xref: /linux/drivers/gpu/drm/mcde/mcde_display_regs.h (revision cdd38c5f1ce4398ec58fec95904b75824daab7b5)
15fc537bfSLinus Walleij /* SPDX-License-Identifier: GPL-2.0 */
25fc537bfSLinus Walleij #ifndef __DRM_MCDE_DISPLAY_REGS
35fc537bfSLinus Walleij #define __DRM_MCDE_DISPLAY_REGS
45fc537bfSLinus Walleij 
55fc537bfSLinus Walleij /* PP (pixel processor) interrupts */
65fc537bfSLinus Walleij #define MCDE_IMSCPP 0x00000104
75fc537bfSLinus Walleij #define MCDE_RISPP 0x00000114
85fc537bfSLinus Walleij #define MCDE_MISPP 0x00000124
95fc537bfSLinus Walleij #define MCDE_SISPP 0x00000134
105fc537bfSLinus Walleij 
115fc537bfSLinus Walleij #define MCDE_PP_VCMPA BIT(0)
125fc537bfSLinus Walleij #define MCDE_PP_VCMPB BIT(1)
135fc537bfSLinus Walleij #define MCDE_PP_VSCC0 BIT(2)
145fc537bfSLinus Walleij #define MCDE_PP_VSCC1 BIT(3)
155fc537bfSLinus Walleij #define MCDE_PP_VCMPC0 BIT(4)
165fc537bfSLinus Walleij #define MCDE_PP_VCMPC1 BIT(5)
175fc537bfSLinus Walleij #define MCDE_PP_ROTFD_A BIT(6)
185fc537bfSLinus Walleij #define MCDE_PP_ROTFD_B BIT(7)
195fc537bfSLinus Walleij 
205fc537bfSLinus Walleij /* Overlay interrupts */
215fc537bfSLinus Walleij #define MCDE_IMSCOVL 0x00000108
225fc537bfSLinus Walleij #define MCDE_RISOVL 0x00000118
235fc537bfSLinus Walleij #define MCDE_MISOVL 0x00000128
245fc537bfSLinus Walleij #define MCDE_SISOVL 0x00000138
255fc537bfSLinus Walleij 
265fc537bfSLinus Walleij /* Channel interrupts */
275fc537bfSLinus Walleij #define MCDE_IMSCCHNL 0x0000010C
285fc537bfSLinus Walleij #define MCDE_RISCHNL 0x0000011C
295fc537bfSLinus Walleij #define MCDE_MISCHNL 0x0000012C
305fc537bfSLinus Walleij #define MCDE_SISCHNL 0x0000013C
315fc537bfSLinus Walleij 
325fc537bfSLinus Walleij /* X = 0..9 */
335fc537bfSLinus Walleij #define MCDE_EXTSRCXA0 0x00000200
345fc537bfSLinus Walleij #define MCDE_EXTSRCXA0_GROUPOFFSET 0x20
355fc537bfSLinus Walleij #define MCDE_EXTSRCXA0_BASEADDRESS0_SHIFT 3
365fc537bfSLinus Walleij #define MCDE_EXTSRCXA0_BASEADDRESS0_MASK 0xFFFFFFF8
375fc537bfSLinus Walleij 
385fc537bfSLinus Walleij #define MCDE_EXTSRCXA1 0x00000204
395fc537bfSLinus Walleij #define MCDE_EXTSRCXA1_GROUPOFFSET 0x20
405fc537bfSLinus Walleij #define MCDE_EXTSRCXA1_BASEADDRESS1_SHIFT 3
415fc537bfSLinus Walleij #define MCDE_EXTSRCXA1_BASEADDRESS1_MASK 0xFFFFFFF8
425fc537bfSLinus Walleij 
435fc537bfSLinus Walleij /* External sources 0..9 */
445fc537bfSLinus Walleij #define MCDE_EXTSRC0CONF 0x0000020C
455fc537bfSLinus Walleij #define MCDE_EXTSRC1CONF 0x0000022C
465fc537bfSLinus Walleij #define MCDE_EXTSRC2CONF 0x0000024C
475fc537bfSLinus Walleij #define MCDE_EXTSRC3CONF 0x0000026C
485fc537bfSLinus Walleij #define MCDE_EXTSRC4CONF 0x0000028C
495fc537bfSLinus Walleij #define MCDE_EXTSRC5CONF 0x000002AC
505fc537bfSLinus Walleij #define MCDE_EXTSRC6CONF 0x000002CC
515fc537bfSLinus Walleij #define MCDE_EXTSRC7CONF 0x000002EC
525fc537bfSLinus Walleij #define MCDE_EXTSRC8CONF 0x0000030C
535fc537bfSLinus Walleij #define MCDE_EXTSRC9CONF 0x0000032C
545fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_GROUPOFFSET 0x20
555fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BUF_ID_SHIFT 0
565fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BUF_ID_MASK 0x00000003
575fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BUF_NB_SHIFT 2
585fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BUF_NB_MASK 0x0000000C
595fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_PRI_OVLID_SHIFT 4
605fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_PRI_OVLID_MASK 0x000000F0
615fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_SHIFT 8
625fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_MASK 0x00000F00
635fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_1BPP_PAL 0
645fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_2BPP_PAL 1
655fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_4BPP_PAL 2
665fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_8BPP_PAL 3
675fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_RGB444 4
685fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_ARGB4444 5
695fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_IRGB1555 6
705fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_RGB565 7
715fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_RGB888 8
725fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_XRGB8888 9
735fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_ARGB8888 10
745fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BPP_YCBCR422 11
755fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BGR BIT(12)
765fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BEBO BIT(13)
775fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_BEPO BIT(14)
785fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_TUNNELING_BUFFER_HEIGHT_SHIFT 16
795fc537bfSLinus Walleij #define MCDE_EXTSRCXCONF_TUNNELING_BUFFER_HEIGHT_MASK 0x0FFF0000
805fc537bfSLinus Walleij 
815fc537bfSLinus Walleij /* External sources 0..9 */
825fc537bfSLinus Walleij #define MCDE_EXTSRC0CR 0x00000210
835fc537bfSLinus Walleij #define MCDE_EXTSRC1CR 0x00000230
845fc537bfSLinus Walleij #define MCDE_EXTSRC2CR 0x00000250
855fc537bfSLinus Walleij #define MCDE_EXTSRC3CR 0x00000270
865fc537bfSLinus Walleij #define MCDE_EXTSRC4CR 0x00000290
875fc537bfSLinus Walleij #define MCDE_EXTSRC5CR 0x000002B0
885fc537bfSLinus Walleij #define MCDE_EXTSRC6CR 0x000002D0
895fc537bfSLinus Walleij #define MCDE_EXTSRC7CR 0x000002F0
905fc537bfSLinus Walleij #define MCDE_EXTSRC8CR 0x00000310
915fc537bfSLinus Walleij #define MCDE_EXTSRC9CR 0x00000330
925fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_SEL_MOD_SHIFT 0
935fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_SEL_MOD_MASK 0x00000003
945fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_SEL_MOD_EXTERNAL_SEL 0
955fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_SEL_MOD_AUTO_TOGGLE 1
965fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_SEL_MOD_SOFTWARE_SEL 2
975fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_MULTIOVL_CTRL_PRIMARY BIT(2) /* 0 = all */
985fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_FS_DIV_DISABLE BIT(3)
995fc537bfSLinus Walleij #define MCDE_EXTSRCXCR_FORCE_FS_DIV BIT(4)
1005fc537bfSLinus Walleij 
1015fc537bfSLinus Walleij /* Only external source 6 has a second address register */
1025fc537bfSLinus Walleij #define MCDE_EXTSRC6A2 0x000002C8
1035fc537bfSLinus Walleij 
1045fc537bfSLinus Walleij /* 6 overlays */
1055fc537bfSLinus Walleij #define MCDE_OVL0CR 0x00000400
1065fc537bfSLinus Walleij #define MCDE_OVL1CR 0x00000420
1075fc537bfSLinus Walleij #define MCDE_OVL2CR 0x00000440
1085fc537bfSLinus Walleij #define MCDE_OVL3CR 0x00000460
1095fc537bfSLinus Walleij #define MCDE_OVL4CR 0x00000480
1105fc537bfSLinus Walleij #define MCDE_OVL5CR 0x000004A0
1115fc537bfSLinus Walleij #define MCDE_OVLXCR_OVLEN BIT(0)
1125fc537bfSLinus Walleij #define MCDE_OVLXCR_COLCCTRL_DISABLED 0
1135fc537bfSLinus Walleij #define MCDE_OVLXCR_COLCCTRL_ENABLED_NO_SAT (1 << 1)
1145fc537bfSLinus Walleij #define MCDE_OVLXCR_COLCCTRL_ENABLED_SAT (2 << 1)
1155fc537bfSLinus Walleij #define MCDE_OVLXCR_CKEYGEN BIT(3)
1165fc537bfSLinus Walleij #define MCDE_OVLXCR_ALPHAPMEN BIT(4)
1175fc537bfSLinus Walleij #define MCDE_OVLXCR_OVLF BIT(5)
1185fc537bfSLinus Walleij #define MCDE_OVLXCR_OVLR BIT(6)
1195fc537bfSLinus Walleij #define MCDE_OVLXCR_OVLB BIT(7)
1205fc537bfSLinus Walleij #define MCDE_OVLXCR_FETCH_ROPC_SHIFT 8
1215fc537bfSLinus Walleij #define MCDE_OVLXCR_FETCH_ROPC_MASK 0x0000FF00
1225fc537bfSLinus Walleij #define MCDE_OVLXCR_STBPRIO_SHIFT 16
1235fc537bfSLinus Walleij #define MCDE_OVLXCR_STBPRIO_MASK 0x000F0000
1245fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_SHIFT 20
1255fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_MASK 0x00F00000
1265fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_1W 0
1275fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_2W 1
1285fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_4W 2
1295fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_8W 3
1305fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_16W 4
1315fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_HW_1W 8
1325fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_HW_2W 9
1335fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_HW_4W 10
1345fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_HW_8W 11
1355fc537bfSLinus Walleij #define MCDE_OVLXCR_BURSTSIZE_HW_16W 12
1365fc537bfSLinus Walleij #define MCDE_OVLXCR_MAXOUTSTANDING_SHIFT 24
1375fc537bfSLinus Walleij #define MCDE_OVLXCR_MAXOUTSTANDING_MASK 0x0F000000
1385fc537bfSLinus Walleij #define MCDE_OVLXCR_MAXOUTSTANDING_1_REQ 0
1395fc537bfSLinus Walleij #define MCDE_OVLXCR_MAXOUTSTANDING_2_REQ 1
1405fc537bfSLinus Walleij #define MCDE_OVLXCR_MAXOUTSTANDING_4_REQ 2
1415fc537bfSLinus Walleij #define MCDE_OVLXCR_MAXOUTSTANDING_8_REQ 3
1425fc537bfSLinus Walleij #define MCDE_OVLXCR_MAXOUTSTANDING_16_REQ 4
1435fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_SHIFT 28
1445fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_MASK 0xF0000000
1455fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_1W 0
1465fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_2W 1
1475fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_4W 2
1485fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_8W 3
1495fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_16W 4
1505fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_HW_1W 8
1515fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_HW_2W 9
1525fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_HW_4W 10
1535fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_HW_8W 11
1545fc537bfSLinus Walleij #define MCDE_OVLXCR_ROTBURSTSIZE_HW_16W 12
1555fc537bfSLinus Walleij 
1565fc537bfSLinus Walleij #define MCDE_OVL0CONF 0x00000404
1575fc537bfSLinus Walleij #define MCDE_OVL1CONF 0x00000424
1585fc537bfSLinus Walleij #define MCDE_OVL2CONF 0x00000444
1595fc537bfSLinus Walleij #define MCDE_OVL3CONF 0x00000464
1605fc537bfSLinus Walleij #define MCDE_OVL4CONF 0x00000484
1615fc537bfSLinus Walleij #define MCDE_OVL5CONF 0x000004A4
1625fc537bfSLinus Walleij #define MCDE_OVLXCONF_PPL_SHIFT 0
1635fc537bfSLinus Walleij #define MCDE_OVLXCONF_PPL_MASK 0x000007FF
1645fc537bfSLinus Walleij #define MCDE_OVLXCONF_EXTSRC_ID_SHIFT 11
1655fc537bfSLinus Walleij #define MCDE_OVLXCONF_EXTSRC_ID_MASK 0x00007800
1665fc537bfSLinus Walleij #define MCDE_OVLXCONF_LPF_SHIFT 16
1675fc537bfSLinus Walleij #define MCDE_OVLXCONF_LPF_MASK 0x07FF0000
1685fc537bfSLinus Walleij 
1695fc537bfSLinus Walleij #define MCDE_OVL0CONF2 0x00000408
1705fc537bfSLinus Walleij #define MCDE_OVL1CONF2 0x00000428
1715fc537bfSLinus Walleij #define MCDE_OVL2CONF2 0x00000448
1725fc537bfSLinus Walleij #define MCDE_OVL3CONF2 0x00000468
1735fc537bfSLinus Walleij #define MCDE_OVL4CONF2 0x00000488
1745fc537bfSLinus Walleij #define MCDE_OVL5CONF2 0x000004A8
1755fc537bfSLinus Walleij #define MCDE_OVLXCONF2_BP_PER_PIXEL_ALPHA 0
1765fc537bfSLinus Walleij #define MCDE_OVLXCONF2_BP_CONSTANT_ALPHA BIT(0)
1775fc537bfSLinus Walleij #define MCDE_OVLXCONF2_ALPHAVALUE_SHIFT 1
1785fc537bfSLinus Walleij #define MCDE_OVLXCONF2_ALPHAVALUE_MASK 0x000001FE
1795fc537bfSLinus Walleij #define MCDE_OVLXCONF2_OPQ BIT(9)
1805fc537bfSLinus Walleij #define MCDE_OVLXCONF2_PIXOFF_SHIFT 10
1815fc537bfSLinus Walleij #define MCDE_OVLXCONF2_PIXOFF_MASK 0x0000FC00
1825fc537bfSLinus Walleij #define MCDE_OVLXCONF2_PIXELFETCHERWATERMARKLEVEL_SHIFT 16
1835fc537bfSLinus Walleij #define MCDE_OVLXCONF2_PIXELFETCHERWATERMARKLEVEL_MASK 0x1FFF0000
1845fc537bfSLinus Walleij 
1855fc537bfSLinus Walleij #define MCDE_OVL0LJINC 0x0000040C
1865fc537bfSLinus Walleij #define MCDE_OVL1LJINC 0x0000042C
1875fc537bfSLinus Walleij #define MCDE_OVL2LJINC 0x0000044C
1885fc537bfSLinus Walleij #define MCDE_OVL3LJINC 0x0000046C
1895fc537bfSLinus Walleij #define MCDE_OVL4LJINC 0x0000048C
1905fc537bfSLinus Walleij #define MCDE_OVL5LJINC 0x000004AC
1915fc537bfSLinus Walleij 
1925fc537bfSLinus Walleij #define MCDE_OVL0CROP 0x00000410
1935fc537bfSLinus Walleij #define MCDE_OVL1CROP 0x00000430
1945fc537bfSLinus Walleij #define MCDE_OVL2CROP 0x00000450
1955fc537bfSLinus Walleij #define MCDE_OVL3CROP 0x00000470
1965fc537bfSLinus Walleij #define MCDE_OVL4CROP 0x00000490
1975fc537bfSLinus Walleij #define MCDE_OVL5CROP 0x000004B0
1985fc537bfSLinus Walleij #define MCDE_OVLXCROP_TMRGN_SHIFT 0
1995fc537bfSLinus Walleij #define MCDE_OVLXCROP_TMRGN_MASK 0x003FFFFF
2005fc537bfSLinus Walleij #define MCDE_OVLXCROP_LMRGN_SHIFT 22
2015fc537bfSLinus Walleij #define MCDE_OVLXCROP_LMRGN_MASK 0xFFC00000
2025fc537bfSLinus Walleij 
2035fc537bfSLinus Walleij #define MCDE_OVL0COMP 0x00000414
2045fc537bfSLinus Walleij #define MCDE_OVL1COMP 0x00000434
2055fc537bfSLinus Walleij #define MCDE_OVL2COMP 0x00000454
2065fc537bfSLinus Walleij #define MCDE_OVL3COMP 0x00000474
2075fc537bfSLinus Walleij #define MCDE_OVL4COMP 0x00000494
2085fc537bfSLinus Walleij #define MCDE_OVL5COMP 0x000004B4
2095fc537bfSLinus Walleij #define MCDE_OVLXCOMP_XPOS_SHIFT 0
2105fc537bfSLinus Walleij #define MCDE_OVLXCOMP_XPOS_MASK 0x000007FF
2115fc537bfSLinus Walleij #define MCDE_OVLXCOMP_CH_ID_SHIFT 11
2125fc537bfSLinus Walleij #define MCDE_OVLXCOMP_CH_ID_MASK 0x00007800
2135fc537bfSLinus Walleij #define MCDE_OVLXCOMP_YPOS_SHIFT 16
2145fc537bfSLinus Walleij #define MCDE_OVLXCOMP_YPOS_MASK 0x07FF0000
2155fc537bfSLinus Walleij #define MCDE_OVLXCOMP_Z_SHIFT 27
2165fc537bfSLinus Walleij #define MCDE_OVLXCOMP_Z_MASK 0x78000000
2175fc537bfSLinus Walleij 
218*d795fd32SLinus Walleij /* DPI/TV configuration registers, channel A and B */
219*d795fd32SLinus Walleij #define MCDE_TVCRA 0x00000838
220*d795fd32SLinus Walleij #define MCDE_TVCRB 0x00000A38
221*d795fd32SLinus Walleij #define MCDE_TVCR_MOD_TV BIT(0) /* 0 = LCD mode */
222*d795fd32SLinus Walleij #define MCDE_TVCR_INTEREN BIT(1)
223*d795fd32SLinus Walleij #define MCDE_TVCR_IFIELD BIT(2)
224*d795fd32SLinus Walleij #define MCDE_TVCR_TVMODE_SDTV_656P (0 << 3)
225*d795fd32SLinus Walleij #define MCDE_TVCR_TVMODE_SDTV_656P_LE (3 << 3)
226*d795fd32SLinus Walleij #define MCDE_TVCR_TVMODE_SDTV_656P_BE (4 << 3)
227*d795fd32SLinus Walleij #define MCDE_TVCR_SDTVMODE_Y0CBY1CR (0 << 6)
228*d795fd32SLinus Walleij #define MCDE_TVCR_SDTVMODE_CBY0CRY1 (1 << 6)
229*d795fd32SLinus Walleij #define MCDE_TVCR_AVRGEN BIT(8)
230*d795fd32SLinus Walleij #define MCDE_TVCR_CKINV BIT(9)
231*d795fd32SLinus Walleij 
232*d795fd32SLinus Walleij /* TV blanking control register 1, channel A and B */
233*d795fd32SLinus Walleij #define MCDE_TVBL1A 0x0000083C
234*d795fd32SLinus Walleij #define MCDE_TVBL1B 0x00000A3C
235*d795fd32SLinus Walleij #define MCDE_TVBL1_BEL1_SHIFT 0 /* VFP vertical front porch 11 bits */
236*d795fd32SLinus Walleij #define MCDE_TVBL1_BSL1_SHIFT 16 /* VSW vertical sync pulse width 11 bits */
237*d795fd32SLinus Walleij 
238*d795fd32SLinus Walleij /* Pixel processing TV start line, channel A and B */
239*d795fd32SLinus Walleij #define MCDE_TVISLA 0x00000840
240*d795fd32SLinus Walleij #define MCDE_TVISLB 0x00000A40
241*d795fd32SLinus Walleij #define MCDE_TVISL_FSL1_SHIFT 0 /* Field 1 identification start line 11 bits */
242*d795fd32SLinus Walleij #define MCDE_TVISL_FSL2_SHIFT 16 /* Field 2 identification start line 11 bits */
243*d795fd32SLinus Walleij 
244*d795fd32SLinus Walleij /* Pixel processing TV DVO offset */
245*d795fd32SLinus Walleij #define MCDE_TVDVOA 0x00000844
246*d795fd32SLinus Walleij #define MCDE_TVDVOB 0x00000A44
247*d795fd32SLinus Walleij #define MCDE_TVDVO_DVO1_SHIFT 0 /* VBP vertical back porch 0 = 0 */
248*d795fd32SLinus Walleij #define MCDE_TVDVO_DVO2_SHIFT 16
249*d795fd32SLinus Walleij 
250*d795fd32SLinus Walleij /*
251*d795fd32SLinus Walleij  * Pixel processing TV Timing 1
252*d795fd32SLinus Walleij  * HBP horizontal back porch 11 bits horizontal offset
253*d795fd32SLinus Walleij  * 0 = 1 pixel HBP, 255 = 256 pixels, so actual value - 1
254*d795fd32SLinus Walleij  */
255*d795fd32SLinus Walleij #define MCDE_TVTIM1A 0x0000084C
256*d795fd32SLinus Walleij #define MCDE_TVTIM1B 0x00000A4C
257*d795fd32SLinus Walleij 
258*d795fd32SLinus Walleij /* Pixel processing TV LBALW */
259*d795fd32SLinus Walleij /* 0 = 1 clock cycle, 255 = 256 clock cycles */
260*d795fd32SLinus Walleij #define MCDE_TVLBALWA 0x00000850
261*d795fd32SLinus Walleij #define MCDE_TVLBALWB 0x00000A50
262*d795fd32SLinus Walleij #define MCDE_TVLBALW_LBW_SHIFT 0 /* HSW horizonal sync width, line blanking width 11 bits */
263*d795fd32SLinus Walleij #define MCDE_TVLBALW_ALW_SHIFT 16 /* HFP horizontal front porch, active line width 11 bits */
264*d795fd32SLinus Walleij 
265*d795fd32SLinus Walleij /* TV blanking control register 1, channel A and B */
266*d795fd32SLinus Walleij #define MCDE_TVBL2A 0x00000854
267*d795fd32SLinus Walleij #define MCDE_TVBL2B 0x00000A54
268*d795fd32SLinus Walleij #define MCDE_TVBL2_BEL2_SHIFT 0 /* Field 2 blanking end line 11 bits */
269*d795fd32SLinus Walleij #define MCDE_TVBL2_BSL2_SHIFT 16 /* Field 2 blanking start line 11 bits */
270*d795fd32SLinus Walleij 
271*d795fd32SLinus Walleij /* Pixel processing TV background */
272*d795fd32SLinus Walleij #define MCDE_TVBLUA 0x00000858
273*d795fd32SLinus Walleij #define MCDE_TVBLUB 0x00000A58
274*d795fd32SLinus Walleij #define MCDE_TVBLU_TVBLU_SHIFT 0 /* 8 bits luminance */
275*d795fd32SLinus Walleij #define MCDE_TVBLU_TVBCB_SHIFT 8 /* 8 bits Cb chrominance */
276*d795fd32SLinus Walleij #define MCDE_TVBLU_TVBCR_SHIFT 16 /* 8 bits Cr chrominance */
277*d795fd32SLinus Walleij 
278*d795fd32SLinus Walleij /* Pixel processing LCD timing 1 */
279*d795fd32SLinus Walleij #define MCDE_LCDTIM1A 0x00000860
280*d795fd32SLinus Walleij #define MCDE_LCDTIM1B 0x00000A60
281*d795fd32SLinus Walleij /* inverted vertical sync pulse for HRTFT 0 = active low, 1 active high */
282*d795fd32SLinus Walleij #define MCDE_LCDTIM1B_IVP BIT(19)
283*d795fd32SLinus Walleij /* inverted vertical sync, 0 = active high (the normal), 1 = active low */
284*d795fd32SLinus Walleij #define MCDE_LCDTIM1B_IVS BIT(20)
285*d795fd32SLinus Walleij /* inverted horizontal sync, 0 = active high (the normal), 1 = active low */
286*d795fd32SLinus Walleij #define MCDE_LCDTIM1B_IHS BIT(21)
287*d795fd32SLinus Walleij /* inverted panel clock 0 = rising edge data out, 1 = falling edge data out */
288*d795fd32SLinus Walleij #define MCDE_LCDTIM1B_IPC BIT(22)
289*d795fd32SLinus Walleij /* invert output enable 0 = active high, 1 = active low */
290*d795fd32SLinus Walleij #define MCDE_LCDTIM1B_IOE BIT(23)
291*d795fd32SLinus Walleij 
2925fc537bfSLinus Walleij #define MCDE_CRC 0x00000C00
2935fc537bfSLinus Walleij #define MCDE_CRC_C1EN BIT(2)
2945fc537bfSLinus Walleij #define MCDE_CRC_C2EN BIT(3)
2955fc537bfSLinus Walleij #define MCDE_CRC_SYCEN0 BIT(7)
2965fc537bfSLinus Walleij #define MCDE_CRC_SYCEN1 BIT(8)
2975fc537bfSLinus Walleij #define MCDE_CRC_SIZE1 BIT(9)
2985fc537bfSLinus Walleij #define MCDE_CRC_SIZE2 BIT(10)
2995fc537bfSLinus Walleij #define MCDE_CRC_YUVCONVC1EN BIT(15)
3005fc537bfSLinus Walleij #define MCDE_CRC_CS1EN BIT(16)
3015fc537bfSLinus Walleij #define MCDE_CRC_CS2EN BIT(17)
3025fc537bfSLinus Walleij #define MCDE_CRC_CS1POL BIT(19)
3035fc537bfSLinus Walleij #define MCDE_CRC_CS2POL BIT(20)
3045fc537bfSLinus Walleij #define MCDE_CRC_CD1POL BIT(21)
3055fc537bfSLinus Walleij #define MCDE_CRC_CD2POL BIT(22)
3065fc537bfSLinus Walleij #define MCDE_CRC_WR1POL BIT(23)
3075fc537bfSLinus Walleij #define MCDE_CRC_WR2POL BIT(24)
3085fc537bfSLinus Walleij #define MCDE_CRC_RD1POL BIT(25)
3095fc537bfSLinus Walleij #define MCDE_CRC_RD2POL BIT(26)
3105fc537bfSLinus Walleij #define MCDE_CRC_SYNCCTRL_SHIFT 29
3115fc537bfSLinus Walleij #define MCDE_CRC_SYNCCTRL_MASK 0x60000000
3125fc537bfSLinus Walleij #define MCDE_CRC_SYNCCTRL_NO_SYNC 0
3135fc537bfSLinus Walleij #define MCDE_CRC_SYNCCTRL_DBI0 1
3145fc537bfSLinus Walleij #define MCDE_CRC_SYNCCTRL_DBI1 2
3155fc537bfSLinus Walleij #define MCDE_CRC_SYNCCTRL_PING_PONG 3
3165fc537bfSLinus Walleij #define MCDE_CRC_CLAMPC1EN BIT(31)
3175fc537bfSLinus Walleij 
3185fc537bfSLinus Walleij #define MCDE_VSCRC0 0x00000C5C
3195fc537bfSLinus Walleij #define MCDE_VSCRC1 0x00000C60
3205fc537bfSLinus Walleij #define MCDE_VSCRC_VSPMIN_MASK 0x00000FFF
3215fc537bfSLinus Walleij #define MCDE_VSCRC_VSPMAX_SHIFT 12
3225fc537bfSLinus Walleij #define MCDE_VSCRC_VSPMAX_MASK 0x00FFF000
3235fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_SHIFT 24
3245fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MASK 0x07000000
3255fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_1 0
3265fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_2 1
3275fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_4 2
3285fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_8 3
3295fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_16 4
3305fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_32 5
3315fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_64 6
3325fc537bfSLinus Walleij #define MCDE_VSCRC_VSPDIV_MCDECLK_DIV_128 7
3335fc537bfSLinus Walleij #define MCDE_VSCRC_VSPOL BIT(27) /* 0 active high, 1 active low */
3345fc537bfSLinus Walleij #define MCDE_VSCRC_VSSEL BIT(28) /* 0 VSYNC0, 1 VSYNC1 */
3355fc537bfSLinus Walleij #define MCDE_VSCRC_VSDBL BIT(29)
3365fc537bfSLinus Walleij 
3375fc537bfSLinus Walleij /* Channel config 0..3 */
3385fc537bfSLinus Walleij #define MCDE_CHNL0CONF 0x00000600
3395fc537bfSLinus Walleij #define MCDE_CHNL1CONF 0x00000620
3405fc537bfSLinus Walleij #define MCDE_CHNL2CONF 0x00000640
3415fc537bfSLinus Walleij #define MCDE_CHNL3CONF 0x00000660
3425fc537bfSLinus Walleij #define MCDE_CHNLXCONF_PPL_SHIFT 0
3435fc537bfSLinus Walleij #define MCDE_CHNLXCONF_PPL_MASK 0x000007FF
3445fc537bfSLinus Walleij #define MCDE_CHNLXCONF_LPF_SHIFT 16
3455fc537bfSLinus Walleij #define MCDE_CHNLXCONF_LPF_MASK 0x07FF0000
3465fc537bfSLinus Walleij #define MCDE_MAX_WIDTH 2048
3475fc537bfSLinus Walleij 
3485fc537bfSLinus Walleij /* Channel status 0..3 */
3495fc537bfSLinus Walleij #define MCDE_CHNL0STAT 0x00000604
3505fc537bfSLinus Walleij #define MCDE_CHNL1STAT 0x00000624
3515fc537bfSLinus Walleij #define MCDE_CHNL2STAT 0x00000644
3525fc537bfSLinus Walleij #define MCDE_CHNL3STAT 0x00000664
3535fc537bfSLinus Walleij #define MCDE_CHNLXSTAT_CHNLRD BIT(0)
3545fc537bfSLinus Walleij #define MCDE_CHNLXSTAT_CHNLA BIT(1)
3555fc537bfSLinus Walleij #define MCDE_CHNLXSTAT_CHNLBLBCKGND_EN BIT(16)
3565fc537bfSLinus Walleij #define MCDE_CHNLXSTAT_PPLX2_V422 BIT(17)
3575fc537bfSLinus Walleij #define MCDE_CHNLXSTAT_LPFX2_V422 BIT(18)
3585fc537bfSLinus Walleij 
3595fc537bfSLinus Walleij /* Sync settings for channel 0..3 */
3605fc537bfSLinus Walleij #define MCDE_CHNL0SYNCHMOD 0x00000608
3615fc537bfSLinus Walleij #define MCDE_CHNL1SYNCHMOD 0x00000628
3625fc537bfSLinus Walleij #define MCDE_CHNL2SYNCHMOD 0x00000648
3635fc537bfSLinus Walleij #define MCDE_CHNL3SYNCHMOD 0x00000668
3645fc537bfSLinus Walleij 
3655fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_SRC_SYNCH_SHIFT 0
3665fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_SRC_SYNCH_MASK 0x00000003
3675fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_SRC_SYNCH_HARDWARE 0
3685fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_SRC_SYNCH_NO_SYNCH 1
3695fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_SRC_SYNCH_SOFTWARE 2
3705fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_OUT_SYNCH_SRC_SHIFT 2
3715fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_OUT_SYNCH_SRC_MASK 0x0000001C
3725fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_OUT_SYNCH_SRC_FORMATTER 0
3735fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_OUT_SYNCH_SRC_TE0 1
3745fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHMOD_OUT_SYNCH_SRC_TE1 2
3755fc537bfSLinus Walleij 
3765fc537bfSLinus Walleij /* Software sync triggers for channel 0..3 */
3775fc537bfSLinus Walleij #define MCDE_CHNL0SYNCHSW 0x0000060C
3785fc537bfSLinus Walleij #define MCDE_CHNL1SYNCHSW 0x0000062C
3795fc537bfSLinus Walleij #define MCDE_CHNL2SYNCHSW 0x0000064C
3805fc537bfSLinus Walleij #define MCDE_CHNL3SYNCHSW 0x0000066C
3815fc537bfSLinus Walleij #define MCDE_CHNLXSYNCHSW_SW_TRIG BIT(0)
3825fc537bfSLinus Walleij 
3835fc537bfSLinus Walleij #define MCDE_CHNL0BCKGNDCOL 0x00000610
3845fc537bfSLinus Walleij #define MCDE_CHNL1BCKGNDCOL 0x00000630
3855fc537bfSLinus Walleij #define MCDE_CHNL2BCKGNDCOL 0x00000650
3865fc537bfSLinus Walleij #define MCDE_CHNL3BCKGNDCOL 0x00000670
3875fc537bfSLinus Walleij #define MCDE_CHNLXBCKGNDCOL_B_SHIFT 0
3885fc537bfSLinus Walleij #define MCDE_CHNLXBCKGNDCOL_B_MASK 0x000000FF
3895fc537bfSLinus Walleij #define MCDE_CHNLXBCKGNDCOL_G_SHIFT 8
3905fc537bfSLinus Walleij #define MCDE_CHNLXBCKGNDCOL_G_MASK 0x0000FF00
3915fc537bfSLinus Walleij #define MCDE_CHNLXBCKGNDCOL_R_SHIFT 16
3925fc537bfSLinus Walleij #define MCDE_CHNLXBCKGNDCOL_R_MASK 0x00FF0000
3935fc537bfSLinus Walleij 
3945fc537bfSLinus Walleij #define MCDE_CHNL0MUXING 0x00000614
3955fc537bfSLinus Walleij #define MCDE_CHNL1MUXING 0x00000634
3965fc537bfSLinus Walleij #define MCDE_CHNL2MUXING 0x00000654
3975fc537bfSLinus Walleij #define MCDE_CHNL3MUXING 0x00000674
3985fc537bfSLinus Walleij #define MCDE_CHNLXMUXING_FIFO_ID_FIFO_A 0
3995fc537bfSLinus Walleij #define MCDE_CHNLXMUXING_FIFO_ID_FIFO_B 1
4005fc537bfSLinus Walleij #define MCDE_CHNLXMUXING_FIFO_ID_FIFO_C0 2
4015fc537bfSLinus Walleij #define MCDE_CHNLXMUXING_FIFO_ID_FIFO_C1 3
4025fc537bfSLinus Walleij 
4035fc537bfSLinus Walleij /* Pixel processing control registers for channel A B,  */
4045fc537bfSLinus Walleij #define MCDE_CRA0 0x00000800
4055fc537bfSLinus Walleij #define MCDE_CRB0 0x00000A00
4065fc537bfSLinus Walleij #define MCDE_CRX0_FLOEN BIT(0)
4075fc537bfSLinus Walleij #define MCDE_CRX0_POWEREN BIT(1)
4085fc537bfSLinus Walleij #define MCDE_CRX0_BLENDEN BIT(2)
4095fc537bfSLinus Walleij #define MCDE_CRX0_AFLICKEN BIT(3)
4105fc537bfSLinus Walleij #define MCDE_CRX0_PALEN BIT(4)
4115fc537bfSLinus Walleij #define MCDE_CRX0_DITHEN BIT(5)
4125fc537bfSLinus Walleij #define MCDE_CRX0_GAMEN BIT(6)
4135fc537bfSLinus Walleij #define MCDE_CRX0_KEYCTRL_SHIFT 7
4145fc537bfSLinus Walleij #define MCDE_CRX0_KEYCTRL_MASK 0x00000380
4155fc537bfSLinus Walleij #define MCDE_CRX0_KEYCTRL_OFF 0
4165fc537bfSLinus Walleij #define MCDE_CRX0_KEYCTRL_ALPHA_RGB 1
4175fc537bfSLinus Walleij #define MCDE_CRX0_KEYCTRL_RGB 2
4185fc537bfSLinus Walleij #define MCDE_CRX0_KEYCTRL_FALPHA_FRGB 4
4195fc537bfSLinus Walleij #define MCDE_CRX0_KEYCTRL_FRGB 5
4205fc537bfSLinus Walleij #define MCDE_CRX0_BLENDCTRL BIT(10)
4215fc537bfSLinus Walleij #define MCDE_CRX0_FLICKMODE_SHIFT 11
4225fc537bfSLinus Walleij #define MCDE_CRX0_FLICKMODE_MASK 0x00001800
4235fc537bfSLinus Walleij #define MCDE_CRX0_FLICKMODE_FORCE_FILTER_0 0
4245fc537bfSLinus Walleij #define MCDE_CRX0_FLICKMODE_ADAPTIVE 1
4255fc537bfSLinus Walleij #define MCDE_CRX0_FLICKMODE_TEST_MODE 2
4265fc537bfSLinus Walleij #define MCDE_CRX0_FLOCKFORMAT_RGB BIT(13) /* 0 = YCVCR */
4275fc537bfSLinus Walleij #define MCDE_CRX0_PALMODE_GAMMA BIT(14) /* 0 = palette */
4285fc537bfSLinus Walleij #define MCDE_CRX0_OLEDEN BIT(15)
4295fc537bfSLinus Walleij #define MCDE_CRX0_ALPHABLEND_SHIFT 16
4305fc537bfSLinus Walleij #define MCDE_CRX0_ALPHABLEND_MASK 0x00FF0000
4315fc537bfSLinus Walleij #define MCDE_CRX0_ROTEN BIT(24)
4325fc537bfSLinus Walleij 
4335fc537bfSLinus Walleij #define MCDE_CRA1 0x00000804
4345fc537bfSLinus Walleij #define MCDE_CRB1 0x00000A04
4355fc537bfSLinus Walleij #define MCDE_CRX1_PCD_SHIFT 0
4365fc537bfSLinus Walleij #define MCDE_CRX1_PCD_MASK 0x000003FF
437*d795fd32SLinus Walleij #define MCDE_CRX1_PCD_BITS 10
4385fc537bfSLinus Walleij #define MCDE_CRX1_CLKSEL_SHIFT 10
4395fc537bfSLinus Walleij #define MCDE_CRX1_CLKSEL_MASK 0x00001C00
4405fc537bfSLinus Walleij #define MCDE_CRX1_CLKSEL_CLKPLL72 0
4415fc537bfSLinus Walleij #define MCDE_CRX1_CLKSEL_CLKPLL27 2
4425fc537bfSLinus Walleij #define MCDE_CRX1_CLKSEL_TV1CLK 3
4435fc537bfSLinus Walleij #define MCDE_CRX1_CLKSEL_TV2CLK 4
4445fc537bfSLinus Walleij #define MCDE_CRX1_CLKSEL_MCDECLK 5
4455fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_SHIFT 13
4465fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_MASK 0x0001E000
4475fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_8BPP_C1 0
4485fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_12BPP_C1 1
4495fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_12BPP_C2 2
4505fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_16BPP_C1 3
4515fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_16BPP_C2 4
4525fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_16BPP_C3 5
4535fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_18BPP_C1 6
4545fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_18BPP_C2 7
4555fc537bfSLinus Walleij #define MCDE_CRX1_CDWIN_24BPP 8
4565fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_SHIFT 25
4575fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_MASK 0x1E000000
4585fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_MONO1 0
4595fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_MONO2 1
4605fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_MONO4 2
4615fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_MONO8 3
4625fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_8BPP 4
4635fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_12BPP 5
4645fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_15BPP 6
4655fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_16BPP 7
4665fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_18BPP 8
4675fc537bfSLinus Walleij #define MCDE_CRX1_OUTBPP_24BPP 9
4685fc537bfSLinus Walleij #define MCDE_CRX1_BCD BIT(29)
4695fc537bfSLinus Walleij #define MCDE_CRA1_CLKTYPE_TVXCLKSEL1 BIT(30) /* 0 = TVXCLKSEL1 */
4705fc537bfSLinus Walleij 
4715fc537bfSLinus Walleij #define MCDE_COLKEYA 0x00000808
4725fc537bfSLinus Walleij #define MCDE_COLKEYB 0x00000A08
4735fc537bfSLinus Walleij 
4745fc537bfSLinus Walleij #define MCDE_FCOLKEYA 0x0000080C
4755fc537bfSLinus Walleij #define MCDE_FCOLKEYB 0x00000A0C
4765fc537bfSLinus Walleij 
4775fc537bfSLinus Walleij #define MCDE_RGBCONV1A 0x00000810
4785fc537bfSLinus Walleij #define MCDE_RGBCONV1B 0x00000A10
4795fc537bfSLinus Walleij 
4805fc537bfSLinus Walleij #define MCDE_RGBCONV2A 0x00000814
4815fc537bfSLinus Walleij #define MCDE_RGBCONV2B 0x00000A14
4825fc537bfSLinus Walleij 
4835fc537bfSLinus Walleij #define MCDE_RGBCONV3A 0x00000818
4845fc537bfSLinus Walleij #define MCDE_RGBCONV3B 0x00000A18
4855fc537bfSLinus Walleij 
4865fc537bfSLinus Walleij #define MCDE_RGBCONV4A 0x0000081C
4875fc537bfSLinus Walleij #define MCDE_RGBCONV4B 0x00000A1C
4885fc537bfSLinus Walleij 
4895fc537bfSLinus Walleij #define MCDE_RGBCONV5A 0x00000820
4905fc537bfSLinus Walleij #define MCDE_RGBCONV5B 0x00000A20
4915fc537bfSLinus Walleij 
4925fc537bfSLinus Walleij #define MCDE_RGBCONV6A 0x00000824
4935fc537bfSLinus Walleij #define MCDE_RGBCONV6B 0x00000A24
4945fc537bfSLinus Walleij 
4955fc537bfSLinus Walleij /* Rotation */
4965fc537bfSLinus Walleij #define MCDE_ROTACONF 0x0000087C
4975fc537bfSLinus Walleij #define MCDE_ROTBCONF 0x00000A7C
4985fc537bfSLinus Walleij 
499*d795fd32SLinus Walleij /* Synchronization event configuration */
5005fc537bfSLinus Walleij #define MCDE_SYNCHCONFA 0x00000880
5015fc537bfSLinus Walleij #define MCDE_SYNCHCONFB 0x00000A80
502*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_HWREQVEVENT_SHIFT 0
503*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_HWREQVEVENT_VSYNC (0 << 0)
504*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_HWREQVEVENT_BACK_PORCH (1 << 0)
505*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_HWREQVEVENT_ACTIVE_VIDEO (2 << 0)
506*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_HWREQVEVENT_FRONT_PORCH (3 << 0)
507*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_HWREQVCNT_SHIFT 2 /* 14 bits */
508*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_SWINTVEVENT_VSYNC (0 << 16)
509*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_SWINTVEVENT_BACK_PORCH (1 << 16)
510*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_SWINTVEVENT_ACTIVE_VIDEO (2 << 16)
511*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_SWINTVEVENT_FRONT_PORCH (3 << 16)
512*d795fd32SLinus Walleij #define MCDE_SYNCHCONF_SWINTVCNT_SHIFT 18 /* 14 bits */
5135fc537bfSLinus Walleij 
5145fc537bfSLinus Walleij /* Channel A+B control registers */
5155fc537bfSLinus Walleij #define MCDE_CTRLA 0x00000884
5165fc537bfSLinus Walleij #define MCDE_CTRLB 0x00000A84
5175fc537bfSLinus Walleij #define MCDE_CTRLX_FIFOWTRMRK_SHIFT 0
5185fc537bfSLinus Walleij #define MCDE_CTRLX_FIFOWTRMRK_MASK 0x000003FF
5195fc537bfSLinus Walleij #define MCDE_CTRLX_FIFOEMPTY BIT(12)
5205fc537bfSLinus Walleij #define MCDE_CTRLX_FIFOFULL BIT(13)
5215fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_SHIFT 16
5225fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_MASK 0x00070000
5235fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DSI0VID 0
5245fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DSI0CMD 1
5255fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DSI1VID 2
5265fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DSI1CMD 3
5275fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DSI2VID 4
5285fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DSI2CMD 5
5295fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DPIA 0
5305fc537bfSLinus Walleij #define MCDE_CTRLX_FORMID_DPIB 1
5315fc537bfSLinus Walleij #define MCDE_CTRLX_FORMTYPE_SHIFT 20
5325fc537bfSLinus Walleij #define MCDE_CTRLX_FORMTYPE_MASK 0x00700000
5335fc537bfSLinus Walleij #define MCDE_CTRLX_FORMTYPE_DPITV 0
5345fc537bfSLinus Walleij #define MCDE_CTRLX_FORMTYPE_DBI 1
5355fc537bfSLinus Walleij #define MCDE_CTRLX_FORMTYPE_DSI 2
5365fc537bfSLinus Walleij 
5375fc537bfSLinus Walleij #define MCDE_DSIVID0CONF0 0x00000E00
5385fc537bfSLinus Walleij #define MCDE_DSICMD0CONF0 0x00000E20
5395fc537bfSLinus Walleij #define MCDE_DSIVID1CONF0 0x00000E40
5405fc537bfSLinus Walleij #define MCDE_DSICMD1CONF0 0x00000E60
5415fc537bfSLinus Walleij #define MCDE_DSIVID2CONF0 0x00000E80
5425fc537bfSLinus Walleij #define MCDE_DSICMD2CONF0 0x00000EA0
5435fc537bfSLinus Walleij #define MCDE_DSICONF0_BLANKING_SHIFT 0
5445fc537bfSLinus Walleij #define MCDE_DSICONF0_BLANKING_MASK 0x000000FF
5455fc537bfSLinus Walleij #define MCDE_DSICONF0_VID_MODE_CMD 0
5465fc537bfSLinus Walleij #define MCDE_DSICONF0_VID_MODE_VID BIT(12)
5475fc537bfSLinus Walleij #define MCDE_DSICONF0_CMD8 BIT(13)
5485fc537bfSLinus Walleij #define MCDE_DSICONF0_BIT_SWAP BIT(16)
5495fc537bfSLinus Walleij #define MCDE_DSICONF0_BYTE_SWAP BIT(17)
5505fc537bfSLinus Walleij #define MCDE_DSICONF0_DCSVID_NOTGEN BIT(18)
5515fc537bfSLinus Walleij #define MCDE_DSICONF0_PACKING_SHIFT 20
5525fc537bfSLinus Walleij #define MCDE_DSICONF0_PACKING_MASK 0x00700000
5535fc537bfSLinus Walleij #define MCDE_DSICONF0_PACKING_RGB565 0
5545fc537bfSLinus Walleij #define MCDE_DSICONF0_PACKING_RGB666 1
55577f512bdSLinus Walleij #define MCDE_DSICONF0_PACKING_RGB888 2
55677f512bdSLinus Walleij #define MCDE_DSICONF0_PACKING_BGR888 3
5575fc537bfSLinus Walleij #define MCDE_DSICONF0_PACKING_HDTV 4
5585fc537bfSLinus Walleij 
5595fc537bfSLinus Walleij #define MCDE_DSIVID0FRAME 0x00000E04
5605fc537bfSLinus Walleij #define MCDE_DSICMD0FRAME 0x00000E24
5615fc537bfSLinus Walleij #define MCDE_DSIVID1FRAME 0x00000E44
5625fc537bfSLinus Walleij #define MCDE_DSICMD1FRAME 0x00000E64
5635fc537bfSLinus Walleij #define MCDE_DSIVID2FRAME 0x00000E84
5645fc537bfSLinus Walleij #define MCDE_DSICMD2FRAME 0x00000EA4
5655fc537bfSLinus Walleij 
5665fc537bfSLinus Walleij #define MCDE_DSIVID0PKT 0x00000E08
5675fc537bfSLinus Walleij #define MCDE_DSICMD0PKT 0x00000E28
5685fc537bfSLinus Walleij #define MCDE_DSIVID1PKT 0x00000E48
5695fc537bfSLinus Walleij #define MCDE_DSICMD1PKT 0x00000E68
5705fc537bfSLinus Walleij #define MCDE_DSIVID2PKT 0x00000E88
5715fc537bfSLinus Walleij #define MCDE_DSICMD2PKT 0x00000EA8
5725fc537bfSLinus Walleij 
5735fc537bfSLinus Walleij #define MCDE_DSIVID0SYNC 0x00000E0C
5745fc537bfSLinus Walleij #define MCDE_DSICMD0SYNC 0x00000E2C
5755fc537bfSLinus Walleij #define MCDE_DSIVID1SYNC 0x00000E4C
5765fc537bfSLinus Walleij #define MCDE_DSICMD1SYNC 0x00000E6C
5775fc537bfSLinus Walleij #define MCDE_DSIVID2SYNC 0x00000E8C
5785fc537bfSLinus Walleij #define MCDE_DSICMD2SYNC 0x00000EAC
5795fc537bfSLinus Walleij 
5805fc537bfSLinus Walleij #define MCDE_DSIVID0CMDW 0x00000E10
5815fc537bfSLinus Walleij #define MCDE_DSICMD0CMDW 0x00000E30
5825fc537bfSLinus Walleij #define MCDE_DSIVID1CMDW 0x00000E50
5835fc537bfSLinus Walleij #define MCDE_DSICMD1CMDW 0x00000E70
5845fc537bfSLinus Walleij #define MCDE_DSIVID2CMDW 0x00000E90
5855fc537bfSLinus Walleij #define MCDE_DSICMD2CMDW 0x00000EB0
5865fc537bfSLinus Walleij #define MCDE_DSIVIDXCMDW_CMDW_CONTINUE_SHIFT 0
5875fc537bfSLinus Walleij #define MCDE_DSIVIDXCMDW_CMDW_CONTINUE_MASK 0x0000FFFF
5885fc537bfSLinus Walleij #define MCDE_DSIVIDXCMDW_CMDW_START_SHIFT 16
5895fc537bfSLinus Walleij #define MCDE_DSIVIDXCMDW_CMDW_START_MASK 0xFFFF0000
5905fc537bfSLinus Walleij 
5915fc537bfSLinus Walleij #define MCDE_DSIVID0DELAY0 0x00000E14
5925fc537bfSLinus Walleij #define MCDE_DSICMD0DELAY0 0x00000E34
5935fc537bfSLinus Walleij #define MCDE_DSIVID1DELAY0 0x00000E54
5945fc537bfSLinus Walleij #define MCDE_DSICMD1DELAY0 0x00000E74
5955fc537bfSLinus Walleij #define MCDE_DSIVID2DELAY0 0x00000E94
5965fc537bfSLinus Walleij #define MCDE_DSICMD2DELAY0 0x00000EB4
5975fc537bfSLinus Walleij 
5985fc537bfSLinus Walleij #define MCDE_DSIVID0DELAY1 0x00000E18
5995fc537bfSLinus Walleij #define MCDE_DSICMD0DELAY1 0x00000E38
6005fc537bfSLinus Walleij #define MCDE_DSIVID1DELAY1 0x00000E58
6015fc537bfSLinus Walleij #define MCDE_DSICMD1DELAY1 0x00000E78
6025fc537bfSLinus Walleij #define MCDE_DSIVID2DELAY1 0x00000E98
6035fc537bfSLinus Walleij #define MCDE_DSICMD2DELAY1 0x00000EB8
6045fc537bfSLinus Walleij 
6055fc537bfSLinus Walleij #endif /* __DRM_MCDE_DISPLAY_REGS */
606