8 camera support for GMSL2, Xavier Jetpack 32.1.0

I’m working on our Xavier carrier for GMSL2 camera support. The camera sensor is
IMX390 and Jetpack is 32.1.0. MAX9295 and MAX9295 are the serializer and deserializer.
We’re using virtual channel support of deserializer.
I’ve gotten video display of 6 different cameras out of 8 cameras simultaneously using gstreamer but I see see video from same camera even though sensor-id is different. This happens for sensor-id 0 and 7 and sensor-id 3 and 4. We’re using a I2C expander and we have the follwoing CSI mapping with I2C

I2C:30 CSI:6-7
I2C:31 CSI:4-5
I2C:32 CSI:2-3
I2C:33 CSI:0-1

I can get raw image using v4l2-ctl from /dev/video0 to /dev/video5 but not from /dev/video6 and /dev/video7. The follwing is crash excerpt

[ 1177.449660] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 1177.449823] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 1177.450009] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 1177.450156] tegra194-vi5 15c10000.vi: unexpected response from camera processor
[ 1177.450306] video4linux video6: vi capture release failed
[ 1177.450446] tegra194-vi5 15c10000.vi: fatal: error recovery failed
[ 1223.138972] Unable to handle kernel NULL pointer dereference at virtual address 00000000

However, the same sensor works for gstreamer.

Using the combination of gstremer and v4l2-ctl I can ensure that all 8 cameras are functional and I’ve added printk in the driver to print various ID specific values from device tree and I see all driver instances work properly. However, I don’t get all of them to work simultaneously.

When I use gstreamer I find that the video is coming from the same camera for sensor-id=0 and sensor-id=7 and gstremaer invoke the same driver instance. The same happens for sensor-id=3 and sensor-id=4.

I feel like either argus camera daemon does not support eight camera position for Jepack 32.1.0, can you confirm? Else I’ve incorrect device tree.

I’m attaching the device tree part that I think is causing the issue

/ {

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_centerleft_liimx390”;
    position = “centerleft”;
    orientation = “6”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 30-001b”;
    /
    Declare the device-tree hierarchy to driver instance /
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@0/imx390_a@1b”;
    };
    };
    module1 {
    badge = “imx390_bottomleft_liimx390”;
    position = “bottomleft”;
    orientation = “7”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 30-001c”;
    /
    Declare the device-tree hierarchy to driver instance /
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@0/imx390_b@1c”;
    };
    };
    module2 {
    badge = “imx390_topright_liimx390”;
    position = “topright”;
    orientation = “4”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 31-001b”;
    /
    Declare the device-tree hierarchy to driver instance /
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@1/imx390_c@1b”;
    };
    };
    module3 {
    badge = “imx390_bottomright_liimx390”;
    position = “bottomright”;
    orientation = “5”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 31-001c”;
    /
    Declare the device-tree hierarchy to driver instance /
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@1/imx390_d@1c”;
    };
    };
    module4 {
    badge = “imx390_topleft_liimx390”;
    position = “topleft”;
    orientation = “2”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 32-001b”;
    /
    Declare the device-tree hierarchy to driver instance /
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@2/imx390_e@1b”;
    };
    };
    module5 {
    badge = “imx390_centerright_liimx390”;
    position = “centerright”;
    orientation = “3”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 32-001c”;
    /
    Declare the device-tree hierarchy to driver instance /
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@2/imx390_f@1c”;
    };
    };
    module6 {
    badge = “imx390_rear_liimx390”;
    position = “rear”;
    orientation = “0”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 33-001b”;
    /
    Declare the device-tree hierarchy to driver instance /
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@3/imx390_g@1b”;
    };
    };
    module7 {
    badge = “imx390_front_liimx390”;
    position = “front”;
    orientation = “1”;
    drivernode0 {
    /
    Declare PCL support driver (classically known as guid) /
    pcl_id = “v4l2_sensor”;
    /
    Driver v4l2 device name /
    devname = “imx390 33-001c”;
    /
    Declare the device-tree hierarchy to driver instance */
    proc-device-tree = “/proc/device-tree/i2c@c250000/tca9546@72/i2c@3/imx390_h@1c”;
    };
    };
    };
    };
    };

Please have apply below patch to verify.

[url]Grab image by Libargus but image is replicated - Jetson AGX Xavier - NVIDIA Developer Forums