Using I2C GPIO Expander Pin as CAM_MUX_SEL to Control 2 Cameras

Hello Nvidia,

We have had the pleasure to use your forums to clear a lot of road blocks while adapting and bringing up the jetson nano on our custom carrier board. There is one issue that we have been hitting our head on for a long time, but didn’t find a solution.

So, we are also using 2 camera ports on our custom carrier board. But instead of driving the cam-mux pin through a GPIO on the jetson, like on B01 devkit, we are trying to drive cam-mux from an I2C GPIO Expander (PCA9536) pin. I am having a hard time trying to configure so that jetson knows which pin to use as mux for selecting the cameras. Consequently, we are unable to instantiate both the cameras together (video0 and video1 like on devkit) in a single boot instance.

Please any explanation on how the jetson muxes the cam-mux-gpio pin during bootup, and how to have it use another gpio pin, not on the jetson module, as a mux selector would be highly appreciated.

Thanks in advance!

hello rahulxt9zu,

you may check reference device tree for using TCA9548 as camera i2c mux,
please also check similar discussion thread, Topic 108012 for reference,

Hello JerryChang
Thanks for the reference. I did come across that earlier, and was taking inspiration from that configuration definition. But our circuit is bit different. Let me attach a picture to show how exactly we are using the a new gpio to drive the cam_mux.

The cam-i2c-mux part is the same as on the B01 devkit (TS3USB30), but since we ran out of usable gpio pins on the jetson, we had to use a gpio expander (PCA9536). And I need to link this cam_mux_sel pin to mux-gpio property in the cam-i2cmux node.

hello rahulxt9zu,

it should be doable to link cam_mux_sel pin to mux-gpio property in the cam-i2cmux node,
our developer also recommend other I2C than cam_i2c.

Thanks JerryChang,

  1. I still need to figure out how to modify the device tree to link a custom created cam_mux_sel to mux-gpio property in the cam-i2cmux node.
  2. You mean we should not use cam_i2c to drive cam_mux_sel? Do you also mean that we should not use cam_i2c to drive anything other than the camera. (we have 2 other pins that we are driving using the cam_i2c, that is not recommended either??)

Thanks for your support,

hello rahulxt9zu,

please also refer to kernel documentations as below for routing the i2c signals.
for example,