Hi,
There are two i2c switch on my hardware, I’m wondering that if my dts is correct? Since it’s not working now. Could you please check following structure for us?
i2c@3180000 {
status = “okay”;
#address-cells = <1>;
#size-cells = <0>;
tca9545@73 {
compatible = "nxp,pca9545";
reg = <0x73>;
#address-cells = <1>;
#size-cells = <0>;
skip_mux_detect;
i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
};
i2c@1 {
reg = <1>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
tca9543@72 {
compatible = "nxp,pca9543";
reg = <0x72>;
#address-cells = <1>;
#size-cells = <0>;
skip_mux_detect;
i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
device_a@43 { };
device_b@44 { };
};
i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
device_c@43 { };
device_d@44 { };
};
};
};
};
};
Please make clear for your problem.
Does the driver probe? Checking by “dmesg | grep -i pca954”
Hello Shane,
I checked 954x driver, and I think it probe correctly.
[ 1.750232] i2c i2c-2: Added multiplexed i2c bus 9
[ 1.753979] i2c i2c-10: Added multiplexed i2c bus 11
[ 1.755709] i2c i2c-10: Added multiplexed i2c bus 12
[ 1.756867] i2c i2c-10: Added multiplexed i2c bus 13
[ 1.757110] i2c i2c-10: Added multiplexed i2c bus 14
[ 1.757116] pca954x 10-0072: registered 4 multiplexed busses for I2C switch pca9545
[ 1.757277] i2c i2c-2: Added multiplexed i2c bus 10
[ 1.757358] i2c i2c-2: Added multiplexed i2c bus 15
[ 1.758013] i2c i2c-2: Added multiplexed i2c bus 16
[ 1.758016] pca954x 2-0073: registered 4 multiplexed busses for I2C switch pca9545
But I got following error when “camera_common_initialize”.
[ 14.184727] isx031 11-0043: i2c bus regbase unavailable
[ 14.184730] isx031 11-0043: Could not initialize sensor properties.
Looks like duplicate i2c0
i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
device_a@43 { };
device_b@44 { };
};
i2c@0 {
reg = <0>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
device_c@43 { };
device_d@44 { };
};
Dear Shane,
Actually it’s typo here, my dts is i2c@1. But it’s not working. I solved it by another way :). Thanks.
The error tell the incorrect “reg” in device tree in sensor_common.c
You should check the detail in sensor_common.c for the error.