Hi,
I’m trying to get our proprietary camera working on Orin Nano with 36.4.4 Linux version.
We sell an infrared camera with CSI interface for which we developped a kernel module and the corresponding device_tree file. This camera works fine on the Orin Nano board with 36.4.0 Linux. We include our dtsi file in /source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi which is then build into the final OS image.
When upgrading to the newer OS version of 36.4.4 we cannot bring up the camera. The module is never loaded and our camera is nowhere to be found when dumping the device tree with dtc -I fs /proc/device-tree
We can however read and write camera registers through i2ctransfer.
Additionaly when flashing a 36.4.4 on a SD card and then booting the board, the bootloader is also updated to 36.4.4 which, from what I understand prevent the camera to bring up when booting a previously working 36.4.0 OS version.
I don’t see why updating the board bootloader could impact CSI cameras. What changed when migrating from 36.4.0 to 36.4.4 is also a mystery to me.
Anything obvious I’m missing ?
Thanks
hello @mickaelPo
Since the camera node is missing from /proc/device-tree, the driver will never probe. The fact that you can read and write sensor registers over I2C confirms that the sensor is electrically reachable, but it does not confirm that the camera node was included in the active device tree.
Given that the same DTSI worked on 36.4.0, I would focus on the device-tree generation path first:
-
Verify that your camera DTSI is still included in the device-tree source hierarchy used by 36.4.4:
grep -R "<your-camera-dtsi>" hardware/nvidia/t23x/nv-public/nv-platform/
-
Decompile the DTB generated by the 36.4.0 build and the DTB generated by the 36.4.4 build, then compare them to determine whether the camera node is already missing before flashing:
dtc -I dtb -O dts -o old.dts <path-to-36.4.0-dtb>
dtc -I dtb -O dts -o new.dts <path-to-36.4.4-dtb>
diff -u old.dts new.dts
You can also search for your camera node or compatible string:
grep -i "<camera-node-or-compatible>" old.dts
grep -i "<camera-node-or-compatible>" new.dts
-
Compare the generated DTB against the running device tree:
dtc -I fs -O dts -o running.dts /proc/device-tree
grep -i "<camera-node-or-compatible>" running.dts
Regarding the bootloader update, on Orin platforms UEFI participates in DTB selection before Linux starts, so a bootloader update can indirectly affect which DTB is loaded.
Regards,
Daniel R.
Embedded SW Engineer at RidgeRun
Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com
Website: www.ridgerun.com
Hello @daniel.rojas.m,
Thanks for your reply.
I will investigate following the steps you suggest.
It’s likely a device tree issue indeed. Or something related to DTB loading in bootloader.
Regards,
Hello,
Upon further investigation I have a better understanding of the issue.
I found that our custom camera dts configuration is built into:
/boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb
When flashing a Jetson Orin Nano with flash.sh script, this file is written as the default dtb file in the bootloader. However when flashing a brand new Nano with a .img file on a SD card using Balena Etcher for example, the file loaded by the bootloader is the original:
/boot/tegra234-p3768-0000+p3767-0005-nv.dtb
This file doesn’t include our camera configuration.
Does that mean you cannot use a SD card image on a brand new Nano board ?
Is there a way to define the .dtb file to be loaded by bootloader from a flashed Nano ?
Regards,
Mickael
Suppose the /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv.dtb is copy from /boot/tegra234-p3768-0000+p3767-0005-nv.dtb.
You need integrate your camera to tegra234-p3768-0000+p3767-0005-nv.dtb before generate the .img file on SD card.
Thanks
Hello @ShaneCCC,
Thanks, this should work!
I also tested adding a FDT line to /boot/extlinux/extlinux.conf
It works as well.
Also as I explained in my original message, we include our camera.dtsi in /source/hardware/nvidia/t23x/nv-public/nv-platform/tegra234-p3768-0000+p3767-xxxx-nv-common.dtsi which is itself included in tegra234-p3768-0000+p3767-0005-nv.dts and others.
Is it the proper way to do or there are a better way to add our camera configuration?
Thanks,
Mickael
Implement the device tree overlay like tegra234-p3767-camera-p3768-imx219-dual.dtbo to apply it by OVERLAYS like below.
LABEL JetsonIO
MENU LABEL Custom Header Config: <CSI Camera IMX219 Dual>
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra234-p3768-0000+p3767-0005-nv-super.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=PARTUUID=7e2b7024-5ed7-4328-b20b-0d6b47386584 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 firmware_class.path=/etc/firmware fbcon=map:0 video=efifb:off console=tty0 efi_pstore.pstore_disable=1 pstore.backend=ramoops efi=runtime pci=pcie_bus_perf nvme.use_threaded_interrupts=1 swiotlb=2048 nv-auto-config
OVERLAYS /boot/tegra234-p3767-camera-p3768-imx219-dual.dtbo
Ok thanks. I will try to add an overlay.
Mickael