Hi all,
Iβm looking for some help with modifying my device tree to get an IMX219 working on my custom carrier board (Antmicro open source baseboard).
On the carrier , the Camera I2C lines are behind an I2C mux (TCA9548, as pointed out in this github issue). The authors made a patch to add their own camera to the device tree, and I want to do the same but with an imx219.
I have decompiled the existing tegra210-p3448-0002-p3449-0000-b00.dtb
into a dts
, and added the following i2c node:
i2c@3180000 {
avt_pca9548: avt_pca9548@70 {
compatible = "nxp,pca9548";
status = "okay";
reg = <0x70>;
#address-cells = <1>;
#size-cells = <0>;
// vcc-supply = <&battery_reg>;
force_bus_start = <0>;
i2c@2 {
reg = <2>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
rbpcv2_imx219 {
compatible = "nvidia,imx219";
reg = <0x10>;
devnode = "video0";
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx219";
use_sensor_mode_id = "true";
status = "okay";
reset-gpios = <0x5b 0x97 0x00>;
// linux,phandle = <0xcb>;
// phandle = <0xcb>;
mode0 {... };
// More modes added after this point
ports {
#address-cells = <0x01>;
#size-cells = <0x00>;
port@0 {
reg = <0x00>;
endpoint {
port-index = <0x00>;
bus-width = <0x02>;
remote-endpoint = <0x78>;
// linux,phandle = <0x79>;
// phandle = <0x79>;
};
};
};
};
};
i2c@3 {
reg = <3>;
i2c-mux,deselect-on-exit;
#address-cells = <1>;
#size-cells = <0>;
rbpcv2_imx219 {
compatible = "nvidia,imx219";
reg = <0x10>;
devnode = "video1";
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx219";
use_sensor_mode_id = "true";
status = "disabled";
reset-gpios = <0x5b 0x97 0x00>;
linux,phandle = <0xcb>;
phandle = <0xcb>;
mode0 { ... };
// More modes after this point
ports {
#address-cells = <0x01>;
#size-cells = <0x00>;
port@0 {
reg = <0x00>;
endpoint {
port-index = <0x00>;
bus-width = <0x02>;
remote-endpoint = <0x78>;
linux,phandle = <0x79>;
phandle = <0x79>;
};
};
};
};
};
};
};
This *.dts is a messy mashup of the original tegra210-p3448-0002-p3449-0000-b00.dtb
and the patch from this github.
Needless to say - it doesnβt work, so Iβm left with the following questions:
- There is a /proc/device-tree/i2c@3180000, so the *.dtb was definitely flashed, but how do I actually debug the i2c@3180000 address? It looks like this:
tree -L 4 i2c@3180000
i2c@3180000
βββ avt_pca9548@70
β βββ #address-cells
β βββ compatible
β βββ force_bus_start
β βββ i2c@2
β β βββ #address-cells
β β βββ i2c-mux,deselect-on-exit
β β βββ name
β β βββ rbpcv2_imx219
β β β βββ compatible
β β β βββ devnode
β β β βββ mode0
β β β βββ mode1
β β β βββ mode2
β β β βββ mode3
β β β βββ mode4
β β β βββ mode5
β β β βββ name
β β β βββ physical_h
β β β βββ physical_w
β β β βββ ports
β β β βββ reg
β β β βββ reset-gpios
β β β βββ sensor_model
β β β βββ status
β β β βββ use_sensor_mode_id
β β βββ reg
β β βββ #size-cells
β βββ i2c@3
β β βββ #address-cells
β β βββ i2c-mux,deselect-on-exit
β β βββ name
β β βββ rbpcv2_imx219
β β β βββ compatible
β β β βββ devnode
β β β βββ linux,phandle
β β β βββ mode0
β β β βββ mode1
β β β βββ mode2
β β β βββ mode3
β β β βββ mode4
β β β βββ mode5
β β β βββ name
β β β βββ phandle
β β β βββ physical_h
β β β βββ physical_w
β β β βββ ports
β β β βββ reg
β β β βββ reset-gpios
β β β βββ sensor_model
β β β βββ status
β β β βββ use_sensor_mode_id
β β βββ reg
β β βββ #size-cells
β βββ name
β βββ reg
β βββ #size-cells
β βββ status
βββ name
-
i2cdetect -l
shows this:
i2cdetect -l
i2c-3 i2c 7000c700.i2c I2C adapter
i2c-1 i2c 7000c400.i2c I2C adapter
i2c-6 i2c Tegra I2C adapter I2C adapter
i2c-4 i2c 7000d000.i2c I2C adapter
i2c-2 i2c 7000c500.i2c I2C adapter
i2c-0 i2c 7000c000.i2c I2C adapter
i2c-5 i2c 7000d100.i2c I2C adapter
does this mean that the I2C mux is not being detected at all?
- Does anyone have experience with a device tree with the TCA9548 mux for the jetson Nano? I would love to be able to copy someones *.dts (or use it as a guide for my own)