Using ISP with custom sensor and my own driver

Hello,
I use a custom CSI Bayer sensor and I wrote a driver for the Jetson Nano.
V4l2 recording works perfectly.

Now I would like to use my driver and sensor with ISP.
As I understood there are different ISP config files for different sensors. But as I also understood it should be possible to use ISP with my custom driver and sensor even without providing an ISP config file, right?

But when I do:

gst-launch-1.0 nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12’ ! fakesink

I get the following error:

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No cameras available

Can you give me some more hints on how to debug my driver, device tree, or setup to get more information with going wrong with ISP?

Any help would be appreciated!
Thank you very much!

Best regards,
jb

It’s could be the context of tegra-camera-platform have something miss cause “No camera available”

Do you see something that could be wrong? In general I think I would need to know what is important for v4l2 interface and what is important for ISP because then I knew where to look into more detail.

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 = <4>;
max_lane_speed = <1500000>;
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 {
  	cam_module0: module0 {
  		badge = "OS02C10_bottom_liOS02C10";
  		position = "bottom";
  		orientation = "0";
  		cam_module0_drivernode0: drivernode0 {
  			/* Declare PCL support driver (classically known as guid)  */
  			pcl_id = "v4l2_sensor";
  			/* Driver v4l2 device name */
  			devname = "OS02C10 30-0036";
  			/* Declare the device-tree hierarchy to driver instance */
  			proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@0/OS02C10_a@36";
  		};
  	};
  };

};

What’s the v4l2-ctl --all shows?

I added some more camera controls.
left, top, conversion_gain_control, black_level

But this cant be the problem, can it?

Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, OS02C10 6-0036
Bus info : platform:54080000.vi:0
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: no power)
Format Video Capture:
Width/Height : 1920/1080
Pixel Format : ‘RG10’
Field : None
Bytes per Line : 3840
Size Image : 4147200
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :

Camera Controls

                 group_hold 0x009a2003 (bool)   : default=0 value=0 flags=execute-on-write
                 hdr_enable 0x009a2004 (intmenu): min=0 max=1 default=0 value=0
                    fuse_id 0x009a2007 (str)    : min=0 max=6 step=2 value='530243' flags=read-only, has-payload
                sensor_mode 0x009a2008 (int64)  : min=0 max=0 step=0 default=0 value=0 flags=slider
                       gain 0x009a2009 (int64)  : min=0 max=0 step=0 default=0 value=0 flags=slider
                   exposure 0x009a200a (int64)  : min=0 max=0 step=0 default=0 value=1 flags=slider
                 frame_rate 0x009a200b (int64)  : min=0 max=0 step=0 default=0 value=1 flags=slider
                       left 0x009a200d (int64)  : min=0 max=0 step=0 default=0 value=0 flags=slider
                        top 0x009a200e (int64)  : min=0 max=0 step=0 default=0 value=0 flags=slider
                     mirror 0x009a200f (int64)  : min=0 max=0 step=0 default=0 value=0 flags=slider
                black_level 0x009a2010 (int64)  : min=0 max=0 step=0 default=0 value=0 flags=slider
       conversion_gain_mode 0x009a2011 (int64)  : min=0 max=0 step=0 default=0 value=0 flags=slider
                bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
            override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
               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
           write_isp_format 0x009a2068 (bool)   : default=0 value=0
   sensor_signal_properties 0x009a2069 (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
    sensor_image_properties 0x009a206a (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
  sensor_control_properties 0x009a206b (u32)    : min=0 max=0 step=0 default=0 flags=read-only, has-payload
          sensor_dv_timings 0x009a206c (u32)    : min=0 max=0 step=0 default=0 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
               sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=2 flags=read-only

Modify the devname = “OS02C10 30-0036” to “OS02C10 06-0036” in the device tree

EDIT: This is not valid anymore, see next post!

Thank you for your fast response.
But I still get the same error after updating the device tree. :/

Any other things I can try?

I had it wrong in this line

proc-device-tree = “/proc/device-tree/host1x/i2c@546c0000/tca9546@70/i2c@0/OS02C10_a@36”;

I compared to imx219 example and fixed it to:

proc-device-tree = “/proc/device-tree/host1x/i2c@546c0000/OS02C10_a@36”;

I guess I got mixed up, because I started develope for Jetson Xavier NX.

Now it is working. :) Thank you very much!

Best regards,
jb