Edit kernel/kernel-jammy-src/arch/arm64/configs/defconfig using vim: CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_IMX219=y CONFIG_VIDEO_V4L2=y
Build the kernel: make -C kernel
After successful build, I can see the object file: kernel/kernel-jammy-src/drivers/media/i2c/imx219.o
Set the installation path for modules: export INSTALL_MOD_PATH= <install-path>/Linux_for_Tegra/rootfs/
Install the kernel modules: sudo -E make install -C kernel
Copy the kernel image: cp kernel/kernel-jammy-src/arch/arm64/boot/Image <install-path>/Linux_for_Tegra/kernel/Image
Update the kernel using the SDK manager
On Jetson Platform:
After flashing and rebooting the system, I can see the sys path exists: /sys/bus/i2c/drivers/imx219
Open a terminal and run sudo dmesg. I see the kernel updated information: "SMP PREEMPT Sat Dec 28 23:09:28 CST 2024" (This timestamp matches the build time of the Image)
However, the keyword “imx219” is not present in the dmesg output.
Question:
Even though the IMX219 sensor is not physically connected, I believe it should be probed during system boot. Did I miss any steps?
If these suggestions don’t help and you want to report an issue to us, please attach the model, command/step, and the customized app (if any) with us to reproduce locally.
Hi @carolyuu ,
I don’t quite understand what you mean here. My purpose is to bring up the imx219 sensor driver, after that , i will use V4L2 to stream the video. I won’t use the deep learning functions for my use case. Why do i need to install TensorFlow or PyTorch?
BTW, when typing cat /lib/modules/5.15.148-tegra/modules.builtin, I can see kernel/drivers/media/i2c/imx219.ko, but I still can’t see any probing message in dmesg. (Please note I did not plug in the imx219 sensor. I am not sure if it affects or not.)
Hi Jerry,
Because I am very new to this topic, I tried to check the device-tree overlay steps :.
Add your .dtsi file to the camera conguration .dtsi file.
tegra234-p3737-camera-modules.dtsi is for Jetson AGX-orin.
→ #include "tegra234-p3737-0000-camera-imx274-dual.dtsi" is alreay in tegra234-p3737-camera-modules.dtsi
Set the status of your device tree nodes to disabled.
imx274 is alreay disabled
→
imx274_a@1a{
status = "disabled";
};
Add the overlay information as fragments below to a new .dts file"
→ tegra234-p3737-camera-dual-imx274-lverlay.dts has the overlay information.
Update the .dts file with proper overlay information and a compatible string
–>In tegra234-p3737-camera-dual-imx274-overlay.dts, I saw the following description which set the overlays status=okay
Before you flash, move the .dtbo to flash_folder/kernel/dtb/.
→ cp kernel-devicetree/generic-dts/dtbs/* <install-path>/Linux_for_Tegra/kernel/dtb/
Add the following lines to the .conf file.
→ Because my platform is Jetson AGX Orin 64GB module, I check jetson-agx-orin-devkit.conf. OVERLAY_DTB_FILE already includes tegra234-p3737-camera-dual-imx274-lverlay.dtbo
Flash the target board by SDK manager
However, after flashing & reboot the target board and type “dmesg”, I cannot see any imx274 probe information. Could you give me some guidance for this problem?
you don’t need to modify the code,
there’s already /boot/tegra234-p3737-camera-dual-imx274-overlay.dtbo if you flashed Jetpack-6.1 public release.
please refer to Configuring the CSI Connector to run Jetson-IO utility to apply device tree overlay.
Hi @JerryChang ,
After selecting the compatible hardware as imx274 in Jetson-IO. It can work now. I can also modify the overlay file as imx219 in /boot/extlinux/extlinux.conf , then in dmesg I can see imx219 probe message.
as you can see… it’s a specific dtbo file, /boot/tegra234-p3737-camera-dual-imx274-overlay.dtbo.
please also dig into kernel release sources, you may develop an overlay file by yourself.
for instance, $public_sources/hardware/nvidia/t23x/nv-public/overlay/
Locate and edit the .dtsi file: <top>/hardware/nvidia/t23x/nv-public/overlay/tegra234-p3737-0000+p3701-0000-dynamic.dts
Replace the following line with an #include statement specifying the .dtsi file for your new device.
(1) remove #include "tegra234-p3737-camera-modules.dtsi"
(2) add #include tegra234-p3767-camera-p3768-imx219-dual.dtboand save the file
it seems you’ve misunderstood.
please dig into device tree overlay file,
for instance,
here is the sources of Jetson Camera Dual-IMX274. $public_sources/kernel_src/hardware/nvidia/t23x/nv-public/overlay/tegra234-p3737-camera-dual-imx274-overlay.dts
since you’re working with AGX Orin, which doesn’t support IMX219 by default.
even though there’s IMX219 device tree overlay file, you still need some modification too.
for instance,
here’s sources of IMX219 device tree overlay $public_sources/kernel_src/hardware/nvidia/t23x/nv-public/overlay/tegra234-p3767-camera-p3768-imx219-A.dts
may I also know how you connect a IMX219 to AGX Orin?
please see-also Camera Design Guide, AGX Orin and Orin Nano/NX they’re having different camera connectors.
if you’re developing your own camera board, please consider it’s another sensor bringup works.
Hi @JerryChang ,
I checked it again, and think for tegra234-p3767-camera-p3768-imx219-A.dts, I need to
replace include <dt-bindings/tegra234-p3767-0000-common.h>
to include <dt-bindings/tegra234-p3737-0000+p3701-0000.h>
Change jetson-header-name to “Jetson AGX CSI Connector”
Change compatible to JETSON_COMPATIBLE.
But besides this, i am not sure what else need to modfiy.
I am very confused now & have some questions :
After modifying it, if I follow the steps in the sub-section device-tree-overlay, will the imx219 appear in jetson-io menu ?
Where to configure the IO pins for SCL and SDA ? I can’t find it either in imx219.c or dts files.
We will connect imx219 to the CSI interface. Is it the OK to modify tegra234-p3767-camera-p3768-imx219-A.dts ? or do you suggest which dts file to refer ?
>> Is it the OK to modify tegra234-p3767-camera-p3768-imx219-A.dts ? or do you suggest which dts file to refer ?
as you can see… it’s sensor device tree with such hardware, Raspberry Pi Camera, IMX219.
please develop another new device tree since you’re going to connect IMX219 to AGX Orin’s CSI interface,
you may dig into that’s cameras from AGX Orin menu of Jetson-IO for reference,
for instance, $public_sources/r36.4.0/Linux_for_Tegra/source/kernel_src/hardware/nvidia/t23x/nv-public/overlay/tegra234-p3737-camera-dual-imx274-overlay.dts
Hi @JerryChang ,
I will dig into imx274 dts first. Thank you.
For the following information, may I know where it mentions the IO pins for SDA/SCL ? From Camera Design Guide, i see there are i2c3, i2c2, i2c4 i2c5, but i can’t see the correponding description both in driver and dts file
I see there is nv_imx219.c and imx219.c, which driver can I use ? I asked this question because when I insmod or modprobe nv_imx219 or nv_imx274,there is nothing appears in dmesg.
as you can see from [Figure 2-3. Single Camera Case Block Diagram],
it uses CAM_I2C, which is I2C3, you may also refer to below… $public_sources/r36.4.0/Linux_for_Tegra/source/kernel_src/hardware/nvidia/t23x/nv-public/tegra234.dtsi
for instance,
for the multi-camera use-case, it’ll use the GPIO-based i2c bus multiplexer to route the i2c signals.
you may see-also Topic 192486, comment #17 for reference.
did you download the latest r36.4 public release sources package?
it should changes to nv_imx219.c
you’ll also need to apply VI/CSI port bindings, which is done by device tree overlay.
(2) For loadable kernel module
I checked the device tree of imx185, the VI/CSI port bindgs are already described in the overlay dtsi. tegra234-p3737-camera-imx185-overlay.dts.txt (5.2 KB)
So I select imx185 in jetson-io.py, and the extlinux.conf is updated after reboot:
you may putting the dtbo to your target instead of re-flashing.
here’s demonstration.
you may download this attachment, tegra234-p3737-camera-test-overlay.7z (1.9 KB), which has included sample overlay sources and dtbo file.
and, please copy dtbo file via ssh to… /boot/tegra234-p3737-camera-test-overlay.dtbo
by launching Jetson-IO to configure Jetson AGX CSI connector, you’ll see a new option available.
for instance,
=================== Jetson Expansion Header Tool ===================
| |
| |
| Select one of the following options: |
| |
...
| Jetson Camera TEST TEST |
FYI, it’s overlay file duplicated from tegra234-p3737-camera-dual-imx274-overlay.dts
you may based-on that to develop your new sensor driver, let’s have another new forum thread if you need further supports.