Add imx664 sensor driver with orin nx 36.4

Sensor driver is insmod ok, and device info is below. But when running jetson_multimedia_api/samples/camera_unit_sample,I got the error:“Device does not support V4L2_CAP_VIDEO_CAPTURE_MPLANE”. When using imx219 it is ok. How to debug this problem?
root@yf-desktop:/home/yf/nvidia# v4l2-ctl -d /dev/video0 --all
Driver Info:
Driver name : tegra-video
Card type : vi-output, imx664 10-0010
Bus info : platform:tegra-capture-vi:1
Driver version : 5.15.148
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : tegra-camrtc-ca
Model : NVIDIA Tegra Video Input Device
Serial :
Bus info :
Media version : 5.15.148
Hardware revision: 0x00000003 (3)
Driver version : 5.15.148
Interface Info:
ID : 0x0300000b
Type : V4L Video
Entity Info:
ID : 0x00000009 (9)
Name : vi-output, imx664 10-0010
Function : V4L2 I/O
Pad 0x0100000a : 0: Sink
Link 0x0200000f: from remote pad 0x1000003 of entity ‘13e00000.host1x:nvcsi@15a00000-’ (Unknown sub-device (0002000a)): Data, Enabled
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
Width/Height : 2688/1520
Pixel Format : ‘RG12’ (12-bit Bayer RGRG/GBGB)
Field : None
Bytes per Line : 5376
Size Image : 8171520
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 0

Camera Controls

                 group_hold 0x009a2003 (bool)   : default=0 value=0 flags=execute-on-write
                sensor_mode 0x009a2008 (int64)  : min=0 max=1 step=1 default=0 value=0 flags=slider
                       gain 0x009a2009 (int64)  : min=16 max=171 step=1 default=16 value=16 flags=slider
                   exposure 0x009a200a (int64)  : min=13 max=30710 step=1 default=2495 value=13 flags=slider
                 frame_rate 0x009a200b (int64)  : min=2000000 max=90000000 step=1 default=30000000 value=2000000 flags=slider
       sensor_configuration 0x009a2032 (u32)    : min=0 max=4294967295 step=1 default=0 dims=[22] flags=read-only, volatile, has-payload
     sensor_mode_i2c_packet 0x009a2033 (u32)    : min=0 max=4294967295 step=1 default=0 dims=[1026] flags=read-only, volatile, has-payload
  sensor_control_i2c_packet 0x009a2034 (u32)    : min=0 max=4294967295 step=1 default=0 dims=[1026] flags=read-only, volatile, has-payload
                bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0 (0 0x0)
                            0: 0 (0x0)
                            1: 1 (0x1)
            override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0 (0 0x0)
                            0: 0 (0x0)
                            1: 1 (0x1)
               height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                 size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0 (1 0x1)
                            0: 1 (0x1)
                            1: 65536 (0x10000)
                            2: 131072 (0x20000)
           write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
   sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 dims=[30][18] flags=read-only, has-payload
    sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 dims=[30][16] flags=read-only, has-payload
  sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 dims=[30][36] flags=read-only, has-payload
          sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 dims=[30][16] flags=read-only, has-payload
           low_latency_mode 0x009a206d (bool)   : default=0 value=0
           preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
override_capture_timeout_ms 0x009a206f (int)    : min=-1 max=2147483647 step=1 default=2500 value=2500
               sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=1 flags=read-only

*** Please note that this reply is generated by LLM automatically ***

To debug the issue where the Jetson Orin NX sensor driver is installed successfully (insmod ok) and device information is available, but running the jetsonmultimedia-api/samples/01_camera/camera_unitsample results in an error “Device does not support V4L2_CAP_VIDEO_CAPTURE_MPLANE” when using a specific camera module (imx664), while it works fine with the imx219 camera module, follow these steps:

  1. Verify V4L2_CAP_VIDEO_CAPTURE_MPLANE Support:

    • The error message indicates that the device (or the driver) does not support the V4L2_CAP_VIDEO_CAPTURE_MPLANE capability, which is required for the jetsonmultimedia-api sample to work. This capability is crucial for memory-to-memory (M2M) devices and for capture devices that can handle multi-planar formats.
    • Check the v4l2-ctl output for the Capabilities and Device Caps fields. In your case, both are 0x84200001 and 0x04200001, respectively, which indicates support for Video Capture, Streaming, and Extended Pix Format but does not explicitly show V4L2_CAP_VIDEO_CAPTURE_MPLANE. The V4L2_CAP_VIDEO_CAPTURE_MPLANE capability is typically represented by the 0x00000008 bit in the capabilities field.
  2. Compare Camera Module Capabilities:

    • Since the issue does not occur with the imx219 camera module, compare the capabilities of both camera modules (imx664 and imx219) using v4l2-ctl. Specifically, look for any differences in the Capabilities, Device Caps, and Video Capture Capabilities sections.
    • The imx219 might support V4L2_CAP_VIDEO_CAPTURE_MPLANE or handle video capture in a way that is compatible with the jetsonmultimedia-api sample, whereas the imx664 might not.
  3. Check Driver and Firmware Versions:

    • Ensure that the driver and firmware versions for both camera modules are up-to-date and compatible with the Jetson Orin NX platform. Sometimes, version mismatches can lead to compatibility issues.
    • The Driver version and Media version fields in the v4l2-ctl output are 515148, indicating that the driver and media components are at the same version. Verify if this version supports the imx664 camera module’s required features.
  4. Inspect Camera Module Configuration:

    • The camera module (imx664) might require specific configuration or settings to enable V4L2_CAP_VIDEO_CAPTURE_MPLANE support. Check the device tree configuration or any module-specific settings that might need to be adjusted.
    • The jetsonmultimedia-api sample might assume certain defaults or configurations that are not met by the imx664 camera module.
  5. Use v4l2-compliance Tool:

    • Utilize the v4l2-compliance tool to test the V4L2 compliance of the imx664 camera module. This tool can help identify any V4L2 API issues or non-compliances that might be causing the problem.
    • Running v4l2-compliance with the -d /dev/video0 option (assuming /dev/video0 is the device file for the imx664 camera) can provide detailed information about the device’s V4L2 capabilities and any potential issues.
  6. Direct V4L2 Interface:

    • If the jetsonmultimedia-api sample uses a high-level interface, try using the Direct V4L2 Interface to capture video directly. This can help determine if the issue is with the high-level API or the underlying V4L2 support.
    • Using the Direct V4L2 Interface requires manually handling the V4L2 API calls, which can be more complex but provides a clearer understanding of what capabilities are supported by the device.
  7. Consult Documentation and Community Resources:

    • Refer to the official NVIDIA Jetson documentation, specifically sections related to camera development and V4L2 support.
    • Check community forums, such as the NVIDIA Developer Forums or specific Jetson-related communities, for similar issues or discussions that might offer insights or solutions.

By following these steps, you should be able to identify and potentially resolve the issue preventing the jetsonmultimedia-api sample from working with the imx664 camera module on the Jetson Orin NX platform.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

imx219’s capabilities is exactly the same, but when running jetson_multimedia_api/samples/camera_unit_sample, everything is ok.

Does argus_camera working?

It looks like hardware problem, i2c is not working. Are there any instructions for solving hardware problems?

Checking the power/reset/standby pins in correct status.