Jetson Orin Nano 在内核增加IMX586摄像头驱动后,无法检测到该摄像头

我在Linux_for_Tegra中的
Linux_for_Tegra/source/public/kernel/nvidia/drivers/media/i2c路径下增加了imx586.c , imx586.h文件
Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/common/kernel-dts/t19x-common-modules路径下增加了对应的dtsi文件:tegra194-camera-bs-imx586-dual.dtsi,tegra194-p3509-0000-a00.dtsi
Linux_for_Tegra/source/public/hardware/nvidia/platform/t19x/jakku/kernel-dts/common路径下增加了tegra194-camera-jakku-bs-imx586-dual.dtsi文件
然后进行编译内核,烧录。
编译成功,在Linux_for_Tegra/source/public/kernel_out/drivers/media/i2c/下发现imx586系列的5个文件:.o,.ko,.mod.mod.c .mod.o
烧录成功,在Jetson Orin Nano 中也能找到imx586.ko文件,但是当我连接imx586摄像头上电,并且在终端中输入nvgstcapture-1.0这个命令后,并没有成功的启用摄像头,终端的提示信息在附件,
我想问问这是什么原因??
是否在模块中增加摄像头驱动还需要更多的操作??
error-info.txt (4.0 KB)

Hi,

你的platform是Orin Nano,所以要改device tree的話應該在T234的目錄下操作
T194的東西你不管怎麼改都是不會生效的
你要確定driver跟dtb的東西都是對的才能work,driver應該沒問題,但是dtb很明顯做錯了

感谢你的回复。
问题0,你的意思是说,我的驱动文件(imx586.c imx586.h)copy的位置是对的吗?
问题1:在copy 这三个dtsi时,应该在Linux_for_Tegra/source/public/hardware/nvidia/platform/这个路径下选择t23x/common/kernel-dts/这个路径吗?
问题2:如果问题1是对的,我打开这个路径后,发现有三个文件夹:t234-common-cvb,t234-common-cvm,t234-common-modules,应该把tegra194-camera-bs-imx586-dual.dtsi,tegra194-p3509-0000-a00.dtsi这两个文件copy到那个文件夹里
问题3:如果问题1是对的,第三个tegra194-camera-jakku-bs-imx586-dual.dtsi文件是要copy到jakku目录下的,但是我在Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/目录下没有找到对应的jakku,我应该把这个文件copy到哪里

hello 1602972632,

Orin Nano it actually using the device tree sources under… $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/
you may refer to developer guide to examine your kernel driver, such as… Verifying the V4L2 Sensor Driver and also To verify the port binding result.

furthermore,
MIPI bayer camera sensors are not plug-n-play, you’ll also need tuning process to tune image quality stuffs.
there’re cameras supported by Jetson Camera Partners on the Jetson platform. please see-also Jetson Partner Supported Cameras for camera solution.

你好,我有几个问题:
1.当我使用v4l2-compliance -d /dev/video,sudo media-ctl -p -d /dev/media0这两个命令的时候,终端提示我command not found
2.我需要更有帮助的关于在内核中增加驱动文件的步骤,比如,我应该把tegra194-camera-bs-imx586-dual.dtsi,tegra194-p3509-0000-a00.dtsi,tegra194-camera-jakku-bs-imx586-dual.dtsi这三个dtsi文件放到哪里,是Linux_for_Tegra/source/public/hardware/nvidia/platform/t23x/p3768/kernel-dts/这里吗?如果是这个路径的话,应该放到cvb/还是cvm/下
3.在你给的支持的相机的链接中,没有的相机型号难道一律都不支持吗,因为jetson orin nano自带imx219的相机驱动,而链接中也没有219.所以我觉得同样都是imx系列的摄像头,imx586应该也可以移植到内核中

hello 1602972632,

do your have experience to bring-up camera sensor?
if no… it’s suggest to use the default camera sensor, such as IMX219 and IMX477. or, please contact with sensor vendor for cameras supported by Jetson Camera Partners.

i also want use default camera sensor, but my boss need me to make the Jetson Orin Nano support IMX586 camera
boss just give me some driver code, and a Jetson orin Nano., and I have never know this before.
so i have to look for some support
I already have the driver program and dtsi file for IMX586 camera, and now I just need to know how to copy these files to the correct path. However, I have not found any relevant information about it in the official documentation.

hello 1602972632,

here’s developer guide for camera driver development, Sensor Software Driver Programming.
you may refer to default camera sensor driver to implement your own sensor device tree.
taking Orin NX developer kit as an example,
it’s main device tree sources, $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3768-0000-a0.dtsi
as you can see, there’re IMX477 and IMX219 device tree has included.
due to IMX219 is included after IMX477, linux system it’s by default parse IMX219 to register it as camera nodes.

...
#include "tegra234-p3768-camera-rbpcv3-imx477.dtsi"
#include "tegra234-p3768-camera-rbpcv2-imx219.dtsi"

根据我的理解,你的意思是,在JetsonOrinNano中有一个最底层的设备树 tegra234-p3768-0000-a0.dtsi,在这个设备树里包含了IMX219的基本的设备树文件tegra234-p3768-camera-rbpcv2-imx219.dtsi,而在这个文件里包含着更具体的设置tegra234-camera-rbpcv2-imx219.dtsi,是这样一种递进的文件结构。
你建议我用这种结构设置自己的设备树。是这样吗?
我手里的三个dtsi文件,如果没有理解错的话,应该要设置成
tegra194-p3509-0000-a00.dtsi->tegra194-camera-jakku-bs-imx586-dual.dtsi->tegra194-camera-bs-imx586-dual.dtsi这种文件结构,是这样吗?
但是问题在于:
1.我发现手中的文件是tegra194-p3509,但是当前的是tegra234-p3768,我是否需要将tegra194相关的全部改成tegra234
2.我应该直接把我的tegra194-p3509-0000-a00.dtsi加到这个 *t23x/p3768/kernel-dts/cvb/目录下吗,它和原有的tegra234-p3768-0000-a0.dtsi是否会产生冲突,或者说我加到这个目录下,但是tegra194-p3509-0000-a00.dtsi不起作用
3.我在dtsi文件中发现,有一些设置是不一样的,我不清楚这是否可行,因为据我了解这三个dtsi文件是应用于基础的jetson nano模块上的

hello 1602972632,

Orin Nano/NX series looking for device tree sources under… /platform/t23x/p3768/ folder.
tegra194 and tegra234 they’re just file naming for different Jetson chips.

please do read the developer guide to have implementation, you may see-also Debugging Tips sections for troubleshooting.

感谢你的回答,但我想请你解释的更清楚一点
首先是我不清楚jetson orin nano 在 /platform/t23x/p3768/这个路径下查找设备树源的具体情况,如果我直接把tegra194-p3509-0000-a00.dtsi
tegra194-camera-jakku-bs-imx586-dual.dtsi
tegra194-camera-bs-imx586-dual.dtsi
这三个dtsi文件放在该目录下,设备是否会查找到对应的设备树源,
还是说设备只查找tegra234-p3768-0000-a0.dtsi,忽略tegra194-p3509-0000-a00.dtsi

其次是我发现dtsi中有
include <dt-bindings/gpio/tegra194-gpio.h>,
include “dt-bindings/clock/tegra194-clock.h”
这样的头文件声明,我的问题是如果把这三个dtsi文件放到t23x目录下,是否需要改成
include <dt-bindings/gpio/tegra234-gpio.h>,
include “dt-bindings/clock/tegra234-clock.h”

更进一步说,我不太清楚这三个适用于Jetson Nano,原本应该放在t19x目录下的dtsi文件,如果在Jetson Orin Nano中应该在t23x中如何进行修改,里面一些包含的头文件和设备树结构是否需要修改
tegra194-camera-bs-imx586-dual - 副本 (1).txt (41.3 KB)
tegra194-camera-jakku-bs-imx586-dual - 副本.txt (2.6 KB)
tegra194-p3509-0000-a00 - 副本.txt (6.0 KB)

why no reply

it doesn’t works by simply putting the sources under p3768, you must revise the code accordingly, that’s life.
please study the reference device tree. you should adapt the driver from t19x series to t23x series.

我在官方文档上看到的例子都是以t19x为例,我想问一下是否有t23x的设备树方面的相关文档

如果我在 $public_sources/kernel_src/hardware/nvidia/platform/t23x/p3768/kernel-dts/cvb/tegra234-p3768-0000-a0.dtsi这个路径下
把#include “tegra234-p3768-camera-rbpcv3-imx477.dtsi”
include “tegra234-p3768-camera-rbpcv2-imx219.dtsi”
这两个都注释掉,最后烧录,结果是什么
会不会是,即使有imx219和imx477的.ko文件,但是连接到摄像头后检测不到摄像头

hello 1602972632,

it’s device tree settings to give node definition for CSI/VI port bindings.
you should have correct port binding results for system link to the nodes.

请看我最新创建的主题,我在里面更准确的描述了我的疑问

tegra234-p3768-camera-rbpcv2-imx219.dtsi 文件以及imx219.c文件在哪里可以下载?谢谢

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