Jetson Orin Nano Devkit adapt imx585 faild

Jetson Orin Nano Devkit adapt imx585 sensor failed.
use argus_camera capture stream, picture are blak
Use an oscilloscope to measure the mipi signal,it have

this is imx585 config:
image

here are some infomation about imx585:


here are my dts configure:

mode0 { /* */
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_c”;
phy_mode = “DPHY”;
discontinuous_clk = “no”;
dpcm_enable = “false”;
cil_settletime = “0”;
lane_polarity = “0”;

				active_w = "3856";
				active_h = "2176";
				mode_type = "bayer";
				pixel_phase = "rggb";
				csi_pixel_bit_depth = "12";
				dynamic_pixel_bit_depth = "12";
				readout_orientation = "0";
				line_length = "3856";
				inherent_gain = "1";
				mclk_multiplier = "28.8";
				pix_clk_hz = "693000000";

				gain_factor = "10";
				min_gain_val = "0"; /* dB */
				max_gain_val = "300"; /* dB */
				step_gain_val = "3"; /* 0.3 */
				default_gain = "0";
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				framerate_factor = "1000000";
				min_framerate = "30000000";
				max_framerate = "40000000";
				step_framerate = "1";
				default_framerate = "30000000";
				exposure_factor = "1000000";
				min_exp_time = "59"; /*us, 2 lines*/
				max_exp_time = "33333";
				step_exp_time = "1";
				default_exp_time = "33333";/* us */
				embedded_metadata_height = "1";
			};

could you please refer to Applications Using V4L2 IOCTL Directly for running V4L2 IOCTL to verify basic functionality during sensor bringup.

dmesg:

hello zhangpeng5,

is there additional message within VI tracing logs? it looks there’s no signal sending to VI channel.
BTW,
may I also know which Jetpack release you’re working with, thanks

Use an oscilloscope to measure the mipi signal,it have

reduce the pix_clk_hz,log as follow:

Jetpack release is:

there’re PHY interrupts, the error code 0x44 indicate there’re more than one bit error has detected on data-lane.
so… you may examine the sensor configurations.

I checked the config with the sensor vendor ,Sensor configuration is correct. it have mipi signal. Can you check the device tree configuration and embedded_metadata_height for me?
image

there’re embedded metadata in the head and also bottom, total 2-line for sending to CSI.
please configure embedded_metadata_height = "2"; in your device tree settings.

no use

this doesn’t helps… please share the failure messages for reference.


are you able to access the camera stream by V4L2 IOCTL? please see-also Applications Using V4L2 IOCTL Directly.

This is the error log for using the V4L2 IOCTL

hello zhangpeng5,

please aware there’s polarity swap, i.e. CSI0 D1 and CSI1 D0 P/N will always been swizzled for P/N.
please also review the schematic for setting this accordingly. you may use device tree property, lane_polarity to configure a polarity swap on any lane.
for example,

                                * lane_polarity
                                * Based on the camera connector pin.
                                * CSIx_D0 | CSIx_D1 | CSI(X+1)_D0 | CSI(X+1)CSIx_D1
                                *    LSB  |   BIT1  |     BIT2    |      MSB
                                * if there is a polarity swap on any lane, the bit corrsponding
                                * to the lane should be set
                                * e.g. polarity swap on CSIx_D0 only -> lane_polarity = "1"; 0001
                                * e.g. polarity swap on CSIx_D1 and CSI(X+1)_D0 -> lane_polarity = "6"; 0110

besides,
in order to ignoring clock configuration related issues,
you may also try below commands to boost all the VI/CSI/ISP clocks for testing.
for example,

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate


Change the pixel clock to this
and
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

Image normality

Why is that? How do we fix it

please refer to Sensor Pixel Clock section, you must set the sensor pixel clock rate correctly to avoid potential issues.


I set it this way.
but must add the fllow:
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

hello zhangpeng5,

system level refer to device tree clock config to set pixel clocks, it should be clock configuration related issues.
please double check the sensor pixel clock rate settings.