你好,这边在用Orin NX 16G官方套件调试GMSL时遇到点困难。
现在的方案是MAX9296+MAX9295+IMX390,解串板是自制的底板,接口有2CSI、2GMSL
目前用Orin NX的CAM1连接解串板上的CSI0,2个GSML都可以正常打开(video2、video3),但CAM0或CSI1都是无效的。
连接CAM0打开失败的log:failedGMSL0.log (89.5 KB)
连接CAM1打开video2成功的log:openGMSL2.log (88.4 KB)
连接CAM1打开video3成功的log:openGMSL3.log (88.1 KB)
附上部分代码:
i2c@0 {
reg = <0x00>;
#address-cells = <0x01>;
#size-cells = <0x00>;
cam_0@1b {
compatible = "sensing,sgx-yuv-gmsl2-0";
reg = <0x1b>;
def-addr = <0x10>;
devnode = "video0";
physical_w = "15.0";
physical_h = "12.5";
sensor_model = "sgx-yuv-gmsl2";
post_crop_frame_drop = [30 00];
use_decibel_gain = "false";
use_sensor_mode_id = "true";
clocks = <0x02 0x24 0x02 0x24>;
clock-names = "extperiph1\0pllp_grtba";
mclk = "extperiph1";
sensing,gmsl-ser-device = <0x2cd>;
sensing,gmsl-dser-device = <0x2ce>;
mode0 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_c";
vc_id = [30 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1080";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "150000000";
serdes_pix_clk_hz = "300000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
mode1 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_a";
vc_id = [30 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1536";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "200000000";
serdes_pix_clk_hz = "200000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
ports {
#address-cells = <0x01>;
#size-cells = <0x00>;
port@0 {
reg = <0x00>;
endpoint {
vc-id = <0x00>;
port-index = <0x00>;
bus-width = <0x04>;
remote-endpoint = <0x2cf>;
phandle = <0x289>;
};
};
};
gmsl-link {
src-csi-port = [62 00];
dst-csi-port = [61 00];
serdes-csi-link = [61 00];
csi-mode = "1x4";
st-vc = <0x00>;
vc-id = <0x00>;
num-lanes = <0x04>;
streams = "ued-u1\0yuv16";
};
};
cam_1@1c {
compatible = "sensing,sgx-yuv-gmsl2-1";
reg = <0x1c>;
def-addr = <0x10>;
devnode = "video1";
physical_w = "15.0";
physical_h = "12.5";
sensor_model = "sgx-yuv-gmsl2";
post_crop_frame_drop = [30 00];
use_decibel_gain = "false";
use_sensor_mode_id = "true";
clocks = <0x02 0x24 0x02 0x24>;
clock-names = "extperiph1\0pllp_grtba";
mclk = "extperiph1";
sensing,gmsl-ser-device = <0x2d0>;
sensing,gmsl-dser-device = <0x2ce>;
mode0 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_a";
vc_id = [31 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1080";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "150000000";
serdes_pix_clk_hz = "300000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
mode1 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_c";
vc_id = [31 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1536";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "200000000";
serdes_pix_clk_hz = "300000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
ports {
#address-cells = <0x01>;
#size-cells = <0x00>;
port@0 {
reg = <0x00>;
endpoint {
vc-id = <0x01>;
port-index = <0x00>;
bus-width = <0x04>;
remote-endpoint = <0x2d1>;
phandle = <0x28b>;
};
};
};
gmsl-link {
src-csi-port = [62 00];
dst-csi-port = [61 00];
serdes-csi-link = [62 00];
csi-mode = "1x4";
st-vc = <0x00>;
vc-id = <0x01>;
num-lanes = <0x04>;
streams = "ued-u1\0yuv16";
};
};
max9296_0@48 {
compatible = "maxim,max9296_0";
reg = <0x48>;
csi-mode = "2x4";
max-src = <0x02>;
reset-gpios = <0x50 0x3e 0x00>;
phandle = <0x2ce>;
};
max9295_prim_0@40 {
compatible = "maxim,max9295_0";
reg = <0x40>;
is-prim-ser;
phandle = <0x493>;
};
max9295_0@60 {
compatible = "maxim,max9295_0";
reg = <0x60>;
sensing,gmsl-dser-device = <0x2ce>;
phandle = <0x2cd>;
};
max9295_1@62 {
compatible = "maxim,max9295_0";
reg = <0x62>;
sensing,gmsl-dser-device = <0x2ce>;
phandle = <0x2d0>;
};
rbpcv2_imx219_a@10 {
mode0 {
tegra_sinterface = "serial_b";
lane_polarity = [36 00];
};
mode1 {
tegra_sinterface = "serial_b";
lane_polarity = [36 00];
};
mode2 {
tegra_sinterface = "serial_b";
lane_polarity = [36 00];
};
mode3 {
tegra_sinterface = "serial_b";
lane_polarity = [36 00];
};
mode4 {
tegra_sinterface = "serial_b";
lane_polarity = [36 00];
};
ports {
port@0 {
endpoint {
port-index = <0x01>;
};
};
};
};
rbpcv3_imx477_a@1a {
mode0 {
tegra_sinterface = "serial_b";
lane_polarity = [36 00];
};
mode1 {
tegra_sinterface = "serial_b";
lane_polarity = [36 00];
};
ports {
port@0 {
endpoint {
port-index = <0x01>;
};
};
};
};
};
i2c@1 {
reg = <0x01>;
#address-cells = <0x01>;
#size-cells = <0x00>;
cam_2@1b {
compatible = "sensing,sgx-yuv-gmsl2-2";
reg = <0x1b>;
def-addr = <0x10>;
devnode = "video2";
physical_w = "15.0";
physical_h = "12.5";
sensor_model = "sgx-yuv-gmsl2";
post_crop_frame_drop = [30 00];
use_decibel_gain = "false";
use_sensor_mode_id = "true";
clocks = <0x02 0x24 0x02 0x24>;
clock-names = "extperiph1\0pllp_grtba";
mclk = "extperiph1";
sensing,gmsl-ser-device = <0x2d2>;
sensing,gmsl-dser-device = <0x2d3>;
mode0 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_c";
vc_id = [30 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1080";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "150000000";
serdes_pix_clk_hz = "300000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
mode1 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_c";
vc_id = [30 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1536";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "200000000";
serdes_pix_clk_hz = "300000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
ports {
#address-cells = <0x01>;
#size-cells = <0x00>;
port@0 {
reg = <0x00>;
endpoint {
vc-id = <0x00>;
port-index = <0x02>;
bus-width = <0x04>;
remote-endpoint = <0x2d4>;
phandle = <0x28d>;
};
};
};
gmsl-link {
src-csi-port = [62 00];
dst-csi-port = [61 00];
serdes-csi-link = [61 00];
csi-mode = "1x4";
st-vc = <0x00>;
vc-id = <0x00>;
num-lanes = <0x04>;
streams = "ued-u1\0yuv16";
};
};
cam_3@1c {
compatible = "sensing,sgx-yuv-gmsl2-3";
reg = <0x1c>;
def-addr = <0x10>;
devnode = "video3";
physical_w = "15.0";
physical_h = "12.5";
sensor_model = "sgx-yuv-gmsl2";
post_crop_frame_drop = [30 00];
use_decibel_gain = "false";
use_sensor_mode_id = "true";
clocks = <0x02 0x24 0x02 0x24>;
clock-names = "extperiph1\0pllp_grtba";
mclk = "extperiph1";
sensing,gmsl-ser-device = <0x2d5>;
sensing,gmsl-dser-device = <0x2d3>;
mode0 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_c";
vc_id = [31 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1080";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "150000000";
serdes_pix_clk_hz = "300000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
mode1 {
mclk_khz = "24000";
num_lanes = [34 00];
tegra_sinterface = "serial_c";
vc_id = [31 00];
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = [30 00];
dynamic_pixel_bit_depth = "16";
csi_pixel_bit_depth = "16";
mode_type = "yuv";
pixel_phase = "uyvy";
active_w = "1920";
active_h = "1536";
readout_orientation = [30 00];
line_length = "2200";
inherent_gain = [31 00];
pix_clk_hz = "200000000";
serdes_pix_clk_hz = "300000000";
gain_factor = "1000";
min_gain_val = [31 00];
max_gain_val = "30000";
step_gain_val = "300";
default_gain = [30 00];
min_hdr_ratio = [31 00];
max_hdr_ratio = [31 00];
framerate_factor = "1000000";
min_framerate = "30000000";
max_framerate = "30000000";
step_framerate = [31 00];
default_framerate = "30000000";
exposure_factor = "1000000";
min_exp_time = "59";
max_exp_time = "33333";
step_exp_time = [31 00];
default_exp_time = "33333";
embedded_metadata_height = [30 00];
};
ports {
#address-cells = <0x01>;
#size-cells = <0x00>;
port@0 {
reg = <0x00>;
endpoint {
vc-id = <0x01>;
port-index = <0x02>;
bus-width = <0x04>;
remote-endpoint = <0x2d6>;
phandle = <0x28f>;
};
};
};
gmsl-link {
src-csi-port = [62 00];
dst-csi-port = [61 00];
serdes-csi-link = [62 00];
csi-mode = "1x4";
st-vc = <0x00>;
vc-id = <0x01>;
num-lanes = <0x04>;
streams = "ued-u1\0yuv16";
};
};
max9296_1@48 {
compatible = "maxim,max9296_1";
reg = <0x48>;
csi-mode = "2x4";
max-src = <0x02>;
reset-gpios = <0x50 0x3e 0x00>;
phandle = <0x2d3>;
};
max9295_prim_0@40 {
compatible = "maxim,max9295_1";
reg = <0x40>;
is-prim-ser;
phandle = <0x494>;
};
max9295_2@60 {
compatible = "maxim,max9295_1";
reg = <0x60>;
sensing,gmsl-dser-device = <0x2d3>;
phandle = <0x2d2>;
};
max9295_3@62 {
compatible = "maxim,max9295_1";
reg = <0x62>;
sensing,gmsl-dser-device = <0x2d3>;
phandle = <0x2d5>;
};
};
现在想调试连接CAM0使摄像头正常使用。麻烦帮忙看下问题!
希望能得到回复,谢谢!