Hello,
What are the expected port-index values for running a 2-lane MIPI camera (imx477) on CSI4 D0 and D1? The Port Index section of the docs is ambiguous for Xavier NX. My best guess so far has been:
- Sensor scope with
port-index = <4>
,bus-width = <2>
, andtegra_sinterface = "serial_e"
-
nvcsi
withport-index = <4>
,bus-width=<2>
, -
vi
withport-index = <4>
,bus-width=<2>
However, with this configuration (and many other presumably incorrect combinations), I get:
[ 123.993815] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 123.993971] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
I know i2c and the imager are working because I can see the i2c signals and csi activity on the scope when running the v4l2-ctl
command.
Here’s my full dtsi:
/ {
host1x {
vi@15c10000 {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
rbpcv3_imx477_vi_in0: endpoint {
port-index = <4>;
bus-width = <2>;
remote-endpoint = <&rbpcv3_imx477_csi_out0>;
};
};
};
};
nvcsi@15a00000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
rbpcv3_imx477_csi_in0: endpoint@0 {
port-index = <4>;
bus-width = <2>;
remote-endpoint = <&rbpcv3_imx477_dual_out0>;
};
};
port@1 {
reg = <1>;
rbpcv3_imx477_csi_out0: endpoint@1 {
remote-endpoint = <&rbpcv3_imx477_vi_in0>;
};
};
};
};
};
};
cam_i2cmux {
i2c@1 {
imx477_cam0: rbpcv3_imx477_c@1a {
compatible = "ridgerun,imx477";
/* I2C device address */
reg = <0x1a>;
/* 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";
mode0 { /* IMX477_MODE_3840x2160 */
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_e";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "3840";
active_h = "2160";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "10";
readout_orientation = "90";
line_length = "11200";
inherent_gain = "1";
mclk_multiplier = "80";
pix_clk_hz = "840000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "356"; /* 22x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "30000000"; /* 30.0 fps */
step_framerate = "1";
default_framerate = "30000000"; /* 30.0 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "2";
};
mode1 { /* IMX477_MODE_1920X1080 */
mclk_khz = "24000";
num_lanes = "2";
tegra_sinterface = "serial_e";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
active_w = "1920";
active_h = "1080";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "10";
readout_orientation = "90";
line_length = "7000";
inherent_gain = "1";
mclk_multiplier = "80";
pix_clk_hz = "840000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "356"; /* 22x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "60000000"; /* 60.0 fps */
step_framerate = "1";
default_framerate = "60000000"; /* 60.0 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "2";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
rbpcv3_imx477_dual_out0: endpoint {
port-index = <4>;
bus-width = <2>;
remote-endpoint = <&rbpcv3_imx477_csi_in0>;
};
};
};
};
};
};
};
/ {
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <2>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <7500000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
module0 {
badge = "jakku_front_IMX477";
position = "front";
orientation = "1";
drivernode0 {
pcl_id = "v4l2_sensor";
devname = "imx477 9-001a";
proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/rbpcv3_imx477_c@1a";
};
};
};
};
};