Error when porting the FPDLink camera driver to Orin NX JP6.1

Hello,

I have a 1080p uyvy format FPDLink camera, which was previously working well on the Xavier platform. However, when I ported the corresponding code to the Orin NX, it cannot correctly capture images. The relevant DTS fragment is as follows:

                    mclk_khz = "24000";
                    num_lanes = "2";
                    tegra_sinterface = "serial_b";
                    lane_polarity = "6";
                    phy_mode = "DPHY";
                    discontinuous_clk = "yes";
                    dpcm_enable = "false";
                    cil_settletime = "0";
                    
                    active_w = "1920";
                    active_h = "1080";
                    mode_type = "yuv";
                    pixel_phase = "uyvy";
                    csi_pixel_bit_depth = "16";
                    readout_orientation = "0";
                    line_length = "2200";
                    inherent_gain = "1";
                    mclk_multiplier = "2";
                    pix_clk_hz = "74250000";
                    
                    serdes_pix_clk_hz = "800000000";

After some investigation, I found that when I remove the serdes_pix_clk_hz line from the DTS and use the method in the bring-up to boost the clock to the maximum, the image is captured correctly.

I have tried modifying several values for serdes_pix_clk_hz, but none of them resolved the issue.

Please help me. Thank you!

Try set to 187499999 if still can’t fix the problem need to set to higher and configurate the sensor to send deskew word for it.

Skew calibration is required if sensor or deserializer is using DPHY, and the output data rate is > 1.5Gbps.
An initiation deskew signal should be sent by sensor or deserializer to perform the skew calibration. If the deskew signals is not sent, the receiver will stall, and the capture will time out.
You can calculate the output data rate with the following equation:

Output data rate = (sensor or deserializer pixel clock in hertz) * (bits per pixel) / (number of CSI lanes)

Using this value, dmesg keep warning:

[  543.044003] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.091947] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[  543.091992] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.147727] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.179368] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.214263] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.230854] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.275012] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.316419] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.358592] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[  543.391908] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[  543.425242] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[  543.437001] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.467076] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[  543.507027] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512

In fact the output of my 954 chip is only configured for 800Mbps

What’s the trace log?

Hi,
@ShaneCCC
I configured it with serdes_pix_clk_hz = ‘187499999’ and it worked.
Last time, it was because I accidentally added an extra space after the number.

I also tried setting it to 100000000, and it worked fine as well. Thank you!

1 Like

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