Dynamic camera driver loading issue

I want to support different camera sensors on the same MIPI interface.
We plan identify the the camera by reading camera id register, then load the corresponding driver.

How should we configure the Device Tree to integrate two camera settings into one single DTS file?

In normal cases, the CSI channel is configured in one-to-one correspondence with a single camera.

How should we write the CSI and camera device tree configurations to meet this dynamic multi-sensor adaptive requirement?

hello ekeechg,

may I have more details.. are you going to enable heterogenous cameras on the same CSI port?
or.. would you like to have several dtbo (device tree overlay) to support different camera hardware?

several dtbo to support different camera hardware

hello ekeechg,

it works with device tree overlay.

please also aware that.. Jetson AGX Thor Developer kit does not support CSI configuration via DTBO.
see-also this forum topic, How to add ...imx274-overlay.dtbo to sdkmanager/Jetpack7.1 to have dtbo applied to Thor? - #5 by JerryChang

Hi,Jerry:
Can DTBO be dynamically loaded via the file system after system boot? Because I want to load different dtbo according different camera.
All documents and forum discussions only mention loading during startup.

BR//ChengKe

hello ekeechg,

you may edit /boot/extlinux/extlinux.conf to add OVERLAYS entry for loading DTBO.
please note that, You can specify FDT alone. You can specify FDT + OVERLAYS. You cannot do only OVERLAYS though.

besides..
you may having several LABEL in the extlinux.conf, there’re L4T boot options in the UEFI stage, you may interrupt the UEFI to select different boot options.

Hi, Jerry:
是的,你说的方法我们试过,但是不能满足我们的需求。
你说的方法需要人为干预,并且只能初始化的时候加载一次。
我们的需求是在系统起来后根据识别到的相机,动态的加载对应的dtbo。

BR//ChengKe

hello ekeechg,

unfortunately, Plugin Manager is not supported anymore.
please refer to Release Notes (r38.4).
let me re-cap as below..

Because UEFI boot is enabled in this release, the plug-in manager is no longer supported.
You must create a device tree overlay (DTB overlay or .dtbo) file to register the camera module

Is there any other way can meet our reqirement?

hello ekeechg,

is your camera board have an EEPROM ID? if yes, UEFI may able to detect it dynamically.

Yes, I can read the camera ID register.
Can we only switch the camera DTBO during the UEFI phase?

hello ekeechg,

just for confirmation, please see-also Jetson EEPROM Layout.
you should have i2cread to your camera board to obtain an unique string.