How to integrate sensor device tree to jetson agx orin

我现在有一份isx021摄像头的驱动文件以及dtsi设备树文件。
现在我已经将它添加到Jetson Agx Orin中,我的操作如下:
1.我对驱动文件的操作是这样的:
驱动文件isx021.c复制到了Linux_for_Tegra/source/src/kernel-5.10/nvidia/drivers/media/i2c/下
并且在Kconfig和makefile中增添isx021的部分。使用./nvbuild.sh -o $PWD/kernel_out编译时,成功编译isx021.ko文件

2.我对dtsi文件的操作是这样的:
进入到Linux_for_Tegra/source/src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb目录下
在tegra234-p3737-0000-a04.dtsi文件中,我添加了#include “tegra234-p3737-0000-camera-sony_isx021-a00.dtsi”。

在tegra234-p3737-camera-modules.dtsi文件中,添加了 include “tegra234-p3737-0000-camera-sony_isx021-a00.dtsi”
include <t234-common-modules/tegra234-camera-sony_isx021-a00.dtsi>
使用./nvbuild.sh -o $PWD/kernel_out编译时,成功编译出tegra234-p3701-0005-p3737-0000.dtb文件。并添加到jetson agx Orind设备/boot/dtb目录下,确认extlinux.config中的FDT正确后,reboot。

3.安装驱动文件时,驱动文件找不到设备树中isx021的节点,使用dtc -I dtb tegra234-p3701-0005-p3737-0000.dtb -O dts -o dump.dts查看,发现tegra234-p3701-0005-p3737-0000.dts中包含isx021的节点。

我不知道那一步有问题,官方文档也没有相关资料,我需要帮助,please!

*** Please note that this reply is generated by LLM automatically ***

The provided text appears to be a series of commands and file paths related to building and configuring the Linux kernel for the NVIDIA Jetson AGX Orin platform. Here’s a breakdown of the commands and files mentioned:

  1. The first line, Jetson AGX Orin isx021dtsi, seems to be a reference to a device tree source file (dtsi) for the Jetson AGX Orin platform.

  2. The subsequent lines appear to be a series of commands and file paths related to building the Linux kernel:

    • Jetson Agx Orin 1 isx021c: This line is unclear, but it may be a reference to a specific configuration or build target for the Jetson AGX Orin platform.
    • LinuxforTegrasourcesrckernel510nvidiadriversmediai2c Kconfig: This line appears to be a reference to a kernel configuration file (Kconfig) for the NVIDIA media I2C driver.
    • makefile: This line is likely a reference to a Makefile used to build the kernel.
    • isx021nvbuildsh o PWDkerneloutisx021ko 2dtsi: This line appears to be a command to build the kernel using the nvbuild.sh script, with the output directory set to kernelout and the device tree source file set to isx021.dtsi.
    • LinuxforTegrasourcesrchardwarenvidiaplatformt23xp3768kerneldtscvb tegra234p37370000a04dtsi: This line appears to be a reference to a device tree source file (dtsi) for the NVIDIA Tegra X1 platform.
    • include tegra234p37370000camerasonyisx021a00dtsi: This line includes another device tree source file (dtsi) for the Sony camera module on the Tegra X1 platform.
    • include tegra234p3737cameramodulesdtsi: This line includes a device tree source file (dtsi) for the camera module on the Tegra X1 platform.
    • nvbuild.sh o PWDkernelouttegra234p37010005p37370000dtbjetson agx OrindbootdtbextlinuxconfigFDTreboot 3isx021dtc I dtb tegra234p37010005p37370000dtb O dts o dumpdtstegra234p37010005p37370000dtsisx021: This line appears to be a command to build the device tree binary (dtb) for the Jetson AGX Orin platform using the nvbuild.sh script.

In summary, the provided text appears to be a series of commands and file paths related to building and configuring the Linux kernel for the NVIDIA Jetson AGX Orin platform. The commands and file paths suggest that the build process involves building the kernel, device tree, and other components for the platform.

Comparison with other platforms is not possible with the provided information, as the text only refers to the Jetson AGX Orin platform. However, it is likely that similar commands and file paths would be used to build and configure the Linux kernel for other NVIDIA platforms, such as the Jetson Xavier NX or Jetson Nano.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Dump the device tree to confirm applying correct device tree.

sudo dtc -I fs -O dts -o extracted_proc.dts /sys/firmware/devicetree/base

hi,ShaneCCC.spencer_88 has been silenced,this is my another account. i try the code that you replayed , but i dont find the device tree node of isx021 in extracted_proc.dts

That tell your system didn’t apply your dtb well.

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