Overlay not applied using jetson-io.py

I am trying to get familiar with AGX Orin development, with end goal of integrating a custom sensor.

I built the overlays in /usr/src/hardware/nvidia/t23x/nv-public/overlay and applied a few of them using jetson-io.I want to apply the tegra234-p3737-camera-e3333-overlay.dtbo as we will base our custom device tree on this. I move the .dtbo to /boot/, and it is detected by jetson-io. I apply the overlay to the CSI connector and reboot. When I look at the modules, the badges are defined as values from other overlays:

jin@ubuntu:/sys/firmware/devicetree/base/tegra-camera-platform/modules$ cat module0/badge
imx274_bottom_A6V26

jin@ubuntu:/sys/firmware/devicetree/base/tegra-camera-platform/modules$ cat module1/badge

imx274_top_A6V26

jin@ubuntu:/sys/firmware/devicetree/base/tegra-camera-platform/modules$ cat module2/badge
dual_hawk_centerleft

jin@ubuntu:/sys/firmware/devicetree/base/tegra-camera-platform/modules$ cat module3/badge

dual_hawk_centerright

jin@ubuntu:/sys/firmware/devicetree/base/tegra-camera-platform/modules$ cat module4/badge

e3333_bottomright_P5V27C

jin@ubuntu:/sys/firmware/devicetree/base/tegra-camera-platform/modules$ cat module5/badge

e3333_topright_P5V27C

Why are module0 through module3 not being updated?

Also attaching dtc output of /proc/device-tree for reference.

device-tree.txt (399.1 KB)

hello j-lee9,

please double check release note for [4.1. Camera] to review your dtbo.
besides.. we may dig into booting logs, especially the UEFI messages for loading device tree overlay.

Hi Jerry,

Thanks, we were able to get it working and confirm our imx219-dummy sensor (no I2C, based on imx219.c) is probed. However, /dev/video0 and /dev/video1 are not detected. Attaching the .dtso for reference.

media-ctl output:

jin@ubuntu:/boot/extlinux$ sudo dmesg | grep imx
[ 10.142666] [DEBUG] imx219_probe successful
[ 10.143008] [DEBUG] imx219_probe successful
jin@ubuntu:/boot/extlinux$ media-ctl -p -d /dev/media0
Media controller API version 5.15.148

Media device information

driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148

Device topology

The sensor driver was built and added to the kernel. The overlay was built and applied using jetson-io.py.

I also notice that few other sensors are included in the device tree, even though only the imx219-dummy overlay is applied in extlinux.conf:

jin@ubuntu:/proc/device-tree$ find . | grep imx1
./bus@0/i2c@3180000/tca9546@70/i2c@0/imx185_a@1a
./bus@0/i2c@3180000/tca9546@70/i2c@0/imx185_a@1a/delayed_gain
./bus@0/i2c@3180000/tca9546@70/i2c@0/imx185_a@1a/mode0

jin@ubuntu:/proc/device-tree$ find . | grep imx27
./bus@0/lens_imx274@A6V26
./bus@0/lens_imx274@A6V26/f_number
./bus@0/lens_imx274@A6V26/aperture
./bus@0/lens_imx274@A6V26/min_focus_distance
./bus@0/lens_imx274@A6V26/hyper_focal

jin@ubuntu:/proc/device-tree$ find . | grep e3333
./e3333_lens_ov5693@P5V27C
./e3333_lens_ov5693@P5V27C/f_number
./e3333_lens_ov5693@P5V27C/aperture
./e3333_lens_ov5693@P5V27C/min_focus_distance
./e3333_lens_ov5693@P5V27C/hyper_focal
./e3333_lens_ov5693@P5V27C/focal_length
./e3333_lens_ov5693@P5V27C/name

Not sure how to go about debugging, as most of the tips require /dev/video0 to be detected. Could you advise?

tegra234-p3737-camera-imx219-dummy-overlay.txt (8.2 KB)

Also attaching the sensor driver for reference. We want to just capture a few frames using v4l2-ctl, bypassing vi.

imx219-dummy.txt (40.5 KB)

You should have imx219_dummy_* in the i2c scope. And keep the i2c_client in the imx219-dumy.c for v4l framework to probe the video node.

You can just remove all the i2c REG access code instead of remove i2c_client struct.

Hi Shane.

Thanks for the feedback.

Once making these changes and setting status = “okay” for all of the nodes (attached), the Tegra VI driver seems to try initializing the graph. However, during subdev initialization, something fails and the Jetson catastrophically crashed. We failed to bring it back in recovery mode and had to reset the Jetson using sdkmanager.

Here is the condensed call trace:

tegra_channel_remove_subdevices

tegra_channel_remove_subdevices … [tegra_camera]

tegra_channel_init_subdevices … [tegra_camera]

tegra_vi_graph_init … [tegra_camera]

v4l2_async_notifier_try_complete.part … [v4l2_async]

v4l2_async_register_subdev … [v4l2_async]

v4l2_async_register_subdev_sensor … [v4l2_fwnode]

imx219_probe … [imx219_dummy]

i2c_device_probe

really_probe.part

Here is relevant section in imx219_probe:

imx219->sd.internal_ops = &imx219_internal_ops;

imx219->sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE |

V4L2_SUBDEV_FL_HAS_EVENTS;

imx219->sd.entity.function = MEDIA_ENT_F_CAM_SENSOR;

*/\* Initialize source pad \*/*

imx219->pad.flags = MEDIA_PAD_FL_SOURCE;

*/\* Initialize default format \*/*

imx219_set_default_format(imx219);

ret = media_entity_pads_init(&imx219->sd.entity, 1, &imx219->pad);

if (ret) {

dev_err(dev, “failed to init entity pads: %d\n”, ret);

goto error_handler_free;

}

ret = v4l2_async_register_subdev_sensor(&imx219->sd);

if (ret < 0) {

dev_err(dev, “failed to register sensor sub-device: %d\n”, ret);

goto error_media_entity;

}

Does the Tegra driver expect a different entity function or additional setup? What could be causing the crash?

Screenshot:

tegra234-p3737-camera-imx219-dummy-overlay.txt (9.0 KB)

imx219-dummy.txt (39.7 KB)

I don’t know what your modification.

However, I would suggest using original imx219 device tree and nv_imx219.c to remove all i2c read/write for it.

Sure. Will start another thread on that as we tried building the nvidia-oot drivers and ran into issues.

Thanks for the help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.