Hello, everyone.
Separate discussion thread from here.
https://forums.developer.nvidia.com/t/why-is-the-imx477-camera-image-not-being-captured-via-fpd-link-ds90ub95x-fpd-link-via-virtual-channels/299147/4
Initial data:
Linux build R32.7.4
Driver GitHub - InES-HPMM/FPD-LinkIII_ds90ub95x: FDP Link III driver for ds90ub954/ds90ub953
The ds90ub954 deserializer is connected to MIPI-2 2 lines are used.
Two serializers ds90ub953 with imx477 cameras are connected to ds90ub954.
I can capture the image from each camera separately.
If I start capturing from two cameras at the same time, everything crashes.
For example start the first camera:
gst-launch-1.0 --verbose nvarguscamerasrc sensor-id=0 wbmode=1 aelock=true awblock=true ! nvvidconv ! videoconvert ! queue ! xvimagesink sync=false
Everything works and I can see the image.
Then let’s run the second camera capture.
gst-launch-1.0 --verbose nvarguscamerasrc sensor-id=1 wbmode=1 aelock=true awblock=true ! nvvidconv ! videoconvert ! queue ! xvimagesink sync=false
After that, image capture from the first camera stops working and the second camera does not turn on.
Below is the trace
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace
csi-log.txt (18.4 MB)
Output of dmesg
dmesg.txt (139.1 KB)
DTS:
#include <dt-bindings/media/camera.h>
//#include <dt-bindings/platform/t210/t210.h>
#include <dt-bindings/gpio/gpio.h>
#define CAM1_PWDN TEGRA194_MAIN_GPIO(S,7)
#define CAM2_PWDN TEGRA194_MAIN_GPIO(T,0)
#define CAM3_PWDN TEGRA194_MAIN_GPIO(T,5)
#define CAM4_PWDN TEGRA194_MAIN_GPIO(T,6)
#define CAMERA_I2C_MUX_BUS(x) (0x1E + x)
/ {
//host1x {
gpio@6000d000 {
camera-control-output-low {
gpio-hog;
output-low;
// gpios = <CAM1_PWDN 0 CAM2_PWDN 0>;
gpios = < TEGRA194_MAIN_GPIO(S,7) 0 TEGRA194_MAIN_GPIO(T,0) 0>;
label = "cam1-pwdn", "cam2-pwdn";
};
};
host1x {
vi@15c10000 {
status = "okay";
num-channels = <2>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0{
status = "okay";
reg = <0>;
ds_imx477_vi_vc0_in0: endpoint {
status = "okay";
// IMX477
vc-id = <0>;
port-index = <2>; // MIPI0 -> CSI-A-B
bus-width = <2>; // Use CSI-A and CSI-B
remote-endpoint = <&ds_imx477_csi_vc0_out0>;
};
};
port@1{
status = "okay";
reg = <1>;
ds_imx477_vi_vc1_in0: endpoint {
status = "okay";
// IMX477
vc-id = <1>;
port-index = <2>; // MIPI0 -> CSI-A-B
bus-width = <2>; // Use CSI-A and CSI-B
remote-endpoint = <&ds_imx477_csi_vc1_out0>;
};
};
};//end ports
};//end vi
nvcsi@15a00000{
status = "okay";
num-channels = <2>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
status = "okay";
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0>;
ds_imx477_i2c_csi_vc0_in0: endpoint@0 {
status = "okay";
// vc-id = <0>;
port-index = <2>; // MIPI4 -> CSI-C
bus-width = <2>; // Use CSI-C and CSI-D
remote-endpoint = <&imx477_i2c_vc0_out0>;
};
};
port@1 {
status = "okay";
reg = <1>;
ds_imx477_csi_vc0_out0: endpoint@1 {
status = "okay";
remote-endpoint = <&ds_imx477_vi_vc0_in0>;
};
};
};
};//end chanel@0
channel@1 {
status = "okay";
reg = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
status = "okay";
reg = <0>;
ds_imx477_i2c_csi_vc1_in0: endpoint@0 {
status = "okay";
port-index = <2>; // MIPI4 -> CSI-C
// vc-id = <1>;
bus-width = <2>; // Use CSI-C and CSI-D
remote-endpoint = <&imx477_i2c_vc1_out0>;
};
};
port@1 {
status = "okay";
reg = <1>;
ds_imx477_csi_vc1_out0: endpoint@1 {
status = "okay";
remote-endpoint = <&ds_imx477_vi_vc1_in0>;
};
};
};
};//end chanel@0
};//end nvcsi
};//end host1x
i2c@3160000 {
fpdlink: ds90ub954@30 {
status = "okay";
compatible = "ti,ds90ub954";
reg = <0x30>;
csi-lane-count = <0x02>;
csi-lane-speed = <1600>;
continuous-clock;
//test-pattern;
//pdb-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(E, 0) 0>;
//pass-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(S, 7) 0>;
//lock-gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(T, 0) 0>;
i2c_address_s0: num-alias-pairs0 {list-cells = <1>;};
i2c_address_s1: num-alias-pairs1 {list-cells = <1>;};
serializers {
status = "okay";
num-channels = <0x02>;
#address-cells = <1>;
#size-cells = <0>;
serializer@0 {
status = "okay";
rx-channel=<0>;
i2c-address=<0x18>;
csi-lane-count = <2>;
continuous-clock;
//i2c-pass-through-all;
virtual-channel-map = <0x0>;
// virtual-channel-map = <0x4>;
// test-pattern;
gpio0-output-enable = <1>;
gpio0-control = <0x9>;
i2c-slave = <&i2c_address_s0 0x1a>;// 0x11>;
slave-alias = <&i2c_address_s0 0x10>;// 0x21>;
};
serializer@1 {
status = "okay";
rx-channel=<1>;
i2c-address=<0x19>;
csi-lane-count = <2>;
continuous-clock;
//i2c-pass-through-all;
// virtual-channel-map = <0x55>;
virtual-channel-map = <0x4>;
// test-pattern;
gpio0-output-enable = <1>;
gpio0-control = <0x9>;
i2c-slave = <&i2c_address_s1 0x1a>;// 0x11>;
slave-alias = <&i2c_address_s1 0x1c>;// 0x21>;
};
};
};
imx477_a@10 {
status = "okay";
compatible = "ridgerun,imx477";
// compatible = "nvidia,imx477";
// I2C device address
reg = <0x10>;
// V4L2 device node location
devnode = "video0";
// Physical dimensions of sensor
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx477";
use_sensor_mode_id = "true";
reset-gpios = <&tegra_main_gpio CAM4_PWDN GPIO_ACTIVE_HIGH>;
/* clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
clock-names = "clk_out_3";
clock-frequency = <24000000>;
mclk = "clk_out_3";
*/
clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_PLLP_OUT0>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
clock-frequency = <24000000>;
// clock-names = "cam_mclk1";
//mclk = "cam_mclk1";
mode0 { /* IMX477_MODE_3264x2464_21FPS */
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_c";//"serial_c";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "10";
csi_pixel_bit_depth = "10";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "4056";
active_h = "3040";
pixel_t = "bayer_rggb";
readout_orientation = "90";
line_length = "13048";
set_mode_delay_ms = "1000";
mclk_multiplier = "80";
//pix_clk_hz = "775960320";
pix_clk_hz = "320000000";
//serdes_pix_clk_hz = "1600000000";
serdes_pix_clk_hz = "640000000";
inherent_gain = "1";
vc-id = "0";
gain_factor = "10";
min_gain_val = "10"; /* 1.00x */
max_gain_val = "3510"; /* 10.66x */
step_gain_val = "1";
default_gain = "10"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "1500000"; /* 1.5 fps */
max_framerate = "15000000"; /* 15 fps */
step_framerate = "1";
default_framerate = "15000000"; /* 15.0 fps */
exposure_factor = "1000000";
min_exp_time = "16"; /* us */
max_exp_time = "710227"; /* us */
step_exp_time = "1";
default_exp_time = "710227"; /* us */
// embedded_metadata_height = "0";
embedded_metadata_height = "2";
};
mode1 { /* IMX477_MODE_1920X1080 */
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_c";//"serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "10";
csi_pixel_bit_depth = "10";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "1920";
active_h = "1080";
pixel_t = "bayer_rggb";
readout_orientation = "90";
line_length = "9024";
set_mode_delay_ms = "1000";
mclk_multiplier = "80";
//pix_clk_hz = "775960320";
pix_clk_hz = "320000000";
//serdes_pix_clk_hz = "1600000000";
serdes_pix_clk_hz = "640000000";
inherent_gain = "1";
vc-id = "0";
gain_factor = "10";
min_gain_val = "10"; /* 1.00x */
max_gain_val = "3510"; /* 17x */
step_gain_val = "1";
default_gain = "10"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "3000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60.0 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60.0 fps */
exposure_factor = "1000000";
min_exp_time = "6"; /* us */
max_exp_time = "16667"; /* us */
step_exp_time = "1";
default_exp_time = "16667"; /* us */
embedded_metadata_height = "2";
// embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx477_i2c_vc0_out0: endpoint {
vc-id = <0>;
port-index = <2>;
bus-width = <2>;
remote-endpoint = <&ds_imx477_i2c_csi_vc0_in0>;
};
};
};
};
imx477_b@1c {
status = "okay";
compatible = "ridgerun,imx477";
// compatible = "nvidia,imx477";
// I2C device address
reg = <0x1c>;
// V4L2 device node location
devnode = "video1";
// Physical dimensions of sensor
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx477";
use_sensor_mode_id = "true";
reset-gpios = <&tegra_main_gpio CAM3_PWDN GPIO_ACTIVE_HIGH>;
/* clocks = <&tegra_car TEGRA210_CLK_CLK_OUT_3>;
clock-names = "clk_out_3";
clock-frequency = <24000000>;
mclk = "clk_out_3";
*/
clocks = <&bpmp_clks TEGRA194_CLK_EXTPERIPH1>,
<&bpmp_clks TEGRA194_CLK_PLLP_OUT0>;
clock-names = "extperiph1", "pllp_grtba";
mclk = "extperiph1";
clock-frequency = <24000000>;
// clock-names = "cam_mclk1";
//mclk = "cam_mclk1";
mode0 { /* IMX477_MODE_3264x2464_21FPS */
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_c";//"serial_c";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "10";
csi_pixel_bit_depth = "10";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "4056";
active_h = "3040";
pixel_t = "bayer_rggb";
readout_orientation = "90";
line_length = "13048";
set_mode_delay_ms = "1000";
mclk_multiplier = "80";
//pix_clk_hz = "775960320";
pix_clk_hz = "320000000";
//serdes_pix_clk_hz = "1600000000";
serdes_pix_clk_hz = "640000000";
inherent_gain = "1";
vc-id = "1";
gain_factor = "10";
min_gain_val = "10"; /* 1.00x */
max_gain_val = "3510"; /* 10.66x */
step_gain_val = "1";
default_gain = "10"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "1500000"; /* 1.5 fps */
max_framerate = "15000000"; /* 15 fps */
step_framerate = "1";
default_framerate = "15000000"; /* 15.0 fps */
exposure_factor = "1000000";
min_exp_time = "16"; /* us */
max_exp_time = "710227"; /* us */
step_exp_time = "1";
default_exp_time = "710227"; /* us */
embedded_metadata_height = "2";
// embedded_metadata_height = "0";
};
mode1 { /* IMX477_MODE_1920X1080 */
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_c";//"serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "10";
csi_pixel_bit_depth = "10";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "1920";
active_h = "1080";
pixel_t = "bayer_rggb";
readout_orientation = "90";
line_length = "9024";
set_mode_delay_ms = "1000";
mclk_multiplier = "80";
//pix_clk_hz = "775960320";
pix_clk_hz = "320000000";
//serdes_pix_clk_hz = "1600000000";
serdes_pix_clk_hz = "640000000";
inherent_gain = "1";
vc-id = "1";
gain_factor = "10";
min_gain_val = "10"; /* 1.00x */
max_gain_val = "3510"; /* 17x */
step_gain_val = "1";
default_gain = "10"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
framerate_factor = "1000000";
min_framerate = "3000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60.0 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60.0 fps */
exposure_factor = "1000000";
min_exp_time = "6"; /* us */
max_exp_time = "16667"; /* us */
step_exp_time = "1";
default_exp_time = "16667"; /* us */
embedded_metadata_height = "2";
// embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx477_i2c_vc1_out0: endpoint {
vc-id = <1>;
port-index = <2>;
bus-width = <2>;
remote-endpoint = <&ds_imx477_i2c_csi_vc1_in0>;
};
};
};
};
// };
};
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <2>; // Changed 2 -> 4
max_lane_speed = <4000000>;//<4500000>;//<1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <240000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
/*
* The general guideline for naming badge_info contains 3 parts, and is as follows,
* The first part is the camera_board_id for the module; if the module is in a FFD
* platform, then use the platform name for this part.
* The second part contains the position of the module, ex. rear or front.
* The third part contains the last 6 characters of a part number which is found
* in the module's specsheet from the vender.
*/
modules {
module0 {
// status = "okay";
// badge = "porg_bottomleft_RBPCV2";
// position = "bottomleft";
// orientation = "1";
badge = "imx477_rear";
position = "rear";
orientation = "1";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "imx477 0-0010";
proc-device-tree = "/proc/device-tree/i2c@3160000/imx477_a@10";
};
};
module1 {
// status = "okay";
// badge = "porg_bottomright_RBPCV2";
// position = "bottomrear";
// orientation = "1";
badge = "imx477_front";
position = "front";
orientation = "1";
drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "imx477 0-001c";
proc-device-tree = "/proc/device-tree/i2c@3160000/imx477_b@1c";
};
};
};
};
};
I’m asking for help.