← Documents Documentation/admin-guide/media/mgb4.rst GitHub 원문 ↗

Linux 6.18.37 · Administration / Media

The mgb4 Driver

Digiteq FrameGrabber 4의 FPD-Link III·GMSL2/3 V4L2 기능, 44개 sysfs parameter, MTD firmware partition과 IIO trigger를 설명합니다.

Source pathDocumentation/admin-guide/media/mgb4.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

FrameGrabber 4 제어 구조

mgb4.rst:1-385

`mgb4`는 두 video input과 output의 link·stream·timing·routing을 sysfs로 제어하고, FPGA firmware는 MTD로, external trigger는 IIO로 노출합니다. Device를 열기 전에 바꿔야 하는 parameter와 open 상태에서 변경할 수 없는 parameter를 구분해야 합니다.

mgb4 control과 data plane
FPD-Link III / GMSL2/3mgb4 inputV4L2 capture
V4L2 output 또는 card inputmgb4 outputdisplay link
sysfs44 parametersstatus · timing · routing
MTDFPGA firmware · factory data
IIOtrigger bits · timestampvideo frame correlation

V4L2 video stream, sysfs configuration, MTD firmware, IIO trigger가 하나의 PCIe card에서 역할별 interface로 분리됩니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 .. include:: <isonum.txt>
4
5 The mgb4 driver
6 ===============
7
8 Copyright |copy| 2023 - 2025 Digiteq Automotive
9 author: Martin Tůma <[email protected]>
10
11 This is a v4l2 device driver for the Digiteq Automotive FrameGrabber 4, a PCIe
12 card capable of capturing and generating FPD-Link III and GMSL2/3 video streams
13 as used in the automotive industry.
14
15 sysfs interface
16 ---------------
17
18 The mgb4 driver provides a sysfs interface, that is used to configure video
19 stream related parameters (some of them must be set properly before the v4l2
20 device can be opened) and obtain the video device/stream status.
21
22 There are two types of parameters - global / PCI card related, found under
23 ``/sys/class/video4linux/videoX/device`` and module specific found under
24 ``/sys/class/video4linux/videoX``.
25
26 Global (PCI card) parameters
27 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28
29 **module_type** (R):
30 Module type.
31
32 | 0 - No module present
33 | 1 - FPDL3
34 | 2 - GMSL (one serializer, two daisy chained deserializers)
35 | 3 - GMSL (one serializer, two deserializers)
36 | 4 - GMSL (two deserializers with two daisy chain outputs)
37
38 **module_version** (R):
39 Module version number. Zero in case of a missing module.
40
41 **fw_type** (R):
42 Firmware type.
43
44 | 1 - FPDL3
45 | 2 - GMSL
46
47 **fw_version** (R):
48 Firmware version number.
49
50 **serial_number** (R):
51 Card serial number. The format is::
52
53 PRODUCT-REVISION-SERIES-SERIAL
54
55 where each component is a 8b number.
56
57 Common FPDL3/GMSL input parameters
58 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59
60 **input_id** (R):
61 Input number ID, zero based.
62
63 **oldi_lane_width** (RW):
64 Number of deserializer output lanes.
65
66 | 0 - single
67 | 1 - dual (default)
68
69 **color_mapping** (RW):
70 Mapping of the incoming bits in the signal to the colour bits of the pixels.
71
72 | 0 - OLDI/JEIDA
73 | 1 - SPWG/VESA (default)
74
75 **link_status** (R):
76 Video link status. If the link is locked, chips are properly connected and
77 communicating at the same speed and protocol. The link can be locked without
78 an active video stream.
79
80 A value of 0 is equivalent to the V4L2_IN_ST_NO_SYNC flag of the V4L2
81 VIDIOC_ENUMINPUT status bits.
82
83 | 0 - unlocked
84 | 1 - locked
85
86 **stream_status** (R):
87 Video stream status. A stream is detected if the link is locked, the input
88 pixel clock is running and the DE signal is moving.
89
90 A value of 0 is equivalent to the V4L2_IN_ST_NO_SIGNAL flag of the V4L2
91 VIDIOC_ENUMINPUT status bits.
92
93 | 0 - not detected
94 | 1 - detected
95
96 **video_width** (R):
97 Video stream width. This is the actual width as detected by the HW.
98
99 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in the width
100 field of the v4l2_bt_timings struct.
101
102 **video_height** (R):
103 Video stream height. This is the actual height as detected by the HW.
104
105 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in the height
106 field of the v4l2_bt_timings struct.
107
108 **vsync_status** (R):
109 The type of VSYNC pulses as detected by the video format detector.
110
111 The value is equivalent to the flags returned by VIDIOC_QUERY_DV_TIMINGS in
112 the polarities field of the v4l2_bt_timings struct.
113
114 | 0 - active low
115 | 1 - active high
116 | 2 - not available
117
118 **hsync_status** (R):
119 The type of HSYNC pulses as detected by the video format detector.
120
121 The value is equivalent to the flags returned by VIDIOC_QUERY_DV_TIMINGS in
122 the polarities field of the v4l2_bt_timings struct.
123
124 | 0 - active low
125 | 1 - active high
126 | 2 - not available
127
128 **vsync_gap_length** (RW):
129 If the incoming video signal does not contain synchronization VSYNC and
130 HSYNC pulses, these must be generated internally in the FPGA to achieve
131 the correct frame ordering. This value indicates, how many "empty" pixels
132 (pixels with deasserted Data Enable signal) are necessary to generate the
133 internal VSYNC pulse.
134
135 **hsync_gap_length** (RW):
136 If the incoming video signal does not contain synchronization VSYNC and
137 HSYNC pulses, these must be generated internally in the FPGA to achieve
138 the correct frame ordering. This value indicates, how many "empty" pixels
139 (pixels with deasserted Data Enable signal) are necessary to generate the
140 internal HSYNC pulse. The value must be greater than 1 and smaller than
141 vsync_gap_length.
142
143 **pclk_frequency** (R):
144 Input pixel clock frequency in kHz.
145
146 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in
147 the pixelclock field of the v4l2_bt_timings struct.
148
149 *Note: The frequency_range parameter must be set properly first to get
150 a valid frequency here.*
151
152 **hsync_width** (R):
153 Width of the HSYNC signal in PCLK clock ticks.
154
155 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in
156 the hsync field of the v4l2_bt_timings struct.
157
158 **vsync_width** (R):
159 Width of the VSYNC signal in PCLK clock ticks.
160
161 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in
162 the vsync field of the v4l2_bt_timings struct.
163
164 **hback_porch** (R):
165 Number of PCLK pulses between deassertion of the HSYNC signal and the first
166 valid pixel in the video line (marked by DE=1).
167
168 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in
169 the hbackporch field of the v4l2_bt_timings struct.
170
171 **hfront_porch** (R):
172 Number of PCLK pulses between the end of the last valid pixel in the video
173 line (marked by DE=1) and assertion of the HSYNC signal.
174
175 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in
176 the hfrontporch field of the v4l2_bt_timings struct.
177
178 **vback_porch** (R):
179 Number of video lines between deassertion of the VSYNC signal and the video
180 line with the first valid pixel (marked by DE=1).
181
182 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in
183 the vbackporch field of the v4l2_bt_timings struct.
184
185 **vfront_porch** (R):
186 Number of video lines between the end of the last valid pixel line (marked
187 by DE=1) and assertion of the VSYNC signal.
188
189 The value is identical to what VIDIOC_QUERY_DV_TIMINGS returns in
190 the vfrontporch field of the v4l2_bt_timings struct.
191
192 **frequency_range** (RW)
193 PLL frequency range of the OLDI input clock generator. The PLL frequency is
194 derived from the Pixel Clock Frequency (PCLK) and is equal to PCLK if
195 oldi_lane_width is set to "single" and PCLK/2 if oldi_lane_width is set to
196 "dual".
197
198 | 0 - PLL < 50MHz (default)
199 | 1 - PLL >= 50MHz
200
201 *Note: This parameter can not be changed while the input v4l2 device is
202 open.*
203
204 Common FPDL3/GMSL output parameters
205 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
206
207 **output_id** (R):
208 Output number ID, zero based.
209
210 **video_source** (RW):
211 Output video source. If set to 0 or 1, the source is the corresponding card
212 input and the v4l2 output devices are disabled. If set to 2 or 3, the source
213 is the corresponding v4l2 video output device. The default is
214 the corresponding v4l2 output, i.e. 2 for OUT1 and 3 for OUT2.
215
216 | 0 - input 0
217 | 1 - input 1
218 | 2 - v4l2 output 0
219 | 3 - v4l2 output 1
220
221 *Note: This parameter can not be changed while ANY of the input/output v4l2
222 devices is open.*
223
224 **display_width** (RW):
225 Display width. There is no autodetection of the connected display, so the
226 proper value must be set before the start of streaming. The default width
227 is 1280.
228
229 *Note: This parameter can not be changed while the output v4l2 device is
230 open.*
231
232 **display_height** (RW):
233 Display height. There is no autodetection of the connected display, so the
234 proper value must be set before the start of streaming. The default height
235 is 640.
236
237 *Note: This parameter can not be changed while the output v4l2 device is
238 open.*
239
240 **frame_rate** (RW):
241 Output video signal frame rate limit in frames per second. Due to
242 the limited output pixel clock steps, the card can not always generate
243 a frame rate perfectly matching the value required by the connected display.
244 Using this parameter one can limit the frame rate by "crippling" the signal
245 so that the lines are not equal (the porches of the last line differ) but
246 the signal appears like having the exact frame rate to the connected display.
247 The default frame rate limit is 60Hz.
248
249 **hsync_polarity** (RW):
250 HSYNC signal polarity.
251
252 | 0 - active low (default)
253 | 1 - active high
254
255 **vsync_polarity** (RW):
256 VSYNC signal polarity.
257
258 | 0 - active low (default)
259 | 1 - active high
260
261 **de_polarity** (RW):
262 DE signal polarity.
263
264 | 0 - active low
265 | 1 - active high (default)
266
267 **pclk_frequency** (RW):
268 Output pixel clock frequency. Allowed values are between 25000-190000(kHz)
269 and there is a non-linear stepping between two consecutive allowed
270 frequencies. The driver finds the nearest allowed frequency to the given
271 value and sets it. When reading this property, you get the exact
272 frequency set by the driver. The default frequency is 61150kHz.
273
274 *Note: This parameter can not be changed while the output v4l2 device is
275 open.*
276
277 **hsync_width** (RW):
278 Width of the HSYNC signal in pixels. The default value is 40.
279
280 **vsync_width** (RW):
281 Width of the VSYNC signal in video lines. The default value is 20.
282
283 **hback_porch** (RW):
284 Number of PCLK pulses between deassertion of the HSYNC signal and the first
285 valid pixel in the video line (marked by DE=1). The default value is 50.
286
287 **hfront_porch** (RW):
288 Number of PCLK pulses between the end of the last valid pixel in the video
289 line (marked by DE=1) and assertion of the HSYNC signal. The default value
290 is 50.
291
292 **vback_porch** (RW):
293 Number of video lines between deassertion of the VSYNC signal and the video
294 line with the first valid pixel (marked by DE=1). The default value is 31.
295
296 **vfront_porch** (RW):
297 Number of video lines between the end of the last valid pixel line (marked
298 by DE=1) and assertion of the VSYNC signal. The default value is 30.
299
300 FPDL3 specific input parameters
301 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
302
303 **fpdl3_input_width** (RW):
304 Number of deserializer input lines.
305
306 | 0 - auto (default)
307 | 1 - single
308 | 2 - dual
309
310 FPDL3 specific output parameters
311 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
312
313 **fpdl3_output_width** (RW):
314 Number of serializer output lines.
315
316 | 0 - auto (default)
317 | 1 - single
318 | 2 - dual
319
320 GMSL specific input parameters
321 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
322
323 **gmsl_mode** (RW):
324 GMSL speed mode.
325
326 | 0 - 12Gb/s (default)
327 | 1 - 6Gb/s
328 | 2 - 3Gb/s
329 | 3 - 1.5Gb/s
330
331 **gmsl_stream_id** (RW):
332 The GMSL multi-stream contains up to four video streams. This parameter
333 selects which stream is captured by the video input. The value is the
334 zero-based index of the stream. The default stream id is 0.
335
336 *Note: This parameter can not be changed while the input v4l2 device is
337 open.*
338
339 **gmsl_fec** (RW):
340 GMSL Forward Error Correction (FEC).
341
342 | 0 - disabled
343 | 1 - enabled (default)
344
345 MTD partitions
346 --------------
347
348 The mgb4 driver creates a MTD device with two partitions:
349 - mgb4-fw.X - FPGA firmware.
350 - mgb4-data.X - Factory settings, e.g. card serial number.
351
352 The *mgb4-fw* partition is writable and is used for FW updates, *mgb4-data* is
353 read-only. The *X* attached to the partition name represents the card number.
354 Depending on the CONFIG_MTD_PARTITIONED_MASTER kernel configuration, you may
355 also have a third partition named *mgb4-flash* available in the system. This
356 partition represents the whole, unpartitioned, card's FLASH memory and one should
357 not fiddle with it...
358
359 IIO (triggers)
360 --------------
361
362 The mgb4 driver creates an Industrial I/O (IIO) device that provides trigger and
363 signal level status capability. The following scan elements are available:
364
365 **activity**:
366 The trigger levels and pending status.
367
368 | bit 1 - trigger 1 pending
369 | bit 2 - trigger 2 pending
370 | bit 5 - trigger 1 level
371 | bit 6 - trigger 2 level
372
373 **timestamp**:
374 The trigger event timestamp.
375
376 The iio device can operate either in "raw" mode where you can fetch the signal
377 levels (activity bits 5 and 6) using sysfs access or in triggered buffer mode.
378 In the triggered buffer mode you can follow the signal level changes (activity
379 bits 1 and 2) using the iio device in /dev. If you enable the timestamps, you
380 will also get the exact trigger event time that can be matched to a video frame
381 (every mgb4 video frame has a timestamp with the same clock source).
382
383 *Note: although the activity sample always contains all the status bits, it makes
384 no sense to get the pending bits in raw mode or the level bits in the triggered
385 buffer mode - the values do not represent valid data in such case.*
386

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

mgb4 드라이버

1-14

이 문서는 GPL-2.0 라이선스를 따르며 Copyright © 2023-2025 Digiteq Automotive입니다. 저자는 Martin Tůma <[email protected]>입니다.

`mgb4`는 Digiteq Automotive FrameGrabber 4용 V4L2 device driver입니다. 이 PCIe card는 자동차 산업에서 사용하는 FPD-Link III와 GMSL2/3 video stream을 capture하고 생성할 수 있습니다.

sysfs interface

15-25

`mgb4` driver는 video stream 관련 parameter를 설정하고 video device 또는 stream 상태를 읽는 sysfs interface를 제공합니다. 일부 parameter는 V4L2 device를 열기 전에 반드시 올바르게 설정해야 합니다.

Parameter는 두 종류입니다. Global 또는 PCI card 관련 parameter는 `/sys/class/video4linux/videoX/device` 아래에 있고, module별 parameter는 `/sys/class/video4linux/videoX` 아래에 있습니다.

mgb4 sysfs 경로
PCIe FrameGrabber 4/sys/class/video4linux/videoX/devicemodule · firmware · serial
FPDL3/GMSL module/sys/class/video4linux/videoXstream · timing · routing

Global card 정보와 input/output module 설정은 서로 다른 sysfs level에 노출됩니다.

Global PCI card parameter

26-56
Parameter권한설명값 또는 형식
module_typeRModule type입니다.0: module 없음; 1: FPDL3; 2: GMSL, serializer 1개와 daisy-chain deserializer 2개; 3: GMSL, serializer 1개와 deserializer 2개; 4: GMSL, daisy-chain output 2개를 가진 deserializer 2개
module_versionRModule version 번호입니다. Module이 없으면 0입니다.
fw_typeRFirmware type입니다.1: FPDL3; 2: GMSL
fw_versionRFirmware version 번호입니다.
serial_numberRCard serial number입니다. 각 component는 8-bit number입니다.PRODUCT-REVISION-SERIES-SERIAL

공통 FPDL3/GMSL input parameter

57-203

Input parameter는 link와 stream 감지, 실제 video timing, synchronization gap 및 OLDI PLL range를 제어하거나 보고합니다. `R`은 read-only, `RW`는 read/write입니다.

Parameter권한설명값·API 대응·제약
input_idR0부터 시작하는 input 번호 ID입니다.
oldi_lane_widthRWDeserializer output lane 수입니다.0: single; 1: dual, 기본값
color_mappingRW입력 signal bit를 pixel colour bit에 mapping하는 방식입니다.0: OLDI/JEIDA; 1: SPWG/VESA, 기본값
link_statusRVideo link 상태입니다. Locked이면 chip이 올바르게 연결되어 같은 speed와 protocol로 통신합니다. Active video stream이 없어도 link는 lock될 수 있습니다.0: unlocked, V4L2 VIDIOC_ENUMINPUT의 V4L2_IN_ST_NO_SYNC와 동등; 1: locked
stream_statusRLink가 locked이고 input pixel clock이 동작하며 DE signal이 움직이면 video stream을 감지한 것입니다.0: 미감지, V4L2 VIDIOC_ENUMINPUT의 V4L2_IN_ST_NO_SIGNAL과 동등; 1: 감지
video_widthRHardware가 감지한 실제 video stream width입니다.VIDIOC_QUERY_DV_TIMINGS가 v4l2_bt_timings.width에 반환하는 값과 동일
video_heightRHardware가 감지한 실제 video stream height입니다.VIDIOC_QUERY_DV_TIMINGS가 v4l2_bt_timings.height에 반환하는 값과 동일
vsync_statusRVideo format detector가 감지한 VSYNC pulse type입니다. v4l2_bt_timings.polarities의 VIDIOC_QUERY_DV_TIMINGS flag와 동등합니다.0: active low; 1: active high; 2: 사용 불가
hsync_statusRVideo format detector가 감지한 HSYNC pulse type입니다. v4l2_bt_timings.polarities의 VIDIOC_QUERY_DV_TIMINGS flag와 동등합니다.0: active low; 1: active high; 2: 사용 불가
vsync_gap_lengthRW입력 video에 VSYNC/HSYNC synchronization pulse가 없을 때 FPGA가 올바른 frame 순서를 위해 내부 VSYNC를 생성하는 데 필요한 empty pixel 수입니다. Empty pixel은 Data Enable이 deassert된 pixel입니다.
hsync_gap_lengthRW입력 video에 synchronization pulse가 없을 때 FPGA가 내부 HSYNC를 생성하는 데 필요한 empty pixel 수입니다.1보다 크고 vsync_gap_length보다 작아야 함
pclk_frequencyRInput pixel clock frequency를 kHz로 표시합니다. v4l2_bt_timings.pixelclock의 VIDIOC_QUERY_DV_TIMINGS 값과 동일합니다.유효한 값을 얻으려면 frequency_range를 먼저 올바르게 설정해야 함
hsync_widthRPCLK clock tick 단위의 HSYNC signal width입니다.v4l2_bt_timings.hsync의 VIDIOC_QUERY_DV_TIMINGS 값과 동일
vsync_widthRPCLK clock tick 단위의 VSYNC signal width입니다.v4l2_bt_timings.vsync의 VIDIOC_QUERY_DV_TIMINGS 값과 동일
hback_porchRHSYNC deassertion부터 video line의 첫 valid pixel, 즉 DE=1까지의 PCLK pulse 수입니다.v4l2_bt_timings.hbackporch와 동일
hfront_porchRVideo line의 마지막 valid pixel 종료부터 HSYNC assertion까지의 PCLK pulse 수입니다.v4l2_bt_timings.hfrontporch와 동일
vback_porchRVSYNC deassertion부터 첫 valid pixel이 있는 video line까지의 line 수입니다.v4l2_bt_timings.vbackporch와 동일
vfront_porchR마지막 valid pixel line 종료부터 VSYNC assertion까지의 video line 수입니다.v4l2_bt_timings.vfrontporch와 동일
frequency_rangeRWOLDI input clock generator의 PLL frequency range입니다. PLL frequency는 PCLK에서 유도되며 oldi_lane_width가 single이면 PCLK, dual이면 PCLK/2입니다.0: PLL < 50MHz, 기본값; 1: PLL >= 50MHz. Input V4L2 device가 열린 동안 변경할 수 없음

공통 FPDL3/GMSL output parameter

204-299

Output parameter는 source routing, display geometry, frame rate, signal polarity와 pixel timing을 설정합니다. 자동 display 감지가 없으므로 streaming 전에 geometry와 clock을 올바르게 지정해야 합니다.

Parameter권한설명값·기본값·제약
output_idR0부터 시작하는 output 번호 ID입니다.
video_sourceRWOutput video source입니다. 0 또는 1이면 해당 card input을 사용하고 V4L2 output device를 비활성화합니다. 2 또는 3이면 해당 V4L2 video output device를 사용합니다.0: input 0; 1: input 1; 2: V4L2 output 0; 3: V4L2 output 1. 기본값은 OUT1=2, OUT2=3. 어떤 input/output V4L2 device라도 열려 있으면 변경 불가
display_widthRW연결된 display를 자동 감지하지 않으므로 streaming 시작 전에 올바른 display width를 설정해야 합니다.기본값 1280. Output V4L2 device가 열린 동안 변경 불가
display_heightRW연결된 display를 자동 감지하지 않으므로 streaming 시작 전에 올바른 display height를 설정해야 합니다.기본값 640. Output V4L2 device가 열린 동안 변경 불가
frame_rateRW초당 frame 수로 나타낸 output video signal frame-rate limit입니다. Output pixel clock step이 제한되어 display가 요구하는 frame rate를 정확히 만들 수 없는 경우, 마지막 line의 porch를 다르게 해 line을 불균등하게 만드는 방식으로 signal을 조정하여 display에는 정확한 frame rate처럼 보이게 제한합니다.기본 limit 60Hz
hsync_polarityRWHSYNC signal polarity입니다.0: active low, 기본값; 1: active high
vsync_polarityRWVSYNC signal polarity입니다.0: active low, 기본값; 1: active high
de_polarityRWDE signal polarity입니다.0: active low; 1: active high, 기본값
pclk_frequencyRWOutput pixel clock frequency입니다. 허용 범위는 25000-190000kHz이고 연속 허용 주파수 사이의 step은 비선형입니다. Driver는 지정 값에 가장 가까운 허용 주파수를 설정하며, 읽을 때는 실제 설정된 정확한 주파수를 반환합니다.기본값 61150kHz. Output V4L2 device가 열린 동안 변경 불가
hsync_widthRWPixel 단위 HSYNC signal width입니다.기본값 40
vsync_widthRWVideo line 단위 VSYNC signal width입니다.기본값 20
hback_porchRWHSYNC deassertion부터 첫 valid pixel, 즉 DE=1까지의 PCLK pulse 수입니다.기본값 50
hfront_porchRW마지막 valid pixel 종료부터 HSYNC assertion까지의 PCLK pulse 수입니다.기본값 50
vback_porchRWVSYNC deassertion부터 첫 valid pixel이 있는 video line까지의 line 수입니다.기본값 31
vfront_porchRW마지막 valid pixel line 종료부터 VSYNC assertion까지의 video line 수입니다.기본값 30

FPDL3 전용 input parameter

300-309
Parameter권한설명
fpdl3_input_widthRWDeserializer input line 수입니다.0: auto, 기본값; 1: single; 2: dual

FPDL3 전용 output parameter

310-319
Parameter권한설명
fpdl3_output_widthRWSerializer output line 수입니다.0: auto, 기본값; 1: single; 2: dual

GMSL 전용 input parameter

320-344
Parameter권한설명값·제약
gmsl_modeRWGMSL speed mode입니다.0: 12Gb/s, 기본값; 1: 6Gb/s; 2: 3Gb/s; 3: 1.5Gb/s
gmsl_stream_idRW최대 4개 video stream을 담는 GMSL multi-stream에서 video input이 capture할 stream을 선택합니다. 값은 0부터 시작하는 stream index입니다.기본 stream ID 0. Input V4L2 device가 열린 동안 변경 불가
gmsl_fecRWGMSL Forward Error Correction(FEC) 설정입니다.0: disabled; 1: enabled, 기본값

MTD partition

345-358

`mgb4` driver는 기본적으로 두 MTD partition을 생성합니다. Partition 이름의 `X`는 card 번호입니다.

Partition접근용도
mgb4-fw.XRWFPGA firmware이며 firmware update에 사용합니다.
mgb4-data.XRCard serial number 같은 factory setting을 저장합니다.
mgb4-flash위험CONFIG_MTD_PARTITIONED_MASTER에 따라 나타나는 전체 비분할 card FLASH memory입니다. 직접 수정하면 안 됩니다.

`mgb4-flash`는 card 전체의 비분할 FLASH memory를 나타냅니다. `CONFIG_MTD_PARTITIONED_MASTER` 설정에 따라 보일 수 있지만 직접 조작하지 마십시오.

IIO trigger

359-385

`mgb4` driver는 trigger와 signal level 상태를 제공하는 Industrial I/O(IIO) device를 생성합니다.

Scan element의미Bit 또는 clock
activityTrigger level과 pending 상태입니다.bit 1: trigger 1 pending; bit 2: trigger 2 pending; bit 5: trigger 1 level; bit 6: trigger 2 level
timestampTrigger event timestamp입니다.Video frame과 같은 clock source

IIO device는 raw mode 또는 triggered buffer mode로 동작합니다. Raw mode에서는 sysfs를 통해 activity bit 5와 6의 signal level을 가져옵니다. Triggered buffer mode에서는 `/dev`의 IIO device를 사용해 activity bit 1과 2의 signal level 변화를 추적합니다.

Timestamp를 활성화하면 video frame과 정확히 대응시킬 수 있는 trigger event 시간을 얻습니다. 모든 `mgb4` video frame timestamp가 IIO event와 같은 clock source를 사용하기 때문입니다.

Activity sample에는 항상 모든 status bit가 있지만 raw mode의 pending bit와 triggered buffer mode의 level bit는 유효한 data를 나타내지 않으므로 읽을 의미가 없습니다.

IIO trigger 관측 mode
raw modesysfsbit 5·6 signal level
triggered buffer/dev IIObit 1·2 pending changetimestampvideo frame

Mode에 따라 activity field에서 의미 있는 bit가 다르며 timestamp는 video frame과 같은 clock domain을 사용합니다.