Hello everyone,
I have two IMX678s connected to my Xavier NX. I have configured the dtsi as follows:
#define CAM0_PWDN TEGRA194_MAIN_GPIO(Q, 5)
#define CAM1_PWDN TEGRA194_MAIN_GPIO(Q, 3)
/ {
i2c@3160000 {
imx678_a@1a {
clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_EXTPERIPH2>;
clock-names = "extperiph1", "extperiph2", "pllp_grtba";
mclk = "extperiph1", "extperiph2";
clock-frequency = <37125000>;
reset-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
};
imx678_c@10 {
clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_EXTPERIPH2>;
clock-names = "extperiph1", "extperiph2", "pllp_grtba";
mclk = "extperiph1", "extperiph2";
clock-frequency = <37125000>;
reset-gpios = <&tegra_main_gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
};
};
gpio@2200000 {
camera-control-output-low {
gpio-hog;
output-low;
gpios = <CAM0_PWDN 0 CAM1_PWDN 0>;
label = "cam0-pwdn","cam1-pwdn";
};
};
pinmux@2430000 {
exp-header-pinmux {
phandle = <0x185>;
linux,phandle = <0x185>;
hdr40-pin32 {
nvidia,lpdr = <0x00>;
nvidia,io-high-voltage = <0x00>;
nvidia,enable-input = <0x00>;
nvidia,tristate = <0x00>;
nvidia,pull = <0x00>;
nvidia,function = "gp";
nvidia,pins = "soc_gpio44_pr0";
};
};
};
__symbols__ {
jetson_io_pinmux = "/pinmux@2430000/exp-header-pinmux\0";
};
};
However, I get these errors once I try to get stream from both:
[ 14.251813] imx678 0-001a: probing v4l2 sensor
[ 14.254510] imx678 0-001a: tegracam sensor driver:imx678_v2.0.6
[ 14.257974] imx678_fuse_id_setup fuse id0 0, fuse id1 0
[ 14.258729] tegra194-vi5 15c10000.vi: subdev imx678 0-001a bound
[ 14.267313] imx678 0-001a: Detected IMX678 sensor
[ 14.267427] imx678 0-0010: probing v4l2 sensor
[ 14.268085] imx678 0-0010: tegracam sensor driver:imx678_v2.0.6
[ 14.276376] imx678_fuse_id_setup fuse id0 0, fuse id1 0
[ 14.276747] tegra194-vi5 15c10000.vi: subdev imx678 0-0010 bound
[ 14.279470] imx678 0-0010: Detected IMX678 sensor
[ 112.709961] imx678_set_frame_rate val = 25
[ 112.709989] imx678_set_frame_rate VMAX = 2250
[ 112.710496] imx678_set_coarse_time val = 6750
[ 112.710501] imx678_set_coarse_time reg_shr0 = 1871
[ 112.710961] imx678_set_gain gain = 13 val = 48
[ 112.751896] imx678_set_frame_rate val = 10
[ 112.751902] imx678_set_frame_rate VMAX = 5625
[ 112.752347] imx678_set_coarse_time val = 6750
[ 112.752350] imx678_set_coarse_time reg_shr0 = 5246
[ 112.752820] imx678_set_gain gain = 0 val = 0
[ 112.753919] imx678_set_gain gain = 13 val = 48
[ 113.361072] imx678_set_coarse_time val = 1099
[ 113.361132] imx678_set_coarse_time reg_shr0 = 5564
[ 113.461532] imx678_set_gain gain = 80 val = 240
[ 114.061902] imx678_set_gain gain = 40 val = 129
[ 114.236315] imx678 0-0010: imx678_write_reg: i2c write failed, 0x3034 = 1
[ 114.249649] imx678 0-0010: imx678_write_reg: i2c write failed, 0x3034 = 1
[ 114.253085] imx678_set_mode, mode = 0
[ 114.254530] imx678 0-0010: Error writing mode
[ 114.255819] imx678 0-0010: imx678_write_reg: i2c write failed, 0x3034 = 1
[ 114.261080] imx678_set_mode, mode = 0
[ 114.261693] imx678 0-0010: Error writing mode
[ 114.302635] imx678 0-0010: imx678_write_reg: i2c write failed, 0x3034 = 1
[ 114.307060] imx678_set_mode, mode = 0
[ 114.307443] imx678 0-0010: Error writing mode
[ 114.308021] imx678 0-0010: imx678_write_reg: i2c write failed, 0x3034 = 1
[ 114.310777] imx678_set_mode, mode = 0
[ 114.311254] imx678 0-0010: Error writing mode
[ 115.789385] imx678_set_mode, mode = 0
[ 115.789804] imx678 0-0010: Error writing mode
[ 115.790445] imx678 0-0010: imx678_write_reg: i2c write failed, 0x3034 = 1
[ 115.791175] imx678_set_mode, mode = 0
[ 115.791539] imx678 0-0010: Error writing mode
[ 115.832118] imx678 0-0010: imx678_write_reg: i2c write failed, 0x3034 = 1
[ 115.835352] imx678_set_mode, mode = 0
[ 115.835750] imx678 0-0010: Error writing mode
As you can see, they are both probed and I can even get visuals from CAM0. However I can’t get any stream from CAM1 (CAM0 is 0-001c and CAM1 is 0-0010).
As a side note, when I try to use gst-launch separately, the second camera always fails to stream. So I don’t believe the issue is particularly with CAM1. If I start from CAM0 then CAM1, CAM1 fails. If I start from CAM1 then CAM0, CAM0 fails.
I would appreciate any help, thank you for your time.