How to change nvcsi setting (such as cil_settletime,lane num) after kernel boot?

Hi ,dear NVIDIA support team
According to my project requirements, I need to change my camera hardware at any time, and each time I need to modify the device tree and driver, which makes me very uncomfortable. Could you please tell me if there is a method and application case for online modification of nvcsi properties and camera device properties?
I saw in the kernel code that there are CSI2-fops.c, CSI4-fops.c, and CSI5-fops.c files. Is it correct that the camera currently uses the CSI2-fops.c interface? Is it possible for me to achieve the previously mentioned functional requirements by calling custom nvcsi settings functions through ioctl?

hello 541449841,

you may refer to developer guide, Creating a Custom Device Tree Overlay.
then… you could apply the device tree overlay according the camera device you’ve connect to the target.

this should be better section, To Create and Apply a DTB Overlay File for camera use-case.

I understand the usage of DTB Overlay, but it is difficult for assembly line workers. We want to implement passing parameters from user space to the kernel and make corresponding adjustments based on these parameters to light up different specifications of the camera.

hello 541449841,

practically, CSI camera isn’t plug-n-play. there’re device tree properties to define hardware related settings.
it’s kernel init progress to detect and power-on/off for camera device registration. you’ll see camera device register to video nodes only if there’s no errors.

you’ll need to revise device tree settings, changing nvcsi settings after kernel boot-up isn’t an appropriate ways for sensor bring-up stage.

what’s the real use-case, are you going to setup an environment for remote sensor bring-up?

We are a CMOS sensor design company that needs to test the performance of all our sensors on the Orin platform. Frequent modification of the device tree would obviously increase our testing costs and reduce efficiency.

So we hope to be able to make changes to the relevant settings from user space to activate sensors with different resolutions, without the need for frequent modification of the device tree and device restarts.

hello 541449841,

please see-also developer guide for Port Binding, it’s low-level driver check those node definitions to register the camera devices.
besides, please see-also Sensor Pixel Clock section; the camera software uses the sensor pixel clock to calculate the exposure and frame rate of the sensor. It must be set correctly to avoid potential issues.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.