IMX477 Arducam Configuring the Jetson Expansion Headers

I am using Jetson XaviernNX emmc module SOM and I connected IMX477 Camera with the som. Whenever I use camera with the newly flashed som. Camera is not detected under ls /dev/video*

Error:
ls /dev/video*
ls: cannot access ‘/dev/video*’: No such file or directory

Using the below approach, it works:

sudo /opt/nvidia/jetson-io/jetson-io.py

= Jetson Expansion Header Tool ===================
| |
| |
| Select one of the following: |
| |
| Configure Jetson 40pin Header |
| Configure Jetson Nano CSI Connector |
| Configure Jetson M.2 Key E Slot |
| Exit

ls /dev/video*
/dev/video0 /dev/video1

Is their any way so that I need not to configure the IMX477 MIPI Camera each time after flash.

Kindly help to resolve this and share the device tree overlay path where I need to make anychanges required.

I have done the following changes inside the dtb and try to reflash but still camera not detected under ls /dev/video*

devicetree.txt (11.3 KB)

Thanks…

Hello @Sunim_1

Do you know how to compile the kernel and device tree and flash the binaries compiled into the board?

If so, you can modify the kernel-5.10/arch/arm64/configs/tegra_defconfig from the kernel sources to set the IMX477 driver as a build-in driver as:

CONFIG_NV_VIDEO_IMX219=n
CONFIG_NV_VIDEO_IMX477=y

Compile all the binaries and flash them into the board.

I hope this helps.

Eduardo Salazar
Embedded SW Engineer at RidgeRun

Contact us: support@ridgerun.com
Developers wiki: https://developer.ridgerun.com/
Website: www.ridgerun.com

After flash you need to run the jetson-io to enable IMX477.

So, you mean to say doing this will resolve my problem of reconfiguring after flash?

CONFIG_NV_VIDEO_IMX219=m
CONFIG_NV_VIDEO_IMX477=m
CONFIG_NV_VIDEO_IMX268=m
CONFIG_NV_VIDEO_IMX274=m

IMX477 should be default enable. You just need to run the jetson-io to enable it after flash.

What does it mean “default enable” and need to run “jetson-io to enable” after flash ?

Kernel config is default enable but device tree need jetson-io to enable it by overlay.

@ShaneCCC @EduardoSalazar96 That’s what I dont want to enable everytime after flash using Jetson-IO Tool.

You can back up the dtb and extlinux.conf and restore it after flash .

I am using Jetpack versoin 5.1.5. I could not found overlay file for IMX477 in /boot/dtb.

Do I need to create an Overlay file for IMX477 ?

Should in the /boot

nvidia@nvidia-desktop:/boot$ ls /boot/ | grep -i imx
tegra234-p3737-camera-dual-imx274-overlay.dtbo
tegra234-p3737-camera-imx185-overlay.dtbo
tegra234-p3737-camera-imx390-addr-0x21-overlay.dtbo
tegra234-p3737-camera-imx390-overlay.dtbo
tegra234-p3767-camera-p3768-imx219-A.dtbo
tegra234-p3767-camera-p3768-imx219-C.dtbo
tegra234-p3767-camera-p3768-imx219-dual.dtbo
tegra234-p3767-camera-p3768-imx219-imx477.dtbo
tegra234-p3767-camera-p3768-imx477-A.dtbo
tegra234-p3767-camera-p3768-imx477-C.dtbo
tegra234-p3767-camera-p3768-imx477-dual-4lane.dtbo
tegra234-p3767-camera-p3768-imx477-dual.dtbo
tegra234-p3767-camera-p3768-imx477-imx219.dtbo

I found here:

ls /boot/ | grep -i imx
tegra194-p2822-camera-dual-imx274-overlay.dtbo
tegra194-p2822-camera-imx185-overlay.dtbo
tegra194-p2822-camera-imx390-overlay.dtbo
tegra194-p2888-0004-e3900-0000-dual-imx274.dtbo
tegra194-p2888-0004-e3900-0000-imx274.dtbo
tegra194-p3668-all-p3509-0000-camera-imx219-dual.dtbo
tegra194-p3668-all-p3509-0000-camera-imx477-dual.dtbo
tegra194-p3668-all-p3509-0000-camera-imx477-imx219.dtbo
tegra234-p3737-camera-dual-imx274-overlay.dtbo
tegra234-p3737-camera-imx185-overlay.dtbo
tegra234-p3737-camera-imx390-overlay.dtbo
tegra234-p3767-camera-imx219-dual.dtbo
tegra234-p3767-camera-imx477-dual.dtbo
tegra234-p3767-camera-imx477-imx219.dtbo
tegra234-p3767-camera-p3768-imx219-dual.dtbo
tegra234-p3767-camera-p3768-imx477-dual-4lane.dtbo
tegra234-p3767-camera-p3768-imx477-dual.dtbo
tegra234-p3767-camera-p3768-imx477-imx219.dtbo

Do I go with this: tegra194-p3668-all-p3509-0000-camera-imx477-dual.dtbo

And after that I need to apply the overlay and add imx477 entry in the extlinux.conf file ?

You can save kernel_tegra234-p3768-0000+p3767-0005-nv-super.dtb and tegra234-p3767-camera-p3768-imx219-dual.dtbo
for example and extlinux.conf to restore to new flash system to enable it.

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=bddef4c9-b10a-4a89-b922-af271ee39a03 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
	OVERLAYS /boot/tegra234-p3767-camera-p3768-imx219-dual.dtbo

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
MENU LABEL primary kernel (safe)
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb quiet nv-auto-config

LABEL imx477
MENU LABEL IMX477 Camera Overlay
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb quiet nv-auto-config
OVERLAYS /boot/tegra194-p3668-all-p3509-0000-camera-imx477-dual.dtbo

I try to edit extlinux.conf and reboot the SOM but nothing reflects any changes.

You have to modify the DEFAULT to imx477 instead of primary.

Does this look good:

TIMEOUT 30
DEFAULT imx477

MENU TITLE L4T boot options

LABEL primary
MENU LABEL primary kernel (safe)
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb quiet nv-auto-config

LABEL imx477
MENU LABEL IMX477 Camera Overlay
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb quiet nv-auto-config
OVERLAYS /boot/tegra194-p3668-all-p3509-0000-camera-imx477-dual.dtbo

I tried to make IMX477 Default and after reboot the SOM, no video devices detected under ls /dev/video*
Are there kernel modules or dtb changes required to detect IMX477 correctly?

I feel IMX477 Overlay does not applied fully.

Is this still an issue to support? Any result can be shared?

I try to implement the above process I shared but seems like imx477 overlay does not applied fully.
Can you help me with example extlinux.conf file need to be look like.

Here’s the config for imx219.

cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT JetsonIO

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      APPEND ${cbootargs} root=PARTUUID=bddef4c9-b10a-4a89-b922-af271ee39a03 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

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# LABEL backup
#    MENU LABEL backup kernel
#    LINUX /boot/Image.backup
#    INITRD /boot/initrd
#    APPEND ${cbootargs}

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=bddef4c9-b10a-4a89-b922-af271ee39a03 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
	OVERLAYS /boot/tegra234-p3767-camera-p3768-imx219-dual.dtbo

Here I modified according to IMX477. Have a look once and let me any required changes if needed.

TIMEOUT 30
DEFAULT JetsonIO

MENU TITLE L4T boot options

LABEL primary
MENU LABEL primary kernel
LINUX /boot/Image
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb quiet nv-auto-config

LABEL JetsonIO
MENU LABEL Custom Header Config:
LINUX /boot/Image
FDT /boot/dtb/kernel_tegra194-p3668-0001-p3509-0000.dtb
INITRD /boot/initrd
APPEND ${cbootargs} root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=efifb:off nospectre_bhb quiet nv-auto-config
OVERLAYS /boot/tegra194-p3668-all-p3509-0000-camera-imx477-dual.dtbo