libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
dsi_common_f47.h
Go to the documentation of this file.
1/** @addtogroup dsi_defines
2 *
3 * @version 1.0.0
4 *
5 * @date 7 July 2016
6 *
7 * @author @htmlonly © @endhtmlonly 2016
8 * Chuck McManis <cmcmanis@mcmanis.com>
9 *
10 * This library supports the Display Serial Interface Host and Wrapper in
11 * the STM32F4xx and STM32F7xx series of ARM Cortex Microcontrollers by
12 * ST Microelectronics.
13 *
14 * LGPL License Terms @ref lgpl_license
15 */
16
17/*
18 * STM32F4/7 DSI Host Defines
19 *
20 * Copyright (C) 2016, Chuck McManis <cmcmanis@mcmanis.com>
21 *
22 * This file is part of the libopencm3 project.
23 *
24 * This library is free software: you can redistribute it and/or modify
25 * it under the terms of the GNU Lesser General Public License as published by
26 * the Free Software Foundation, either version 3 of the License, or
27 * (at your option) any later version.
28 *
29 * This library is distributed in the hope that it will be useful,
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 * GNU Lesser General Public License for more details.
33 *
34 * You should have received a copy of the GNU Lesser General Public License
35 * along with this library. If not, see <http://www.gnu.org/licenses/>.
36 *
37 */
38
41
42/** @cond */
43#ifndef DSI_H
44/** @endcond */
45#define DSI_H
46
47/**@{*/
48
49
50/**
51 * DSI Host Version Register
52 */
53#define DSI_VR MMIO32(DSI_BASE + 0x0U)
54
55/**
56 * DSI Host Control Register
57 */
58#define DSI_CR MMIO32(DSI_BASE + 0x4U)
59#define DSI_CR_EN (1 << 0)
60
61/**
62 * DSI Host Clock Control Register
63 */
64#define DSI_CCR MMIO32(DSI_BASE + 0x8U)
65#define DSI_CCR_TOCKDIV_SHIFT 8
66#define DSI_CCR_TOCKDIV_MASK 0xff
67#define DSI_CCR_TXECKDIV_SHIFT 0
68#define DSI_CCR_TXECKDIV_MASK 0xff
69
70/**
71 * DSI Host LTDC VCID Register
72 */
73#define DSI_LVCIDR MMIO32(DSI_BASE + 0xcU)
74#define DSI_LVCIDR_VCID_SHIFT 0
75#define DSI_LVCIDR_VCID_MASK 0x3
76
77/**
78 * DSI Host LTDC Color Coding Register
79 */
80#define DSI_LCOLCR MMIO32(DSI_BASE + 0x10U)
81#define DSI_LCOLCR_LPE (1 << 8)
82#define DSI_LCOLCR_COLC_SHIFT 0
83#define DSI_LCOLCR_COLC_MASK 0xf
84
85/**
86 * DSI Host LTDC Polarity Configuration Register
87 */
88#define DSI_LPCR MMIO32(DSI_BASE + 0x14U)
89#define DSI_LPCR_HSP (1 << 2)
90#define DSI_LPCR_VSP (1 << 1)
91#define DSI_LPCR_DEP (1 << 0)
92
93/**
94 * DSI Host Low-power Configuration Register
95 */
96#define DSI_LPMCR MMIO32(DSI_BASE + 0x18U)
97#define DSI_LPMCR_LPSIZE_SHIFT 16
98#define DSI_LPMCR_LPSIZE_MASK 0xff
99#define DSI_LPMCR_VLPSIZE_SHIFT 0
100#define DSI_LPMCR_VLPSIZE_MASK 0xff
101
102/**
103 * DSI Host Protocol Configuration Register
104 */
105#define DSI_PCR MMIO32(DSI_BASE + 0x2cU)
106#define DSI_PCR_CRCRXE (1 << 4)
107#define DSI_PCR_ECCRXE (1 << 3)
108#define DSI_PCR_BTAE (1 << 2)
109#define DSI_PCR_ETRXE (1 << 1)
110#define DSI_PCR_ETTXE (1 << 0)
111
112/**
113 * DSI Host Generic VCID Register
114 */
115#define DSI_GVCIDR MMIO32(DSI_BASE + 0x30U)
116#define DSI_GVCIDR_VCID_SHIFT 0
117#define DSI_GVCIDR_VCID_MASK 0x3
118
119/**
120 * DSI Host mode Configuration Register
121 */
122#define DSI_MCR MMIO32(DSI_BASE + 0x34U)
123#define DSI_MCR_CMDM (1 << 0)
124
125/**
126 * DSI Host Video mode Configuration Register
127 */
128#define DSI_VMCR MMIO32(DSI_BASE + 0x38U)
129#define DSI_VMCR_PGO (1 << 24)
130#define DSI_VMCR_PGM (1 << 20)
131#define DSI_VMCR_PGE (1 << 16)
132#define DSI_VMCR_LPCE (1 << 15)
133#define DSI_VMCR_FBTAAE (1 << 14)
134#define DSI_VMCR_LPHFPE (1 << 13)
135#define DSI_VMCR_LPHBPE (1 << 12)
136#define DSI_VMCR_LPVAE (1 << 11)
137#define DSI_VMCR_LPVFPE (1 << 10)
138#define DSI_VMCR_LPVBPE (1 << 9)
139#define DSI_VMCR_LPVSAE (1 << 8)
140#define DSI_VMCR_VMT_SHIFT 0
141#define DSI_VMCR_VMT_MASK 0x3
142#define DSI_VMCR_VMT_NON_BURST_PULSE 0x0
143#define DSI_VMCR_VMT_NON_BURSE_EVENT 0x1
144#define DSI_VMCR_VMT_BURST 0x2
145
146/**
147 * DSI Host Video Packet Configuration Register
148 */
149#define DSI_VPCR MMIO32(DSI_BASE + 0x3CU)
150#define DSI_VPCR_VPSIZE_SHIFT 0
151#define DSI_VPCR_VPSIZE_MASK 0x3fff
152
153/**
154 * DSI Host Video Chunks Configuration Register
155 */
156#define DSI_VCCR MMIO32(DSI_BASE + 0x40U)
157#define DSI_VCCR_NUMC_SHIFT 0
158#define DSI_VCCR_NUMC_MASK 0x1fff
159
160/**
161 * DSI Host Video Null Packet Configuration Register
162 */
163#define DSI_VNPCR MMIO32(DSI_BASE + 0x44U)
164#define DSI_VNPCR_NPSIZE_SHIFT 0
165#define DSI_VNPCR_NPSIZE_MASK 0x1fff
166
167/**
168 * DSI Host Video HSA Configuration Register
169 */
170#define DSI_VHSACR MMIO32(DSI_BASE + 0x48U)
171#define DSI_VHSACR_HSA_SHIFT 0
172#define DSI_VHSACR_HSA_MASK 0xfff
173
174/**
175 * DSI Host Video HBP Configuration Register
176 */
177#define DSI_VHBPCR MMIO32(DSI_BASE + 0x4CU)
178#define DSI_VHBPCR_HBP_SHIFT 0
179#define DSI_VHBPCR_HBP_MASK 0xfff
180
181/**
182 * DSI Host Video Line Configuration Register
183 */
184#define DSI_VLCR MMIO32(DSI_BASE + 0x50U)
185#define DSI_VLCR_HLINE_SHIFT 0
186#define DSI_VLCR_HLINE_MASK 0x7fff
187
188/**
189 * DSI Host Video VSA Configuration Register
190 */
191#define DSI_VVSACR MMIO32(DSI_BASE + 0x54U)
192#define DSI_VVSACR_VSA_SHIFT 0
193#define DSI_VVSACR_VSA_MASK 0x3ff
194
195/**
196 * DSI Host Video VBP Configuration Register
197 */
198#define DSI_VVBPCR MMIO32(DSI_BASE + 0x58U)
199#define DSI_VVBPCR_VBP_SHIFT 0
200#define DSI_VVBPCR_VBP_MASK 0x3ff
201
202/**
203 * DSI Host Video VFP Configuration Register
204 */
205#define DSI_VVFPCR MMIO32(DSI_BASE + 0x5CU)
206#define DSI_VVFPCR_VFP_SHIFT 0
207#define DSI_VVFPCR_VFP_MASK 0x3ff
208
209/**
210 * DSI Host Video VA Configuration Register
211 */
212#define DSI_VVACR MMIO32(DSI_BASE + 0x60U)
213#define DSI_VVACR_VA_SHIFT 0
214#define DSI_VVACR_VA_MASK 0x3fff
215
216/**
217 * DSI Host LTDC Command Configuration Register
218 */
219#define DSI_LCCR MMIO32(DSI_BASE + 0x64U)
220#define DSI_LCCR_CMDSIZE_SHIFT 0
221#define DSI_LCCR_CMDSIZE_MASK 0xffff
222
223/**
224 * DSI Host Command mode Configuration Register
225 */
226#define DSI_CMCR MMIO32(DSI_BASE + 0x68U)
227#define DSI_CMCR_MRDPS (1 << 24)
228#define DSI_CMCR_DLWTX (1 << 19)
229#define DSI_CMCR_DSR0TX (1 << 18)
230#define DSI_CMCR_DSW1TX (1 << 17)
231#define DSI_CMCR_DSW0TX (1 << 16)
232/* Bit 15 reserved */
233#define DSI_CMCR_GLWTX (1 << 14)
234#define DSI_CMCR_GSR2TX (1 << 13)
235#define DSI_CMCR_GSR1TX (1 << 12)
236#define DSI_CMCR_GSR0TX (1 << 11)
237#define DSI_CMCR_GSW2TX (1 << 10)
238#define DSI_CMCR_GSW1TX (1 << 9)
239#define DSI_CMCR_GSW0TX (1 << 8)
240/* Bits 7:2 Reserved */
241#define DSI_CMCR_ARE (1 << 1)
242#define DSI_CMCR_TEARE (1 << 0)
243
244/**
245 * DSI Host Generic Header Configuration Register
246 */
247#define DSI_GHCR MMIO32(DSI_BASE + 0x6CU)
248#define DSI_GHCR_WCMSB_SHIFT 16
249#define DSI_GHCR_WCMSB_MASK 0xff
250#define DSI_GHCR_WCLSB_SHIFT 8
251#define DSI_GHCR_WCLSB_MASK 0xff
252#define DSI_GHCR_DATA1_SHIFT 16 /* data 1 in 'short' mode */
253#define DSI_GHCR_DATA1_MASK 0xff
254#define DSI_GHCR_DATA0_SHIFT 8 /* data 0 in 'short' mode */
255#define DSI_GHCR_DATA0_MASK 0xff
256#define DSI_GHCR_VCID_SHIFT 6
257#define DSI_GHCR_VCID_MASK 0x3
258#define DSI_GHCR_DT_SHIFT 0
259#define DSI_GHCR_DT_MASK 0x3f
260
261/**
262 * DSI Host Generic Payload Data Register
263 */
264#define DSI_GPDR MMIO32(DSI_BASE + 0x70U)
265#define DSI_GPDR_BYTE4_SHIFT 24
266#define DSI_GPDR_BYTE4_MASK 0xff
267#define DSI_GPDR_BYTE3_SHIFT 16
268#define DSI_GPDR_BYTE3_MASK 0xff
269#define DSI_GPDR_BYTE2_SHIFT 8
270#define DSI_GPDR_BYTE2_MASK 0xff
271#define DSI_GPDR_BYTE1_SHIFT 0
272#define DSI_GPDR_BYTE1_MASK 0xff
273
274/**
275 * DSI Host Generate Packet Status Register
276 */
277#define DSI_GPSR MMIO32(DSI_BASE + 0x74U)
278/* Reserved 31:7 */
279#define DSI_GPSR_RCB (1 << 6)
280#define DSI_GPSR_PRDFF (1 << 5)
281#define DSI_GPSR_PRDFE (1 << 4)
282#define DSI_GPSR_PWRFF (1 << 3)
283#define DSI_GPSR_PWRFE (1 << 2)
284#define DSI_GPSR_CMDFF (1 << 1)
285#define DSI_GPSR_CMDFE (1 << 0)
286
287/**
288 * DSI Host Timeout Counter Configuration Register
289 */
290#define DSI_TCCR0 MMIO32(DSI_BASE + 0x78U)
291#define DSI_TCCR0_HSTX_TOCNT_SHIFT 16
292#define DSI_TCCR0_HSTX_TOCNT_MASK 0xffff
293#define DSI_TCCR0_LPRX_TOCNT_SHIFT 0
294#define DSI_TCCR0_LPRX_TOCNT_MASK 0xffff
295
296/**
297 * DSI Host Timeout Counter Configuration Register 1
298 */
299#define DSI_TCCR1 MMIO32(DSI_BASE + 0x7CU)
300#define DSI_TCCR1_HSRD_TOCNT_SHIFT 0
301#define DSI_TCCR1_HSRD_TOCNT_MASK 0xffff
302
303/**
304 * DSI Host Timeout Counter Configuration Register 2
305 */
306#define DSI_TCCR2 MMIO32(DSI_BASE + 0x80U)
307#define DSI_TCCR2_LPRD_TOCNT_SHIFT 0
308#define DSI_TCCR2_LPRD_TOCNT_MASK 0xffff
309
310/**
311 * DSI Host Timeout Counter Configuration Register 3
312 */
313#define DSI_TCCR3 MMIO32(DSI_BASE + 0x84U)
314#define DSI_TCCR3_PM (1 << 24)
315#define DSI_TCCR3_HSWR_TOCNT_SHIFT 0
316#define DSI_TCCR3_HSWR_TOCNT_MASK 0xffff
317
318/**
319 * DSI Host Timeout Counter Configuration Register 4
320 */
321#define DSI_TCCR4 MMIO32(DSI_BASE + 0x88U)
322#define DSI_TCCR4_LPWR_TOCNT_SHIFT 0
323#define DSI_TCCR4_LPWR_TOCNT_MASK 0xffff
324
325/**
326 * DSI Host Timeout Counter Configuration Register 5
327 */
328#define DSI_TCCR5 MMIO32(DSI_BASE + 0x8CU)
329#define DSI_TCCR5_BTA_TOCNT_SHIFT 0
330#define DSI_TCCR5_BTA_TOCNT_MASK 0xffff
331
332/**
333 * DSI Host Clock Lane Configuration Register
334 */
335#define DSI_CLCR MMIO32(DSI_BASE + 0x94U)
336#define DSI_CLCR_ACR (1 << 1)
337#define DSI_CLCR_DPCC (1 << 0)
338
339/**
340 * DSI Host Clock Lane Timer Configuration Register
341 */
342#define DSI_CLTCR MMIO32(DSI_BASE + 0x98U)
343#define DSI_CLTCR_HS2LP_TIME_SHIFT 16
344#define DSI_CLTCR_HS2LP_TIME_MASK 0x3ff
345#define DSI_CLTCR_LP2HS_TIME_SHIFT 0
346#define DSI_CLTCR_LP2HS_TIME_MASK 0x3ff
347
348/**
349 * DSI Host Data Lane Time Configuration Register
350 */
351#define DSI_DLTCR MMIO32(DSI_BASE + 0x9CU)
352#define DSI_DLTCR_HS2LP_TIME_SHIFT 24
353#define DSI_DLTCR_HS2LP_TIME_MASK 0xff
354#define DSI_DLTCR_LP2HS_TIME_SHIFT 16
355#define DSI_DLTCR_LP2HS_TIME_MASK 0xff
356#define DSI_DLTCR_MRD_TIME_SHIFT 0
357#define DSI_DLTCR_MRD_TIME_MASK 0x7fff
358
359/**
360 * DSI Host PHY Control Register
361 */
362#define DSI_PCTLR MMIO32(DSI_BASE + 0xA0U)
363#define DSI_PCTLR_CKE (1 << 2)
364#define DSI_PCTLR_DEN (1 << 1)
365
366/**
367 * DSI Host PHY Configuration Register
368 */
369#define DSI_PCONFR MMIO32(DSI_BASE + 0xA4U)
370#define DSI_PCONFR_SW_TIME_SHIFT 8
371#define DSI_PCONFR_SW_TIME_MASK 0xff
372#define DSI_PCONFR_NL_SHIFT 0
373#define DSI_PCONFR_NL_MASK 0x3
374#define DSI_PCONFR_NL_1LANE 0
375#define DSI_PCONFR_NL_2LANE 1
376
377/**
378 * DSI Host PHY ULPS Control Register
379 */
380#define DSI_PUCR MMIO32(DSI_BASE + 0xA8U)
381#define DSI_PUCR_UEDL (1 << 3)
382#define DSI_PUCR_URDL (1 << 2)
383#define DSI_PUCR_UECL (1 << 1)
384#define DSI_PUCR_URCL (1 << 0)
385
386/**
387 * DSI Host PHY TX Triggers Configuration Register
388 */
389#define DSI_PTTCR MMIO32(DSI_BASE + 0xACU)
390#define DSI_PTTCR_TX_TRIG_SHIFT 0
391#define DSI_PTTCR_TX_TRIG_MASK 0xf
392#define DSI_PTTCR_TX_TRIG_1 0x1
393#define DSI_PTTCR_TX_TRIG_2 0x2
394#define DSI_PTTCR_TX_TRIG_3 0x4
395#define DSI_PTTCR_TX_TRIG_4 0x8
396
397/**
398 * DSI Host PHY Status Register
399 */
400#define DSI_PSR MMIO32(DSI_BASE + 0xB0U)
401#define DSI_PSR_UAN1 (1 << 8)
402#define DSI_PSR_PSS1 (1 << 7)
403#define DSI_PSR_RUE0 (1 << 6)
404#define DSI_PSR_UAN0 (1 << 5)
405#define DSI_PSR_PSS0 (1 << 4)
406#define DSI_PSR_UANC (1 << 3)
407#define DSI_PSR_PSSC (1 << 2)
408#define DSI_PSR_PD (1 << 1)
409
410/**
411 * DSI Host Interrupt & Status Register 0
412 */
413#define DSI_ISR0 MMIO32(DSI_BASE + 0xBCU)
414#define DSI_ISR0_PE4 (1 << 20)
415#define DSI_ISR0_PE3 (1 << 19)
416#define DSI_ISR0_PE2 (1 << 18)
417#define DSI_ISR0_PE1 (1 << 17)
418#define DSI_ISR0_PE0 (1 << 16)
419#define DSI_ISR0_AE15 (1 << 15)
420#define DSI_ISR0_AE14 (1 << 14)
421#define DSI_ISR0_AE13 (1 << 13)
422#define DSI_ISR0_AE12 (1 << 12)
423#define DSI_ISR0_AE11 (1 << 11)
424#define DSI_ISR0_AE10 (1 << 10)
425#define DSI_ISR0_AE9 (1 << 9)
426#define DSI_ISR0_AE8 (1 << 8)
427#define DSI_ISR0_AE7 (1 << 7)
428#define DSI_ISR0_AE6 (1 << 6)
429#define DSI_ISR0_AE5 (1 << 5)
430#define DSI_ISR0_AE4 (1 << 4)
431#define DSI_ISR0_AE3 (1 << 3)
432#define DSI_ISR0_AE2 (1 << 2)
433#define DSI_ISR0_AE1 (1 << 1)
434#define DSI_ISR0_AE0 (1 << 0)
435
436/**
437 * DSI Host Interrupt & Status Register 1
438 */
439#define DSI_ISR1 MMIO32(DSI_BASE + 0xC0U)
440#define DSI_ISR1_GPRXE (1 << 12)
441#define DSI_ISR1_GPRDE (1 << 11)
442#define DSI_ISR1_GPTXE (1 << 10)
443#define DSI_ISR1_GPWRE (1 << 9)
444#define DSI_ISR1_GCWRE (1 << 8)
445#define DSI_ISR1_LPWRE (1 << 7)
446#define DSI_ISR1_EOTPE (1 << 6)
447#define DSI_ISR1_PSE (1 << 5)
448#define DSI_ISR1_CRCE (1 << 4)
449#define DSI_ISR1_ECCME (1 << 3)
450#define DSI_ISR1_ECCSE (1 << 2)
451#define DSI_ISR1_TOLPRX (1 << 1)
452#define DSI_ISR1_TOHSTX (1 << 0)
453
454/**
455 * DSI Host Interrupt Enable Register 0
456 */
457#define DSI_IER0 MMIO32(DSI_BASE + 0xC4U)
458#define DSI_IER0_PE4IE (1 << 20)
459#define DSI_IER0_PE3IE (1 << 19)
460#define DSI_IER0_PE2IE (1 << 18)
461#define DSI_IER0_PE1IE (1 << 17)
462#define DSI_IER0_PE0IE (1 << 16)
463#define DSI_IER0_AE15IE (1 << 15)
464#define DSI_IER0_AE14IE (1 << 14)
465#define DSI_IER0_AE13IE (1 << 13)
466#define DSI_IER0_AE12IE (1 << 12)
467#define DSI_IER0_AE11IE (1 << 11)
468#define DSI_IER0_AE10IE (1 << 10)
469#define DSI_IER0_AE9IE (1 << 9)
470#define DSI_IER0_AE8IE (1 << 8)
471#define DSI_IER0_AE7IE (1 << 7)
472#define DSI_IER0_AE6IE (1 << 6)
473#define DSI_IER0_AE5IE (1 << 5)
474#define DSI_IER0_AE4IE (1 << 4)
475#define DSI_IER0_AE3IE (1 << 3)
476#define DSI_IER0_AE2IE (1 << 2)
477#define DSI_IER0_AE1IE (1 << 1)
478#define DSI_IER0_AE0IE (1 << 0)
479
480/**
481 * DSI Host Interrupt Enable Register 1
482 */
483#define DSI_IER1 MMIO32(DSI_BASE + 0xC8U)
484#define DSI_IER1_GPRXEIE (1 << 12)
485#define DSI_IER1_GPRDEIE (1 << 11)
486#define DSI_IER1_GPTXEIE (1 << 10)
487#define DSI_IER1_GPWREIE (1 << 9)
488#define DSI_IER1_GCWREIE (1 << 8)
489#define DSI_IER1_LPWREIE (1 << 7)
490#define DSI_IER1_EOTPEIE (1 << 6)
491#define DSI_IER1_PSEIE (1 << 5)
492#define DSI_IER1_CRCEIE (1 << 4)
493#define DSI_IER1_ECCMEIE (1 << 3)
494#define DSI_IER1_ECCSEIE (1 << 2)
495#define DSI_IER1_TOLPRXIE (1 << 1)
496#define DSI_IER1_TOHSTXIE (1 << 0)
497
498/**
499 * DSI Host Force Interrupt Register 0
500 */
501#define DSI_FIR0 MMIO32(DSI_BASE + 0xD8U)
502#define DSI_FIR0_FPE4 (1 << 20)
503#define DSI_FIR0_FPE3 (1 << 19)
504#define DSI_FIR0_FPE2 (1 << 18)
505#define DSI_FIR0_FPE1 (1 << 17)
506#define DSI_FIR0_FPE0 (1 << 16)
507#define DSI_FIR0_FAE15 (1 << 15)
508#define DSI_FIR0_FAE14 (1 << 14)
509#define DSI_FIR0_FAE13 (1 << 13)
510#define DSI_FIR0_FAE12 (1 << 12)
511#define DSI_FIR0_FAE11 (1 << 11)
512#define DSI_FIR0_FAE10 (1 << 10)
513#define DSI_FIR0_FAE9 (1 << 9)
514#define DSI_FIR0_FAE8 (1 << 8)
515#define DSI_FIR0_FAE7 (1 << 7)
516#define DSI_FIR0_FAE6 (1 << 6)
517#define DSI_FIR0_FAE5 (1 << 5)
518#define DSI_FIR0_FAE4 (1 << 4)
519#define DSI_FIR0_FAE3 (1 << 3)
520#define DSI_FIR0_FAE2 (1 << 2)
521#define DSI_FIR0_FAE1 (1 << 1)
522#define DSI_FIR0_FAE0 (1 << 0)
523
524/**
525 * DSI Host Force Interrupt Register 1
526 */
527#define DSI_FIR1 MMIO32(DSI_BASE + 0xDCU)
528#define DSI_FIR1_FGPRXE (1 << 12)
529#define DSI_FIR1_FGPRDE (1 << 11)
530#define DSI_FIR1_FGPTXE (1 << 10)
531#define DSI_FIR1_FGPWRE (1 << 9)
532#define DSI_FIR1_FGCWRE (1 << 8)
533#define DSI_FIR1_FLPWRE (1 << 7)
534#define DSI_FIR1_FEOTPE (1 << 6)
535#define DSI_FIR1_FPSE (1 << 5)
536#define DSI_FIR1_FCRCE (1 << 4)
537#define DSI_FIR1_FECCME (1 << 3)
538#define DSI_FIR1_FECCSE (1 << 2)
539#define DSI_FIR1_FTOLPRX (1 << 1)
540#define DSI_FIR1_FTOHSTX (1 << 0)
541
542/**
543 * DSI Host Video Shadow Control Register
544 */
545#define DSI_VSCR MMIO32(DSI_BASE + 0x100U)
546#define DSI_VSCR_UR (1 << 8)
547#define DSI_VSCR_EN (1 << 0)
548
549/**
550 * DSI Host LTDC Current VCID Register
551 */
552#define DSI_LCVCIDR MMIO32(DSI_BASE + 0x10CU)
553#define DSI_LCVCIDR_VCID_SHIFT 0
554#define DSI_LCVCIDR_VCID_MASK 0x3
555
556/**
557 * DSI Host LTCD Current Color Coding Register
558 */
559#define DSI_LCCCR MMIO32(DSI_BASE + 0x110U)
560#define DSI_LCCR_LPE (1 << 8)
561#define DSI_LCCR_COLC_SHIFT 0
562#define DSI_LCCR_COLC_MASK 0xf
563
564/**
565 * DSI Host Low-power mode Current Configuration Register
566 */
567#define DSI_LPMCCR MMIO32(DSI_BASE + 0x118U)
568#define DSI_LPMCCR_LPSIZE_SHIFT 16
569#define DSI_LPMCCR_LPSIZE_MASK 0xff
570#define DSI_LPMCCR_VLPSIZE_SHIFT 0
571#define DSI_LPMCCR_VLPSIZE_MASK 0xff
572
573/**
574 * DSI Host Video mode Current Configuration Register
575 */
576#define DSI_VMCCR MMIO32(DSI_BASE + 0x138U)
577#define DSI_VMCCR_LPCE (1 << 9)
578#define DSI_VMCCR_FBTAAE (1 << 8)
579#define DSI_VMCCR_LPHFE (1 << 7)
580#define DSI_VMCCR_LPHBPE (1 << 6)
581#define DSI_VMCCR_LPVAE (1 << 5)
582#define DSI_VMCCR_LPVFPE (1 << 4)
583#define DSI_VMCCR_LPVBPE (1 << 3)
584#define DSI_VMCCR_LPVSAE (1 << 2)
585#define DSI_VMCCR_VMT_SHIFT 0
586#define DSI_VMCCR_VMT_MASK 0x3
587
588/**
589 * DSI Host Video Packet Current Configuration Register
590 */
591#define DSI_VPCCR MMIO32(DSI_BASE + 0x13CU)
592#define DSI_VPCCR_VPSIZE_SHIFT 0
593#define DSI_VPCCR_VPSIZE_MASK 0x3fff
594
595/**
596 * DSI Host Video Chunks Current Configuration Register
597 */
598#define DSI_VCCCR MMIO32(DSI_BASE + 0x140U)
599#define DSI_VCCCR_NUMC_SHIFT 0
600#define DSI_VCCCR_NUMC_MASK 0x1fff
601
602/**
603 * DSI Host Video Null Packet Current Configuration Register
604 */
605#define DSI_VNPCCR MMIO32(DSI_BASE + 0x144U)
606#define DSI_VNPCCR_NPSIZE_SHIFT 0
607#define DSI_VNPCCR_NPSIZE_MASK 0x1fff
608
609/**
610 * DSI Host Video HSA Current Configuration Register
611 */
612#define DSI_VHSACCR MMIO32(DSI_BASE + 0x148U)
613#define DSI_VHSACCR_HSA_SHIFT 0
614#define DSI_VHSACCR_HSA_MASK 0xfff
615
616/**
617 * DSI Host Video HBP Current Configuration Register
618 */
619#define DSI_VHBPCCR MMIO32(DSI_BASE + 0x14CU)
620#define DSI_VHBPCCR_HBP_SHIFT 0
621#define DSI_VHBPCCR_HBP_MASK 0xfff
622
623/**
624 * DSI Host Video Line Current Configuration Register
625 */
626#define DSI_VLCCR MMIO32(DSI_BASE + 0x150U)
627#define DSI_VLCCR_HLINE_SHIFT 0
628#define DSI_VLCCR_HLINE_MASK 0x7fff
629
630/**
631 * DSI Host Video VSA Current Configuration Register
632 */
633#define DSI_VVSACCR MMIO32(DSI_BASE + 0x154U)
634#define DSI_VVSACCR_VSA_SHIFT 0
635#define DSI_VVSACCR_VSA_MASK 0x3ff
636
637/**
638 * DSI Host Video VBP Current Configuration Register
639 */
640#define DSI_VVBPCCR MMIO32(DSI_BASE + 0x0158U)
641#define DSI_VVBPCCR_VBP_SHIFT 0
642#define DSI_VVBPCCR_VBP_MAST 0x3ff
643
644/**
645 * DSI Host Video VFP Current Configuration Register
646 */
647#define DSI_VVFPCCR MMIO32(DSI_BASE + 0x15CU)
648#define DSI_VVFPCCR_VFP_SHIFT 0
649#define DSI_VVFPCCR_VFP_MASK 0x3ff
650
651/**
652 * DSI Host Video VA Current Configuration Register
653 */
654#define DSI_VVACCR MMIO32(DSI_BASE + 0x160U)
655#define DSI_VVACCR_VA_SHIFT 0
656#define DSI_VVACCR_VA_MASK 0x3fff
657
658/**
659 * DSI Wrapper Configuration Register
660 */
661#define DSI_WCFGR MMIO32(DSI_BASE + 0x400U)
662#define DSI_WCFGR_VSPOL (1 << 7)
663#define DSI_WCFGR_AR (1 << 6)
664#define DSI_WCFGR_TEPOL (1 << 5)
665#define DSI_WCFGR_TESRC (1 << 4)
666#define DSI_WCFGR_COLMUX_SHIFT 1
667#define DSI_WCFGR_COLMUX_MASK 7
668#define DSI_WCFGR_DSIM (1 << 0)
669
670/**
671 * DSI Wrapper Control Register
672 */
673#define DSI_WCR MMIO32(DSI_BASE + 0x404U)
674#define DSI_WCR_DSIEN (1 << 3)
675#define DSI_WCR_LTDCEN (1 << 2)
676#define DSI_WCR_SHTDN (1 << 1)
677#define DSI_WCR_COLM (1 << 0)
678
679/**
680 * DSI Wrapper Interrupt Enable Register
681 */
682#define DSI_WIER MMIO32(DSI_BASE + 0x408U)
683#define DSI_WIER_RRIE (1 << 13)
684#define DSI_WIER_PLLUIE (1 << 10)
685#define DSI_WIER_PLLLIE (1 << 9)
686#define DSI_WIER_ERIE (1 << 1)
687#define DSI_WIER_TEIE (1 << 0)
688
689/**
690 * DSI Wrapper Interrupt & Status Register
691 */
692#define DSI_WISR MMIO32(DSI_BASE + 0x40CU)
693/* reserved 31:14 */
694#define DSI_WISR_RRIF (1 << 13)
695#define DSI_WISR_RRS (1 << 12)
696#define DSI_WISR_PLLUIF (1 << 10)
697#define DSI_WISR_PLLLIF (1 << 9)
698#define DSI_WISR_PLLLS (1 << 8)
699/* reserved 7:3 */
700#define DSI_WISR_BUSY (1 << 2)
701#define DSI_WISR_ERIF (1 << 1)
702#define DSI_WISR_TEIF (1 << 0)
703
704/**
705 * DSI Wrapper Interrupt Flag Clear Register
706 */
707#define DSI_WIFCR MMIO32(DSI_BASE + 0x410U)
708/* reserved 31:14 */
709#define DSI_WIFCR_CRRIF (1 << 13)
710/* reserved 12:11 */
711#define DSI_WIFCR_CPLLUIF (1 << 10)
712#define DSI_WIFCR_CPLLLIF (1 << 9)
713/* reserved 8:2 */
714#define DSI_WIFCR_CERIF (1 << 1)
715#define DSI_WIFCR_CTEIF (1 << 0)
716
717/**
718 * DSI Wrapper PHY Configuration Register 0
719 */
720#define DSI_WPCR0 MMIO32(DSI_BASE + 0x418U)
721#define DSI_WPCR0_TCLKPOSTEN (1 << 27)
722#define DSI_WPCR0_TLPXCEN (1 << 26)
723#define DSI_WPCR0_THSEXITEN (1 << 25)
724#define DSI_WPCR0_TLPXDEN (1 << 24)
725#define DSI_WPCR0_THSZEROEN (1 << 23)
726#define DSI_WPCR0_THSTRAILEN (1 << 22)
727#define DSI_WPCR0_THSPREPEN (1 << 21)
728#define DSI_WPCR0_TCLKZEROEN (1 << 20)
729#define DSI_WPCR0_TCLKPREPEN (1 << 19)
730#define DSI_WPCR0_PDEN (1 << 18)
731#define DSI_WPCR0_TDDL (1 << 16)
732#define DSI_WPCR0_CDOFFDL (1 << 14)
733#define DSI_WPCR0_FTXSMDL (1 << 13)
734#define DSI_WPCR0_FTXSMCL (1 << 12)
735#define DSI_WPCR0_HSIDL1 (1 << 11)
736#define DSI_WPCR0_HSIDL0 (1 << 10)
737#define DSI_WPCR0_HSICL (1 << 9)
738#define DSI_WPCR0_SWDL1 (1 << 8)
739#define DSI_WPCR0_SWDL0 (1 << 7)
740#define DSI_WPCR0_SWCL (1 << 6)
741#define DSI_WPCR0_UIX4_SHIFT 0
742#define DSI_WPCR0_UIX4_MASK 0x3f
743
744/**
745 * DSI Wrapper PHY Configration Register 1
746 */
747#define DSI_WPCR1 MMIO32(DSI_BASE + 0x41CU)
748#define DSI_WPCR1_LPRXFT_SHIFT 25
749#define DSI_WPCR1_LPRXFT_MASK 0x3
750#define DSI_WPCR1_FLPRXLPM (1 << 22)
751#define DSI_WPCR1_HSTXSRCDL_SHIFT 18
752#define DSI_WPCR1_HSTXSRCDL_MASK 0x3
753#define DSI_WPCR1_HSTXSRCCL_SHIFT 16
754#define DSI_WPCR1_HSTXSRCCL_MASK 0x3
755#define DSI_WPCR1_SDDC (1 << 12)
756#define DSI_WPCR1_LPSRCDL_SHIFT 8
757#define DSI_WPCR1_LPSRCDL_MASK 0x3
758#define DSI_WPCR1_HSTXDDL_SHIFT 2
759#define DSI_WPCR1_HSTXDDL_MASK 0x3
760#define DSI_WPCR1_HSTXDCL_SHIFT 0
761#define DSI_WPCR1_HSTXDCL_MASK 0x3
762
763/**
764 * DSI Wrapper PHY Configuration Register 2
765 */
766#define DSI_WPCR2 MMIO32(DSI_BASE + 0x420U)
767#define DSI_WPCR2_THSTRAIL_SHIFT 24
768#define DSI_WPCR2_THSTRAIL_MASK 0xff
769#define DSI_WPCR2_THSPREP_SHIFT 16
770#define DSI_WPCR2_THSPREP_MASK 0xff
771#define DSI_WPCR2_TCLKZERO_SHIFT 8
772#define DSI_WPCR2_TCLKZERO_MASK 0xff
773#define DSI_WPCR2_TCLKPREP_SHIFT 0
774#define DSI_WPCR2_TCLKPREP_MASK 0xff
775
776/**
777 * DSI Wrapper PHY Configuration Register 3
778 */
779#define DSI_WPCR3 MMIO32(DSI_BASE + 0x424U)
780#define DSI_WPCR3_TLPXC_SHIFT 24
781#define DSI_WPCR3_TLPXC_MASK 0xff
782#define DSI_WPCR3_THSEXIT_SHIFT 16
783#define DSI_WPCR3_THSEXIT_MASK 0xff
784#define DSI_WPCR3_TLPXD_SHIFT 8
785#define DSI_WPCR3_TLPXD_MASK 0xff
786#define DSI_WPCR3_THSZERO_SHIFT 0
787#define DSI_WPCR3_THSZERO_MASK 0xff
788
789/**
790 * DSI Wrapper PHY Configuration Register 4
791 */
792#define DSI_WPCR4 MMIO32(DSI_BASE + 0x428U)
793#define DSI_WPCR4_TCLKPOST_SHIFT 0
794#define DSI_WPCR4_TCLKPOST_MASK 0xff
795
796/**
797 * DSI Wrapper Regulator and PLL Control Register
798 */
799#define DSI_WRPCR MMIO32(DSI_BASE + 0x430U)
800#define DSI_WRPCR_REGEN (1 << 24)
801#define DSI_WRPCR_ODF_SHIFT 16
802#define DSI_WRPCR_ODF_MASK 0x3
803#define DSI_WRPCR_ODF_DIV_1 0
804#define DSI_WRPCR_ODF_DIV_2 1
805#define DSI_WRPCR_ODF_DIV_4 2
806#define DSI_WRPCR_ODF_DIV_8 3
807#define DSI_WRPCR_IDF_SHIFT 11
808#define DSI_WRPCR_IDF_MASK 0xf
809#define DSI_WRPCR_IDF_DIV_1 1
810#define DSI_WRPCR_IDF_DIV_2 2
811#define DSI_WRPCR_IDF_DIV_3 3
812#define DSI_WRPCR_IDF_DIV_4 4
813#define DSI_WRPCR_IDF_DIV_5 5
814#define DSI_WRPCR_IDF_DIV_6 6
815#define DSI_WRPCR_IDF_DIV_7 7
816/* valid NDIV values 10 - 125 all other reserved */
817#define DSI_WRPCR_NDIV_SHIFT 2
818#define DSI_WRPCR_NDIV_MASK 0x7f
819#define DSI_WRPCR_PLLEN (1 << 0)
820
821/** @cond */
822#endif
823/** @endcond */
824/**@}*/