Orin camera Fail to parse port info by JetPack5.0.2

camera 在配置后,开机log出现失败提示,请问,这个是什么问题;dtsi 配置相关在在Jetson AGX Xavier 平台上是可以没有问题的。
log 如下:
[2022/12/7 14:40:06] [ 2.663343] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/7 14:40:06] [ 2.670733] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/7 14:40:06] [ 2.677205] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/7 14:40:06] [ 2.686392] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/7 14:40:06] [ 2.693217] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/7 14:40:06] [ 2.702402] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/7 14:40:06] [ 2.709230] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info

Hi,

I am moving your topic to the Jetson AGX Xavier forum so the support team has visibility.

hello 305248199,

did you meant this camera driver works on JetPack-4.6.x on AGX Xavier?
AGX Orin is running with kernel version 5.10, you must migrate to the new kernel version.
please see-also Camera Driver Porting to review your driver implementation.
thanks

I imitate the device tree file written by imx390 of kernel 5.10

hello 305248199,

are you actually working with a Ser/Des chip?
tegra234-camera-imx390-a00.dtsi it’s actually reference driver with SerDes (Serializer-Deserializer) links,

Our serial/deserialized ic is:MAX96715/MAX96722

The boot kernel log is as follows:
[2022/12/9 11:38:58] [ 2.710554] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/9 11:38:58] [ 2.719734] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/9 11:38:58] [ 2.775035] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/9 11:38:58] [ 2.784048] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/9 11:38:58] [ 2.839346] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/9 11:38:58] [ 2.848370] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/9 11:38:58] [ 2.903660] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/9 11:38:58] [ 2.912672] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/9 11:38:58] [ 2.919495] tegra-camrtc-capture-vi tegra-capture-vi: all channel init failed
[2022/12/9 11:38:58] [ 2.926845] tegra-camrtc-capture-vi tegra-capture-vi: Init channel failed
[2022/12/9 11:38:58] [ 2.933725] tegra-camrtc-capture-vi tegra-capture-vi: tegra_vi_media_controller_init_int: failed
[2022/12/9 11:38:58] [ 2.942423] tegra-camrtc-capture-vi tegra-capture-vi: media controller init failed

I imitate the device tree file as attached:
tegra234-camera-ar0234-a00.dtsi (44.9 KB)
tegra234-p3737-0000-camera-ar0234-a00.dtsi (5.9 KB)
tegra234-p3737-camera-ar0234-overlay.dts (18.2 KB)

The wiring MAX96722 schematic diagram is as follows:
Four 1-lane cameras are connected to csi0 and csi1

hello 305248199,

please resolve this error first,

you may refer to developer guide for driver implementation,
for example, Sensor Software Driver Programming, and also, Jetson Virtual Channel with GMSL Camera Framework.
thanks

What is the problem with dtsi? Please give directions, thank you!

hello 305248199,

you should also have the same configuration in your mode settings. i.e. tegra_sinterface = "serial_a";
since you have 1-lane camera connected to CSI-A, as your port binding, port-index = <0>;.

BTW,
is it intentionally to have 3 camera nodes for using vc-id=0, 2, 3?
please try narrow down the issue by having only single camera defined.

Okay, I’ll try

@JerryChang
I tried, but the problem remains;
The boot kernel log is as follows:
[2022/12/9 17:44:09] [ 2.709084] tegra-camrtc-capture-vi tegra-capture-vi: tegra_channel_csi_init:Fail to parse port info
[2022/12/9 17:44:09] [ 2.718265] tegra-camrtc-capture-vi tegra-capture-vi: channel init failed
[2022/12/9 17:44:09] [ 2.725089] tegra-camrtc-capture-vi tegra-capture-vi: all channel init failed
[2022/12/9 17:44:09] [ 2.732440] tegra-camrtc-capture-vi tegra-capture-vi: Init channel failed
[2022/12/9 17:44:09] [ 2.739317] tegra-camrtc-capture-vi tegra-capture-vi: tegra_vi_media_controller_init_int: failed
[2022/12/9 17:44:09] [ 2.748017] tegra-camrtc-capture-vi tegra-capture-vi: media controller init failed
tegra234-camera-ar0234-a00.dtsi (8.1 KB)
tegra234-p3737-0000-camera-ar0234-a00.dtsi (2.7 KB)
tegra234-p3737-camera-ar0234-overlay.dts (5.1 KB)

@JerryChang
请教一个问题,tegra234-p3737-camera-modules.dtsi 一定要放到设备树文件:tegra234-p3701-0000-p3737-0000.dts 中吗?我发现放到这里没有作用,放到 tegra234-p3701-0004-p3737-0000.dts 中不行吗?
或者说:tegra234-p3701-0000-p3737-0000-kexec.dtb 文件需要放到目标平台的那里?我之前是放到了 /boot/ 下,没有作用。

hello 305248199,

may I know how you built and update your device tree blob?

please review /boot/extlinux/extlinux.conf
there’s FDT entry, for loading device tree blob via root file system.
for example,

TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/dtb/kernel_tegra234-p3701-0004-p3737-0000.dtb

so,
you may copy your customize device tree binary to your target, and revise the extlinux.conf to point-out your binary file. it’ll take effect after system rebooted.
you may examine kernel logs for $ dmesg | grep DTB Build time, it shall the time when you compile this binary file on your host machine.

OK, then I have no problem configuring!

@JerryChang
我试了只配置 1 line 1个摄像头的,开机kenrel依然报类似的错误。

hello 305248199,

please disassembler the dtb file into text file to review the device tree settings,
for example, $ dtc -I dtb -O dts -o output.dts tegra234-p3701-0000-p3737-0000.dtb

The attachment is the tegra234-p3701-0004-p3737-0000.dtb converted file

tegra234-p3701-0004-p3737-0000.dts (433.0 KB)

hello 305248199,

these two were not identical.
since you’ve sensor ar0234_a configured as 1-lane using vc-id=1. you should have the same in the gmsl-link
for example,

		ar0234_a@11 {
			compatible = "onsemi,ar0234";
			mode0 {
				num_lanes = [31 00];
				tegra_sinterface = "serial_a";
				vc_id = [31 00];

				port@0 {
					endpoint {
						vc-id = <0x01>;
						port-index = <0x00>;
						bus-width = <0x02>;
			gmsl-link {
				csi-mode = "1x4";
				st-vc = <0x00>;
				vc-id = <0x00>;
				num-lanes = <0x04>;

我修改了,问题还是存在。