device-tree node setting of YUV Sensor Driver

I have read the “Sensor Driver Programming Guide”.But I have still some question about the device-tree of V4L2 sensor driver. I am confused of some param setting.

I am using adv7280m. It change analog video PAL or NTSC to mipi CSI. I set it work at PAL 50Hz. It’s active resolution is 720*576.

(1)mclk_khz = “24000”;
why i always set to 24MHz ? Can I change to other value. what’s it according to ?

(2)active_w = “720”; //My ADV7280M out width
active_h = “576”; //My ADV7280M out height

(3)pixel_t = “yuyv”;
My sensor output format is YUV422,I set yuyv is right?

(4)line_length = “?”;
I don’t know how to set line_length ,where Can I get this value?the sensor datasheet say it only support one mode 720*576. Can I set line_length 720 is OK ?

(5) mclk_multiplier = “?”;
I know this value must be larger than pix_clk_hz/mclk_khz .Who can tell me. what’s the max-limit of the mclk_multiplier. If I set too big , what’s the influence?

(6)pix_clk_hz = “?”;
Somebody say pix_clk_hz = frame_rate* frame_length * line_length.
I am Sure the frame_rate is only support PAL 50Hz. How Can I know the frame_length?as I know, min_framerate is related to maximum frame length.(min_framerate = pix_clk_hz / (line_length * maximum frame length)).
why frame length Can change? How Can I get the change range ?

(7)min_framerate = “?”;
max_framerate = “50”;

If the sensor only support one frame_rate 50HZ. How to set min_framerate and max_framerate?

BTW, I use V4l to test. I will not use I2S of Nvidia. which parameters above I can set as my wish, and will not impact getting video form v4l-ctrl or Using GStreamer with V4L2 Source Plugin ?

Thanks [/for all.



  1. mclk is the sensor operation clock. If ADV7280M didn’t use this you can ignore it.
  2. Doesn’t matter for the v4l2src.
        1. You can ignore these if it’s YUV sensor.

So as I understanding,

(1)I can just set the right lane_num and csi_port and other neccssary device-tree node, then with a right YUV sensor driver. Then I can get the video form v4l-ctrl with right params ?

(2)I want to know how the TX2 VI and CSI modules of the CPU recognize the YUV video my sensor input .Just satisfy the CSI-2 Specifiication is Ok ?TX2 CPU can automatically check the video format the sensor input and decorde it ?

(3) In above decording process , i don’t need to set some value about clk, speed , time , framerate, video frame width /height in the device-tree node ? Is my understanding is right ?

(4)about “mclk_khz” and “pix_clk_hz” ,in which situation they need be set correctly ? or what they are userd to do ? who will user them ,and to do what ?

Thanks you for your will be very helpful.

  1. Yes.
  2. Check the TRM to know the detail information.
  3. Yes.
  4. mclk is for output clock for sensor operation. You can know it from sensor vendor. pix_clk_hz is doesn’t matter for the v4l2src use case.

Thank you ShaneCCC.

(1)about item 4 above, " mclk is for output clock for sensor operation". Could you tell me, what operations need to use mclk ?for example ?

(2)My sensor only support I2C control and CSI .Then if I only want to get YUV video form v4l2src , Can I put aside mclk and I don’t need to set it ?

(3)The following content form adv7280m datasheet:
"The ADV728x-M outputs video data in an 8-bit YCrCb 4:2:2
format. When the I2P core is disabled, the video data is output
in an interlaced format at a nominal data rate of 216 Mbps. When
the I2P core is enabled, the video data is output in a progressive
format at a nominal data rate of 432 Mbps. "

216Mbps and 432Mbps has no relation with the sensor device-tree node setting ? is my understanding ok ?

Thanks !

If your device is didn’t use this clock as input clock then you can ignore it.

Thank you very much .
Now, I see. this mclk is TX2 output to my sensor. I really don’t use it .