# Jetson TX2 NX can't get work the camera on custom carrier board

Hi, we have the jetson TX2 NX connected to our custom carrier board, the same is able to use to 4 cameras using the PCA9548 I2C multiplexer. the problem is that we can’t setup the device tree to get work the cameras. We used as reference the common/kernel-dts/t18x-common-modules/tegra186-camera-e3322-a00.dtsi and tegra186-quill-camera-e3322-a00.dtsi, also, we know that when we use this PCA9548, need to add the reference voltage, with the follow:
vcc-supply = xxxx
vana-supply = xxxx
vdig-supply = xxxx
dovdd-supply = xxxx
i’ve tried to add any regulator reference, and the dtb compiles, also recognize the cameras, but i can’t open the video
the other thing is that when i add the regulator reference like <\$p3509_vdd_sys_en>, the HDMI monitors shows the NVIDIA logo, and after a few seconds show white scren, but still get connection through SSH or VNC. we found the following error in the dmsg:

arm-smmu 12000000.iommu: Unhandled context fault: iova=0x966a6f00, fsynr=0x160001, cb=13, sid=9(0x9 - NVDISPLAY), pgd=0, pud=0, pmd=0, pte=0

but, when i used the regulator reference <\$vdd_3v3>, the HDMI work well and show normal image, still i can’t get work the cameras

In the other hand, i’ve tried our custom carrier board with the jetson nano NX, and the four cameras works well, using the following regulator reference:

vcc-supply = <&p3668_spmic_ldo0>;
vana-supply = <&p3668_spmic_ldo0>;
vif-supply = <&p3668_spmic_ldo0>;

any suggestion?

I think you need to confirm the needed power for the PCA9548 on TX2 NX power rail.
Also you can try the i2cdetect to check if can detect the PCA9548 and camera sensors and check the kernel message for the sensor driver probe.

Well. the result of the `i2cdetect -l`:

``````i2c-35  i2c             i2c-2-mux (chan_id 5)                   I2C adapter
i2c-33  i2c             i2c-2-mux (chan_id 3)                   I2C adapter
i2c-31  i2c             i2c-2-mux (chan_id 1)                   I2C adapter
i2c-36  i2c             i2c-2-mux (chan_id 6)                   I2C adapter
i2c-34  i2c             i2c-2-mux (chan_id 4)                   I2C adapter
i2c-32  i2c             i2c-2-mux (chan_id 2)                   I2C adapter
i2c-30  i2c             i2c-2-mux (chan_id 0)                   I2C adapter
i2c-37  i2c             i2c-2-mux (chan_id 7)                   I2C adapter
``````

i know the cameras are connected in i2c-30 and i2c-32, so i check the camera recognition with `i2cdetect -r -y 30`

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

i know that the pca9548 uses the 0x70 and the imx219 camera uses the 0x10 address

also, if i did the `dmesg | grep imx`, i get the following

``````[   15.352008] imx219 30-0010: tegracam sensor driver:imx219_v2.0.6
[   15.383320] imx219 32-0010: tegracam sensor driver:imx219_v2.0.6
[   17.286092] tegra-vi4 15700000.vi: subdev imx219 30-0010 bound
[   17.305012] tegra-vi4 15700000.vi: subdev imx219 32-0010 bound
``````

Test we did
In the other hand, one of the test we did is set manually the port in the pca9548 to detect the camera, doing the follow:

1. Use the default dtb of the tx2 nx
2. Find where is connected the pca9548, searching the address 0x70 with `i2cdetect -r -y 9`
``````     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
``````
1. I found in the datasheet of the pca9548 that if i write 0x01, the i2c port will be redirected to the chanel where is the camera connected, i used the command `I2cset -y 6 0x70 0x01`
2. `sudo reboot`

After the reboot, if i did the `ls /dev/`,i can found the video0, as expected.

Now i can see the video using the following command:
gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! ‘video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12’ ! nvvidconv flip-method=0 ! ‘video/x-raw,width=960, height=616’ ! nvvidconv ! nvegltransform ! nveglglessink -e

with this, we know that all the hardware connections are good, and don’t should be problem of power.

Well done, looks like everything done well.

Hi Shane, at hardware level everything because if we remove the TCA9548 from the DTS, and we use the standard configuration for the cameras using IMX219, we can select using i2cset the i2c address for the cameras that we want and it’s works correctly (individually). But not together (because the tca9548 is disable.

Then you said: the problem is the TX2 NX power rail.
We tried many configurations to put:

vcc-supply = xxxx
vana-supply = xxxx
vdig-supply = xxxx
dovdd-supply = xxxx

And no one works.

Sorry, clean your whole story here.
If your problem is having problem to detect TCA9548 you may need to check your HW to enable correct power rail.