Is it possible to enable IMX390+GMSL on TX2-NX?

Hi,
I am using R32.6.1,is it possible to enable IMX390+GMSL on TX2-NX? I tried to add the dts based on tegra186-quill-camera-imx390-a00.dtsi and tegra186-camera-imx390-a00.dtsi(using pca954x), but it failed. Then I tried to modify the dts based on tegra186-camera-lanai-rbpcv2-imx219.dtsi(using cam_i2cmux), it also failed.

dmesg of dts based on tegra186-quill-camera-imx390-a00.dtsi(using nxp,pc954x)

[    1.370779] pca954x 2-0070: vcc-pullup regulator not found
[    1.370791] pca954x 2-0070: pca954x_probe: forcing device bus number, start 30.
[    1.370794] pca954x 2-0070: device detect skipped.
[    1.371236] i2c i2c-30: Failed to register i2c client max9295 at 0x40 (-16)
[    1.378220] i2c i2c-30: of_i2c: Failure registering /i2c@3180000/tca9546@70/i2c@0/max9295_a@40
[    1.386846] i2c i2c-30: Failed to create I2C device for /i2c@3180000/tca9546@70/i2c@0/max9295_a@40
[    1.386938] i2c i2c-2: Added multiplexed i2c bus 30
[    1.387101] i2c i2c-2: Added multiplexed i2c bus 31
[    1.387307] i2c i2c-2: Added multiplexed i2c bus 32
[    1.387519] i2c i2c-2: Added multiplexed i2c bus 33
[    1.387524] pca954x 2-0070: registered 4 multiplexed busses for I2C switch pca9546
[    1.388243] max9295 30-0062: [MAX9295]: probing GMSL Serializer
[    1.388284] max9295 30-0062: max9295_probe:  success
[    1.388305] max9295 30-0060: [MAX9295]: probing GMSL Serializer
[    1.388330] max9295 30-0060: max9295_probe:  success
[    1.388421] max9296 30-0048: [MAX9296]: probing GMSL Deserializer
[    1.388586] max9296 30-0048: max9296_probe:  success
[    1.388685] imx390 30-001b: probing v4l2 sensor.
[    1.388983] imx390 30-001b: tegracam sensor driver:imx390_v2.0.6
[    1.389006] imx390 30-001b: missing serializer dev handle
[    1.394427] imx390 30-001b: board setup failed
[    1.398881] (NULL device *): max9295_sdev_pair: invalid input params
[    1.405247] imx390 30-001b: gmsl ser pairing failed
[    1.410181] imx390: probe of 30-001b failed with error -22
[    1.410209] imx390 30-001c: probing v4l2 sensor.
[    1.410326] imx390 30-001c: couldn't create debugfs
[    1.415218] imx390 30-001c: tegracam sensor driver:imx390_v2.0.6
[    1.442349] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.442487] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.442535] max9296 30-0048: max9296_write_reg:i2c write failed, 0x10 = 2
[    1.449546] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.449668] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.449709] max9296 30-0048: max9296_write_reg:i2c write failed, 0x10 = 22
[    1.558131] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[    1.562219] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.562334] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.562369] max9295 30-0062: max9295_write_reg:i2c write failed, 0x0 = c0
[    1.569377] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.569498] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.569538] max9295 30-0060: max9295_write_reg:i2c write failed, 0x10 = 22
[    1.576541] max9295 30-0060: max9295_setup_control: ERROR: ser device not found
[    1.583881] imx390 30-001c: gmsl serializer setup failed
[    1.589385] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.589508] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.589598] max9296 30-0048: max9296_write_reg:i2c write failed, 0x332 = f0
[    1.596785] imx390 30-001c: imx390_probe gmsl serdes setup failed
[    1.602986] imx390: probe of 30-001c failed with error -121
[    1.603728] max77620-power max77620-power: Event recorder REG_NVERC : 0x0

dmesg of DTS modified based on tegra186-camera-lanai-rbpcv2-imx219.dtsi(using cam_i2cmux)

[    1.358073] i2c /dev entries driver
[    1.359825] i2c i2c-9: Failed to register i2c client max9295 at 0x40 (-16)
[    1.366811] i2c i2c-9: of_i2c: Failure registering /cam_i2cmux/i2c@0/max9295_a@40
[    1.374307] i2c i2c-9: Failed to create I2C device for /cam_i2cmux/i2c@0/max9295_a@40
[    1.374400] i2c i2c-2: Added multiplexed i2c bus 9
[    1.374405] i2c-mux-gpio cam_i2cmux: 1 port mux on 3180000.i2c adapter
[    1.374959] max9295 9-0062: [MAX9295]: probing GMSL Serializer
[    1.374996] max9295 9-0062: max9295_probe:  success
[    1.375019] max9295 9-0060: [MAX9295]: probing GMSL Serializer
[    1.375046] max9295 9-0060: max9295_probe:  success
[    1.375142] max9296 9-0048: [MAX9296]: probing GMSL Deserializer
[    1.375314] max9296 9-0048: max9296_probe:  success
[    1.375379] imx390 9-001b: probing v4l2 sensor.
[    1.375693] imx390 9-001b: tegracam sensor driver:imx390_v2.0.6
[    1.375764] imx390 9-001b: missing serializer dev handle
[    1.381096] imx390 9-001b: board setup failed
[    1.385460] (NULL device *): max9295_sdev_pair: invalid input params
[    1.391823] imx390 9-001b: gmsl ser pairing failed
[    1.396671] imx390: probe of 9-001b failed with error -22
[    1.396702] imx390 9-001c: probing v4l2 sensor.
[    1.396830] imx390 9-001c: couldn't create debugfs
[    1.401636] imx390 9-001c: tegracam sensor driver:imx390_v2.0.6
[    1.426446] tegra-i2c 3180000.i2c: no acknowledge from address 0x48
[    1.426496] max9296 9-0048: max9296_write_reg:i2c write failed, 0x10 = 2
[    1.433412] tegra-i2c 3180000.i2c: no acknowledge from address 0x48
[    1.433453] max9296 9-0048: max9296_write_reg:i2c write failed, 0x10 = 22
[    1.546292] tegra-i2c 3180000.i2c: no acknowledge from address 0x62
[    1.546334] max9295 9-0062: max9295_write_reg:i2c write failed, 0x0 = c0
[    1.553242] tegra-i2c 3180000.i2c: no acknowledge from address 0x60
[    1.553283] max9295 9-0060: max9295_write_reg:i2c write failed, 0x10 = 22
[    1.558217] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[    1.560220] max9295 9-0060: max9295_setup_control: ERROR: ser device not found
[    1.567446] imx390 9-001c: gmsl serializer setup failed
[    1.572752] tegra-i2c 3180000.i2c: no acknowledge from address 0x48
[    1.572793] max9296 9-0048: max9296_write_reg:i2c write failed, 0x332 = f0
[    1.579832] imx390 9-001c: imx390_probe gmsl serdes setup failed
[    1.585921] imx390: probe of 9-001c failed with error -121
[    1.586592] max77620-power max77620-power: Event recorder REG_NVERC : 0x0
[    1.588118] usb 1-2: New USB device found, idVendor=2109, idProduct=2817
[    1.588124] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0

How to modify the DTS to enable the IMX390+GMSL on TX2-NX?

thinks in advance

hello Jinhao,

virtual channel should also supported with TX2 NX.
as you can see in developer guide, Jetson Virtual Channel with GMSL Camera Framework. it applies to: Jetson AGX Xavier series and Jetson TX2 series.

according to kernel logs…

[    1.442487] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.442535] max9296 30-0048: max9296_write_reg:i2c write failed, 0x10 = 2

there’re communication failures, such as… i2c no acknowledge, and also i2c write failed.
these errors usually caused by incorrect regulator settings, or incorrect i2c bus/address of your device connections.

Hello JerryChang,

I’ve read the doc, and did some experiments.

According to the tegra186-cvb-prod-p2597-b00-p3489-1000-a00-00.dtsi. I manually added gpio_i2c_0_77,en_vdd_cam,en_vdd_cam_1v2 in file sources/hardware/nvidia/platform/t18x/lanai/kernel-dts/common/tegra186-p3636-0001-a00-power-tree.dtsi

{
	i2c@316000 {
		gpio_i2c_0_77: gpio@77 {
			compatible = "ti,tca9539";
			reg = <0x77>;
			gpio-controller;
			#gpio-cells = <2>;
			vcc-supply = <&battery_reg>;
		};
	};

	fixed-regulators {
			...

			/* Refered by IMX390 */
			
			en_vdd_cam: regulator@205 {
				compatible = "regulator-fixed-sync";
				reg = <205>;
				regulator-name = "en-vdd-cam";
				regulator-min-microvolt = <1800000>;
				regulator-max-microvolt = <1800000>;
				gpio = <&gpio_i2c_0_77 9 1>;
				enable-active-high;
			};

			/* Refered by MAX9296 */
			en_vdd_cam_1v2: regulator@12 {
				compatible = "regulator-fixed-sync";
				reg = <12>;
				regulator-name = "en-vdd-cam-1v2";
				regulator-min-microvolt = <1200000>;
				regulator-max-microvolt = <1200000>;
				gpio = <&gpio_i2c_0_77 10 0>;
				enable-active-high;
			};

			
	};
};

With the new dtb file, the device boot log outputs

[    1.407062] pca954x 2-0070: registered 4 multiplexed busses for I2C switch pca9546
[    1.407812] max9295 30-0062: [MAX9295]: probing GMSL Serializer
[    1.407848] max9295 30-0062: max9295_probe:  success
[    1.407870] max9295 30-0060: [MAX9295]: probing GMSL Serializer
[    1.407898] max9295 30-0060: max9295_probe:  success
[    1.407992] max9296 30-0048: [MAX9296]: probing GMSL Deserializer
[    1.408135] max9296 30-0048: vdd_cam_1v2 regulator get failed
[    1.413909] max9296 30-0048: unable to parse dt
[    1.418497] max9296: probe of 30-0048 failed with error -14
[    1.418568] imx390 30-001b: probing v4l2 sensor.
[    1.418878] imx390 30-001b: tegracam sensor driver:imx390_v2.0.6
[    1.418903] imx390 30-001b: missing serializer dev handle
[    1.424318] imx390 30-001b: board setup failed
[    1.428774] (NULL device *): max9295_sdev_pair: invalid input params
[    1.435153] imx390 30-001b: gmsl ser pairing failed
[    1.440081] imx390: probe of 30-001b failed with error -22
[    1.440110] imx390 30-001c: probing v4l2 sensor.
[    1.440231] imx390 30-001c: couldn't create debugfs
[    1.445122] imx390 30-001c: tegracam sensor driver:imx390_v2.0.6
[    1.445154] imx390 30-001c: missing deserializer driver
[    1.450389] imx390 30-001c: board setup failed
[    1.454839] max9295 30-0060: max9295_sdev_pair: invalid input params
[    1.461249] imx390 30-001c: gmsl ser pairing failed
[    1.466333] imx390: probe of 30-001c failed with error -22
[    1.466863] max77620-power max77620-power: Event recorder REG_NVERC : 0x0

i2cdetect -y -r 2

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: UU -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --

When I remove the “gpio = <&gpio_i2c_0_77 10 0>;” from en_vdd_cam_1v2, it seems all drivers probes are success but failed to communicate with devices.

[    0.474249] tegra-i2c 3160000.i2c: no acknowledge from address 0x77
.....
[    1.377858] i2c /dev entries driver
[    1.379122] pca954x 2-0070: vcc-pullup regulator not found
[    1.379132] pca954x 2-0070: pca954x_probe: forcing device bus number, start 30.
[    1.379135] pca954x 2-0070: device detect skipped.
[    1.379634] i2c i2c-30: Failed to register i2c client max9295 at 0x40 (-16)
[    1.386620] i2c i2c-30: of_i2c: Failure registering /i2c@3180000/tca9546@70/i2c@0/max9295_a@40
[    1.395238] i2c i2c-30: Failed to create I2C device for /i2c@3180000/tca9546@70/i2c@0/max9295_a@40
[    1.395332] i2c i2c-2: Added multiplexed i2c bus 30
[    1.395495] i2c i2c-2: Added multiplexed i2c bus 31
[    1.395697] i2c i2c-2: Added multiplexed i2c bus 32
[    1.395897] i2c i2c-2: Added multiplexed i2c bus 33
[    1.395901] pca954x 2-0070: registered 4 multiplexed busses for I2C switch pca9546
[    1.396635] max9295 30-0062: [MAX9295]: probing GMSL Serializer
[    1.396669] max9295 30-0062: max9295_probe:  success
[    1.396689] max9295 30-0060: [MAX9295]: probing GMSL Serializer
[    1.396724] max9295 30-0060: max9295_probe:  success
[    1.396818] max9296 30-0048: [MAX9296]: probing GMSL Deserializer
[    1.396976] max9296 30-0048: max9296_probe:  success
[    1.397072] imx390 30-001b: probing v4l2 sensor.
[    1.397377] imx390 30-001b: tegracam sensor driver:imx390_v2.0.6
[    1.397400] imx390 30-001b: missing serializer dev handle
[    1.402817] imx390 30-001b: board setup failed
[    1.407290] (NULL device *): max9295_sdev_pair: invalid input params
[    1.413649] imx390 30-001b: gmsl ser pairing failed
[    1.418582] imx390: probe of 30-001b failed with error -22
[    1.418611] imx390 30-001c: probing v4l2 sensor.
[    1.418733] imx390 30-001c: couldn't create debugfs
[    1.423630] imx390 30-001c: tegracam sensor driver:imx390_v2.0.6
[    1.450456] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.450591] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.450639] max9296 30-0048: max9296_write_reg:i2c write failed, 0x10 = 2
[    1.457652] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.457775] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.457817] max9296 30-0048: max9296_write_reg:i2c write failed, 0x10 = 22
[    1.566234] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[    1.570320] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.570436] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.570471] max9295 30-0062: max9295_write_reg:i2c write failed, 0x0 = c0
[    1.577480] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.577601] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.577641] max9295 30-0060: max9295_write_reg:i2c write failed, 0x10 = 22
[    1.584646] max9295 30-0060: max9295_setup_control: ERROR: ser device not found
[    1.591985] imx390 30-001c: gmsl serializer setup failed
[    1.597443] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.597614] tegra-i2c 3180000.i2c: no acknowledge from address 0x70
[    1.597704] max9296 30-0048: max9296_write_reg:i2c write failed, 0x332 = f0
[    1.604893] imx390 30-001c: imx390_probe gmsl serdes setup failed
[    1.611095] imx390: probe of 30-001c failed with error -121
[    1.611771] max77620-power max77620-power: Event recorder REG_NVERC : 0x0

i2cdetect -y -r 2

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- 36 -- -- -- -- -- -- -- -- --
40: UU -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: UU -- UU -- -- -- -- -- -- -- -- -- -- -- -- --
70: UU -- -- -- -- -- -- --

is gpio_i2c_0_77 necessary to en_vdd_cam and en_vdd_cam_1v2? How can I fix it? I am using TX2 NX devkit. Only one IMX390 and serializer board are connected to MAX9296 deserializer board.

Thank you in advance.

hello Jinhao,

this should be failure by i2cmux, please check you enable TCA9546.
or… you don’t need i2c bus multiplexer since you’ve only single camera in your system.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.