Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * R-Car Display Unit Registers Definitions
0004  *
0005  * Copyright (C) 2013-2015 Renesas Electronics Corporation
0006  *
0007  * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
0008  */
0009 
0010 #ifndef __RCAR_DU_REGS_H__
0011 #define __RCAR_DU_REGS_H__
0012 
0013 #define DU0_REG_OFFSET      0x00000
0014 #define DU1_REG_OFFSET      0x30000
0015 #define DU2_REG_OFFSET      0x40000
0016 #define DU3_REG_OFFSET      0x70000
0017 
0018 /* -----------------------------------------------------------------------------
0019  * Display Control Registers
0020  */
0021 
0022 #define DSYSR           0x00000 /* display 1 */
0023 #define DSYSR_ILTS      (1 << 29)
0024 #define DSYSR_DSEC      (1 << 20)
0025 #define DSYSR_IUPD      (1 << 16)
0026 #define DSYSR_DRES      (1 << 9)
0027 #define DSYSR_DEN       (1 << 8)
0028 #define DSYSR_TVM_MASTER    (0 << 6)
0029 #define DSYSR_TVM_SWITCH    (1 << 6)
0030 #define DSYSR_TVM_TVSYNC    (2 << 6)
0031 #define DSYSR_TVM_MASK      (3 << 6)
0032 #define DSYSR_SCM_INT_NONE  (0 << 4)
0033 #define DSYSR_SCM_INT_SYNC  (2 << 4)
0034 #define DSYSR_SCM_INT_VIDEO (3 << 4)
0035 #define DSYSR_SCM_MASK      (3 << 4)
0036 
0037 #define DSMR            0x00004
0038 #define DSMR_VSPM       (1 << 28)
0039 #define DSMR_ODPM       (1 << 27)
0040 #define DSMR_DIPM_DISP      (0 << 25)
0041 #define DSMR_DIPM_CSYNC     (1 << 25)
0042 #define DSMR_DIPM_DE        (3 << 25)
0043 #define DSMR_DIPM_MASK      (3 << 25)
0044 #define DSMR_CSPM       (1 << 24)
0045 #define DSMR_DIL        (1 << 19)
0046 #define DSMR_VSL        (1 << 18)
0047 #define DSMR_HSL        (1 << 17)
0048 #define DSMR_DDIS       (1 << 16)
0049 #define DSMR_CDEL       (1 << 15)
0050 #define DSMR_CDEM_CDE       (0 << 13)
0051 #define DSMR_CDEM_LOW       (2 << 13)
0052 #define DSMR_CDEM_HIGH      (3 << 13)
0053 #define DSMR_CDEM_MASK      (3 << 13)
0054 #define DSMR_CDED       (1 << 12)
0055 #define DSMR_ODEV       (1 << 8)
0056 #define DSMR_CSY_VH_OR      (0 << 6)
0057 #define DSMR_CSY_333        (2 << 6)
0058 #define DSMR_CSY_222        (3 << 6)
0059 #define DSMR_CSY_MASK       (3 << 6)
0060 
0061 #define DSSR            0x00008
0062 #define DSSR_VC1FB_DSA0     (0 << 30)
0063 #define DSSR_VC1FB_DSA1     (1 << 30)
0064 #define DSSR_VC1FB_DSA2     (2 << 30)
0065 #define DSSR_VC1FB_INIT     (3 << 30)
0066 #define DSSR_VC1FB_MASK     (3 << 30)
0067 #define DSSR_VC0FB_DSA0     (0 << 28)
0068 #define DSSR_VC0FB_DSA1     (1 << 28)
0069 #define DSSR_VC0FB_DSA2     (2 << 28)
0070 #define DSSR_VC0FB_INIT     (3 << 28)
0071 #define DSSR_VC0FB_MASK     (3 << 28)
0072 #define DSSR_DFB(n)     (1 << ((n)+15))
0073 #define DSSR_TVR        (1 << 15)
0074 #define DSSR_FRM        (1 << 14)
0075 #define DSSR_VBK        (1 << 11)
0076 #define DSSR_RINT       (1 << 9)
0077 #define DSSR_HBK        (1 << 8)
0078 #define DSSR_ADC(n)     (1 << ((n)-1))
0079 
0080 #define DSRCR           0x0000c
0081 #define DSRCR_TVCL      (1 << 15)
0082 #define DSRCR_FRCL      (1 << 14)
0083 #define DSRCR_VBCL      (1 << 11)
0084 #define DSRCR_RICL      (1 << 9)
0085 #define DSRCR_HBCL      (1 << 8)
0086 #define DSRCR_ADCL(n)       (1 << ((n)-1))
0087 #define DSRCR_MASK      0x0000cbff
0088 
0089 #define DIER            0x00010
0090 #define DIER_TVE        (1 << 15)
0091 #define DIER_FRE        (1 << 14)
0092 #define DIER_VBE        (1 << 11)
0093 #define DIER_RIE        (1 << 9)
0094 #define DIER_HBE        (1 << 8)
0095 #define DIER_ADCE(n)        (1 << ((n)-1))
0096 
0097 #define CPCR            0x00014
0098 #define CPCR_CP4CE      (1 << 19)
0099 #define CPCR_CP3CE      (1 << 18)
0100 #define CPCR_CP2CE      (1 << 17)
0101 #define CPCR_CP1CE      (1 << 16)
0102 
0103 #define DPPR            0x00018
0104 #define DPPR_DPE(n)     (1 << ((n)*4-1))
0105 #define DPPR_DPS(n, p)      (((p)-1) << DPPR_DPS_SHIFT(n))
0106 #define DPPR_DPS_SHIFT(n)   (((n)-1)*4)
0107 #define DPPR_BPP16      (DPPR_DPE(8) | DPPR_DPS(8, 1))  /* plane1 */
0108 #define DPPR_BPP32_P1       (DPPR_DPE(7) | DPPR_DPS(7, 1))
0109 #define DPPR_BPP32_P2       (DPPR_DPE(8) | DPPR_DPS(8, 2))
0110 #define DPPR_BPP32      (DPPR_BPP32_P1 | DPPR_BPP32_P2) /* plane1 & 2 */
0111 
0112 #define DEFR            0x00020
0113 #define DEFR_CODE       (0x7773 << 16)
0114 #define DEFR_EXSL       (1 << 12)
0115 #define DEFR_EXVL       (1 << 11)
0116 #define DEFR_EXUP       (1 << 5)
0117 #define DEFR_VCUP       (1 << 4)
0118 #define DEFR_DEFE       (1 << 0)
0119 
0120 #define DAPCR           0x00024
0121 #define DAPCR_CODE      (0x7773 << 16)
0122 #define DAPCR_AP2E      (1 << 4)
0123 #define DAPCR_AP1E      (1 << 0)
0124 
0125 #define DCPCR           0x00028
0126 #define DCPCR_CODE      (0x7773 << 16)
0127 #define DCPCR_CA2B      (1 << 13)
0128 #define DCPCR_CD2F      (1 << 12)
0129 #define DCPCR_DC2E      (1 << 8)
0130 #define DCPCR_CAB       (1 << 5)
0131 #define DCPCR_CDF       (1 << 4)
0132 #define DCPCR_DCE       (1 << 0)
0133 
0134 #define DEFR2           0x00034
0135 #define DEFR2_CODE      (0x7775 << 16)
0136 #define DEFR2_DEFE2G        (1 << 0)
0137 
0138 #define DEFR3           0x00038
0139 #define DEFR3_CODE      (0x7776 << 16)
0140 #define DEFR3_EVDA      (1 << 14)
0141 #define DEFR3_EVDM_1        (1 << 12)
0142 #define DEFR3_EVDM_2        (2 << 12)
0143 #define DEFR3_EVDM_3        (3 << 12)
0144 #define DEFR3_VMSM2_EMA     (1 << 6)
0145 #define DEFR3_VMSM1_ENA     (1 << 4)
0146 #define DEFR3_DEFE3     (1 << 0)
0147 
0148 #define DEFR4           0x0003c
0149 #define DEFR4_CODE      (0x7777 << 16)
0150 #define DEFR4_LRUO      (1 << 5)
0151 #define DEFR4_SPCE      (1 << 4)
0152 
0153 #define DVCSR           0x000d0
0154 #define DVCSR_VCnFB2_DSA0(n)    (0 << ((n)*2+16))
0155 #define DVCSR_VCnFB2_DSA1(n)    (1 << ((n)*2+16))
0156 #define DVCSR_VCnFB2_DSA2(n)    (2 << ((n)*2+16))
0157 #define DVCSR_VCnFB2_INIT(n)    (3 << ((n)*2+16))
0158 #define DVCSR_VCnFB2_MASK(n)    (3 << ((n)*2+16))
0159 #define DVCSR_VCnFB_DSA0(n) (0 << ((n)*2))
0160 #define DVCSR_VCnFB_DSA1(n) (1 << ((n)*2))
0161 #define DVCSR_VCnFB_DSA2(n) (2 << ((n)*2))
0162 #define DVCSR_VCnFB_INIT(n) (3 << ((n)*2))
0163 #define DVCSR_VCnFB_MASK(n) (3 << ((n)*2))
0164 
0165 #define DEFR5           0x000e0
0166 #define DEFR5_CODE      (0x66 << 24)
0167 #define DEFR5_YCRGB2_DIS    (0 << 14)
0168 #define DEFR5_YCRGB2_PRI1   (1 << 14)
0169 #define DEFR5_YCRGB2_PRI2   (2 << 14)
0170 #define DEFR5_YCRGB2_PRI3   (3 << 14)
0171 #define DEFR5_YCRGB2_MASK   (3 << 14)
0172 #define DEFR5_YCRGB1_DIS    (0 << 12)
0173 #define DEFR5_YCRGB1_PRI1   (1 << 12)
0174 #define DEFR5_YCRGB1_PRI2   (2 << 12)
0175 #define DEFR5_YCRGB1_PRI3   (3 << 12)
0176 #define DEFR5_YCRGB1_MASK   (3 << 12)
0177 #define DEFR5_DEFE5     (1 << 0)
0178 
0179 #define DDLTR           0x000e4
0180 #define DDLTR_CODE      (0x7766 << 16)
0181 #define DDLTR_DLAR2     (1 << 6)
0182 #define DDLTR_DLAY2     (1 << 5)
0183 #define DDLTR_DLAY1     (1 << 1)
0184 
0185 #define DEFR6           0x000e8
0186 #define DEFR6_CODE      (0x7778 << 16)
0187 #define DEFR6_ODPM12_DSMR   (0 << 10)
0188 #define DEFR6_ODPM12_DISP   (2 << 10)
0189 #define DEFR6_ODPM12_CDE    (3 << 10)
0190 #define DEFR6_ODPM12_MASK   (3 << 10)
0191 #define DEFR6_ODPM02_DSMR   (0 << 8)
0192 #define DEFR6_ODPM02_DISP   (2 << 8)
0193 #define DEFR6_ODPM02_CDE    (3 << 8)
0194 #define DEFR6_ODPM02_MASK   (3 << 8)
0195 #define DEFR6_TCNE1     (1 << 6)
0196 #define DEFR6_TCNE0     (1 << 4)
0197 #define DEFR6_MLOS1     (1 << 2)
0198 #define DEFR6_DEFAULT       (DEFR6_CODE | DEFR6_TCNE1)
0199 
0200 #define DEFR7           0x000ec
0201 #define DEFR7_CODE      (0x7779 << 16)
0202 #define DEFR7_CMME1     BIT(6)
0203 #define DEFR7_CMME0     BIT(4)
0204 
0205 /* -----------------------------------------------------------------------------
0206  * R8A7790-only Control Registers
0207  */
0208 
0209 #define DD1SSR          0x20008
0210 #define DD1SSR_TVR      (1 << 15)
0211 #define DD1SSR_FRM      (1 << 14)
0212 #define DD1SSR_BUF      (1 << 12)
0213 #define DD1SSR_VBK      (1 << 11)
0214 #define DD1SSR_RINT     (1 << 9)
0215 #define DD1SSR_HBK      (1 << 8)
0216 #define DD1SSR_ADC(n)       (1 << ((n)-1))
0217 
0218 #define DD1SRCR         0x2000c
0219 #define DD1SRCR_TVR     (1 << 15)
0220 #define DD1SRCR_FRM     (1 << 14)
0221 #define DD1SRCR_BUF     (1 << 12)
0222 #define DD1SRCR_VBK     (1 << 11)
0223 #define DD1SRCR_RINT        (1 << 9)
0224 #define DD1SRCR_HBK     (1 << 8)
0225 #define DD1SRCR_ADC(n)      (1 << ((n)-1))
0226 
0227 #define DD1IER          0x20010
0228 #define DD1IER_TVR      (1 << 15)
0229 #define DD1IER_FRM      (1 << 14)
0230 #define DD1IER_BUF      (1 << 12)
0231 #define DD1IER_VBK      (1 << 11)
0232 #define DD1IER_RINT     (1 << 9)
0233 #define DD1IER_HBK      (1 << 8)
0234 #define DD1IER_ADC(n)       (1 << ((n)-1))
0235 
0236 #define DEFR8           0x20020
0237 #define DEFR8_CODE      (0x7790 << 16)
0238 #define DEFR8_VSCS      (1 << 6)
0239 #define DEFR8_DRGBS_DU(n)   ((n) << 4)
0240 #define DEFR8_DRGBS_MASK    (3 << 4)
0241 #define DEFR8_DEFE8     (1 << 0)
0242 
0243 #define DOFLR           0x20024
0244 #define DOFLR_CODE      (0x7790 << 16)
0245 #define DOFLR_HSYCFL1       (1 << 13)
0246 #define DOFLR_VSYCFL1       (1 << 12)
0247 #define DOFLR_ODDFL1        (1 << 11)
0248 #define DOFLR_DISPFL1       (1 << 10)
0249 #define DOFLR_CDEFL1        (1 << 9)
0250 #define DOFLR_RGBFL1        (1 << 8)
0251 #define DOFLR_HSYCFL0       (1 << 5)
0252 #define DOFLR_VSYCFL0       (1 << 4)
0253 #define DOFLR_ODDFL0        (1 << 3)
0254 #define DOFLR_DISPFL0       (1 << 2)
0255 #define DOFLR_CDEFL0        (1 << 1)
0256 #define DOFLR_RGBFL0        (1 << 0)
0257 
0258 #define DIDSR           0x20028
0259 #define DIDSR_CODE      (0x7790 << 16)
0260 #define DIDSR_LDCS_DCLKIN(n)    (0 << (8 + (n) * 2))
0261 #define DIDSR_LDCS_DSI(n)   (2 << (8 + (n) * 2))    /* V3U only */
0262 #define DIDSR_LDCS_LVDS0(n) (2 << (8 + (n) * 2))
0263 #define DIDSR_LDCS_LVDS1(n) (3 << (8 + (n) * 2))
0264 #define DIDSR_LDCS_MASK(n)  (3 << (8 + (n) * 2))
0265 #define DIDSR_PDCS_CLK(n, clk)  (clk << ((n) * 2))
0266 #define DIDSR_PDCS_MASK(n)  (3 << ((n) * 2))
0267 
0268 #define DEFR10          0x20038
0269 #define DEFR10_CODE     (0x7795 << 16)
0270 #define DEFR10_VSPF1_RGB    (0 << 14)
0271 #define DEFR10_VSPF1_YC     (1 << 14)
0272 #define DEFR10_DOCF1_RGB    (0 << 12)
0273 #define DEFR10_DOCF1_YC     (1 << 12)
0274 #define DEFR10_YCDF0_YCBCR444   (0 << 11)
0275 #define DEFR10_YCDF0_YCBCR422   (1 << 11)
0276 #define DEFR10_VSPF0_RGB    (0 << 10)
0277 #define DEFR10_VSPF0_YC     (1 << 10)
0278 #define DEFR10_DOCF0_RGB    (0 << 8)
0279 #define DEFR10_DOCF0_YC     (1 << 8)
0280 #define DEFR10_TSEL_H3_TCON1    (0 << 1) /* DEFR102 register only (DU2/DU3) */
0281 #define DEFR10_DEFE10       (1 << 0)
0282 
0283 #define DPLLCR          0x20044
0284 #define DPLLCR_CODE     (0x95 << 24)
0285 #define DPLLCR_PLCS1        (1 << 23)
0286 /*
0287  * PLCS0 is bit 21, but H3 ES1.x requires bit 20 to be set as well. As bit 20
0288  * isn't implemented by other SoC in the Gen3 family it can safely be set
0289  * unconditionally.
0290  */
0291 #define DPLLCR_PLCS0        (3 << 20)
0292 #define DPLLCR_CLKE     (1 << 18)
0293 #define DPLLCR_FDPLL(n)     ((n) << 12)
0294 #define DPLLCR_N(n)     ((n) << 5)
0295 #define DPLLCR_M(n)     ((n) << 3)
0296 #define DPLLCR_STBY     (1 << 2)
0297 #define DPLLCR_INCS_DOTCLKIN0   (0 << 0)
0298 #define DPLLCR_INCS_DOTCLKIN1   (1 << 1)
0299 
0300 #define DPLLC2R         0x20048
0301 #define DPLLC2R_CODE        (0x95 << 24)
0302 #define DPLLC2R_SELC        (1 << 12)
0303 #define DPLLC2R_M(n)        ((n) << 8)
0304 #define DPLLC2R_FDPLL(n)    ((n) << 0)
0305 
0306 /* -----------------------------------------------------------------------------
0307  * Display Timing Generation Registers
0308  */
0309 
0310 #define HDSR            0x00040
0311 #define HDER            0x00044
0312 #define VDSR            0x00048
0313 #define VDER            0x0004c
0314 #define HCR         0x00050
0315 #define HSWR            0x00054
0316 #define VCR         0x00058
0317 #define VSPR            0x0005c
0318 #define EQWR            0x00060
0319 #define SPWR            0x00064
0320 #define CLAMPSR         0x00070
0321 #define CLAMPWR         0x00074
0322 #define DESR            0x00078
0323 #define DEWR            0x0007c
0324 
0325 /* -----------------------------------------------------------------------------
0326  * Display Attribute Registers
0327  */
0328 
0329 #define CP1TR           0x00080
0330 #define CP2TR           0x00084
0331 #define CP3TR           0x00088
0332 #define CP4TR           0x0008c
0333 
0334 #define DOOR            0x00090
0335 #define DOOR_RGB(r, g, b)   (((r) << 18) | ((g) << 10) | ((b) << 2))
0336 #define CDER            0x00094
0337 #define CDER_RGB(r, g, b)   (((r) << 18) | ((g) << 10) | ((b) << 2))
0338 #define BPOR            0x00098
0339 #define BPOR_RGB(r, g, b)   (((r) << 18) | ((g) << 10) | ((b) << 2))
0340 
0341 #define RINTOFSR        0x0009c
0342 
0343 #define DSHPR           0x000c8
0344 #define DSHPR_CODE      (0x7776 << 16)
0345 #define DSHPR_PRIH      (0xa << 4)
0346 #define DSHPR_PRIL_BPP16    (0x8 << 0)
0347 #define DSHPR_PRIL_BPP32    (0x9 << 0)
0348 
0349 /* -----------------------------------------------------------------------------
0350  * Display Plane Registers
0351  */
0352 
0353 #define PLANE_OFF       0x00100
0354 
0355 #define PnMR            0x00100 /* plane 1 */
0356 #define PnMR_VISL_VIN0      (0 << 26)   /* use Video Input 0 */
0357 #define PnMR_VISL_VIN1      (1 << 26)   /* use Video Input 1 */
0358 #define PnMR_VISL_VIN2      (2 << 26)   /* use Video Input 2 */
0359 #define PnMR_VISL_VIN3      (3 << 26)   /* use Video Input 3 */
0360 #define PnMR_YCDF_YUYV      (1 << 20)   /* YUYV format */
0361 #define PnMR_TC_R       (0 << 17)   /* Tranparent color is PnTC1R */
0362 #define PnMR_TC_CP      (1 << 17)   /* Tranparent color is color palette */
0363 #define PnMR_WAE        (1 << 16)   /* Wrap around Enable */
0364 #define PnMR_SPIM_TP        (0 << 12)   /* Transparent Color */
0365 #define PnMR_SPIM_ALP       (1 << 12)   /* Alpha Blending */
0366 #define PnMR_SPIM_EOR       (2 << 12)   /* EOR */
0367 #define PnMR_SPIM_TP_OFF    (1 << 14)   /* No Transparent Color */
0368 #define PnMR_CPSL_CP1       (0 << 8)    /* Color Palette selected 1 */
0369 #define PnMR_CPSL_CP2       (1 << 8)    /* Color Palette selected 2 */
0370 #define PnMR_CPSL_CP3       (2 << 8)    /* Color Palette selected 3 */
0371 #define PnMR_CPSL_CP4       (3 << 8)    /* Color Palette selected 4 */
0372 #define PnMR_DC         (1 << 7)    /* Display Area Change */
0373 #define PnMR_BM_MD      (0 << 4)    /* Manual Display Change Mode */
0374 #define PnMR_BM_AR      (1 << 4)    /* Auto Rendering Mode */
0375 #define PnMR_BM_AD      (2 << 4)    /* Auto Display Change Mode */
0376 #define PnMR_BM_VC      (3 << 4)    /* Video Capture Mode */
0377 #define PnMR_DDDF_8BPP      (0 << 0)    /* 8bit */
0378 #define PnMR_DDDF_16BPP     (1 << 0)    /* 16bit or 32bit */
0379 #define PnMR_DDDF_ARGB      (2 << 0)    /* ARGB */
0380 #define PnMR_DDDF_YC        (3 << 0)    /* YC */
0381 #define PnMR_DDDF_MASK      (3 << 0)
0382 
0383 #define PnMWR           0x00104
0384 
0385 #define PnALPHAR        0x00108
0386 #define PnALPHAR_ABIT_1     (0 << 12)
0387 #define PnALPHAR_ABIT_0     (1 << 12)
0388 #define PnALPHAR_ABIT_X     (2 << 12)
0389 
0390 #define PnDSXR          0x00110
0391 #define PnDSYR          0x00114
0392 #define PnDPXR          0x00118
0393 #define PnDPYR          0x0011c
0394 
0395 #define PnDSA0R         0x00120
0396 #define PnDSA1R         0x00124
0397 #define PnDSA2R         0x00128
0398 #define PnDSA_MASK      0xfffffff0
0399 
0400 #define PnSPXR          0x00130
0401 #define PnSPYR          0x00134
0402 #define PnWASPR         0x00138
0403 #define PnWAMWR         0x0013c
0404 
0405 #define PnBTR           0x00140
0406 
0407 #define PnTC1R          0x00144
0408 #define PnTC2R          0x00148
0409 #define PnTC3R          0x0014c
0410 #define PnTC3R_CODE     (0x66 << 24)
0411 
0412 #define PnMLR           0x00150
0413 
0414 #define PnSWAPR         0x00180
0415 #define PnSWAPR_DIGN        (1 << 4)
0416 #define PnSWAPR_SPQW        (1 << 3)
0417 #define PnSWAPR_SPLW        (1 << 2)
0418 #define PnSWAPR_SPWD        (1 << 1)
0419 #define PnSWAPR_SPBY        (1 << 0)
0420 
0421 #define PnDDCR          0x00184
0422 #define PnDDCR_CODE     (0x7775 << 16)
0423 #define PnDDCR_LRGB1        (1 << 11)
0424 #define PnDDCR_LRGB0        (1 << 10)
0425 
0426 #define PnDDCR2         0x00188
0427 #define PnDDCR2_CODE        (0x7776 << 16)
0428 #define PnDDCR2_NV21        (1 << 5)
0429 #define PnDDCR2_Y420        (1 << 4)
0430 #define PnDDCR2_DIVU        (1 << 1)
0431 #define PnDDCR2_DIVY        (1 << 0)
0432 
0433 #define PnDDCR4         0x00190
0434 #define PnDDCR4_CODE        (0x7766 << 16)
0435 #define PnDDCR4_VSPS        (1 << 13)
0436 #define PnDDCR4_SDFS_RGB    (0 << 4)
0437 #define PnDDCR4_SDFS_YC     (5 << 4)
0438 #define PnDDCR4_SDFS_MASK   (7 << 4)
0439 #define PnDDCR4_EDF_NONE    (0 << 0)
0440 #define PnDDCR4_EDF_ARGB8888    (1 << 0)
0441 #define PnDDCR4_EDF_RGB888  (2 << 0)
0442 #define PnDDCR4_EDF_RGB666  (3 << 0)
0443 #define PnDDCR4_EDF_MASK    (7 << 0)
0444 
0445 #define APnMR           0x0a100
0446 #define APnMR_WAE       (1 << 16)   /* Wrap around Enable */
0447 #define APnMR_DC        (1 << 7)    /* Display Area Change */
0448 #define APnMR_BM_MD     (0 << 4)    /* Manual Display Change Mode */
0449 #define APnMR_BM_AD     (2 << 4)    /* Auto Display Change Mode */
0450 
0451 #define APnMWR          0x0a104
0452 
0453 #define APnDSXR         0x0a110
0454 #define APnDSYR         0x0a114
0455 #define APnDPXR         0x0a118
0456 #define APnDPYR         0x0a11c
0457 
0458 #define APnDSA0R        0x0a120
0459 #define APnDSA1R        0x0a124
0460 #define APnDSA2R        0x0a128
0461 
0462 #define APnSPXR         0x0a130
0463 #define APnSPYR         0x0a134
0464 #define APnWASPR        0x0a138
0465 #define APnWAMWR        0x0a13c
0466 
0467 #define APnBTR          0x0a140
0468 
0469 #define APnMLR          0x0a150
0470 #define APnSWAPR        0x0a180
0471 
0472 /* -----------------------------------------------------------------------------
0473  * Display Capture Registers
0474  */
0475 
0476 #define DCMR            0x0c100
0477 #define DCMWR           0x0c104
0478 #define DCSAR           0x0c120
0479 #define DCMLR           0x0c150
0480 
0481 /* -----------------------------------------------------------------------------
0482  * Color Palette Registers
0483  */
0484 
0485 #define CP1_000R        0x01000
0486 #define CP1_255R        0x013fc
0487 #define CP2_000R        0x02000
0488 #define CP2_255R        0x023fc
0489 #define CP3_000R        0x03000
0490 #define CP3_255R        0x033fc
0491 #define CP4_000R        0x04000
0492 #define CP4_255R        0x043fc
0493 
0494 /* -----------------------------------------------------------------------------
0495  * External Synchronization Control Registers
0496  */
0497 
0498 #define ESCR02          0x10000
0499 #define ESCR13          0x01000
0500 #define ESCR_DCLKOINV       (1 << 25)
0501 #define ESCR_DCLKSEL_DCLKIN (0 << 20)
0502 #define ESCR_DCLKSEL_CLKS   (1 << 20)
0503 #define ESCR_DCLKSEL_MASK   (1 << 20)
0504 #define ESCR_DCLKDIS        (1 << 16)
0505 #define ESCR_SYNCSEL_OFF    (0 << 8)
0506 #define ESCR_SYNCSEL_EXVSYNC    (2 << 8)
0507 #define ESCR_SYNCSEL_EXHSYNC    (3 << 8)
0508 #define ESCR_FRQSEL_MASK    (0x3f << 0)
0509 
0510 #define OTAR02          0x10004
0511 #define OTAR13          0x01004
0512 
0513 /* -----------------------------------------------------------------------------
0514  * Dual Display Output Control Registers
0515  */
0516 
0517 #define DORCR           0x11000
0518 #define DORCR_PG2T      (1 << 30)
0519 #define DORCR_DK2S      (1 << 28)
0520 #define DORCR_PG2D_DS1      (0 << 24)
0521 #define DORCR_PG2D_DS2      (1 << 24)
0522 #define DORCR_PG2D_FIX0     (2 << 24)
0523 #define DORCR_PG2D_DOOR     (3 << 24)
0524 #define DORCR_PG2D_MASK     (3 << 24)
0525 #define DORCR_DR1D      (1 << 21)
0526 #define DORCR_PG1D_DS1      (0 << 16)
0527 #define DORCR_PG1D_DS2      (1 << 16)
0528 #define DORCR_PG1D_FIX0     (2 << 16)
0529 #define DORCR_PG1D_DOOR     (3 << 16)
0530 #define DORCR_PG1D_MASK     (3 << 16)
0531 #define DORCR_RGPV      (1 << 4)
0532 #define DORCR_DPRS      (1 << 0)
0533 
0534 #define DPTSR           0x11004
0535 #define DPTSR_PnDK(n)       (1 << ((n) + 16))
0536 #define DPTSR_PnTS(n)       (1 << (n))
0537 
0538 #define DAPTSR          0x11008
0539 #define DAPTSR_APnDK(n)     (1 << ((n) + 16))
0540 #define DAPTSR_APnTS(n)     (1 << (n))
0541 
0542 #define DS1PR           0x11020
0543 #define DS2PR           0x11024
0544 
0545 /* -----------------------------------------------------------------------------
0546  * YC-RGB Conversion Coefficient Registers
0547  */
0548 
0549 #define YNCR            0x11080
0550 #define YNOR            0x11084
0551 #define CRNOR           0x11088
0552 #define CBNOR           0x1108c
0553 #define RCRCR           0x11090
0554 #define GCRCR           0x11094
0555 #define GCBCR           0x11098
0556 #define BCBCR           0x1109c
0557 
0558 #endif /* __RCAR_DU_REGS_H__ */