hello:
I use jetson orin nx 16G(Linux version 36.4.3 GA),Configuration method as shown in the following figure:
and I set in this:
using IMX219 Daul is Normal drawing output int
CAM0 or
CAM1 ,
but using IMX219-C seting in
CAM0,I can use commands
media-ctl -p -d /dev/media0 as fllow:
root@yz-desktop:/home/yz# media-ctl -p -d /dev/media0
Media controller API version 5.15.148
Media device information
------------------------
driver tegra-camrtc-ca
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 5.15.148
Device topology
- entity 1: 13e00000.host1x:nvcsi@15a00000- (2 pads, 2 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "imx219 9-0010":0 [ENABLED]
pad1: Source
-> "vi-output, imx219 9-0010":0 [ENABLED]
- entity 4: imx219 9-0010 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:SRGGB10_1X10/3280x2464@1/21 field:none colorspace:srgb]
-> "13e00000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 6: vi-output, imx219 9-0010 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "13e00000.host1x:nvcsi@15a00000-":1 [ENABLED]
No official device tree files have been modified,My customized board, modeled after the official device tree example, also experiences similar issues. and I just want a camera.
I don’t think I can understand what’s your problem here.
Please give the more specific to tell what’s your request.
Thanks
hello:
I use imx566 in 4 lane,10bit, external clock 74.25Mhz,lane rate1188 Mpbs,hardware circuit as follows:
and my device tree file:
#include <dt-bindings/media/camera.h>
#define CAM_PWDN TEGRA234_MAIN_GPIO(Y, 3) //cam的使能管脚,110
#define CAM_XCLR_PN TEGRA234_MAIN_GPIO(H, 6) //xclr 管脚,114
#define CAM_PG_EN TEGRA234_MAIN_GPIO(Y, 1) //电路板上电完成,管脚108
#define CAM_INCK_EN TEGRA234_MAIN_GPIO(P, 0) //sensor的时钟使能,管脚116
#define CAM_XMASTER TEGRA234_MAIN_GPIO(Y, 2) //输出104
#define BUS_WIDTH 4
#define VC_MIPI_CAMERAS 1
#define NUM_LANES "4"
#define PORT_INDEX 2
/ {
tegra-capture-vi {
num-channels = <1>; //接入相机数量
ports {
#address-cells = <VC_MIPI_CAMERAS>;
#size-cells = <0>;
vi_port0: port@0 {
reg = <0>;
bopixel_imx566_vi_in0: endpoint {
port-index = <PORT_INDEX>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&bopixel_imx566_csi_out0>;
};
};
};
};
host1x@13e00000 {
nvcsi@15a00000 {
num-channels = <VC_MIPI_CAMERAS>;
#address-cells = <1>;
#size-cells = <0>;
csi_chan0: channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
csi_chan0_port0: port@0 {
reg = <0>;
bopixel_imx566_csi_in0: endpoint@0 {
port-index = <PORT_INDEX>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&bopixel_imx566_out0>;
};
};
csi_chan0_port1: port@1 {
reg = <1>;
bopixel_imx566_csi_out0: endpoint@1 {
remote-endpoint = <&bopixel_imx566_vi_in0>;
};
};
};
};
};
};
i2c@3160000{
status = "okay"; // 启用该设备
imx566_cam0: bopixel_imx566_a@1a {
status = "okay";
compatible = "sony,imx566";
/* I2C device address */
reg = <0x1a>;
pwdn-gpios = <&tegra_main_gpio CAM_PWDN GPIO_ACTIVE_HIGH>;
xclr-gpios = <&tegra_main_gpio CAM_XCLR_PN GPIO_ACTIVE_HIGH>;
pg-gpios = <&tegra_main_gpio CAM_PG_EN GPIO_ACTIVE_HIGH>;
inck-gpios = <&tegra_main_gpio CAM_INCK_EN GPIO_ACTIVE_HIGH>;
xmaster-gpios = <&tegra_main_gpio CAM_XMASTER GPIO_ACTIVE_HIGH>;
pwms = <&tegra_pwm5 0 1000000>; // 两路PWM,分别1000us周期,1000us周期
pwm-names = "pwm-xhs";
trigger_mode = "0";
io_mode = "0";
/* V4L2 device node location */
devnode = "video0";
/* Physical dimensions of sensor */
physical_w = "3.680";
physical_h = "2.760";
sensor_model = "imx566";
use_sensor_mode_id = "true";
mode0 {
// mclk_khz = "37125";
num_lanes = NUM_LANES;
tegra_sinterface = "serial_c";
phy_mode = "DPHY";
discontinuous_clk = "yes";
dpcm_enable = "false";
cil_settletime = "0";
lane_polarity = "0";
active_w = "2840";
active_h = "2840";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "10";
// readout_orientation = "90";
line_length = "3448";
inherent_gain = "1";
mclk_multiplier = "12.8";
pix_clk_hz = "475200000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "170"; /* 10.66x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "21000000"; /* 21.0 fps */
step_framerate = "1";
default_framerate = "21000000"; /* 21.0 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "2";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
bopixel_imx566_out0: endpoint {
port-index = <PORT_INDEX>;
bus-width = <BUS_WIDTH>;
remote-endpoint = <&bopixel_imx566_csi_in0>;
};
};
};
};
};
};
/ {
tcp: tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <BUS_WIDTH>;
max_lane_speed = <1500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <240000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
cam_module0: module0 {
badge = "jakku_front_RBP194";
position = "front";
orientation = "1";
cam_module0_drivernode0: drivernode0 {
pcl_id = "v4l2_sensor";
devname = "imx566 9-001a";
proc-device-tree = "/proc/device-tree/i2c@3160000/bopixel_imx566_a@1a";
};
};
};
};
};
//end
but report errors
[ 2415.673152] bwmgr API not supported
[ 2418.328054] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2418.328076] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2418.329013] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2418.329019] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 2418.329024] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2418.329026] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 2418.329228] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 2420.887885] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2420.887900] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2420.889003] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2420.889008] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 2420.889012] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2420.889014] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 2420.889218] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
root@tegra-ubuntu:/home/yz/nfs# sudo media-ctl -p -d /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
<- "imx566 0-001a":0 [ENABLED]
pad1: Source
-> "vi-output, imx566 0-001a":0 [ENABLED]
- entity 4: imx566 0-001a (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[fmt:SRGGB10_1X10/2840x2840 field:none colorspace:srgb
crop.bounds:(0,0)/2840x2840
crop:(0,0)/2840x2840
compose.bounds:(0,0)/2840x2840
compose:(0,0)/2840x2840]
-> "13e40000.host1x:nvcsi@15a00000-":0 [ENABLED]
- entity 6: vi-output, imx566 0-001a (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "13e40000.host1x:nvcsi@15a00000-":1 [ENABLED]
Please help check the device tree configuration, or other configurations are missing. Thank you.
Get the trace log for the capture failed.
root@tegra-ubuntu:/home/yz/nfs# cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 33/33 #P:4
#
# _-------=> irqs-off
# / _------=> need-resched
# | / _-----=> need-resched-lazy
# || / _----=> hardirq/softirq
# ||| / _---=> preempt-depth
# |||| / _--=> preempt-lazy-depth
# ||||| / _-=> migrate-disable
# |||||| / delay
# TASK-PID CPU# ||||||| TIMESTAMP FUNCTION
# | | | ||||||| | |
kworker/0:1-19631 [000] ....... 4028.789198: rtcpu_string: tstamp:126290976343 id:0x04010000 str:"VM0 deactivating."
v4l_id-26202 [003] ....... 4044.257597: tegra_channel_open: vi-output, imx566 0-001a
v4l_id-26202 [003] ....... 4044.257753: tegra_channel_close: vi-output, imx566 0-001a
v4l2-ctl-26340 [001] ....... 4066.556171: tegra_channel_open: vi-output, imx566 0-001a
v4l2-ctl-26340 [001] ....... 4066.574397: tegra_channel_set_power: imx566 0-001a : 0x1
v4l2-ctl-26340 [001] ....... 4066.574408: camera_common_s_power: status : 0x1
v4l2-ctl-26340 [001] ....... 4066.574418: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-26340 [001] ....... 4066.574420: csi_s_power: enable : 0x1
v4l2-ctl-26340 [001] ....... 4066.575153: tegra_channel_capture_setup: vnc_id 0 W 2840 H 2840 fmt c4
v4l2-ctl-26340 [001] ....... 4066.581111: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-26340 [001] ....... 4066.583241: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-26340 [001] ....... 4066.583243: csi_s_stream: enable : 0x1
v4l2-ctl-26340 [001] ....... 4066.583557: tegra_channel_set_stream: imx566 0-001a : 0x1
kworker/0:2-26193 [000] ....... 4066.621620: rtcpu_string: tstamp:127472982136 id:0x04010000 str:"VM0 activating."
kworker/0:2-26193 [000] ....... 4066.621623: rtcpu_vinotify_event: tstamp:127473430622 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4079139295712 data:0x759d580010000000
kworker/0:2-26193 [000] ....... 4066.621623: rtcpu_vinotify_event: tstamp:127473430808 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4079139302144 data:0x0000000031000001
kworker/0:2-26193 [000] ....... 4066.621624: rtcpu_vinotify_event: tstamp:127473430969 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4079139347488 data:0x759d550010000000
kworker/0:2-26193 [000] ....... 4066.621624: rtcpu_vinotify_event: tstamp:127473431113 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4079139354080 data:0x0000000031000002
vi-output, imx5-26342 [000] ....... 4069.122836: tegra_channel_capture_setup: vnc_id 0 W 2840 H 2840 fmt c4
kworker/0:2-26193 [000] ....... 4069.149651: rtcpu_vinotify_event: tstamp:127552871009 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4081681157312 data:0x759d580010000000
kworker/0:2-26193 [000] ....... 4069.149653: rtcpu_vinotify_event: tstamp:127552871148 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4081681163776 data:0x0000000031000001
kworker/0:2-26193 [000] ....... 4069.149654: rtcpu_vinotify_event: tstamp:127552871301 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4081681209120 data:0x759d550010000000
kworker/0:2-26193 [000] ....... 4069.149654: rtcpu_vinotify_event: tstamp:127552871433 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:4081681215648 data:0x0000000031000002
v4l2-ctl-26340 [002] ....... 4071.019429: tegra_channel_close: vi-output, imx566 0-001a
vi-output, imx5-26342 [000] ....... 4071.650836: tegra_channel_capture_setup: vnc_id 0 W 2840 H 2840 fmt c4
v4l2-ctl-26340 [001] ....... 4071.650949: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-26340 [001] ....... 4071.650951: tegra_channel_set_stream: imx566 0-001a : 0x0
v4l2-ctl-26340 [001] ....... 4071.650953: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-26340 [001] ....... 4071.650955: csi_s_stream: enable : 0x0
v4l2-ctl-26340 [001] ....... 4071.652699: tegra_channel_set_power: imx566 0-001a : 0x0
v4l2-ctl-26340 [001] ....... 4071.652705: camera_common_s_power: status : 0x0
v4l2-ctl-26340 [001] ....... 4071.652714: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x0
v4l2-ctl-26340 [001] ....... 4071.652716: csi_s_power: enable : 0x0
Looks like doesn’t receive any validate data from the sensor.
Maybe probe the sensor output signal to confirm.
Thanks