Jetson AGX Orin 64 GB, JP 36.3 camera no probing

Hello,

Given:

Ubuntu 22.04 LTS

JP 36.3, (on JP 36.4 drivers mouse and keyboard not working).

On kernel without I2C (I took the example from ov5693 as a basis), I2C and GPIOs on user space linux.

The problem occurred because of no probing camera.

tegra234-camera-ZZZZZ-a00.dtsi


/ {
	fragment-camera@0 {
		target-path = "/";
		__overlay__ {
			tegra-capture-vi {
				num-channels = <1>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					port@0 {
						reg = <0>;
						ZZZZZ_vi_in0: endpoint {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&ZZZZZ_csi_out0>;
						};
					};
				};
			};

			bus@0 {
				host1x@13e00000 {
					nvcsi@15a00000 {
						num-channels = <1>;
						#address-cells = <1>;
						#size-cells = <0>;
						channel@0 {
							reg = <0>;
							ports {
								#address-cells = <1>;
								#size-cells = <0>;
								port@0 {
									reg = <0>;
									ZZZZZ_csi_in0: endpoint@0 {
										port-index = <0>;
										bus-width = <4>;
										remote-endpoint = <&ZZZZZ_vi_out0>;
									};
								};
								port@1 {
									reg = <1>;
									ZZZZZ_csi_out0: endpoint@1 {
										remote-endpoint = <&ZZZZZ_vi_in0>;
									};
								};
							};
						};
					};
				};

				i2c@3180000 {
					tca9546@70 {
						i2c@0 {
							ZZZZZ_a@18 {
								compatible = "ZZZZZ";
								reg = <0x18>; //change other register write for I2C
								devnode = "video0";

								/* Define any required hw resources needed by driver */
								/* ie. clocks, io pins, power sources */
								avdd-reg = "vana";
								iovdd-reg = "vif";
								dvdd-reg = "vdig";

								/* Physical dimensions of sensor */
								physical_w = "18.0";
								physical_h = "18.0";
								sensor_model ="ZZZZZ";
    							post_crop_frame_drop = "0";
    							use_decibel_gain = "false";
    							delayed_gain = "false";
    							use_sensor_mode_id = "false";
								limit_analog_gain = "false";

								mode0
								{
									/*ZZZZZ_MODE_2592X2048*/
									mclk_khz = "24000"; /* 24 MHz*/
									num_lanes = "4";
									tegra_sinterface = "serial_a";
									phy_mode = "DPHY";
									discontinuous_clk = "no";
									dpcm_enable = "false";
									cil_settletime = "0";
									csi_pixel_bit_depth = "10";
									mode_type = "raw";
									pixel_phase = "y";
									active_w = "2592";
									active_h = "2048";
									readout_orientation = "0";
									line_length = "2784";
									mclk_multiplier = "14.46";
									pix_clk_hz = "347109120";

									framerate_factor = "1000000"; /* 1 */
									min_framerate = "60000000"; /* 60 */
									max_framerate = "60000000"; /* 60 */
									step_framerate = "1";
									default_framerate= "60000000"; /* 60 */

									embedded_metadata_height = "0";
								};

								mode1
								{
									/*ZZZZZ_MODE_2592X2048*/
									mclk_khz = "24000"; /* 24 MHz*/
									num_lanes = "4";
									tegra_sinterface = "serial_a";
									phy_mode = "DPHY";
									discontinuous_clk = "no";
									dpcm_enable = "false";
									cil_settletime = "0";
									csi_pixel_bit_depth = "10";
									mode_type = "bayer";
									pixel_phase = "rggb";
									active_w = "2592";
									active_h = "2048";
									readout_orientation = "0";
									line_length = "2784";
									mclk_multiplier = "14.46";
									pix_clk_hz = "347109120";

									framerate_factor = "1000000"; /* 1 */
									min_framerate = "60000000"; /* 60 */
									max_framerate = "60000000"; /* 60 */
									step_framerate = "1";
									default_framerate= "60000000"; /* 60 */

									embedded_metadata_height = "0";
								};

								ports {
									#address-cells = <1>;
									#size-cells = <0>;
									port@0 {
										reg = <0>;
										ZZZZZ_vi_out0: endpoint {
											port-index = <0>;
											bus-width = <4>;
											remote-endpoint = <&ZZZZZ_csi_in0>;
										};
									};
								};
							};
						};
					};
				};
			};

			tegra-camera-platform {
				compatible = "nvidia, tegra-camera-platform";

				num_csi_lanes = <4>;
				max_lane_speed = <1500000>;
				min_bits_per_pixel = <10>;
				vi_peak_byte_per_pixel = <2>;
				vi_bw_margin_pct = <25>;
				isp_peak_byte_per_pixel = <5>;
				isp_bw_margin_pct = <25>;

				modules {
					module0 {
						badge = "ZZZZZ_bottom";
						position = "bottom";
						orientation = "1";
						drivernode0 {
							pcl_id = "v4l2_sensor";
							sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9546@70/i2c@0/ZZZZZ_a@18";
						};
					};
				};
			};
		};
	};
};

tegra234-p3737-camera-ZZZZZ-overlay.dts

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Jetson Device-tree overlay for Camera ZZZZZ module on t23x platforms
 *
 */

/dts-v1/;
/plugin/;

#include <dt-bindings/clock/tegra234-clock.h>
#include <dt-bindings/gpio/tegra234-gpio.h>
#include <dt-bindings/tegra234-p3737-0000+p3701-0000.h>

/ {
	overlay-name = "Jetson Camera ZZZZZ";
	jetson-header-name = "Jetson AGX CSI Connector";
	compatible = JETSON_COMPATIBLE;
//	compatible = "nvidia,p3737-0000+p3701-0000", "nvidia,p3737-0000+p3701-0004", "nvidia,p3737-0000+p3701-0005", "nvidia,p3737-0000+p3701-0008";

	fragment@0 {
		target-path = "/";
		board-config { //added
			ids = "ZZZZZ";
			sw-modules = "kernel";
		};
		__overlay__ {
			status = "okay"; //added
			tegra-capture-vi {
				num-channels = <1>;
				ports {
					status = "okay";
					port@0 {
						status = "okay";
						ZZZZZ_vi_in0: endpoint {
							status = "okay";
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&ZZZZZ_csi_out0>;
						};
					};
				};
			};

			tegra-camera-platform {
				modules {
					status = "okay";
					module0 {
						badge = "ZZZZZ_bottom";
						position = "bottom";
						orientation = "1";
						status = "okay";
						drivernode0 {
							status = "okay";
							/* Declare PCL support driver (classically known as guid) */
							pcl_id = "v4l2_sensor";
							/* Declare the device-tree hierarchy to driver instance */
							sysfs-device-tree = "/sys/firmware/devicetree/base/bus@0/i2c@3180000/tca9546@70/i2c@0/ZZZZZ_a@18";
						};
					};
				};
			};
			bus@0 {
				host1x@13e00000 {
					nvcsi@15a00000 {
						num-channels = <1>;
						channel@0 {
							status = "okay";
							ports {
								status = "okay";
								port@0 {
									status = "okay";
									ZZZZZ_csi_in0: endpoint@0 {
										status = "okay";
										port-index = <0>;
										bus-width = <4>;
										remote-endpoint = <&ZZZZZ_vi_out0>;
									};
								};
								port@1 {
									status = "okay";
									ZZZZZ_csi_out0: endpoint@1 {
										status = "okay";
										remote-endpoint = <&ZZZZZ_vi_in0>;
									};
								};
							};
						};
					};
				};
				i2c@3180000 {
					tca9546@70 {
						status = "okay";
						compatible = "nxp,pca9546";
						reg = <0x70>;
						#address-cells = <1>;
						#size-cells = <0>;
						skip_mux_detect = "yes";
						i2c@0 {
							reg = <0>;
							i2c-mux,deselect-on-exit;
							#address-cells = <1>;
							#size-cells = <0>;
							status = "okay";
							ZZZZZ_a@18 {
								channel = "a";
								status = "okay";
								def-addr = <0x18>;
								ports {
									status = "okay";
									port@0 {
										status = "okay";
										ZZZZZ_vi_out0: endpoint {
											status = "okay";
											port-index = <0>;
											bus-width = <4>;
											remote-endpoint = <&ZZZZZ_csi_in0>;
										};
									};
								};
							};
						};
					};
				};
			};
		};
	};
};

In tegra234-p3737-camera-modules.dtsi I added:

#include "tegra234-camera-ZZZZZ-a00.dtsi"

commented gpios:

/* set camera gpio direction to output */
/*
				gpio@2200000 {
					camera-control-output-low {
						gpio-hog;
						output-low;
						gpios = <CAM0_RST_L 0 CAM0_PWDN 0
							 CAM1_RST_L 0 CAM1_PWDN 0>;
						label = "cam0-rst", "cam0-pwdn",
							"cam1-rst", "cam1-pwdn";
					};
				};
*/

added:

tca9546@70 {
						status = "disabled";
						i2c@0 {
							...
							ZZZZZ_a@18 {
								status = "disabled";
							};
						};

In Makefile added:

dtbo-y += tegra234-p3737-camera-ZZZZZ-overlay.dtbo

In p3737-0000-p3701-0000.conf added:

OVERLAY_DTB_FILE="...,tegra234-p3737-camera-ZZZZZ-overlay.dtbo";

And I flashed:

sudo ./flash.sh jetson-agx-orin-devkit internal

How to fix it so that the camera probing and device /dev/video0 appears?

Thanks!

hello demonoff2024,

I assume it’s USB keyboard and mouse, which should be plug-n-play.
you may also dig into this why it cannot works on JP-6.1/r36.4


anyways.. may I know what’s the error logs?
did you meant system did not trying to probe the CSI cameras?
if yes..
the issue should be on sensor side, during kernel initialization stage, it’s step for camera device registration to setup a video device node to linux kernel. sensor probing only run once during kernel initialization stage of system boot-up.
for a typical camera application running cycle, the driver will Power On the sensor, Start Sensor Streaming, sending relevant v4l2 controls, and finally power off the sensor.
so… if there’s a error returns, it’ll not register a video node, (/dev/video0).
please see-also Topic 293662 and Topic 290610 to examine camera device registration process.

hello JerryChang,

I assume it’s USB keyboard and mouse, which should be plug-n-play.
you may also dig into this why it cannot works on JP-6.1/r36.4

I just connected a plug and play keyboard and mouse.

anyways.. may I know what’s the error logs?

I didn’t connect the camera sensor because I wanted to make sure that the video device /dev/video0 appeared

On the Orin NX 16 GB (JP 35.3.1) module I was able to launch the driver and new video devices appeared without connecting the camera sensor.

itisit@itisit-desktop:~/Documents$ media-ctl -pd /dev/media0
Media controller API version 5.10.120

Media device information

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

Device topology

  • entity 1: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    pad0: Sink
    ← “ZZZZZ 30-0018”:0 [ENABLED]
    pad1: Source
    → “vi-output, ZZZZZ 30-0018”:0 [ENABLED]

  • entity 4: 13e40000.host1x:nvcsi@15a00000- (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    pad0: Sink
    ← “ZZZZZ 31-0018”:0 [ENABLED]
    pad1: Source
    → “vi-output, ZZZZZ 31-0018”:0 [ENABLED]

  • entity 7: ZZZZZ 30-0018 (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [fmt:Y10_1X10/2592x2048 field:none colorspace:raw]
    → “13e40000.host1x:nvcsi@15a00000-”:0 [ENABLED]

  • entity 9: vi-output, ZZZZZ 30-0018 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    ← “13e40000.host1x:nvcsi@15a00000-”:1 [ENABLED]

  • entity 23: ZZZZZ 31-0018 (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev3
    pad0: Source
    [fmt:Y10_1X10/2592x2048 field:none colorspace:raw]
    → “13e40000.host1x:nvcsi@15a00000-”:0 [ENABLED]

  • entity 25: vi-output, ZZZZZ 31-0018 (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video1
    pad0: Sink
    ← “13e40000.host1x:nvcsi@15a00000-”:1 [ENABLED]

itisit@itisit-desktop:~/Documents$

itisit@itisit-desktop:~/Work$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0

vi-output, ZZZZZ 30-0018 (platform:tegra-capture-vi:0):
/dev/video0

vi-output, ZZZZZ 31-0018 (platform:tegra-capture-vi:2):
/dev/video1

itisit@itisit-desktop:~/Work$

hello demonoff2024,

it’s porting issue, since you’ve check it worked on JP-5,
please refer to Topic 310858 for some known changes when porting DTS from JP-5 to JP-6

@JerryChang

Your post didn’t help me. I decided to check other drivers (imx185, imx390 - without sensors), none of them no probing.

Toolchain version 9.3 and OS Ubuntu 22 do not affect the system build?

I upgraded to 36.4.4 and this link helped me https://forums.developer.nvidia.com/t/adding-a-new-camera-sensor-driver-without-flashing/298399, I did it.

Thanks!

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