I am migrating a camera driver from Jetpack-5 to Jetpack-6 and facing the issue that no /dev/videoX device created even-though the kernel driver is loaded (checked with lsmod). Also, no probing message in the beginning and ending of the probe function (either with dev_info() or pr_info()) is showed.
Also, the example of creating a device-tree overlay for point #1 in the R36.4.3 Release Note seems obsolete as there’s no more t19x platform since Jetpack-6 :
Therefore, I am a little bit stuck for a correct way to create or apply the device-tree overlay in order to register the camera device for a custom board in Jetpack-6.2.
may I know which JP-6 public release version you’re moving to?
you may see-also Topic 310858 for some known changes when porting DTS from JP-5 to JP-6.
or, developer guide, Camera Driver Porting to examine your sensor driver.
besides, here’s IMX185 camera overlay file used by Orin (t23x) series. $public_sources/kernel_oot_modules_src/hardware/nvidia/t23x/nv-public/overlay/tegra234-camera-imx185-a00.dtsi
I am using the latest Jetpack-6.2. I already read the link you suggesteda nd applied them but the problem is that the /dev/videoX is not created on my custom board. I would like you confirmation that using the device-tree overlay with the Jetson-IO tool is the only way to register a custom camera driver so that /dev/videoX is present and this could also be applied to a custom board instead of only developer kits as you said?
Jetson-IO changes the pin configurations through a graphic user interface, it may not able to launch if you used a custom board.
you may still using *.dtbo to load the device tree overlay. please note that, you can specify FDT alone. you can specify FDT + OVERLAYS. however, you cannot do only OVERLAYS though.
FYI, it’s due to overlays from Rootfs are processed only if DTB is coming from Rootfs. when FDT entry is not present in extlinux.conf UEFI DTB is used.
So for the custom carrier board of the Jetson Orin Nano, I should define FDT as the specific device-tree of my board or define FDT = /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb then add OVERLAYS as the device-tree overlay of the specific hardware of my carrier board like this example : Added new drivers to kernel - #9 by KevinFFF ?
it depends-on your board SKUs. you may refer to Overview of T23x Device Tree Structure.
please check you’ve include this dtsi file to build the device tree, tegra234-p3767-sku-handling.dtsi
furthermore, it’s p3768-0000-p3767-0000-a0.conf to process and determine which device tree flashing onto the target.
for instance,
update_flash_args_common()
{
...
elif [ "${board_sku}" = "0003" ]; then
BPFDTB_FILE="tegra234-bpmp-3767-0003-3509-a02.dtb";
DTB_FILE=tegra234-p3768-0000+p3767-0003-nv.dtb;
elif [ "${board_sku}" = "0004" ]; then
BPFDTB_FILE="tegra234-bpmp-3767-0004-3509-a02.dtb";
DTB_FILE=tegra234-p3768-0000+p3767-0004-nv.dtb;
elif [ "${board_sku}" = "0005" ]; then
BPFDTB_FILE="tegra234-bpmp-3767-0003-3509-a02.dtb";
DTB_FILE=tegra234-p3768-0000+p3767-0005-nv.dtb;
BTW,
please see-also EEPROM Modifications section.
since you’re having a customize board, you may need to modify the MB2 BCT file if the carrier board is designed without an EEPROM, i.e. cvb_eeprom_read_size = <0x0>.
I add the device-tree overlay in hardware/nvidia/t23x/nv-public/overlay/tegra234-p3767-camera-p3768-NV_TOTO-cam0-4lane-overlay.dts, and the tegra234-p3767-camera-p3768-NV_TOTO-cam0-4lane-overlay.dtbo is generated under kernel-devicetree/generic-dts/dtbs/
I then copied the newly generated dtb/dtbo to the SDK isntall folder : cp -rv kernel-devicetree/generic-dts/dtbs/* $SDK_JP_DIR/kernel/dtb/
I checked and saw that the tegra234-p3767-camera-p3768-NV_TOTO-cam0-4lane-overlay.dtbo file is avalable under $SDK_JP_DIR/kernel/dtb/
In $SDK_JP_DIR/, modified the flash configuration (toto-orin-nano-base.conf) by adding the above device-tree overlay :
OVERLAY_DTB_FILE+=“,tegra234-p3767-camera-p3768-NV_TOTO-cam0-4lane-overlay.dtbo”;
However, the tegra234-p3767-camera-p3768-NV_TOTO-cam0-4lane-overlay.dtbo does not appear at /boot of the running board so that I could add it into the /boot/extlinux/extlinux.conf. But the main device-tree kernel_tegra234-orin-nano-TOTO-CAMERA.dtb of the board does exist under /boot/ and /boot/dtb/
I copied the tegra234-p3767-camera-p3768-NV_TOTO-cam0-4lane-overlay.dtbo to the board manually, and added it to /boot/extlinux/extlinux.conf :
TIMEOUT 30
DEFAULT primary
MENU TITLE L4T boot options
LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
FDT kernel_tegra234-orin-nano-TOTO-CAMERA.dtb
OVERLAYS tegra234-p3767-camera-p3768-NV_TOTO-cam0-4lane-overlay.dtbo
INITRD /boot/initrd
APPEND ${cbootargs} root=PARTUUID=75096468-f687-4df7-b6fe-f1ada581bf0b rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 nospectre_bhb video=efifb:off console=tty0
But still no /dev/videoX or probling message shown.
this is only flashing QSPI, whereas those files should be flash to file system, (i.e. external)
ya, let’s have files copy to target manually for development stage.
could you please add some debug prints to check below has being called correctly? $public_sources/kernel_oot_modules_src/kernel/nvidia-oot/drivers/media/platform/tegra/camera/sensor_common.c
int sensor_common_init_sensor_properties(...)
{
...
dev_dbg(dev, "parsing for %s props\n", temp_str);
err = sensor_common_parse_signal_props(dev, node,
&sensor->sensor_modes[i].signal_properties);
err = sensor_common_parse_image_props(dev, node,
&sensor->sensor_modes[i].image_properties);
I’m not sure what’s the partition layout of your customize board. please check EMMC_CFG of your board config file for confirmation.
besides, please refer to.. $OUT/Linux_for_Tegra/tools/kernel_flash/README_initrd_flash.txt
you may check [Workflow 3: How to flash to an external storage] and [Workflow 4: How to flash to device with internal QSPI and an external storage device] for reference.
that’s correct, Jetson Orin Nano does not have an internal storage, (i.e. eMMC)
I assume you have NVMe as your external storage per your flashing logs. it should point the partition layout to flash_l4t_t234_nvme.xml
see-also To Flash the Jetson Developer Kit Operating Software.
it’s suggest we keep this bug for device registration, please debug into sensor probing issue.
we may use separate forum ticket regrading to pack the dtb and dtbo file into system.img for flashing. it needs your complete flashing logs for checking.