VC-MIPI-modules / vc_mipi_nvidia

Vision Components MIPI CSI-2 driver for NVIDIA Jetson Nano, Xavier NX, AGX Xavier, TX2 and Orin Nano, Orin NX
69 stars 31 forks source link

VC Driver reports Error -34 on boot #96

Closed s-withers-archangel closed 2 weeks ago

s-withers-archangel commented 3 weeks ago

After running the quickstart script and booting the JETSON i'm not getting any video devices under /dev and the VC driver is reporting an error in the dmesg output

[    7.555172] vc_mipi 9-001a: tegracam sensor driver:vc_mipi_v2.0.6
[    7.565140] vc_mipi 9-001a: ctrl Frame Rate range update failed
[    7.575227] vc_mipi 9-001a: Error -34 updating mode specific control ranges 
[    7.582472] vc_mipi 9-001a: Error -34 updating control ranges
[    7.588374] vc_mipi 9-001a: Failed to init ctrls vc_mipi

Hardware Setup:

Host: Ubuntu 22.04.3 LTS
JETSON: NVIDIA Jetson Orin Nano 8GB NVME (devkit)
Camera:  IMX568C
Jetpack: 35.3.1

Steps followed

git clone https://github.com/VC-MIPI-modules/vc_mipi_nvidia.git
cd vc_mipi_nvidia/bin
./quickstart.sh
Selected jetson board and jetpack version

Modified tegra234-camera-vc-mipi-cam.dtsi is follows:

/*
 * Copyright (c) 2023, Vision Components GmbH.  All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <dt-bindings/media/camera.h>

// ------------------------------------------------------------------------------------------------
//  Driver Configuration for NVIDIA Jetson Orin Nano on NVIDIA Jetson Orin Nano Developer Kit
// ------------------------------------------------------------------------------------------------
#define VC_MIPI_CAM_1       1   // 1: Enabled, 0: Disabled  (serial_b => CSI Port 1 => VI Stream 0)
#define VC_MIPI_CAM_0       1   // 1: Enabled, 0: Disabled  (serial_c => CSI Port 2 => VI Stream 2)
// ------------------------------------------------------------------------------------------------
//  Supported number of lanes
// -----+------------------------------------------------------------------------------------------
//  1   | OV7251, IMX296, IMX297
//  2   | OV9281, IMX264, IMX265
//  2,4 | IMX178, IMX183, IMX226, IMX250, IMX252, IMX273, IMX290, IMX327, IMX335, IMX392, 
//      | IMX412, IMX415, IMX462, IMX565, IMX566, IMX567, IMX568
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_LANES       2   // 1, 2, 4 Lanes
// ------------------------------------------------------------------------------------------------
//  Embedded Metadata Height
// -----+------------------------------------------------------------------------------------------
//  0   | IMX178, IMX183, IMX226, IMX250, IMX252, IMX264, IMX265, IMX273, IMX392, OV7251, OV9281
//  1   | IMX290, IMX327, IMX335, IMX415, IMX462
//  2   | IMX296, IMX297, IMX412
//  4   | IMX565, IMX566, IMX567, IMX568
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_METADATA_H  "4" // "0", "1", "2", "4" Lines of meta data
// ------------------------------------------------------------------------------------------------
//   Sensor Manufacturer
// -----+------------------------------------------------------------------------------------------
//   1  | Sony Sensor (IMX)
//   2  | Omni Vision Sensor (OV)
// -----+------------------------------------------------------------------------------------------
#define VC_MIPI_MANUFACTURER 1
// ------------------------------------------------------------------------------------------------
//  GStreamer Support
// ------------------------------------------------------------------------------------------------
//  If you want to use GStreamer with nvarguscamerasrc you have to adjust this settings in the 
//  device tree below. The sections which have to be modified are marked by a comment. 
//  To find the correct parameter values please follow the instruction in the main README.md of 
//  this repository https://github.com/VC-MIPI-modules/vc_mipi_nvidia#gstreamer-support
// ------------------------------------------------------------------------------------------------

#if VC_MIPI_LANES == 1
        #define BUS_WIDTH 1
        #define NUM_LANES "1" 
        #define NUM_CSI_LANES 2
        #define PIX_CLK_HZ "150000000"
#endif
#if VC_MIPI_LANES == 2
        #define BUS_WIDTH 2
        #define NUM_LANES "2" 
        #define NUM_CSI_LANES 4
        #define PIX_CLK_HZ "300000000"
#endif
#if VC_MIPI_LANES == 4
        #define BUS_WIDTH 4
        #define NUM_LANES "4" 
        #define NUM_CSI_LANES 8
        #define PIX_CLK_HZ "600000000"
#endif

#if VC_MIPI_CAM_1 == 1 && VC_MIPI_CAM_0 == 1
        #define VC_MIPI_CAMERAS 2
#else
        #define VC_MIPI_CAMERAS 1
#endif

/ {
        tegra-capture-vi  {
                num-channels = <VC_MIPI_CAMERAS>;
                ports {
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_CAM_1 == 1
                        vc_vi_port0: port@0 {
                                reg = <0>;
                                vc_vi_in0: endpoint {
                                        port-index = <1>;
                                        bus-width = <BUS_WIDTH>;
                                        remote-endpoint = <&vc_csi_out0>;
                                };
                        };
#endif
#if VC_MIPI_CAM_0 == 1
                        vc_vi_port1: port@1 {
                                reg = <1>;
                                vc_vi_in1: endpoint {
                                        port-index = <2>;
                                        bus-width = <BUS_WIDTH>;
                                        remote-endpoint = <&vc_csi_out1>;
                                };
                        };
#endif
                }; // ports
        };

        host1x@13e00000 {
                nvcsi@15a00000 {
                        num-channels = <VC_MIPI_CAMERAS>;
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_CAM_1 == 1
                        vc_csi_chan0: channel@0 {
                                reg = <0>;
                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        vc_csi_chan0_port0: port@0 {
                                                reg = <0>;
                                                vc_csi_in0: endpoint@0 {
                                                        port-index = <1>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_mipi_out0>;
                                                };
                                        };
                                        vc_csi_chan0_port1: port@1 {
                                                reg = <1>;
                                                vc_csi_out0: endpoint@1 {
                                                        remote-endpoint = <&vc_vi_in0>;
                                                };
                                        };
                                };
                        };
#endif
#if VC_MIPI_CAM_0 == 1
                        vc_csi_chan1: channel@1 {
                                reg = <1>;
                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        vc_csi_chan1_port0: port@0 {
                                                reg = <0>;
                                                vc_csi_in1: endpoint@2 {
                                                        port-index = <2>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_mipi_out1>;
                                                };
                                        };
                                        vc_csi_chan1_port1: port@1 {
                                                reg = <1>;
                                                vc_csi_out1: endpoint@3 {
                                                        remote-endpoint = <&vc_vi_in1>;
                                                };
                                        };
                                };
                        };
#endif
                };
        };

        cam_i2cmux {
#if VC_MIPI_CAM_1 == 1
        i2c@0 {
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi_cam0: vc_mipi@1a {
                                reg                     = <0x1a>;
#else
                        vc_mipi_cam0: vc_mipi@60 {
                                reg                     = <0x60>;
#endif
                                compatible              = "nvidia,vc_mipi";
                                devnode                 = "video0";
                                use_sensor_mode_id      = "false";
                                sensor_model            = "vc_mipi";

                                num_lanes               = NUM_LANES;
                                trigger_mode            = "0";
                                io_mode                 = "0";

                                // ----------------------------------------------------
                                // If you want to use GStreamer with nvarguscamerasrc
                                // you have to adjust this settings
                                physical_w              = "6.752";
                                physical_h              = "5.612";
                                // ----------------------------------------------------

                                // This node is needed by the Tegra framework.
                                // You don't have to change any settings if just want 
                                // to use the V4L API.
                                mode0 {
                                        num_lanes                = NUM_LANES;
                                        tegra_sinterface         = "serial_b";
                                        embedded_metadata_height = VC_MIPI_METADATA_H;
                                        readout_orientation      = "0";
                                        lane_polarity            = "6";

                                        // ----------------------------------------------------
                                        // If you want to use GStreamer with nvarguscamerasrc
                                        // you have to adjust this settings. 
                                        active_l                 = "0";
                                        active_t                 = "0";
                                        active_w                 = "2464";
                                        active_h                 = "2048";
                                        mode_type                = "bayer";
                                        pixel_phase              = "rggb";
                                        csi_pixel_bit_depth      = "10";

                                        min_gain_val             = "0";         // mdB
                                        max_gain_val             = "48000";     // mdB
                                        step_gain_val            = "100";       // mdB
                                        default_gain             = "0";         // mdB

                                        min_exp_time             = "1";         // us
                                        max_exp_time             = "1000000";   // us
                                        step_exp_time            = "1";         // us
                                        default_exp_time         = "10000";     // us

                                        // For applications like argus_camera, there should 
                                        // be a minimal frame rate greater than zero!
                                        min_framerate            = "100";       // mHz
                                        max_framerate            = "41300";     // mHz
                                        step_framerate           = "100";       // mHz
                                        default_framerate        = "60000";     // mHz
                                        // ----------------------------------------------------

                                        gain_factor              = "1000";
                                        exposure_factor          = "1000000";
                                        framerate_factor         = "1000";
                                        inherent_gain            = "1";
                                        min_hdr_ratio            = "1";
                                        max_hdr_ratio            = "1";

                                        line_length              = "0";
                                        phy_mode                 = "DPHY";
                                        discontinuous_clk        = "no";
                                        mclk_khz                 = "24000";
                                        pix_clk_hz               = PIX_CLK_HZ;
                                        mclk_multiplier          = "0.0";       // deprecated
                                        cil_settletime           = "0";
                                        dpcm_enable              = "false";
                                };

                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        port@0 {
                                                reg = <0>;
                                                vc_mipi_out0: endpoint {
                                                        port-index = <1>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_csi_in0>;
                                                };
                                        };
                                };
                        };
                };
#endif // VC_MIPI_CAM_1

#if VC_MIPI_CAM_0 == 1
                i2c@1 {
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi_cam1: vc_mipi@1a {
                                reg                     = <0x1a>;
#else
                        vc_mipi_cam1: vc_mipi@60 {
                                reg                     = <0x60>;
#endif
                                compatible              = "nvidia,vc_mipi";
                                devnode                 = "video1";
                                use_sensor_mode_id      = "false";
                                sensor_model            = "vc_mipi";

                                num_lanes               = NUM_LANES;
                                trigger_mode            = "0";
                                io_mode                 = "0";

                                // ----------------------------------------------------
                                // If you want to use GStreamer with nvarguscamerasrc
                                // you have to adjust this settings
                                physical_w              = "6.752";
                                physical_h              = "5.612";
                                // ----------------------------------------------------

                                // This node is needed by the Tegra framework.
                                // You don't have to change any settings if just want 
                                // to use the V4L API.
                                mode0 {
                                        num_lanes                = NUM_LANES;
                                        tegra_sinterface         = "serial_c";
                                        embedded_metadata_height = VC_MIPI_METADATA_H;
                                        readout_orientation      = "0";
                                        lane_polarity            = "0";

                                        // ----------------------------------------------------
                                        // If you want to use GStreamer with nvarguscamerasrc
                                        // you have to adjust this settings. 
                                        active_l                 = "0";
                                        active_t                 = "0";
                                        active_w                 = "2464";
                                        active_h                 = "2048";
                                        mode_type                = "bayer";
                                        pixel_phase              = "rggb";
                                        csi_pixel_bit_depth      = "10";

                                        min_gain_val             = "0";         // mdB
                                        max_gain_val             = "48000";     // mdB
                                        step_gain_val            = "100";       // mdB
                                        default_gain             = "0";         // mdB

                                        min_exp_time             = "1";         // us
                                        max_exp_time             = "1000000";   // us
                                        step_exp_time            = "1";         // us
                                        default_exp_time         = "10000";     // us

                                        // For applications like argus_camera, there should 
                                        // be a minimal frame rate greater than zero!
                                        min_framerate            = "100";       // mHz
                                        max_framerate            = "41300";     // mHz
                                        step_framerate           = "100";       // mHz
                                        default_framerate        = "60000";     // mHz
                                        // ----------------------------------------------------

                                        gain_factor              = "1000";
                                        exposure_factor          = "1000000";
                                        framerate_factor         = "1000";
                                        inherent_gain            = "1";
                                        min_hdr_ratio            = "1";
                                        max_hdr_ratio            = "1";

                                        line_length              = "0";
                                        phy_mode                 = "DPHY";
                                        discontinuous_clk        = "no";
                                        mclk_khz                 = "24000";
                                        pix_clk_hz               = PIX_CLK_HZ;
                                        mclk_multiplier          = "0.0";       // deprecated
                                        cil_settletime           = "0";
                                        dpcm_enable              = "false";
                                };

                                ports {
                                        #address-cells = <1>;
                                        #size-cells = <0>;
                                        port@0 {
                                                reg = <0>;
                                                vc_mipi_out1: endpoint {
                                                        port-index = <2>;
                                                        bus-width = <BUS_WIDTH>;
                                                        remote-endpoint = <&vc_csi_in1>;
                                                };
                                        };
                                };
                        };
                };
#endif // VC_MIPI_CAM_0
        };

        lens@vc_mipi {
                min_focus_distance  = "0.0";
                hyper_focal         = "0.0";
                focal_length        = "6.0";
                f_number            = "2.0";
                aperture            = "0.0";
        };
};

/ {
        tcp: tegra-camera-platform {
                compatible = "nvidia, tegra-camera-platform";

                num_csi_lanes = <NUM_CSI_LANES>;
                max_lane_speed = <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>;

                modules {
#if VC_MIPI_CAM_1 == 1
                        cam_module0: module0 {
                                badge = "jakku_front_vc_mipi";
                                position = "front";
                                orientation = "1";
                                cam_module0_drivernode0: drivernode0 {
                                        pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
                                        devname = "vc_mipi 9-001a";
                                        proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/vc_mipi@1a";
#else
                                        devname = "vc_mipi 9-0060";
                                        proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@0/vc_mipi@60";
#endif
                                };
                                cam_module0_drivernode1: drivernode1 {
                                        pcl_id = "v4l2_lens";
                                        proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
                                };
                        };
#endif // VC_MIPI_CAM_1

#if VC_MIPI_CAM_0 == 1
                        cam_module1: module1 {
                                badge = "jakku_rear_vc_mipi";
                                position = "rear";
                                orientation = "1";
                                cam_module1_drivernode0: drivernode0 {
                                        pcl_id = "v4l2_sensor";
#if VC_MIPI_MANUFACTURER == 1
                                        devname = "vc_mipi 10-001a";
                                        proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/vc_mipi@1a";
#else
                                        devname = "vc_mipi 10-0060";
                                        proc-device-tree = "/proc/device-tree/cam_i2cmux/i2c@1/vc_mipi@60";
#endif  
                                };
                                cam_module1_drivernode1: drivernode1 {
                                        pcl_id = "v4l2_lens";
                                        proc-device-tree = "/proc/device-tree/lens@vc_mipi/";
                                };
                        };
#endif // VC_MIPI_CAM_0
                };
        };
};

#define CAM0_PWDN   TEGRA234_MAIN_GPIO(H, 6)
#define CAM1_PWDN   TEGRA234_MAIN_GPIO(AC, 0)
#define CAM_I2C_MUX     TEGRA234_AON_GPIO(CC, 3)

/ {
        cam_i2cmux {
                status = "okay";
                compatible = "i2c-mux-gpio";
                #address-cells = <1>;
                #size-cells = <0>;
                mux-gpios = <&tegra_aon_gpio CAM_I2C_MUX GPIO_ACTIVE_HIGH>;
                i2c-parent = <&cam_i2c>;
#if VC_MIPI_CAM_1 == 1
                i2c@0 {
                        status = "okay";
                        reg = <0>;
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi@1a {
#else
                        vc_mipi@60 {
#endif
                                reset-gpios = <&tegra_main_gpio CAM0_PWDN GPIO_ACTIVE_HIGH>;
                        };
                };
#endif
#if VC_MIPI_CAM_0 == 1
                i2c@1 {
                        status = "okay";
                        reg = <1>;
                        #address-cells = <1>;
                        #size-cells = <0>;
#if VC_MIPI_MANUFACTURER == 1
                        vc_mipi@1a {
#else
                        vc_mipi@60 {
#endif
                                reset-gpios = <&tegra_main_gpio CAM1_PWDN GPIO_ACTIVE_HIGH>;
                        };
                };
#endif
        };

        gpio@2200000 {
                camera-control-output-low {
                        gpio-hog;
                        output-low;
                        gpios = <CAM0_PWDN 0 CAM1_PWDN 0>;
                        label = "cam0-pwdn","cam1-pwdn";
                };
        };
};

After the device has been flashed, I ran max_speed.sh and demo.sh, but video devices are present:

developmentai@nvidia:~/vc_mipi_nvidia/target$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
    /dev/media0

Cannot open device /dev/video0, exiting.

The dmesg output shows the device being detected but an error coming from the device driver:

developmentai@nvidia:~$ sudo dmesg | grep vc
[sudo] password for developmentai: 
[    0.002361] DTS File Name: /home/steve/vc_mipi_nvidia/build/Xavier_35.3.1/Linux_for_Tegra/source/public/kernel/kernel-5.10/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t23x/p3768/kernel-dts/tegra234-p3767-0003-p3768-0000-a0.dts
[    5.650248] tegra-ivc-bus bc00000.rtcpu:ivc-bus: region 0: iova=0xbfec0000-0xbfee01ff size=131584
[    5.659429] tegra-ivc-bus bc00000.rtcpu:ivc-bus:echo@0: echo: ver=0 grp=1 RX[16x64]=0x1000-0x1480 TX[16x64]=0x1480-0x1900
[    5.670859] tegra-ivc-bus bc00000.rtcpu:ivc-bus:dbg@1: dbg: ver=0 grp=1 RX[1x448]=0x1900-0x1b40 TX[1x448]=0x1b40-0x1d80
[    5.682258] tegra-ivc-bus bc00000.rtcpu:ivc-bus:dbg@2: dbg: ver=0 grp=1 RX[1x8192]=0x1d80-0x3e00 TX[1x8192]=0x3e00-0x5e80
[    5.693968] tegra-ivc-bus bc00000.rtcpu:ivc-bus:ivccontrol@3: ivccontrol: ver=0 grp=1 RX[64x320]=0x5e80-0xaf00 TX[64x320]=0xaf00-0xff80
[    5.706523] tegra-capture-ivc bc00000.rtcpu:ivc-bus:ivccontrol@3: no priority specified, using 99 as default
[    5.717238] tegra-ivc-bus bc00000.rtcpu:ivc-bus:ivccapture@4: ivccapture: ver=0 grp=1 RX[512x64]=0xff80-0x18000 TX[512x64]=0x18000-0x20080
[    5.730043] tegra-capture-ivc bc00000.rtcpu:ivc-bus:ivccapture@4: no priority specified, using 99 as default
[    5.740752] tegra-ivc-bus bc00000.rtcpu:ivc-bus:diag@5: diag: ver=0 grp=1 RX[1x64]=0x20080-0x20140 TX[1x64]=0x20140-0x20200
[    5.835651] user_ivc_mempool: hypervisor not present
[    6.617854] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: context isolation disabled due to no IOMMU
[    6.627530] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: initialized
[    6.633982] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e40000.host1x:nvcsi@15a00000- bound
[    6.643206] tegra-camrtc-capture-vi tegra-capture-vi: subdev 13e40000.host1x:nvcsi@15a00000- bound
[    6.974857] vc_mipi 9-001a: vc_probe(): Probing UNIVERSAL VC MIPI Driver (v0.17.1)
[    7.381252] i2c 9-0010: vc_init_ctrl_imx568(): Initialising module control for IMX568
[    7.501152] vc_mipi 9-001a: vc_init_io(): Init trigger and flash mode
[    7.507782] i2c 9-0010: vc_mod_set_trigger_mode(): Set trigger mode: DISABLED
[    7.523520] i2c 9-0010: vc_mod_set_io_mode(): Set IO mode: DISABLED
[    7.537302] vc_mipi 9-001a: vc_init_frmfmt(): Init frame (width: 2464, height: 2064, fps: 0)
[    7.555172] vc_mipi 9-001a: tegracam sensor driver:vc_mipi_v2.0.6
[    7.565140] vc_mipi 9-001a: ctrl Frame Rate range update failed
[    7.575227] vc_mipi 9-001a: Error -34 updating mode specific control ranges 
[    7.582472] vc_mipi 9-001a: Error -34 updating control ranges
[    7.588374] vc_mipi 9-001a: Failed to init ctrls vc_mipi
[    7.593836] vc_mipi 9-001a: vc_probe(): Tegra camera subdev registration failed
[    7.607042] vc_mipi 10-001a: vc_probe(): Probing UNIVERSAL VC MIPI Driver (v0.17.1)
[   10.013355] vc_mipi 10-001a: vc_mod_setup(): Unable to get module I2C client for address 0x10
[   10.022121] vc_mipi 10-001a: vc_probe(): Error in vc_core_init!
[   12.661097] hvc_sysfs: hypervisor is not present

The dmesg for i2c also shows the camera being detected

developmentai@nvidia:~/vc_mipi_nvidia/target$ sudo dmesg | grep i2c
[    4.283254] i2c /dev entries driver
[    4.286972] tegra-i2c 3160000.i2c: Adding to iommu group 2
[    4.292772] tegra-i2c c240000.i2c: Adding to iommu group 2
[    4.298477] tegra-i2c 3180000.i2c: Adding to iommu group 2
[    4.304176] tegra-i2c 3190000.i2c: Adding to iommu group 2
[    4.309860] tegra-i2c 31b0000.i2c: Adding to iommu group 2
[    4.315532] tegra-i2c 31c0000.i2c: Adding to iommu group 2
[    4.321211] tegra-i2c c250000.i2c: Adding to iommu group 2
[    4.326892] tegra-i2c 31e0000.i2c: Adding to iommu group 2
[    7.079899] i2c 9-0010: +--- VC MIPI Camera -----------------------------------+
[    7.087512] i2c 9-0010: | MANUF. | Vision Components               MID: 0x0427 |
[    7.095125] i2c 9-0010: | MODULE | ID:  0x0568                     REV:   0004 |
[    7.102729] i2c 9-0010: | SENSOR | SONY IMX568C                                |
[    7.110340] i2c 9-0010: +--------+---------------------------------------------+
[    7.117945] i2c 9-0010: +--- Sensor Registers ------+--------+--------+--------+
[    7.125552] i2c 9-0010: |                           | low    | mid    | high   |
[    7.133160] i2c 9-0010: +---------------------------+--------+--------+--------+
[    7.140765] i2c 9-0010: | idle                      | 0x3000 |        |        |
[    7.148370] i2c 9-0010: | horizontal start          | 0x3120 | 0x3121 |        |
[    7.155983] i2c 9-0010: | vertical start            | 0x3122 | 0x3123 |        |
[    7.155989] i2c 9-0010: | horizontal end            | 0x0000 | 0x0000 |        |
[    7.178094] i2c 9-0010: | vertical end              | 0x30d0 | 0x30d1 |        |
[    7.185699] i2c 9-0010: | hor. output width         | 0x3124 | 0x3125 |        |
[    7.193303] i2c 9-0010: | ver. output height        | 0x3126 | 0x3127 |        |
[    7.200908] i2c 9-0010: | exposure                  | 0x3240 | 0x3241 | 0x3242 |
[    7.208510] i2c 9-0010: | gain                      | 0x3514 | 0x3515 |        |
[    7.216114] i2c 9-0010: +---------------------------+--------+--------+--------+
[    7.223723] i2c 9-0010: | clock for ext. trigger    | 54000000 Hz              |
[    7.231326] i2c 9-0010: | pixel clock               | 74250000 Hz              |
[    7.238937] i2c 9-0010: | shutter offset            |      770 us              |
[    7.246545] i2c 9-0010: +---------------------------+--------------------------+
[    7.254147] i2c 9-0010: +--- Module Modes -------+---------+---------+---------+
[    7.261756] i2c 9-0010: |  # | rate    | lanes   | format  | type    | binning |
[    7.269373] i2c 9-0010: +----+---------+---------+---------+---------+---------+
[    7.276981] i2c 9-0010: |  0 |    1188 |       2 | RAW08   | STREAM  |       0 |
[    7.284587] i2c 9-0010: |  1 |    1188 |       2 | RAW10   | STREAM  |       0 |
[    7.292191] i2c 9-0010: |  2 |    1188 |       2 | RAW12   | STREAM  |       0 |
[    7.299795] i2c 9-0010: |  3 |    1188 |       2 | RAW08   | EXT.TRG |       0 |
[    7.307401] i2c 9-0010: |  4 |    1188 |       2 | RAW10   | EXT.TRG |       0 |
[    7.315003] i2c 9-0010: |  5 |    1188 |       2 | RAW12   | EXT.TRG |       0 |
[    7.322609] i2c 9-0010: |  6 |    1188 |       4 | RAW08   | STREAM  |       0 |
[    7.330215] i2c 9-0010: |  7 |    1188 |       4 | RAW10   | STREAM  |       0 |
[    7.337824] i2c 9-0010: |  8 |    1188 |       4 | RAW12   | STREAM  |       0 |
[    7.353891] i2c 9-0010: |  9 |    1188 |       4 | RAW08   | EXT.TRG |       0 |
[    7.353895] i2c 9-0010: | 10 |    1188 |       4 | RAW10   | EXT.TRG |       0 |
[    7.365983] i2c 9-0010: | 11 |    1188 |       4 | RAW12   | EXT.TRG |       0 |
[    7.365986] i2c 9-0010: +----+---------+---------+---------+---------+---------+
[    7.381252] i2c 9-0010: vc_init_ctrl_imx568(): Initialising module control for IMX568
[    7.393074] i2c 9-0010: +-------+--------+------------+-----------+
[    7.393080] i2c 9-0010: | lanes | format | exposure   | framerate |
[    7.429588] i2c 9-0010: |       |        | max [us]   | max [mHz] |
[    7.436016] i2c 9-0010: +-------+--------+------------+-----------+
[    7.442445] i2c 9-0010: |     2 | RAW08  |  148226464 |     51778 |
[    7.448875] i2c 9-0010: |     2 | RAW10  |  183022398 |     41933 |
[    7.455313] i2c 9-0010: |     2 | RAW12  |  218036426 |     35200 |
[    7.461751] i2c 9-0010: |     4 | RAW08  |   78617813 |     97627 |
[    7.461753] i2c 9-0010: |     4 | RAW10  |   96015783 |     79936 |
[    7.461754] i2c 9-0010: |     4 | RAW12  |  113413743 |     67672 |
[    7.461755] i2c 9-0010: +-------+--------+------------+-----------+
[    7.461760] i2c 9-0010: VC MIPI Core successfully initialized
[    7.507782] i2c 9-0010: vc_mod_set_trigger_mode(): Set trigger mode: DISABLED
[    7.523520] i2c 9-0010: vc_mod_set_io_mode(): Set IO mode: DISABLED
[    7.601391] i2c i2c-2: Added multiplexed i2c bus 9
[   10.028245] i2c i2c-2: Added multiplexed i2c bus 10
[   10.033258] i2c-mux-gpio cam_i2cmux: 2 port mux on 3180000.i2c adapter

Any help much appreciated

bazo80 commented 3 weeks ago

Hello @s-withers-archangel ,

you have set:

max_framerate            = "41300";     // mHz
...
default_framerate        = "60000";     // mHz

The default_framerate must be less or equal than the max_frame_rate. You should set the

default_framerate        = "41300";     // mHz

for both sensors.

Please have a try.

best regards

s-withers-archangel commented 2 weeks ago

That was the cause, thank you!