Use i2c mux on custom carrier board

Good morning,
we made a custom carrier board fod Jetson Orin NX and Nano, fully compatible with dev-kit carrier board, except than we have a tca9548 i2c mux since we need to connect 4 cameras.
In order to enable the mux, I tried to create a simple overlay dtb with the following content

/dts-v1/;
/plugin/;

#include <dt-bindings/tegra234-p3767-0000-common.h>
#include <dt-bindings/clock/tegra234-clock.h>
#include <dt-bindings/gpio/tegra234-gpio.h>

#define CAMERA_I2C_MUX_BUS(x) (0x1E + x)

/ {
	overlay-name = "Analyzer 4*2-lane";
	jetson-header-name = "Jetson 24pin CSI Connector";
	compatible = JETSON_COMPATIBLE_P3768;

	fragment-camera@0 {
		target-path = "/";
		__overlay__ {

	bus@0 {
		

		i2c@3180000 {
			tca9548_70: tca9548@70 {
				status = "okay";
				compatible = "nxp,pca9548";
				reg = <0x70>;
				#address-cells = <1>;
				#size-cells = <0>;
				skip_mux_detect;
				#vcc-supply = <&p3737_vdd_1v8_sys>;
				#vcc-pullup-supply = <&battery_reg>;
				force_bus_start = <CAMERA_I2C_MUX_BUS(0)>;

			};
		};

	};

		}; //__overlay__ ends
	}; //fragment-camera@0 ends
};

Next, I enabled the overlay using jetson-io utility. Since the module for mux component is defined in i2c-mux-pca954x.c source file, i edited the file adding a trace message at the beginning of probe funtion and I rebuild the kernel image. So i have a boot option as follow:

LABEL JetsonIO
        MENU LABEL Custom Header Config: <Analyzer 4*2-lane>
        LINUX /boot/ImageMux
        FDT /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb
        INITRD /boot/initrd
        APPEND ${cbootargs} root=PARTUUID=dec382ef-f53d-46b6-96e2-54e202db10ae rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config
        OVERLAYS /boot/tegra234-p3767-camera-p3768-analyzer-4cam.dtbo

where ImageMux is the image rebuilded with trace in mux module probe and tegra234-p3767-camera-p3768-analyzer-4cam.dtbo has the content above

If I run the boot option I can’t see any of the trace within i2c mux driver and no tca9548 device are created in device-tree

another issue is that if I replace kernel_tegra234-p3768-0000+p3767-0005-nv.dtb with an edited version no changes are applied. Is the FDT option used in extlinux.conf?

Any suggestion?

Regards

hello liviolima80,

you may see-also Topic 192486 for more details of Cam I2C MUX.
please note that, you can specify FDT alone. you can specify FDT + OVERLAYS. but.. you cannot do only OVERLAYS though.
overlays from Rootfs are processed only if DTB is coming from Rootfs. when FDT entry is not present in extlinux.conf UEFI DTB is used.