Can't find a suitable value of pixel clk and serdes pixel clk

Hi all,

I ported a GMSL2 MIPI CSI2 Image sensor driver from JetPack 4.x to JetPack 5.x

I am using the setup below

  • Jetson AGX Xavier
  • 4 GMSL2 Cameras AR0820 Image sensor with MAX9295 Serializer
  • MAX9296 Deserializer
  • LI TCA954x Mux

When i tested the camera stream with JetPack 4.x pix_clk_hz and serdes_pix_clk_hz values, i was not able to capture, it seems that JP5.x add the deskew calibration, so i had tune the pix_clk_hz and serdes_pix_clk_hz

/* Clocks from JetPack 4.x */
/* This values work correctly in JP4.x but not in JP5.x */
pix_clk_hz = "292820486"
serdes_pix_clk_hz = "833333333"

/* Clocks from JetPack 5.x */

/*From the sensor guide i calculated the clocks */
Forumla 1 :
pix_clk_hz = sensor output size * frame rate
                   = 3848 * 2168 * 30
                    = 250273920 hz

Formula 2 :
pix_clk_hz = (sensor data rate * number of lanes) / bits per pixel
                   = (1250 * 4 ) / 12
                   = 416666666 hz

For serdes_pix_clk_hz i took the max from the datasheet : 300Mhz

I am able to get the stream of the 4 cameras but i am finding issues regarding the auto exposure control, this latter is very slow… the isp was tunned for this image sensor

Can you please support to find the correct pixel clocks and solve auto exposure control ?


You can report the pix_clk_hz/serdes_pix_clk_hz to make sure the output data rate less than 1.5Gbps
And modify your sensor driver if there have code depend on this clock.

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)

Make sure the sensor configure to output suitable frame rate and boost the clocks to verify.

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

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