Probe pca9546 before imx cameras, use plugin manager

Hi,

i’m supporting imx219/imx290 … cameras for nano customized board: two csi-2 ports connected to csi0 csi2, and i2c expanded by pca9546, they looks like:

proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@0/imx219_a@10";

the cams works without plugin manager, but it’s need to flash dtb for different cams, so i want them support plugin manager, and i’ve improved tegra210-porg-plugin-manager.dtsi with all of cams’ configuration.

now i’ve got situations like cameras’ driver probe before the pca9546 finish it’s probe. logs attached below.

how can i make cameras + pca9546 work with pluin-manager?

[    1.219004] i2c /dev entries driver
[    1.220962] pca954x 6-0070: vcc-pullup regulator not found
[    1.220982] pca954x 6-0070: pca954x_probe: forcing device bus number, start 30.
[    1.220986] pca954x 6-0070: device detect skipped.
[    1.221656] i2c i2c-30: Failed to register i2c client imx219 at 0x10 (-16)
[    1.221663] i2c i2c-30: of_i2c: Failure registering /host1x/i2c@546c0000/tca9546@70/i2c@0/imx219_a@10
[    1.221668] i2c i2c-30: Failed to create I2C device for /host1x/i2c@546c0000/tca9546@70/i2c@0/imx219_a@10
[    1.221695] i2c i2c-6: Added multiplexed i2c bus 30
[    1.222200] i2c i2c-31: Failed to register i2c client imx219 at 0x10 (-16)
[    1.222205] i2c i2c-31: of_i2c: Failure registering /host1x/i2c@546c0000/tca9546@70/i2c@1/imx219_e@10
[    1.222209] i2c i2c-31: Failed to create I2C device for /host1x/i2c@546c0000/tca9546@70/i2c@1/imx219_e@10
[    1.222227] i2c i2c-6: Added multiplexed i2c bus 31
[    1.222514] i2c i2c-6: Added multiplexed i2c bus 32
[    1.222800] i2c i2c-6: Added multiplexed i2c bus 33
[    1.222805] pca954x 6-0070: registered 4 multiplexed busses for I2C switch pca9546
[    1.223281] imx179 30-0010: reset-gpios not found
[    1.223285] imx179 30-0010: tegra camera driver registration failed, retry later
[    1.223559] imx179 31-0010: reset-gpios not found
[    1.223563] imx179 31-0010: tegra camera driver registration failed, retry later
[    1.223797] dw9714 30-000c: probing sensor
[    1.224089] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x70
[    1.224322] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x70
[    1.224405] dw9714 30-000c: dw9714_write_table: -121 addr = 0xec, val = 0xa3
[    1.224408] dw9714 30-000c: dw9714_init:error writing table
[    1.224413] dw9714 30-000c: camera_common_focuser_init: error power on
[    1.224417] dw9714 30-000c: unable to initialize focuser
[    1.224421] dw9714 30-000c: dw9714: probing sensor failed!!
[    1.224484] dw9714: probe of 30-000c failed with error -121
[    1.224531] dw9714 31-000c: probing sensor
[    1.224818] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x70
[    1.225038] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x70
[    1.225119] dw9714 31-000c: dw9714_write_table: -121 addr = 0xec, val = 0xa3
[    1.225122] dw9714 31-000c: dw9714_init:error writing table
[    1.225126] dw9714 31-000c: camera_common_focuser_init: error power on
[    1.225129] dw9714 31-000c: unable to initialize focuser
[    1.225131] dw9714 31-000c: dw9714: probing sensor failed!!
[    1.225189] dw9714: probe of 31-000c failed with error -121

Does your camera board have EEPROM design? Without EEPROM design that can’t support plugin-manager.

@ShaneCCC
thanks, i don’t think these cams have EEPROM.