1 /*
2  * mipi_tx_reg.h
3  *
4  * mipi tx register header file.
5  *
6  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
7  *
8  * This software is licensed under the terms of the GNU General Public
9  * License version 2, as published by the Free Software Foundation, and
10  * may be copied, distributed, and modified under those terms.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  */
18 
19 #ifndef MIPI_TX_REG_H
20 #define MIPI_TX_REG_H
21 
22 /* Define the union U_PWR_UP */
23 typedef union {
24     /* Define the struct bits */
25     struct {
26         unsigned int pwr_up : 1;      /* [0] */
27         unsigned int reserved_0 : 31; /* [31..1] */
28     } bits;
29 
30     /* Define an unsigned member */
31     unsigned int u32;
32 } U_PWR_UP;
33 
34 /* Define the union U_CLKMGR_CFG */
35 typedef union {
36     /* Define the struct bits */
37     struct {
38         unsigned int tx_esc_clk_division : 8; /* [7..0] */
39         unsigned int reserved_0 : 8;          /* [15..8] */
40         unsigned int reserved_1 : 16;         /* [31..16] */
41     } bits;
42 
43     /* Define an unsigned member */
44     unsigned int u32;
45 } U_CLKMGR_CFG;
46 
47 /* Define the union U_VCID */
48 typedef union {
49     /* Define the struct bits */
50     struct {
51         unsigned int vcid : 2;        /* [1..0] */
52         unsigned int reserved_0 : 30; /* [31..2] */
53     } bits;
54 
55     /* Define an unsigned member */
56     unsigned int u32;
57 } U_VCID;
58 
59 /* Define the union U_COLOR_CODING */
60 typedef union {
61     /* Define the struct bits */
62     struct {
63         unsigned int color_coding : 4; /* [3..0] */
64         unsigned int reserved_0 : 4;   /* [7..4] */
65         unsigned int loosely18_en : 1; /* [8] */
66         unsigned int reserved_1 : 23;  /* [31..9] */
67     } bits;
68 
69     /* Define an unsigned member */
70     unsigned int u32;
71 } U_COLOR_CODING;
72 
73 /* Define the union U_LP_CMD_TIM */
74 typedef union {
75     /* Define the struct bits */
76     struct {
77         unsigned int invact_lpcmd_time : 8;  /* [7..0] */
78         unsigned int reserved_0 : 8;         /* [15..8] */
79         unsigned int outvact_lpcmd_time : 8; /* [23..16] */
80         unsigned int reserved_1 : 8;         /* [31..24] */
81     } bits;
82 
83     /* Define an unsigned member */
84     unsigned int u32;
85 } U_LP_CMD_TIM;
86 
87 /* Define the union U_PCKHDL_CFG */
88 typedef union {
89     /* Define the struct bits */
90     struct {
91         unsigned int eotp_tx_en : 1;  /* [0] */
92         unsigned int eotp_rx_en : 1;  /* [1] */
93         unsigned int bta_en : 1;      /* [2] */
94         unsigned int ecc_rx_en : 1;   /* [3] */
95         unsigned int crc_rx_en : 1;   /* [4] */
96         unsigned int reserved_0 : 27; /* [31..5] */
97     } bits;
98 
99     /* Define an unsigned member */
100     unsigned int u32;
101 } U_PCKHDL_CFG;
102 
103 /* Define the union U_GEN_VCID */
104 typedef union {
105     /* Define the struct bits */
106     struct {
107         unsigned int gen_vcid_rx : 2; /* [1..0] */
108         unsigned int reserved_0 : 30; /* [31..2] */
109     } bits;
110 
111     /* Define an unsigned member */
112     unsigned int u32;
113 } U_GEN_VCID;
114 
115 /* Define the union U_MODE_CFG */
116 typedef union {
117     /* Define the struct bits */
118     struct {
119         unsigned int cmd_video_mode : 1; /* [0] */
120         unsigned int reserved_0 : 31;    /* [31..1] */
121     } bits;
122 
123     /* Define an unsigned member */
124     unsigned int u32;
125 } U_MODE_CFG;
126 
127 /* Define the union U_VID_MODE_CFG */
128 typedef union {
129     /* Define the struct bits */
130     struct {
131         unsigned int vid_mode_type : 2;    /* [1..0] */
132         unsigned int reserved_0 : 6;       /* [7..2] */
133         unsigned int lp_vsa_en : 1;        /* [8] */
134         unsigned int lp_vbp_en : 1;        /* [9] */
135         unsigned int lp_vfp_en : 1;        /* [10] */
136         unsigned int lp_vact_en : 1;       /* [11] */
137         unsigned int lp_hbp_en : 1;        /* [12] */
138         unsigned int lp_hfp_en : 1;        /* [13] */
139         unsigned int frame_bta_ack_en : 1; /* [14] */
140         unsigned int lp_cmd_en : 1;        /* [15] */
141         unsigned int vpg_en : 1;           /* [16] */
142         unsigned int reserved_1 : 3;       /* [19..17] */
143         unsigned int vpg_mode : 1;         /* [20] */
144         unsigned int reserved_2 : 3;       /* [23..21] */
145         unsigned int vpg_orientation : 1;  /* [24] */
146         unsigned int reserved_3 : 7;       /* [31..25] */
147     } bits;
148 
149     /* Define an unsigned member */
150     unsigned int u32;
151 } U_VID_MODE_CFG;
152 
153 /* Define the union U_VID_PKT_SIZE */
154 typedef union {
155     /* Define the struct bits */
156     struct {
157         unsigned int vid_pkt_size : 14; /* [13..0] */
158         unsigned int reserved_0 : 18;   /* [31..14] */
159     } bits;
160 
161     /* Define an unsigned member */
162     unsigned int u32;
163 } U_VID_PKT_SIZE;
164 
165 /* Define the union U_VID_NUM_CHUNKS */
166 typedef union {
167     /* Define the struct bits */
168     struct {
169         unsigned int vid_num_chunks : 13; /* [12..0] */
170         unsigned int reserved_0 : 19;     /* [31..13] */
171     } bits;
172 
173     /* Define an unsigned member */
174     unsigned int u32;
175 } U_VID_NUM_CHUNKS;
176 
177 /* Define the union U_VID_NULL_SIZE */
178 typedef union {
179     /* Define the struct bits */
180     struct {
181         unsigned int vid_null_size : 13; /* [12..0] */
182         unsigned int reserved_0 : 19;    /* [31..13] */
183     } bits;
184 
185     /* Define an unsigned member */
186     unsigned int u32;
187 } U_VID_NULL_SIZE;
188 
189 /* Define the union U_VID_HSA_TIME */
190 typedef union {
191     /* Define the struct bits */
192     struct {
193         unsigned int vid_hsa_time : 12; /* [11..0] */
194         unsigned int reserved_0 : 20;   /* [31..12] */
195     } bits;
196 
197     /* Define an unsigned member */
198     unsigned int u32;
199 } U_VID_HSA_TIME;
200 
201 /* Define the union U_VID_HBP_TIME */
202 typedef union {
203     /* Define the struct bits */
204     struct {
205         unsigned int vid_hbp_time : 12; /* [11..0] */
206         unsigned int reserved_0 : 20;   /* [31..12] */
207     } bits;
208 
209     /* Define an unsigned member */
210     unsigned int u32;
211 } U_VID_HBP_TIME;
212 
213 /* Define the union U_VID_HLINE_TIME */
214 typedef union {
215     /* Define the struct bits */
216     struct {
217         unsigned int vid_hline_time : 15; /* [14..0] */
218         unsigned int reserved_0 : 17;     /* [31..15] */
219     } bits;
220 
221     /* Define an unsigned member */
222     unsigned int u32;
223 } U_VID_HLINE_TIME;
224 
225 /* Define the union U_VID_VSA_LINES */
226 typedef union {
227     /* Define the struct bits */
228     struct {
229         unsigned int vsa_lines : 10;  /* [9..0] */
230         unsigned int reserved_0 : 22; /* [31..10] */
231     } bits;
232 
233     /* Define an unsigned member */
234     unsigned int u32;
235 } U_VID_VSA_LINES;
236 
237 /* Define the union U_VID_VBP_LINES */
238 typedef union {
239     /* Define the struct bits */
240     struct {
241         unsigned int vbp_lines : 10;  /* [9..0] */
242         unsigned int reserved_0 : 22; /* [31..10] */
243     } bits;
244 
245     /* Define an unsigned member */
246     unsigned int u32;
247 } U_VID_VBP_LINES;
248 
249 /* Define the union U_VID_VFP_LINES */
250 typedef union {
251     /* Define the struct bits */
252     struct {
253         unsigned int vfp_lines : 10;  /* [9..0] */
254         unsigned int reserved_0 : 22; /* [31..10] */
255     } bits;
256 
257     /* Define an unsigned member */
258     unsigned int u32;
259 } U_VID_VFP_LINES;
260 
261 /* Define the union U_VID_VACTIVE_LINES */
262 typedef union {
263     /* Define the struct bits */
264     struct {
265         unsigned int v_active_lines : 14; /* [13..0] */
266         unsigned int reserved_0 : 18;     /* [31..14] */
267     } bits;
268 
269     /* Define an unsigned member */
270     unsigned int u32;
271 } U_VID_VACTIVE_LINES;
272 
273 /* Define the union U_EDPI_CMD_SIZE */
274 typedef union {
275     /* Define the struct bits */
276     struct {
277         unsigned int edpi_allowed_cmd_size : 16; /* [15..0] */
278         unsigned int reserved_0 : 16;            /* [31..16] */
279     } bits;
280 
281     /* Define an unsigned member */
282     unsigned int u32;
283 } U_EDPI_CMD_SIZE;
284 
285 /* Define the union U_CMD_MODE_CFG */
286 typedef union {
287     /* Define the struct bits */
288     struct {
289         unsigned int reserved_0 : 1;      /* [0] */
290         unsigned int reserved_1 : 1;      /* [1] */
291         unsigned int reserved_2 : 6;      /* [7..2] */
292         unsigned int gen_sw_0p_tx : 1;    /* [8] */
293         unsigned int gen_sw_1p_tx : 1;    /* [9] */
294         unsigned int gen_sw_2p_tx : 1;    /* [10] */
295         unsigned int gen_sr_0p_tx : 1;    /* [11] */
296         unsigned int gen_sr_1p_tx : 1;    /* [12] */
297         unsigned int gen_sr_2p_tx : 1;    /* [13] */
298         unsigned int gen_lw_tx : 1;       /* [14] */
299         unsigned int reserved_3 : 1;      /* [15] */
300         unsigned int dcs_sw_0p_tx : 1;    /* [16] */
301         unsigned int dcs_sw_1p_tx : 1;    /* [17] */
302         unsigned int dcs_sr_0p_tx : 1;    /* [18] */
303         unsigned int dcs_lw_tx : 1;       /* [19] */
304         unsigned int reserved_4 : 4;      /* [23..20] */
305         unsigned int max_rd_pkt_size : 1; /* [24] */
306         unsigned int reserved_5 : 7;      /* [31..25] */
307     } bits;
308 
309     /* Define an unsigned member */
310     unsigned int u32;
311 } U_CMD_MODE_CFG;
312 
313 /* Define the union U_GEN_HDR */
314 typedef union {
315     /* Define the struct bits */
316     struct {
317         unsigned int gen_dt : 6;        /* [5..0] */
318         unsigned int gen_vc : 2;        /* [7..6] */
319         unsigned int gen_wc_lsbyte : 8; /* [15..8] */
320         unsigned int gen_wc_msbyte : 8; /* [23..16] */
321         unsigned int reserved_0 : 8;    /* [31..24] */
322     } bits;
323 
324     /* Define an unsigned member */
325     unsigned int u32;
326 } U_GEN_HDR;
327 
328 /* Define the union U_GEN_PLD_DATA */
329 typedef union {
330     /* Define the struct bits */
331     struct {
332         unsigned int gen_pld_b1 : 8; /* [7..0] */
333         unsigned int gen_pld_b2 : 8; /* [15..8] */
334         unsigned int gen_pld_b3 : 8; /* [23..16] */
335         unsigned int gen_pld_b4 : 8; /* [31..24] */
336     } bits;
337 
338     /* Define an unsigned member */
339     unsigned int u32;
340 } U_GEN_PLD_DATA;
341 
342 /* Define the union U_CMD_PKT_STATUS */
343 typedef union {
344     /* Define the struct bits */
345     struct {
346         unsigned int gen_cmd_empty : 1;   /* [0] */
347         unsigned int gen_cmd_full : 1;    /* [1] */
348         unsigned int gen_pld_w_empty : 1; /* [2] */
349         unsigned int gen_pld_w_full : 1;  /* [3] */
350         unsigned int gen_pld_r_empty : 1; /* [4] */
351         unsigned int gen_pld_r_full : 1;  /* [5] */
352         unsigned int gen_rd_cmd_busy : 1; /* [6] */
353         unsigned int reserved_0 : 25;     /* [31..7] */
354     } bits;
355 
356     /* Define an unsigned member */
357     unsigned int u32;
358 } U_CMD_PKT_STATUS;
359 
360 /* Define the union U_LP_WR_TO_CNT */
361 typedef union {
362     /* Define the struct bits */
363     struct {
364         unsigned int lp_wr_to_cnt : 16; /* [15..0] */
365         unsigned int reserved_0 : 16;   /* [31..16] */
366     } bits;
367 
368     /* Define an unsigned member */
369     unsigned int u32;
370 } U_LP_WR_TO_CNT;
371 
372 /* Define the union U_BTA_TO_CNT */
373 typedef union {
374     /* Define the struct bits */
375     struct {
376         unsigned int bta_to_cnt : 16; /* [15..0] */
377         unsigned int reserved_0 : 16; /* [31..16] */
378     } bits;
379 
380     /* Define an unsigned member */
381     unsigned int u32;
382 } U_BTA_TO_CNT;
383 
384 /* Define the union U_LPCLK_CTRL */
385 typedef union {
386     /* Define the struct bits */
387     struct {
388         unsigned int phy_txrequestclkhs : 1; /* [0] */
389         unsigned int auto_clklane_ctrl : 1;  /* [1] */
390         unsigned int reserved_0 : 30;        /* [31..2] */
391     } bits;
392 
393     /* Define an unsigned member */
394     unsigned int u32;
395 } U_LPCLK_CTRL;
396 
397 /* Define the union U_PHY_TMR_LPCLK_CFG */
398 typedef union {
399     /* Define the struct bits */
400     struct {
401         unsigned int phy_clklp2hs_time : 10; /* [9..0] */
402         unsigned int reserved_0 : 6;         /* [15..10] */
403         unsigned int phy_clkhs2lp_time : 10; /* [25..16] */
404         unsigned int reserved_1 : 6;         /* [31..26] */
405     } bits;
406 
407     /* Define an unsigned member */
408     unsigned int u32;
409 } U_PHY_TMR_LPCLK_CFG;
410 
411 /* Define the union U_PHY_TMR_CFG */
412 typedef union {
413     /* Define the struct bits */
414     struct {
415         unsigned int phy_lp2hs_time : 10; /* [9..0] */
416         unsigned int reserved_0 : 6;      /* [15..10] */
417         unsigned int phy_hs2lp_time : 10; /* [25..16] */
418         unsigned int reserved_1 : 6;      /* [31..26] */
419     } bits;
420 
421     /* Define an unsigned member */
422     unsigned int u32;
423 } U_PHY_TMR_CFG;
424 
425 /* Define the union U_PHY_RSTZ */
426 typedef union {
427     /* Define the struct bits */
428     struct {
429         unsigned int phy_shutdownz : 1; /* [0] */
430         unsigned int phy_rstz : 1;      /* [1] */
431         unsigned int phy_enableclk : 1; /* [2] */
432         unsigned int phy_forcepll : 1;  /* [3] */
433         unsigned int reserved_0 : 28;   /* [31..4] */
434     } bits;
435 
436     /* Define an unsigned member */
437     unsigned int u32;
438 } U_PHY_RSTZ;
439 
440 /* Define the union U_PHY_IF_CFG */
441 typedef union {
442     /* Define the struct bits */
443     struct {
444         unsigned int n_lanes : 2;            /* [1..0] */
445         unsigned int reserved_0 : 6;         /* [7..2] */
446         unsigned int phy_stop_wait_time : 8; /* [15..8] */
447         unsigned int reserved_1 : 16;        /* [31..16] */
448     } bits;
449 
450     /* Define an unsigned member */
451     unsigned int u32;
452 } U_PHY_IF_CFG;
453 
454 /* Define the union U_PHY_ULPS_CTRL */
455 typedef union {
456     /* Define the struct bits */
457     struct {
458         unsigned int phy_txrequlpsclk : 1;  /* [0] */
459         unsigned int phy_txexitulpsclk : 1; /* [1] */
460         unsigned int phy_txrequlpslan : 1;  /* [2] */
461         unsigned int phy_txexitulpslan : 1; /* [3] */
462         unsigned int reserved_0 : 28;       /* [31..4] */
463     } bits;
464 
465     /* Define an unsigned member */
466     unsigned int u32;
467 } U_PHY_ULPS_CTRL;
468 
469 /* Define the union U_PHY_STATUS */
470 typedef union {
471     /* Define the struct bits */
472     struct {
473         unsigned int phy_lock : 1;               /* [0] */
474         unsigned int phy_direction : 1;          /* [1] */
475         unsigned int phy_stopstateclklane : 1;   /* [2] */
476         unsigned int phy_ulpsactivenotclk : 1;   /* [3] */
477         unsigned int phy_stopstate0lane : 1;     /* [4] */
478         unsigned int phy_ulpsactivenot0lane : 1; /* [5] */
479         unsigned int phy_rxulpsesc0lane : 1;     /* [6] */
480         unsigned int phy_stopstate1lane : 1;     /* [7] */
481         unsigned int phy_ulpsactivenot1lane : 1; /* [8] */
482         unsigned int phy_stopstate2lane : 1;     /* [9] */
483         unsigned int phy_ulpsactivenot2lane : 1; /* [10] */
484         unsigned int phy_stopstate3lane : 1;     /* [11] */
485         unsigned int phy_ulpsactivenot3lane : 1; /* [12] */
486         unsigned int reserved_0 : 19;            /* [31..13] */
487     } bits;
488 
489     /* Define an unsigned member */
490     unsigned int u32;
491 } U_PHY_STATUS;
492 
493 /* Define the union U_PHY_TST_CTRL0 */
494 typedef union {
495     /* Define the struct bits */
496     struct {
497         unsigned int phy_testclr : 1; /* [0] */
498         unsigned int phy_testclk : 1; /* [1] */
499         unsigned int reserved_0 : 30; /* [31..2] */
500     } bits;
501 
502     /* Define an unsigned member */
503     unsigned int u32;
504 } U_PHY_TST_CTRL0;
505 
506 /* Define the union U_PHY_TST_CTRL1 */
507 typedef union {
508     /* Define the struct bits */
509     struct {
510         unsigned int phy_testdin : 8;  /* [7..0] */
511         unsigned int phy_testdout : 8; /* [15..8] */
512         unsigned int phy_testen : 1;   /* [16] */
513         unsigned int reserved_0 : 15;  /* [31..17] */
514     } bits;
515 
516     /* Define an unsigned member */
517     unsigned int u32;
518 } U_PHY_TST_CTRL1;
519 
520 /* Define the union U_INT_ST0 */
521 typedef union {
522     /* Define the struct bits */
523     struct {
524         unsigned int ack_with_err_0 : 1;  /* [0] */
525         unsigned int ack_with_err_1 : 1;  /* [1] */
526         unsigned int ack_with_err_2 : 1;  /* [2] */
527         unsigned int ack_with_err_3 : 1;  /* [3] */
528         unsigned int ack_with_err_4 : 1;  /* [4] */
529         unsigned int ack_with_err_5 : 1;  /* [5] */
530         unsigned int ack_with_err_6 : 1;  /* [6] */
531         unsigned int ack_with_err_7 : 1;  /* [7] */
532         unsigned int ack_with_err_8 : 1;  /* [8] */
533         unsigned int ack_with_err_9 : 1;  /* [9] */
534         unsigned int ack_with_err_10 : 1; /* [10] */
535         unsigned int ack_with_err_11 : 1; /* [11] */
536         unsigned int ack_with_err_12 : 1; /* [12] */
537         unsigned int ack_with_err_13 : 1; /* [13] */
538         unsigned int ack_with_err_14 : 1; /* [14] */
539         unsigned int ack_with_err_15 : 1; /* [15] */
540         unsigned int dphy_errors_0 : 1;   /* [16] */
541         unsigned int dphy_errors_1 : 1;   /* [17] */
542         unsigned int dphy_errors_2 : 1;   /* [18] */
543         unsigned int dphy_errors_3 : 1;   /* [19] */
544         unsigned int dphy_errors_4 : 1;   /* [20] */
545         unsigned int reserved_0 : 11;     /* [31..21] */
546     } bits;
547 
548     /* Define an unsigned member */
549     unsigned int u32;
550 } U_INT_ST0;
551 
552 /* Define the union U_INT_ST1 */
553 typedef union {
554     /* Define the struct bits */
555     struct {
556         unsigned int to_hs_tx : 1;          /* [0] */
557         unsigned int to_lp_rx : 1;          /* [1] */
558         unsigned int ecc_single_err : 1;    /* [2] */
559         unsigned int ecc_multi_err : 1;     /* [3] */
560         unsigned int crc_err : 1;           /* [4] */
561         unsigned int pkt_size_err : 1;      /* [5] */
562         unsigned int eopt_err : 1;          /* [6] */
563         unsigned int dpi_pld_wr_err : 1;    /* [7] */
564         unsigned int gen_cmd_wr_err : 1;    /* [8] */
565         unsigned int gen_pld_wr_err : 1;    /* [9] */
566         unsigned int gen_pld_send_err : 1;  /* [10] */
567         unsigned int gen_pld_rd_err : 1;    /* [11] */
568         unsigned int gen_pld_recev_err : 1; /* [12] */
569         unsigned int reserved_0 : 3;        /* [15..13] */
570         unsigned int vsstart : 1;           /* [16] */
571         unsigned int reserved_1 : 3;        /* [19..17] */
572         unsigned int rxtrigger_0 : 1;       /* [20] */
573         unsigned int rxtrigger_1 : 1;       /* [21] */
574         unsigned int rxtrigger_2 : 1;       /* [22] */
575         unsigned int rxtrigger_3 : 1;       /* [23] */
576         unsigned int hss_abnormal : 1;      /* [24] */
577         unsigned int reserved_2 : 7;        /* [31..25] */
578     } bits;
579 
580     /* Define an unsigned member */
581     unsigned int u32;
582 } U_INT_ST1;
583 
584 /* Define the union U_INT_MSK0 */
585 typedef union {
586     /* Define the struct bits */
587     struct {
588         unsigned int mask_ack_with_err_0 : 1;  /* [0] */
589         unsigned int mask_ack_with_err_1 : 1;  /* [1] */
590         unsigned int mask_ack_with_err_2 : 1;  /* [2] */
591         unsigned int mask_ack_with_err_3 : 1;  /* [3] */
592         unsigned int mask_ack_with_err_4 : 1;  /* [4] */
593         unsigned int mask_ack_with_err_5 : 1;  /* [5] */
594         unsigned int mask_ack_with_err_6 : 1;  /* [6] */
595         unsigned int mask_ack_with_err_7 : 1;  /* [7] */
596         unsigned int mask_ack_with_err_8 : 1;  /* [8] */
597         unsigned int mask_ack_with_err_9 : 1;  /* [9] */
598         unsigned int mask_ack_with_err_10 : 1; /* [10] */
599         unsigned int mask_ack_with_err_11 : 1; /* [11] */
600         unsigned int mask_ack_with_err_12 : 1; /* [12] */
601         unsigned int mask_ack_with_err_13 : 1; /* [13] */
602         unsigned int mask_ack_with_err_14 : 1; /* [14] */
603         unsigned int mask_ack_with_err_15 : 1; /* [15] */
604         unsigned int mask_dphy_errors_0 : 1;   /* [16] */
605         unsigned int mask_dphy_errors_1 : 1;   /* [17] */
606         unsigned int mask_dphy_errors_2 : 1;   /* [18] */
607         unsigned int mask_dphy_errors_3 : 1;   /* [19] */
608         unsigned int mask_dphy_errors_4 : 1;   /* [20] */
609         unsigned int reserved_0 : 11;          /* [31..21] */
610     } bits;
611 
612     /* Define an unsigned member */
613     unsigned int u32;
614 } U_INT_MSK0;
615 
616 /* Define the union U_INT_MSK1 */
617 typedef union {
618     /* Define the struct bits */
619     struct {
620         unsigned int mask_to_hs_tx : 1;          /* [0] */
621         unsigned int mask_to_lp_rx : 1;          /* [1] */
622         unsigned int mask_ecc_single_err : 1;    /* [2] */
623         unsigned int mask_ecc_multi_err : 1;     /* [3] */
624         unsigned int mask_crc_err : 1;           /* [4] */
625         unsigned int mask_pkt_size_err : 1;      /* [5] */
626         unsigned int mask_eopt_err : 1;          /* [6] */
627         unsigned int mask_dpi_pld_wr_err : 1;    /* [7] */
628         unsigned int mask_gen_cmd_wr_err : 1;    /* [8] */
629         unsigned int mask_gen_pld_wr_err : 1;    /* [9] */
630         unsigned int mask_gen_pld_send_err : 1;  /* [10] */
631         unsigned int mask_gen_pld_rd_err : 1;    /* [11] */
632         unsigned int mask_gen_pld_recev_err : 1; /* [12] */
633         unsigned int reserved_0 : 3;             /* [15..13] */
634         unsigned int mask_vsstart : 1;           /* [16] */
635         unsigned int reserved_1 : 3;             /* [19..17] */
636         unsigned int mask_trigger_0 : 1;         /* [20] */
637         unsigned int mask_trigger_1 : 1;         /* [21] */
638         unsigned int mask_trigger_2 : 1;         /* [22] */
639         unsigned int mask_trigger_3 : 1;         /* [23] */
640         unsigned int mask_hss_abnormal : 1;      /* [24] */
641         unsigned int reserved_2 : 7;             /* [31..25] */
642     } bits;
643 
644     /* Define an unsigned member */
645     unsigned int u32;
646 } U_INT_MSK1;
647 
648 /* Define the union U_PHY_CAL */
649 typedef union {
650     /* Define the struct bits */
651     struct {
652         unsigned int txskewcalhs : 1; /* [0] */
653         unsigned int reserved_0 : 31; /* [31..1] */
654     } bits;
655 
656     /* Define an unsigned member */
657     unsigned int u32;
658 } U_PHY_CAL;
659 
660 /* Define the union U_INT_FORCE1 */
661 typedef union {
662     /* Define the struct bits */
663     struct {
664         unsigned int reserved_0 : 1;  /* [0] */
665         unsigned int reserved_1 : 1;  /* [1] */
666         unsigned int reserved_2 : 1;  /* [2] */
667         unsigned int reserved_3 : 1;  /* [3] */
668         unsigned int reserved_4 : 1;  /* [4] */
669         unsigned int reserved_5 : 1;  /* [5] */
670         unsigned int reserved_6 : 1;  /* [6] */
671         unsigned int reserved_7 : 1;  /* [7] */
672         unsigned int reserved_8 : 1;  /* [8] */
673         unsigned int reserved_9 : 1;  /* [9] */
674         unsigned int reserved_10 : 1; /* [10] */
675         unsigned int reserved_11 : 1; /* [11] */
676         unsigned int reserved_12 : 1; /* [12] */
677         unsigned int reserved_13 : 3; /* [15..13] */
678         unsigned int reserved_14 : 1; /* [16] */
679         unsigned int reserved_15 : 3; /* [19..17] */
680         unsigned int reserved_16 : 1; /* [20] */
681         unsigned int reserved_17 : 1; /* [21] */
682         unsigned int reserved_18 : 1; /* [22] */
683         unsigned int reserved_19 : 1; /* [23] */
684         unsigned int reserved_20 : 1; /* [24] */
685         unsigned int reserved_21 : 7; /* [31..25] */
686     } bits;
687 
688     /* Define an unsigned member */
689     unsigned int u32;
690 } U_INT_FORCE1;
691 
692 /* Define the union U_OPERATION_MODE */
693 typedef union {
694     /* Define the struct bits */
695     struct {
696         unsigned int reserved_0 : 1;          /* [0] */
697         unsigned int mem_ck_en : 1;           /* [1] */
698         unsigned int reserved_1 : 2;          /* [3..2] */
699         unsigned int reserved_2 : 1;          /* [4] */
700         unsigned int init_skew_en : 1;        /* [5] */
701         unsigned int period_skew_en : 1;      /* [6] */
702         unsigned int reserved_3 : 1;          /* [7] */
703         unsigned int reserved_4 : 1;          /* [8] */
704         unsigned int reserved_5 : 1;          /* [9] */
705         unsigned int reserved_6 : 1;          /* [10] */
706         unsigned int reserved_7 : 1;          /* [11] */
707         unsigned int reserved_8 : 1;          /* [12] */
708         unsigned int reserved_9 : 1;          /* [13] */
709         unsigned int reserved_10 : 1;         /* [14] */
710         unsigned int reserved_11 : 1;         /* [15] */
711         unsigned int read_empty_vsync_en : 1; /* [16] */
712         unsigned int reserved_12 : 1;         /* [17] */
713         unsigned int buf_clr_en : 1;          /* [18] */
714         unsigned int reserved_13 : 1;         /* [19] */
715         unsigned int hss_abnormal_rst : 1;    /* [20] */
716         unsigned int reserved_14 : 3;         /* [23..21] */
717         unsigned int reserved_15 : 1;         /* [24] */
718         unsigned int reserved_16 : 1;         /* [25] */
719         unsigned int reserved_17 : 1;         /* [26] */
720         unsigned int reserved_18 : 1;         /* [27] */
721         unsigned int reserved_19 : 3;         /* [30..28] */
722         unsigned int input_en : 1;            /* [31] */
723     } bits;
724 
725     /* Define an unsigned member */
726     unsigned int u32;
727 } U_OPERATION_MODE;
728 
729 /* Define the union U_VERT_DET */
730 typedef union {
731     /* Define the struct bits */
732     struct {
733         unsigned int vact_det : 16; /* [15..0] */
734         unsigned int vall_det : 16; /* [31..16] */
735     } bits;
736 
737     /* Define an unsigned member */
738     unsigned int u32;
739 } U_VERT_DET;
740 
741 /* Define the union U_HORI0_DET */
742 typedef union {
743     /* Define the struct bits */
744     struct {
745         unsigned int hact_det : 16;  /* [15..0] */
746         unsigned int hline_det : 16; /* [31..16] */
747     } bits;
748 
749     /* Define an unsigned member */
750     unsigned int u32;
751 } U_HORI0_DET;
752 
753 /* Define the union U_HORI1_DET */
754 typedef union {
755     /* Define the struct bits */
756     struct {
757         unsigned int hsa_det : 16; /* [15..0] */
758         unsigned int hbp_det : 16; /* [31..16] */
759     } bits;
760 
761     /* Define an unsigned member */
762     unsigned int u32;
763 } U_HORI1_DET;
764 
765 /* Define the union U_VSA_DET */
766 typedef union {
767     /* Define the struct bits */
768     struct {
769         unsigned int vsa_det : 16;    /* [15..0] */
770         unsigned int reserved_0 : 16; /* [31..16] */
771     } bits;
772 
773     /* Define an unsigned member */
774     unsigned int u32;
775 } U_VSA_DET;
776 
777 /* Define the union U_V_H_SEND */
778 typedef union {
779     /* Define the struct bits */
780     struct {
781         unsigned int h_send : 16; /* [15..0] */
782         unsigned int v_send : 16; /* [31..16] */
783     } bits;
784 
785     /* Define an unsigned member */
786     unsigned int u32;
787 } U_V_H_SEND;
788 
789 /* Define the union U_DATATYPE0 */
790 typedef union {
791     /* Define the struct bits */
792     struct {
793         unsigned int reserved_0 : 6; /* [5..0] */
794         unsigned int reserved_1 : 2; /* [7..6] */
795         unsigned int dt_hss : 6;     /* [13..8] */
796         unsigned int reserved_2 : 2; /* [15..14] */
797         unsigned int dt_vse : 6;     /* [21..16] */
798         unsigned int reserved_3 : 2; /* [23..22] */
799         unsigned int dt_vss : 6;     /* [29..24] */
800         unsigned int reserved_4 : 2; /* [31..30] */
801     } bits;
802 
803     /* Define an unsigned member */
804     unsigned int u32;
805 } U_DATATYPE0;
806 
807 /* Define the union U_CSI_CTRL */
808 typedef union {
809     /* Define the struct bits */
810     struct {
811         unsigned int csi_en : 1;      /* [0] */
812         unsigned int reserved_0 : 3;  /* [3..1] */
813         unsigned int reserved_1 : 1;  /* [4] */
814         unsigned int reserved_2 : 3;  /* [7..5] */
815         unsigned int reserved_3 : 1;  /* [8] */
816         unsigned int reserved_4 : 3;  /* [11..9] */
817         unsigned int reserved_5 : 1;  /* [12] */
818         unsigned int reserved_6 : 3;  /* [15..13] */
819         unsigned int reserved_7 : 1;  /* [16] */
820         unsigned int reserved_8 : 15; /* [31..17] */
821     } bits;
822 
823     /* Define an unsigned member */
824     unsigned int u32;
825 } U_CSI_CTRL;
826 
827 /* Define the union U_SKEW_BEGIN */
828 typedef union {
829     /* Define the struct bits */
830     struct {
831         unsigned int skew_begin : 32; /* [31..0] */
832     } bits;
833 
834     /* Define an unsigned member */
835     unsigned int u32;
836 } U_SKEW_BEGIN;
837 /* Define the union U_SKEW_END */
838 typedef union {
839     /* Define the struct bits */
840     struct {
841         unsigned int skew_end : 32; /* [31..0] */
842     } bits;
843 
844     /* Define an unsigned member */
845     unsigned int u32;
846 } U_SKEW_END;
847 /* Define the union U_LANE_ID */
848 typedef union {
849     /* Define the struct bits */
850     struct {
851         unsigned int lane0_id : 2;    /* [1..0] */
852         unsigned int reserved_0 : 2;  /* [3..2] */
853         unsigned int lane1_id : 2;    /* [5..4] */
854         unsigned int reserved_1 : 2;  /* [7..6] */
855         unsigned int lane2_id : 2;    /* [9..8] */
856         unsigned int reserved_2 : 2;  /* [11..10] */
857         unsigned int lane3_id : 2;    /* [13..12] */
858         unsigned int reserved_3 : 18; /* [31..14] */
859     } bits;
860 
861     /* Define an unsigned member */
862     unsigned int u32;
863 } U_LANE_ID;
864 
865 
866 /* Define the global struct */
867 typedef struct {
868     unsigned int reserved_0;               /* 0x0 */
869     U_PWR_UP PWR_UP;                       /* 0x4 */
870     U_CLKMGR_CFG CLKMGR_CFG;               /* 0x8 */
871     U_VCID VCID;                           /* 0xc */
872     U_COLOR_CODING COLOR_CODING;           /* 0x10 */
873     unsigned int reserved_1;               /* 0x14 */
874     U_LP_CMD_TIM LP_CMD_TIM;               /* 0x18 */
875     unsigned int reserved_2[4];            /* 0x1c~0x28 */
876     U_PCKHDL_CFG PCKHDL_CFG;               /* 0x2c */
877     U_GEN_VCID GEN_VCID;                   /* 0x30 */
878     U_MODE_CFG MODE_CFG;                   /* 0x34 */
879     U_VID_MODE_CFG VID_MODE_CFG;           /* 0x38 */
880     U_VID_PKT_SIZE VID_PKT_SIZE;           /* 0x3c */
881     U_VID_NUM_CHUNKS VID_NUM_CHUNKS;       /* 0x40 */
882     U_VID_NULL_SIZE VID_NULL_SIZE;         /* 0x44 */
883     U_VID_HSA_TIME VID_HSA_TIME;           /* 0x48 */
884     U_VID_HBP_TIME VID_HBP_TIME;           /* 0x4c */
885     U_VID_HLINE_TIME VID_HLINE_TIME;       /* 0x50 */
886     U_VID_VSA_LINES VID_VSA_LINES;         /* 0x54 */
887     U_VID_VBP_LINES VID_VBP_LINES;         /* 0x58 */
888     U_VID_VFP_LINES VID_VFP_LINES;         /* 0x5c */
889     U_VID_VACTIVE_LINES VID_VACTIVE_LINES; /* 0x60 */
890     U_EDPI_CMD_SIZE EDPI_CMD_SIZE;         /* 0x64 */
891     U_CMD_MODE_CFG CMD_MODE_CFG;           /* 0x68 */
892     U_GEN_HDR GEN_HDR;                     /* 0x6c */
893     U_GEN_PLD_DATA GEN_PLD_DATA;           /* 0x70 */
894     U_CMD_PKT_STATUS CMD_PKT_STATUS;       /* 0x74 */
895     unsigned int reserved_3[4];            /* 0x78~0x84 */
896     U_LP_WR_TO_CNT LP_WR_TO_CNT;           /* 0x88 */
897     U_BTA_TO_CNT BTA_TO_CNT;               /* 0x8c */
898     unsigned int reserved_4;               /* 0x90 */
899     U_LPCLK_CTRL LPCLK_CTRL;               /* 0x94 */
900     U_PHY_TMR_LPCLK_CFG PHY_TMR_LPCLK_CFG; /* 0x98 */
901     U_PHY_TMR_CFG PHY_TMR_CFG;             /* 0x9c */
902     U_PHY_RSTZ PHY_RSTZ;                   /* 0xa0 */
903     U_PHY_IF_CFG PHY_IF_CFG;               /* 0xa4 */
904     U_PHY_ULPS_CTRL PHY_ULPS_CTRL;         /* 0xa8 */
905     unsigned int reserved_5;               /* 0xac */
906     U_PHY_STATUS PHY_STATUS;               /* 0xb0 */
907     U_PHY_TST_CTRL0 PHY_TST_CTRL0;         /* 0xb4 */
908     U_PHY_TST_CTRL1 PHY_TST_CTRL1;         /* 0xb8 */
909     U_INT_ST0 INT_ST0;                     /* 0xbc */
910     U_INT_ST1 INT_ST1;                     /* 0xc0 */
911     U_INT_MSK0 INT_MSK0;                   /* 0xc4 */
912     U_INT_MSK1 INT_MSK1;                   /* 0xc8 */
913     unsigned int reserved_6[79];           /* 0xcc~0x204 */
914     U_OPERATION_MODE OPERATION_MODE;       /* 0x208 */
915     unsigned int reserved_8[2];            /* 0x20c~0x210 */
916     volatile U_VERT_DET VERT_DET;          /* 0x214 */
917     volatile U_HORI0_DET HORI0_DET;        /* 0x218 */
918     volatile U_HORI1_DET HORI1_DET;        /* 0x21c */
919     volatile U_VSA_DET VSA_DET;            /* 0x220 */
920     U_V_H_SEND V_H_SEND;                   /* 0x224 */
921     unsigned int reserved_9[2];            /* 0x228~0x22c */
922     U_DATATYPE0 DATATYPE0;                 /* 0x230 */
923     unsigned int reserved_10;              /* 0x234 */
924     U_CSI_CTRL CSI_CTRL;                   /* 0x238 */
925     unsigned int reserved_11[6];           /* 0x23c~0x250 */
926 } MipiTxRegsTypeTag;
927 
928 #endif /* __MIPI_TX_REG_H__ */
929