In hardware,I connected two max9296 with xavier,and echo max9296 connected two max9295,thus connecting four imx390.
when I hang one imx390 on the device tree,all four imx390 can get video in turn by modifying max9296’s addr
and port-index tegra_sinterface.
but when I hang all four imx390 on the device tree, I can only get video from two of them.
/ {
host1x {
vi@15c10000 {
num-channels = <4>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_vi_in0: endpoint {
vc-id = <0>;
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_out0>;
};
};
port@1 {
reg = <1>;
imx390_vi_in1: endpoint {
vc-id = <1>;
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_out1>;
};
};
#if 1
port@2 {
reg = <2>;
imx390_vi_in2: endpoint {
vc-id = <0>;
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_out2>;
};
};
port@3 {
reg = <3>;
imx390_vi_in3: endpoint {
vc-id = <1>;
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_out3>;
};
};
#endif
};
};
nvcsi@15a00000 {
num-channels = <4>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_csi_in0: endpoint@0 {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx390_imx390_out0>;
};
};
port@1 {
reg = <1>;
imx390_csi_out0: endpoint@1 {
remote-endpoint = <&imx390_vi_in0>;
};
};
};
};
channel@1 {
reg = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_csi_in1: endpoint@2 {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx390_imx390_out1>;
};
};
port@1 {
reg = <1>;
imx390_csi_out1: endpoint@3 {
remote-endpoint = <&imx390_vi_in1>;
};
};
};
};
#if 1
channel@2 {
reg = <2>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_csi_in2: endpoint@4 {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&imx390_imx390_out2>;
};
};
port@1 {
reg = <1>;
imx390_csi_out2: endpoint@5 {
remote-endpoint = <&imx390_vi_in2>;
};
};
};
};
channel@3 {
reg = <3>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_csi_in3: endpoint@6 {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&imx390_imx390_out3>;
};
};
port@1 {
reg = <1>;
imx390_csi_out3: endpoint@7 {
remote-endpoint = <&imx390_vi_in3>;
};
};
};
};
#endif
};
};
i2c@3180000 {
imx390_a@1b {
compatible = "nvidia,imx390";
reg = <0x1b>;
physical_w = "15.0";
physical_h = "12.5";
sensor_model ="imx390";
post_crop_frame_drop = "0";
use_decibel_gain = "true";
delayed_gain = "true";
use_sensor_mode_id = "true";
mode0 {/*mode IMX390_MODE_1920X1080_CROP_30FPS*/
mclk_khz = "24000";
num_lanes = "4";
tegra_sinterface = "serial_c";
vc_id = "0";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "12";
csi_pixel_bit_depth = "12";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "1920";
active_h = "1080";
pixel_t = "bayer_rggb12";
readout_orientation = "0";
line_length = "4400";
inherent_gain = "1";
mclk_multiplier = "6.18";
pix_clk_hz = "148500000";
serdes_pix_clk_hz = "1485000000";
min_gain_val = "0"; /* dB */
max_gain_val = "30"; /* dB */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1.5";
max_framerate = "30";
min_exp_time = "118"; /*us,4 lines*/
max_exp_time = "660000";
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_imx390_out0: endpoint {
vc-id = <0>;
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_in0>;
};
};
};
gmsl-link {
src-csi-port = "b";
dst-csi-port = "b";
serdes-csi-link = "a";
csi-mode = "1x4";
st-vc = <0>;
vc-id = <0>;
num-lanes = <4>;
streams = "raw12";
};
};
imx390_b@1c {
compatible = "nvidia,imx390";
reg = <0x1c>;
physical_w = "15.0";
physical_h = "12.5";
sensor_model ="imx390";
post_crop_frame_drop = "0";
use_decibel_gain = "true";
delayed_gain = "true";
use_sensor_mode_id = "true";
mode0 {/*mode IMX390_MODE_1920X1080_CROP_30FPS*/
mclk_khz = "24000";
num_lanes = "4";
tegra_sinterface = "serial_c";
vc_id = "1";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "12";
csi_pixel_bit_depth = "12";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "1920";
active_h = "1080";
pixel_t = "bayer_rggb";
readout_orientation = "0";
line_length = "4400";
inherent_gain = "1";
mclk_multiplier = "6.18";
pix_clk_hz = "148500000";
min_gain_val = "0"; /* dB */
max_gain_val = "30"; /* dB */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1.5";
max_framerate = "30";
min_exp_time = "118"; /*us,4 lines*/
max_exp_time = "660000";
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_imx390_out1: endpoint {
vc-id = <1>;
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_in1>;
};
};
};
gmsl-link {
src-csi-port = "b";
dst-csi-port = "b";
serdes-csi-link = "b";
csi-mode = "1x4";
st-vc = <0>;
vc-id = <1>;
num-lanes = <4>;
streams = "raw12";
};
};
#if 1
imx390_c@1d {
compatible = "nvidia,imx390";
reg = <0x1d>;
physical_w = "15.0";
physical_h = "12.5";
sensor_model ="imx390";
post_crop_frame_drop = "0";
use_decibel_gain = "true";
delayed_gain = "true";
use_sensor_mode_id = "true";
mode0 {/*mode IMX390_MODE_1920X1080_CROP_30FPS*/
mclk_khz = "24000";
num_lanes = "4";
tegra_sinterface = "serial_a";
vc_id = "0";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "12";
csi_pixel_bit_depth = "12";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "1920";
active_h = "1080";
pixel_t = "bayer_rggb12";
readout_orientation = "0";
line_length = "4400";
inherent_gain = "1";
mclk_multiplier = "6.18";
pix_clk_hz = "148500000";
serdes_pix_clk_hz = "1485000000";
min_gain_val = "0"; /* dB */
max_gain_val = "30"; /* dB */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1.5";
max_framerate = "30";
min_exp_time = "118"; /*us,4 lines*/
max_exp_time = "660000";
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_imx390_out2: endpoint {
vc-id = <0>;
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_in2>;
};
};
};
gmsl-link {
src-csi-port = "b";
dst-csi-port = "b";
serdes-csi-link = "a";
csi-mode = "1x4";
st-vc = <0>;
vc-id = <0>;
num-lanes = <4>;
streams = "raw12";
};
};
imx390_d@1e{
compatible = "nvidia,imx390";
reg = <0x1e>;
physical_w = "15.0";
physical_h = "12.5";
sensor_model ="imx390";
post_crop_frame_drop = "0";
use_decibel_gain = "true";
delayed_gain = "true";
use_sensor_mode_id = "true";
mode0 {/*mode IMX390_MODE_1920X1080_CROP_30FPS*/
mclk_khz = "24000";
num_lanes = "4";
tegra_sinterface = "serial_a";
vc_id = "1";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "0";
dynamic_pixel_bit_depth = "12";
csi_pixel_bit_depth = "12";
mode_type = "bayer";
pixel_phase = "rggb";
active_w = "1920";
active_h = "1080";
pixel_t = "bayer_rggb";
readout_orientation = "0";
line_length = "4400";
inherent_gain = "1";
mclk_multiplier = "6.18";
pix_clk_hz = "148500000";
min_gain_val = "0"; /* dB */
max_gain_val = "30"; /* dB */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "1.5";
max_framerate = "30";
min_exp_time = "118"; /*us,4 lines*/
max_exp_time = "660000";
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
imx390_imx390_out3: endpoint {
vc-id = <1>;
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&imx390_csi_in3>;
};
};
};
gmsl-link {
src-csi-port = "b";
dst-csi-port = "b";
serdes-csi-link = "b";
csi-mode = "1x4";
st-vc = <0>;
vc-id = <1>;
num-lanes = <4>;
streams = "raw12";
};
};
#endif
};
};
/ {
tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
/**
* Physical settings to calculate max ISO BW
*
* num_csi_lanes = <>;
* Total number of CSI lanes when all cameras are active
*
* max_lane_speed = <>;
* Max lane speed in Kbit/s
*
* min_bits_per_pixel = <>;
* Min bits per pixel
*
* vi_peak_byte_per_pixel = <>;
* Max byte per pixel for the VI ISO case
*
* vi_bw_margin_pct = <>;
* Vi bandwidth margin in percentage
*
* max_pixel_rate = <>;
* Max pixel rate in Kpixel/s for the ISP ISO case
*
* isp_peak_byte_per_pixel = <>;
* Max byte per pixel for the ISP ISO case
*
* isp_bw_margin_pct = <>;
* Isp bandwidth margin in percentage
*/
num_csi_lanes = <8>;
max_lane_speed = <4000000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
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 {
badge = "imx390_rear";
position = "rear";
orientation = "0";
drivernode0 {
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_sensor";
/* Driver v4l2 device name */
devname = "imx390 2-001b";
/* Declare the device-tree hierarchy to driver instance */
proc-device-tree = "/proc/device-tree/i2c@3180000/imx390_a@1b";
};
};
module1 {
badge = "imx390_front";
position = "front";
orientation = "1";
drivernode0 {
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_sensor";
/* Driver v4l2 device name */
devname = "imx390 2-001c";
/* Declare the device-tree hierarchy to driver instance */
proc-device-tree = "/proc/device-tree/i2c@3180000/imx390_b@1c";
};
};
module2 {
badge = "imx390_left";
position = "left";
orientation = "0";
drivernode0 {
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_sensor";
/* Driver v4l2 device name */
devname = "imx390 2-001d";
/* Declare the device-tree hierarchy to driver instance */
proc-device-tree = "/proc/device-tree/i2c@3180000/imx390_c@1d";
};
};
module3 {
badge = "imx390_right";
position = "right";
orientation = "1";
drivernode0 {
/* Declare PCL support driver (classically known as guid) */
pcl_id = "v4l2_sensor";
/* Driver v4l2 device name */
devname = "imx390 2-001e";
/* Declare the device-tree hierarchy to driver instance */
proc-device-tree = "/proc/device-tree/i2c@3180000/imx390_d@1e";
};
};
};
};
};