MIPI Cam Enable default with using Jetson Expansion Header Tool Jetson IO

I am using Jetson OrinNX 16GB module with 1 TB Nvme SSD with Inhouse Carrier Board.
I am using L4T version 35.2.1 . When I try to connect MIPI camera IMX477 Arducam. It wont get detected. After flashing I need to configure the MIPI Camera via Jetson IO tool, why so ?

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

Kindly help to resolve this.

Thanks…

hello Sunim_1,

that’s due to Orin NX by default to detect IMX219 to register camera device.
FYI, as mentioned by Topic 322227, IMX219 auto-detection has disabled in the JP-6.2/r36.4.3 release version.

please update the device tree, please remove IMX219 from the base device tree.
for instance, $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3768-0000-a0.dtsi

By removing IMX219 from the device or just try to change the status ?

  1. I am using this dtb file or can say command for flashing the OrinNX SOM:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml --no-systemimg” --showlogs --network usb0 p3509-a02+p3767-0000 internal

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_nvme.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 p3767 external

So where do I make changes to make IMX477 Camera Auto detect after flashing the SOM.

  1. Is their any other way without removing IMX219 from the device tree or can say just disbale the status. Is that work ?

hello Sunim_1,

>> Q1
you’ll need to rebuilt the kernel sources to create a new device tree, which has exclude imx219.

>> Q2
yes, you may using device tree overlay, it’s same as you configure CSI connector through Jetson-IO.

Q1 Is it okay to make changes in the device tree for including IMX219 along with IMX477 by changing the status disabled to “okay” ?

Q2 Do I make change the status to “okay” here ?

cam_i2cmux {
compatible = “i2c-mux-gpio”;
#address-cells = <0x01>;
#size-cells = <0x00>;
mux-gpios = <0x66 0x13 0x00>;
i2c-parent = <0x2ab>;
status = “okay”;

	i2c@0 {
		reg = <0x00>;
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "okay";
		phandle = <0x472>;

		rbpcv3_imx477_a@1a {
			compatible = "ridgerun,imx477";
			reg = <0x1a>;
			devnode = "video0";
			physical_w = "3.680";
			physical_h = "2.760";
			sensor_model = "imx477";
			use_sensor_mode_id = "true";
			status = "disabled";
			reset-gpios = <0x05 0x3e 0x00>;
			phandle = <0x473>;

And here,

	i2c@1 {
		reg = <0x01>;
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "okay";
		phandle = <0x476>;

		rbpcv3_imx477_c@1a {
			compatible = "ridgerun,imx477";
			reg = <0x1a>;
			devnode = "video1";
			physical_w = "3.680";
			physical_h = "2.760";
			sensor_model = "imx477";
			use_sensor_mode_id = "true";
			status = "disabled";
			reset-gpios = <0x05 0xa0 0x00>;
			phandle = <0x477>;

hello Sunim_1,

please refer to Release Notes (r36.4.3),
you may check [4.2. Device Registration] to create a device tree overlay (DTB overlay or .dtbo) file to register the camera module.

Hello @JerryChang , As I see in the device tree file in tegra234-p3767-0000-p3509-a02.dts I found imx219 and imx477 entry as cam_i2cmux and i2c@1 so here the status is set to disabled so while enable it to “okay” will solve solve my imx477 problem for using jetson io tool ?

hello Sunim_1,

yes, that’s what device tree overlay has done.

I am using L4T 35.2.1 OrinNX 16GB Module.
I enabled IMX477 device tree overlay but looks like IMX219 device tree overlay is not having status options in the device tree.

IMX477:
i2c@1 {
reg = <0x01>;
#address-cells = <0x01>;
#size-cells = <0x00>;
status = “okay”;
phandle = <0x476>;

		rbpcv3_imx477_c@1a {
			compatible = "ridgerun,imx477";
			reg = <0x1a>;
			devnode = "video1";
			physical_w = "3.680";
			physical_h = "2.760";
			sensor_model = "imx477";
			use_sensor_mode_id = "true";
			status = "okay";
			reset-gpios = <0x05 0xa0 0x00>;
			phandle = <0x477>;

IMX219:

rbpcv2_imx219_c@10 {
compatible = “sony,imx219”;
reg = <0x10>;
devnode = “video1”;
physical_w = “3.680”;
physical_h = “2.760”;
sensor_model = “imx219”;
use_sensor_mode_id = “true”;
reset-gpios = <0x05 0xa0 0x00>;
phandle = <0x479>;

Is IMX219 automatically detected or I need to explicitly add the status option like below ?

    status = "okay";  // Explicitly enable IMX219

hello Sunim_1,

that’s correct, Orin NX by default to detect IMX219 to register camera device.
you’ll need to update base device tree to exclude IMX219.

  1. Alright and what about IMX477 ?
		rbpcv3_imx477_c@1a {
			compatible = "ridgerun,imx477";
			reg = <0x1a>;
			devnode = "video1";
			physical_w = "3.680";
			physical_h = "2.760";
			sensor_model = "imx477";
			use_sensor_mode_id = "true";
			status = "okay";
			reset-gpios = <0x05 0xa0 0x00>;
			phandle = <0x477>;

While enabling in the main dtb that is here make IMX477 default detection without using Jetson-IO Tool ?

  1. For IMX219 Do I need to add explicitly in the device tree node like this:

    status = “okay”; // Explicitly enable IMX219 ??

yes, I’ve already share the approach as mentioned in comment #4.

Yes, but in the dtb Device tree overlay is already present as you see this:

rbpcv3_imx477_c@1a {
			compatible = "ridgerun,imx477";
			reg = <0x1a>;
			devnode = "video1";
			physical_w = "3.680";
			physical_h = "2.760";
			sensor_model = "imx477";
			use_sensor_mode_id = "true";
			status = "okay";
			reset-gpios = <0x05 0xa0 0x00>;
			phandle = <0x477>;

But after enabling the status it looks like I flashed OrinNX and configured also but after configuration I wont be able to get L4T. The device goes in APX Mode why ?

Here is the command I used for flashing and building sources:

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml --no-systemimg” --showlogs --network usb0 p3509-a02+p3767-0000 internal

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_nvme.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 p3767 external

hello Sunim_1,

it looks you’ve confused with device tree blob (*.dtb) and device tree blob overlay (*.dtbo).
it’s A_kernel-dtb partition to have *.dtb file, and upon system boot-up, it apply the driver settings by parsing device tree blob.
*.dtbo is putting under /boot/, it’s loaded after, to overwrite the defined settings accordingly.

Alright understood can you help me little more to find the path or file where I need to make changes for OrinNX 16GB. As for flashing or downloading source build I used this dtb : tegra234-p3767-0000-p3509-a02.dtb.

And using this dtb I flash and everything works well just I dont need to reconfigure everytime IMX477 via Jetson IO Tool, I need to make it IMX477 permanent detected while bootup the SOM.

hello Sunim_1,

did you using Orin NX module with Xavier NX carrier board?
it should be tegra234-p3768-0000+p3767-0000-nv.dtb if you’re working with Orin NX developer kit.
here’s an example about the naming.
p3767 - Orin module
p3768 - Orin carrier board

Yes, I am working with OrinNX SOM with XavierNX Developer Kit.

And I use this dtb to flash:
tegra234-p3767-0000-p3509-a02.dtb

hello Sunim_1,

please see-also Jetson FAQ | NVIDIA Developer, Orin NX/Nano are not pin-to-pin compatible with Xavier NX carrier board.
please running with Orin Nano carrier board for camera use-cases.

Alright so what will be my dtb for Orin Nano Dev kit Carrier Board ?

And do I follow this process to flash with Orin Nano Devkit also ?

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_external.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml --no-systemimg” --showlogs --network usb0 p3509-a02+p3767-0000 internal

sudo ./tools/kernel_flash/l4t_initrd_flash.sh --flash-only --external-device nvme0n1p1 -c tools/kernel_flash/flash_l4t_nvme.xml -p “-c bootloader/t186ref/cfg/flash_t234_qspi.xml” --showlogs --network usb0 p3767 external

hello Sunim_1,

please refer to developer guide for sample flash commands, To Flash the Jetson Developer Kit Operating Software.