1*11696c5eSBiju Das /* SPDX-License-Identifier: GPL-2.0 */ 2*11696c5eSBiju Das /* 3*11696c5eSBiju Das * R-Car Display Unit Registers Definitions 4*11696c5eSBiju Das * 5*11696c5eSBiju Das * Copyright (C) 2013-2015 Renesas Electronics Corporation 6*11696c5eSBiju Das * 7*11696c5eSBiju Das * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com) 8*11696c5eSBiju Das */ 9*11696c5eSBiju Das 10*11696c5eSBiju Das #ifndef __RCAR_DU_REGS_H__ 11*11696c5eSBiju Das #define __RCAR_DU_REGS_H__ 12*11696c5eSBiju Das 13*11696c5eSBiju Das #define DU0_REG_OFFSET 0x00000 14*11696c5eSBiju Das #define DU1_REG_OFFSET 0x30000 15*11696c5eSBiju Das #define DU2_REG_OFFSET 0x40000 16*11696c5eSBiju Das #define DU3_REG_OFFSET 0x70000 17*11696c5eSBiju Das 18*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 19*11696c5eSBiju Das * Display Control Registers 20*11696c5eSBiju Das */ 21*11696c5eSBiju Das 22*11696c5eSBiju Das #define DSYSR 0x00000 /* display 1 */ 23*11696c5eSBiju Das #define DSYSR_ILTS (1 << 29) 24*11696c5eSBiju Das #define DSYSR_DSEC (1 << 20) 25*11696c5eSBiju Das #define DSYSR_IUPD (1 << 16) 26*11696c5eSBiju Das #define DSYSR_DRES (1 << 9) 27*11696c5eSBiju Das #define DSYSR_DEN (1 << 8) 28*11696c5eSBiju Das #define DSYSR_TVM_MASTER (0 << 6) 29*11696c5eSBiju Das #define DSYSR_TVM_SWITCH (1 << 6) 30*11696c5eSBiju Das #define DSYSR_TVM_TVSYNC (2 << 6) 31*11696c5eSBiju Das #define DSYSR_TVM_MASK (3 << 6) 32*11696c5eSBiju Das #define DSYSR_SCM_INT_NONE (0 << 4) 33*11696c5eSBiju Das #define DSYSR_SCM_INT_SYNC (2 << 4) 34*11696c5eSBiju Das #define DSYSR_SCM_INT_VIDEO (3 << 4) 35*11696c5eSBiju Das #define DSYSR_SCM_MASK (3 << 4) 36*11696c5eSBiju Das 37*11696c5eSBiju Das #define DSMR 0x00004 38*11696c5eSBiju Das #define DSMR_VSPM (1 << 28) 39*11696c5eSBiju Das #define DSMR_ODPM (1 << 27) 40*11696c5eSBiju Das #define DSMR_DIPM_DISP (0 << 25) 41*11696c5eSBiju Das #define DSMR_DIPM_CSYNC (1 << 25) 42*11696c5eSBiju Das #define DSMR_DIPM_DE (3 << 25) 43*11696c5eSBiju Das #define DSMR_DIPM_MASK (3 << 25) 44*11696c5eSBiju Das #define DSMR_CSPM (1 << 24) 45*11696c5eSBiju Das #define DSMR_DIL (1 << 19) 46*11696c5eSBiju Das #define DSMR_VSL (1 << 18) 47*11696c5eSBiju Das #define DSMR_HSL (1 << 17) 48*11696c5eSBiju Das #define DSMR_DDIS (1 << 16) 49*11696c5eSBiju Das #define DSMR_CDEL (1 << 15) 50*11696c5eSBiju Das #define DSMR_CDEM_CDE (0 << 13) 51*11696c5eSBiju Das #define DSMR_CDEM_LOW (2 << 13) 52*11696c5eSBiju Das #define DSMR_CDEM_HIGH (3 << 13) 53*11696c5eSBiju Das #define DSMR_CDEM_MASK (3 << 13) 54*11696c5eSBiju Das #define DSMR_CDED (1 << 12) 55*11696c5eSBiju Das #define DSMR_ODEV (1 << 8) 56*11696c5eSBiju Das #define DSMR_CSY_VH_OR (0 << 6) 57*11696c5eSBiju Das #define DSMR_CSY_333 (2 << 6) 58*11696c5eSBiju Das #define DSMR_CSY_222 (3 << 6) 59*11696c5eSBiju Das #define DSMR_CSY_MASK (3 << 6) 60*11696c5eSBiju Das 61*11696c5eSBiju Das #define DSSR 0x00008 62*11696c5eSBiju Das #define DSSR_VC1FB_DSA0 (0 << 30) 63*11696c5eSBiju Das #define DSSR_VC1FB_DSA1 (1 << 30) 64*11696c5eSBiju Das #define DSSR_VC1FB_DSA2 (2 << 30) 65*11696c5eSBiju Das #define DSSR_VC1FB_INIT (3 << 30) 66*11696c5eSBiju Das #define DSSR_VC1FB_MASK (3 << 30) 67*11696c5eSBiju Das #define DSSR_VC0FB_DSA0 (0 << 28) 68*11696c5eSBiju Das #define DSSR_VC0FB_DSA1 (1 << 28) 69*11696c5eSBiju Das #define DSSR_VC0FB_DSA2 (2 << 28) 70*11696c5eSBiju Das #define DSSR_VC0FB_INIT (3 << 28) 71*11696c5eSBiju Das #define DSSR_VC0FB_MASK (3 << 28) 72*11696c5eSBiju Das #define DSSR_DFB(n) (1 << ((n)+15)) 73*11696c5eSBiju Das #define DSSR_TVR (1 << 15) 74*11696c5eSBiju Das #define DSSR_FRM (1 << 14) 75*11696c5eSBiju Das #define DSSR_VBK (1 << 11) 76*11696c5eSBiju Das #define DSSR_RINT (1 << 9) 77*11696c5eSBiju Das #define DSSR_HBK (1 << 8) 78*11696c5eSBiju Das #define DSSR_ADC(n) (1 << ((n)-1)) 79*11696c5eSBiju Das 80*11696c5eSBiju Das #define DSRCR 0x0000c 81*11696c5eSBiju Das #define DSRCR_TVCL (1 << 15) 82*11696c5eSBiju Das #define DSRCR_FRCL (1 << 14) 83*11696c5eSBiju Das #define DSRCR_VBCL (1 << 11) 84*11696c5eSBiju Das #define DSRCR_RICL (1 << 9) 85*11696c5eSBiju Das #define DSRCR_HBCL (1 << 8) 86*11696c5eSBiju Das #define DSRCR_ADCL(n) (1 << ((n)-1)) 87*11696c5eSBiju Das #define DSRCR_MASK 0x0000cbff 88*11696c5eSBiju Das 89*11696c5eSBiju Das #define DIER 0x00010 90*11696c5eSBiju Das #define DIER_TVE (1 << 15) 91*11696c5eSBiju Das #define DIER_FRE (1 << 14) 92*11696c5eSBiju Das #define DIER_VBE (1 << 11) 93*11696c5eSBiju Das #define DIER_RIE (1 << 9) 94*11696c5eSBiju Das #define DIER_HBE (1 << 8) 95*11696c5eSBiju Das #define DIER_ADCE(n) (1 << ((n)-1)) 96*11696c5eSBiju Das 97*11696c5eSBiju Das #define CPCR 0x00014 98*11696c5eSBiju Das #define CPCR_CP4CE (1 << 19) 99*11696c5eSBiju Das #define CPCR_CP3CE (1 << 18) 100*11696c5eSBiju Das #define CPCR_CP2CE (1 << 17) 101*11696c5eSBiju Das #define CPCR_CP1CE (1 << 16) 102*11696c5eSBiju Das 103*11696c5eSBiju Das #define DPPR 0x00018 104*11696c5eSBiju Das #define DPPR_DPE(n) (1 << ((n)*4-1)) 105*11696c5eSBiju Das #define DPPR_DPS(n, p) (((p)-1) << DPPR_DPS_SHIFT(n)) 106*11696c5eSBiju Das #define DPPR_DPS_SHIFT(n) (((n)-1)*4) 107*11696c5eSBiju Das #define DPPR_BPP16 (DPPR_DPE(8) | DPPR_DPS(8, 1)) /* plane1 */ 108*11696c5eSBiju Das #define DPPR_BPP32_P1 (DPPR_DPE(7) | DPPR_DPS(7, 1)) 109*11696c5eSBiju Das #define DPPR_BPP32_P2 (DPPR_DPE(8) | DPPR_DPS(8, 2)) 110*11696c5eSBiju Das #define DPPR_BPP32 (DPPR_BPP32_P1 | DPPR_BPP32_P2) /* plane1 & 2 */ 111*11696c5eSBiju Das 112*11696c5eSBiju Das #define DEFR 0x00020 113*11696c5eSBiju Das #define DEFR_CODE (0x7773 << 16) 114*11696c5eSBiju Das #define DEFR_EXSL (1 << 12) 115*11696c5eSBiju Das #define DEFR_EXVL (1 << 11) 116*11696c5eSBiju Das #define DEFR_EXUP (1 << 5) 117*11696c5eSBiju Das #define DEFR_VCUP (1 << 4) 118*11696c5eSBiju Das #define DEFR_DEFE (1 << 0) 119*11696c5eSBiju Das 120*11696c5eSBiju Das #define DAPCR 0x00024 121*11696c5eSBiju Das #define DAPCR_CODE (0x7773 << 16) 122*11696c5eSBiju Das #define DAPCR_AP2E (1 << 4) 123*11696c5eSBiju Das #define DAPCR_AP1E (1 << 0) 124*11696c5eSBiju Das 125*11696c5eSBiju Das #define DCPCR 0x00028 126*11696c5eSBiju Das #define DCPCR_CODE (0x7773 << 16) 127*11696c5eSBiju Das #define DCPCR_CA2B (1 << 13) 128*11696c5eSBiju Das #define DCPCR_CD2F (1 << 12) 129*11696c5eSBiju Das #define DCPCR_DC2E (1 << 8) 130*11696c5eSBiju Das #define DCPCR_CAB (1 << 5) 131*11696c5eSBiju Das #define DCPCR_CDF (1 << 4) 132*11696c5eSBiju Das #define DCPCR_DCE (1 << 0) 133*11696c5eSBiju Das 134*11696c5eSBiju Das #define DEFR2 0x00034 135*11696c5eSBiju Das #define DEFR2_CODE (0x7775 << 16) 136*11696c5eSBiju Das #define DEFR2_DEFE2G (1 << 0) 137*11696c5eSBiju Das 138*11696c5eSBiju Das #define DEFR3 0x00038 139*11696c5eSBiju Das #define DEFR3_CODE (0x7776 << 16) 140*11696c5eSBiju Das #define DEFR3_EVDA (1 << 14) 141*11696c5eSBiju Das #define DEFR3_EVDM_1 (1 << 12) 142*11696c5eSBiju Das #define DEFR3_EVDM_2 (2 << 12) 143*11696c5eSBiju Das #define DEFR3_EVDM_3 (3 << 12) 144*11696c5eSBiju Das #define DEFR3_VMSM2_EMA (1 << 6) 145*11696c5eSBiju Das #define DEFR3_VMSM1_ENA (1 << 4) 146*11696c5eSBiju Das #define DEFR3_DEFE3 (1 << 0) 147*11696c5eSBiju Das 148*11696c5eSBiju Das #define DEFR4 0x0003c 149*11696c5eSBiju Das #define DEFR4_CODE (0x7777 << 16) 150*11696c5eSBiju Das #define DEFR4_LRUO (1 << 5) 151*11696c5eSBiju Das #define DEFR4_SPCE (1 << 4) 152*11696c5eSBiju Das 153*11696c5eSBiju Das #define DVCSR 0x000d0 154*11696c5eSBiju Das #define DVCSR_VCnFB2_DSA0(n) (0 << ((n)*2+16)) 155*11696c5eSBiju Das #define DVCSR_VCnFB2_DSA1(n) (1 << ((n)*2+16)) 156*11696c5eSBiju Das #define DVCSR_VCnFB2_DSA2(n) (2 << ((n)*2+16)) 157*11696c5eSBiju Das #define DVCSR_VCnFB2_INIT(n) (3 << ((n)*2+16)) 158*11696c5eSBiju Das #define DVCSR_VCnFB2_MASK(n) (3 << ((n)*2+16)) 159*11696c5eSBiju Das #define DVCSR_VCnFB_DSA0(n) (0 << ((n)*2)) 160*11696c5eSBiju Das #define DVCSR_VCnFB_DSA1(n) (1 << ((n)*2)) 161*11696c5eSBiju Das #define DVCSR_VCnFB_DSA2(n) (2 << ((n)*2)) 162*11696c5eSBiju Das #define DVCSR_VCnFB_INIT(n) (3 << ((n)*2)) 163*11696c5eSBiju Das #define DVCSR_VCnFB_MASK(n) (3 << ((n)*2)) 164*11696c5eSBiju Das 165*11696c5eSBiju Das #define DEFR5 0x000e0 166*11696c5eSBiju Das #define DEFR5_CODE (0x66 << 24) 167*11696c5eSBiju Das #define DEFR5_YCRGB2_DIS (0 << 14) 168*11696c5eSBiju Das #define DEFR5_YCRGB2_PRI1 (1 << 14) 169*11696c5eSBiju Das #define DEFR5_YCRGB2_PRI2 (2 << 14) 170*11696c5eSBiju Das #define DEFR5_YCRGB2_PRI3 (3 << 14) 171*11696c5eSBiju Das #define DEFR5_YCRGB2_MASK (3 << 14) 172*11696c5eSBiju Das #define DEFR5_YCRGB1_DIS (0 << 12) 173*11696c5eSBiju Das #define DEFR5_YCRGB1_PRI1 (1 << 12) 174*11696c5eSBiju Das #define DEFR5_YCRGB1_PRI2 (2 << 12) 175*11696c5eSBiju Das #define DEFR5_YCRGB1_PRI3 (3 << 12) 176*11696c5eSBiju Das #define DEFR5_YCRGB1_MASK (3 << 12) 177*11696c5eSBiju Das #define DEFR5_DEFE5 (1 << 0) 178*11696c5eSBiju Das 179*11696c5eSBiju Das #define DDLTR 0x000e4 180*11696c5eSBiju Das #define DDLTR_CODE (0x7766 << 16) 181*11696c5eSBiju Das #define DDLTR_DLAR2 (1 << 6) 182*11696c5eSBiju Das #define DDLTR_DLAY2 (1 << 5) 183*11696c5eSBiju Das #define DDLTR_DLAY1 (1 << 1) 184*11696c5eSBiju Das 185*11696c5eSBiju Das #define DEFR6 0x000e8 186*11696c5eSBiju Das #define DEFR6_CODE (0x7778 << 16) 187*11696c5eSBiju Das #define DEFR6_ODPM12_DSMR (0 << 10) 188*11696c5eSBiju Das #define DEFR6_ODPM12_DISP (2 << 10) 189*11696c5eSBiju Das #define DEFR6_ODPM12_CDE (3 << 10) 190*11696c5eSBiju Das #define DEFR6_ODPM12_MASK (3 << 10) 191*11696c5eSBiju Das #define DEFR6_ODPM02_DSMR (0 << 8) 192*11696c5eSBiju Das #define DEFR6_ODPM02_DISP (2 << 8) 193*11696c5eSBiju Das #define DEFR6_ODPM02_CDE (3 << 8) 194*11696c5eSBiju Das #define DEFR6_ODPM02_MASK (3 << 8) 195*11696c5eSBiju Das #define DEFR6_TCNE1 (1 << 6) 196*11696c5eSBiju Das #define DEFR6_TCNE0 (1 << 4) 197*11696c5eSBiju Das #define DEFR6_MLOS1 (1 << 2) 198*11696c5eSBiju Das #define DEFR6_DEFAULT (DEFR6_CODE | DEFR6_TCNE1) 199*11696c5eSBiju Das 200*11696c5eSBiju Das #define DEFR7 0x000ec 201*11696c5eSBiju Das #define DEFR7_CODE (0x7779 << 16) 202*11696c5eSBiju Das #define DEFR7_CMME1 BIT(6) 203*11696c5eSBiju Das #define DEFR7_CMME0 BIT(4) 204*11696c5eSBiju Das 205*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 206*11696c5eSBiju Das * R8A7790-only Control Registers 207*11696c5eSBiju Das */ 208*11696c5eSBiju Das 209*11696c5eSBiju Das #define DD1SSR 0x20008 210*11696c5eSBiju Das #define DD1SSR_TVR (1 << 15) 211*11696c5eSBiju Das #define DD1SSR_FRM (1 << 14) 212*11696c5eSBiju Das #define DD1SSR_BUF (1 << 12) 213*11696c5eSBiju Das #define DD1SSR_VBK (1 << 11) 214*11696c5eSBiju Das #define DD1SSR_RINT (1 << 9) 215*11696c5eSBiju Das #define DD1SSR_HBK (1 << 8) 216*11696c5eSBiju Das #define DD1SSR_ADC(n) (1 << ((n)-1)) 217*11696c5eSBiju Das 218*11696c5eSBiju Das #define DD1SRCR 0x2000c 219*11696c5eSBiju Das #define DD1SRCR_TVR (1 << 15) 220*11696c5eSBiju Das #define DD1SRCR_FRM (1 << 14) 221*11696c5eSBiju Das #define DD1SRCR_BUF (1 << 12) 222*11696c5eSBiju Das #define DD1SRCR_VBK (1 << 11) 223*11696c5eSBiju Das #define DD1SRCR_RINT (1 << 9) 224*11696c5eSBiju Das #define DD1SRCR_HBK (1 << 8) 225*11696c5eSBiju Das #define DD1SRCR_ADC(n) (1 << ((n)-1)) 226*11696c5eSBiju Das 227*11696c5eSBiju Das #define DD1IER 0x20010 228*11696c5eSBiju Das #define DD1IER_TVR (1 << 15) 229*11696c5eSBiju Das #define DD1IER_FRM (1 << 14) 230*11696c5eSBiju Das #define DD1IER_BUF (1 << 12) 231*11696c5eSBiju Das #define DD1IER_VBK (1 << 11) 232*11696c5eSBiju Das #define DD1IER_RINT (1 << 9) 233*11696c5eSBiju Das #define DD1IER_HBK (1 << 8) 234*11696c5eSBiju Das #define DD1IER_ADC(n) (1 << ((n)-1)) 235*11696c5eSBiju Das 236*11696c5eSBiju Das #define DEFR8 0x20020 237*11696c5eSBiju Das #define DEFR8_CODE (0x7790 << 16) 238*11696c5eSBiju Das #define DEFR8_VSCS (1 << 6) 239*11696c5eSBiju Das #define DEFR8_DRGBS_DU(n) ((n) << 4) 240*11696c5eSBiju Das #define DEFR8_DRGBS_MASK (3 << 4) 241*11696c5eSBiju Das #define DEFR8_DEFE8 (1 << 0) 242*11696c5eSBiju Das 243*11696c5eSBiju Das #define DOFLR 0x20024 244*11696c5eSBiju Das #define DOFLR_CODE (0x7790 << 16) 245*11696c5eSBiju Das #define DOFLR_HSYCFL1 (1 << 13) 246*11696c5eSBiju Das #define DOFLR_VSYCFL1 (1 << 12) 247*11696c5eSBiju Das #define DOFLR_ODDFL1 (1 << 11) 248*11696c5eSBiju Das #define DOFLR_DISPFL1 (1 << 10) 249*11696c5eSBiju Das #define DOFLR_CDEFL1 (1 << 9) 250*11696c5eSBiju Das #define DOFLR_RGBFL1 (1 << 8) 251*11696c5eSBiju Das #define DOFLR_HSYCFL0 (1 << 5) 252*11696c5eSBiju Das #define DOFLR_VSYCFL0 (1 << 4) 253*11696c5eSBiju Das #define DOFLR_ODDFL0 (1 << 3) 254*11696c5eSBiju Das #define DOFLR_DISPFL0 (1 << 2) 255*11696c5eSBiju Das #define DOFLR_CDEFL0 (1 << 1) 256*11696c5eSBiju Das #define DOFLR_RGBFL0 (1 << 0) 257*11696c5eSBiju Das 258*11696c5eSBiju Das #define DIDSR 0x20028 259*11696c5eSBiju Das #define DIDSR_CODE (0x7790 << 16) 260*11696c5eSBiju Das #define DIDSR_LDCS_DCLKIN(n) (0 << (8 + (n) * 2)) 261*11696c5eSBiju Das #define DIDSR_LDCS_DSI(n) (2 << (8 + (n) * 2)) /* V3U only */ 262*11696c5eSBiju Das #define DIDSR_LDCS_LVDS0(n) (2 << (8 + (n) * 2)) 263*11696c5eSBiju Das #define DIDSR_LDCS_LVDS1(n) (3 << (8 + (n) * 2)) 264*11696c5eSBiju Das #define DIDSR_LDCS_MASK(n) (3 << (8 + (n) * 2)) 265*11696c5eSBiju Das #define DIDSR_PDCS_CLK(n, clk) (clk << ((n) * 2)) 266*11696c5eSBiju Das #define DIDSR_PDCS_MASK(n) (3 << ((n) * 2)) 267*11696c5eSBiju Das 268*11696c5eSBiju Das #define DEFR10 0x20038 269*11696c5eSBiju Das #define DEFR10_CODE (0x7795 << 16) 270*11696c5eSBiju Das #define DEFR10_VSPF1_RGB (0 << 14) 271*11696c5eSBiju Das #define DEFR10_VSPF1_YC (1 << 14) 272*11696c5eSBiju Das #define DEFR10_DOCF1_RGB (0 << 12) 273*11696c5eSBiju Das #define DEFR10_DOCF1_YC (1 << 12) 274*11696c5eSBiju Das #define DEFR10_YCDF0_YCBCR444 (0 << 11) 275*11696c5eSBiju Das #define DEFR10_YCDF0_YCBCR422 (1 << 11) 276*11696c5eSBiju Das #define DEFR10_VSPF0_RGB (0 << 10) 277*11696c5eSBiju Das #define DEFR10_VSPF0_YC (1 << 10) 278*11696c5eSBiju Das #define DEFR10_DOCF0_RGB (0 << 8) 279*11696c5eSBiju Das #define DEFR10_DOCF0_YC (1 << 8) 280*11696c5eSBiju Das #define DEFR10_TSEL_H3_TCON1 (0 << 1) /* DEFR102 register only (DU2/DU3) */ 281*11696c5eSBiju Das #define DEFR10_DEFE10 (1 << 0) 282*11696c5eSBiju Das 283*11696c5eSBiju Das #define DPLLCR 0x20044 284*11696c5eSBiju Das #define DPLLCR_CODE (0x95 << 24) 285*11696c5eSBiju Das #define DPLLCR_PLCS1 (1 << 23) 286*11696c5eSBiju Das #define DPLLCR_PLCS0 (1 << 21) 287*11696c5eSBiju Das #define DPLLCR_CLKE (1 << 18) 288*11696c5eSBiju Das #define DPLLCR_FDPLL(n) ((n) << 12) 289*11696c5eSBiju Das #define DPLLCR_N(n) ((n) << 5) 290*11696c5eSBiju Das #define DPLLCR_M(n) ((n) << 3) 291*11696c5eSBiju Das #define DPLLCR_STBY (1 << 2) 292*11696c5eSBiju Das #define DPLLCR_INCS_DOTCLKIN0 (0 << 0) 293*11696c5eSBiju Das #define DPLLCR_INCS_DOTCLKIN1 (1 << 1) 294*11696c5eSBiju Das 295*11696c5eSBiju Das #define DPLLC2R 0x20048 296*11696c5eSBiju Das #define DPLLC2R_CODE (0x95 << 24) 297*11696c5eSBiju Das #define DPLLC2R_SELC (1 << 12) 298*11696c5eSBiju Das #define DPLLC2R_M(n) ((n) << 8) 299*11696c5eSBiju Das #define DPLLC2R_FDPLL(n) ((n) << 0) 300*11696c5eSBiju Das 301*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 302*11696c5eSBiju Das * Display Timing Generation Registers 303*11696c5eSBiju Das */ 304*11696c5eSBiju Das 305*11696c5eSBiju Das #define HDSR 0x00040 306*11696c5eSBiju Das #define HDER 0x00044 307*11696c5eSBiju Das #define VDSR 0x00048 308*11696c5eSBiju Das #define VDER 0x0004c 309*11696c5eSBiju Das #define HCR 0x00050 310*11696c5eSBiju Das #define HSWR 0x00054 311*11696c5eSBiju Das #define VCR 0x00058 312*11696c5eSBiju Das #define VSPR 0x0005c 313*11696c5eSBiju Das #define EQWR 0x00060 314*11696c5eSBiju Das #define SPWR 0x00064 315*11696c5eSBiju Das #define CLAMPSR 0x00070 316*11696c5eSBiju Das #define CLAMPWR 0x00074 317*11696c5eSBiju Das #define DESR 0x00078 318*11696c5eSBiju Das #define DEWR 0x0007c 319*11696c5eSBiju Das 320*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 321*11696c5eSBiju Das * Display Attribute Registers 322*11696c5eSBiju Das */ 323*11696c5eSBiju Das 324*11696c5eSBiju Das #define CP1TR 0x00080 325*11696c5eSBiju Das #define CP2TR 0x00084 326*11696c5eSBiju Das #define CP3TR 0x00088 327*11696c5eSBiju Das #define CP4TR 0x0008c 328*11696c5eSBiju Das 329*11696c5eSBiju Das #define DOOR 0x00090 330*11696c5eSBiju Das #define DOOR_RGB(r, g, b) (((r) << 18) | ((g) << 10) | ((b) << 2)) 331*11696c5eSBiju Das #define CDER 0x00094 332*11696c5eSBiju Das #define CDER_RGB(r, g, b) (((r) << 18) | ((g) << 10) | ((b) << 2)) 333*11696c5eSBiju Das #define BPOR 0x00098 334*11696c5eSBiju Das #define BPOR_RGB(r, g, b) (((r) << 18) | ((g) << 10) | ((b) << 2)) 335*11696c5eSBiju Das 336*11696c5eSBiju Das #define RINTOFSR 0x0009c 337*11696c5eSBiju Das 338*11696c5eSBiju Das #define DSHPR 0x000c8 339*11696c5eSBiju Das #define DSHPR_CODE (0x7776 << 16) 340*11696c5eSBiju Das #define DSHPR_PRIH (0xa << 4) 341*11696c5eSBiju Das #define DSHPR_PRIL_BPP16 (0x8 << 0) 342*11696c5eSBiju Das #define DSHPR_PRIL_BPP32 (0x9 << 0) 343*11696c5eSBiju Das 344*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 345*11696c5eSBiju Das * Display Plane Registers 346*11696c5eSBiju Das */ 347*11696c5eSBiju Das 348*11696c5eSBiju Das #define PLANE_OFF 0x00100 349*11696c5eSBiju Das 350*11696c5eSBiju Das #define PnMR 0x00100 /* plane 1 */ 351*11696c5eSBiju Das #define PnMR_VISL_VIN0 (0 << 26) /* use Video Input 0 */ 352*11696c5eSBiju Das #define PnMR_VISL_VIN1 (1 << 26) /* use Video Input 1 */ 353*11696c5eSBiju Das #define PnMR_VISL_VIN2 (2 << 26) /* use Video Input 2 */ 354*11696c5eSBiju Das #define PnMR_VISL_VIN3 (3 << 26) /* use Video Input 3 */ 355*11696c5eSBiju Das #define PnMR_YCDF_YUYV (1 << 20) /* YUYV format */ 356*11696c5eSBiju Das #define PnMR_TC_R (0 << 17) /* Tranparent color is PnTC1R */ 357*11696c5eSBiju Das #define PnMR_TC_CP (1 << 17) /* Tranparent color is color palette */ 358*11696c5eSBiju Das #define PnMR_WAE (1 << 16) /* Wrap around Enable */ 359*11696c5eSBiju Das #define PnMR_SPIM_TP (0 << 12) /* Transparent Color */ 360*11696c5eSBiju Das #define PnMR_SPIM_ALP (1 << 12) /* Alpha Blending */ 361*11696c5eSBiju Das #define PnMR_SPIM_EOR (2 << 12) /* EOR */ 362*11696c5eSBiju Das #define PnMR_SPIM_TP_OFF (1 << 14) /* No Transparent Color */ 363*11696c5eSBiju Das #define PnMR_CPSL_CP1 (0 << 8) /* Color Palette selected 1 */ 364*11696c5eSBiju Das #define PnMR_CPSL_CP2 (1 << 8) /* Color Palette selected 2 */ 365*11696c5eSBiju Das #define PnMR_CPSL_CP3 (2 << 8) /* Color Palette selected 3 */ 366*11696c5eSBiju Das #define PnMR_CPSL_CP4 (3 << 8) /* Color Palette selected 4 */ 367*11696c5eSBiju Das #define PnMR_DC (1 << 7) /* Display Area Change */ 368*11696c5eSBiju Das #define PnMR_BM_MD (0 << 4) /* Manual Display Change Mode */ 369*11696c5eSBiju Das #define PnMR_BM_AR (1 << 4) /* Auto Rendering Mode */ 370*11696c5eSBiju Das #define PnMR_BM_AD (2 << 4) /* Auto Display Change Mode */ 371*11696c5eSBiju Das #define PnMR_BM_VC (3 << 4) /* Video Capture Mode */ 372*11696c5eSBiju Das #define PnMR_DDDF_8BPP (0 << 0) /* 8bit */ 373*11696c5eSBiju Das #define PnMR_DDDF_16BPP (1 << 0) /* 16bit or 32bit */ 374*11696c5eSBiju Das #define PnMR_DDDF_ARGB (2 << 0) /* ARGB */ 375*11696c5eSBiju Das #define PnMR_DDDF_YC (3 << 0) /* YC */ 376*11696c5eSBiju Das #define PnMR_DDDF_MASK (3 << 0) 377*11696c5eSBiju Das 378*11696c5eSBiju Das #define PnMWR 0x00104 379*11696c5eSBiju Das 380*11696c5eSBiju Das #define PnALPHAR 0x00108 381*11696c5eSBiju Das #define PnALPHAR_ABIT_1 (0 << 12) 382*11696c5eSBiju Das #define PnALPHAR_ABIT_0 (1 << 12) 383*11696c5eSBiju Das #define PnALPHAR_ABIT_X (2 << 12) 384*11696c5eSBiju Das 385*11696c5eSBiju Das #define PnDSXR 0x00110 386*11696c5eSBiju Das #define PnDSYR 0x00114 387*11696c5eSBiju Das #define PnDPXR 0x00118 388*11696c5eSBiju Das #define PnDPYR 0x0011c 389*11696c5eSBiju Das 390*11696c5eSBiju Das #define PnDSA0R 0x00120 391*11696c5eSBiju Das #define PnDSA1R 0x00124 392*11696c5eSBiju Das #define PnDSA2R 0x00128 393*11696c5eSBiju Das #define PnDSA_MASK 0xfffffff0 394*11696c5eSBiju Das 395*11696c5eSBiju Das #define PnSPXR 0x00130 396*11696c5eSBiju Das #define PnSPYR 0x00134 397*11696c5eSBiju Das #define PnWASPR 0x00138 398*11696c5eSBiju Das #define PnWAMWR 0x0013c 399*11696c5eSBiju Das 400*11696c5eSBiju Das #define PnBTR 0x00140 401*11696c5eSBiju Das 402*11696c5eSBiju Das #define PnTC1R 0x00144 403*11696c5eSBiju Das #define PnTC2R 0x00148 404*11696c5eSBiju Das #define PnTC3R 0x0014c 405*11696c5eSBiju Das #define PnTC3R_CODE (0x66 << 24) 406*11696c5eSBiju Das 407*11696c5eSBiju Das #define PnMLR 0x00150 408*11696c5eSBiju Das 409*11696c5eSBiju Das #define PnSWAPR 0x00180 410*11696c5eSBiju Das #define PnSWAPR_DIGN (1 << 4) 411*11696c5eSBiju Das #define PnSWAPR_SPQW (1 << 3) 412*11696c5eSBiju Das #define PnSWAPR_SPLW (1 << 2) 413*11696c5eSBiju Das #define PnSWAPR_SPWD (1 << 1) 414*11696c5eSBiju Das #define PnSWAPR_SPBY (1 << 0) 415*11696c5eSBiju Das 416*11696c5eSBiju Das #define PnDDCR 0x00184 417*11696c5eSBiju Das #define PnDDCR_CODE (0x7775 << 16) 418*11696c5eSBiju Das #define PnDDCR_LRGB1 (1 << 11) 419*11696c5eSBiju Das #define PnDDCR_LRGB0 (1 << 10) 420*11696c5eSBiju Das 421*11696c5eSBiju Das #define PnDDCR2 0x00188 422*11696c5eSBiju Das #define PnDDCR2_CODE (0x7776 << 16) 423*11696c5eSBiju Das #define PnDDCR2_NV21 (1 << 5) 424*11696c5eSBiju Das #define PnDDCR2_Y420 (1 << 4) 425*11696c5eSBiju Das #define PnDDCR2_DIVU (1 << 1) 426*11696c5eSBiju Das #define PnDDCR2_DIVY (1 << 0) 427*11696c5eSBiju Das 428*11696c5eSBiju Das #define PnDDCR4 0x00190 429*11696c5eSBiju Das #define PnDDCR4_CODE (0x7766 << 16) 430*11696c5eSBiju Das #define PnDDCR4_VSPS (1 << 13) 431*11696c5eSBiju Das #define PnDDCR4_SDFS_RGB (0 << 4) 432*11696c5eSBiju Das #define PnDDCR4_SDFS_YC (5 << 4) 433*11696c5eSBiju Das #define PnDDCR4_SDFS_MASK (7 << 4) 434*11696c5eSBiju Das #define PnDDCR4_EDF_NONE (0 << 0) 435*11696c5eSBiju Das #define PnDDCR4_EDF_ARGB8888 (1 << 0) 436*11696c5eSBiju Das #define PnDDCR4_EDF_RGB888 (2 << 0) 437*11696c5eSBiju Das #define PnDDCR4_EDF_RGB666 (3 << 0) 438*11696c5eSBiju Das #define PnDDCR4_EDF_MASK (7 << 0) 439*11696c5eSBiju Das 440*11696c5eSBiju Das #define APnMR 0x0a100 441*11696c5eSBiju Das #define APnMR_WAE (1 << 16) /* Wrap around Enable */ 442*11696c5eSBiju Das #define APnMR_DC (1 << 7) /* Display Area Change */ 443*11696c5eSBiju Das #define APnMR_BM_MD (0 << 4) /* Manual Display Change Mode */ 444*11696c5eSBiju Das #define APnMR_BM_AD (2 << 4) /* Auto Display Change Mode */ 445*11696c5eSBiju Das 446*11696c5eSBiju Das #define APnMWR 0x0a104 447*11696c5eSBiju Das 448*11696c5eSBiju Das #define APnDSXR 0x0a110 449*11696c5eSBiju Das #define APnDSYR 0x0a114 450*11696c5eSBiju Das #define APnDPXR 0x0a118 451*11696c5eSBiju Das #define APnDPYR 0x0a11c 452*11696c5eSBiju Das 453*11696c5eSBiju Das #define APnDSA0R 0x0a120 454*11696c5eSBiju Das #define APnDSA1R 0x0a124 455*11696c5eSBiju Das #define APnDSA2R 0x0a128 456*11696c5eSBiju Das 457*11696c5eSBiju Das #define APnSPXR 0x0a130 458*11696c5eSBiju Das #define APnSPYR 0x0a134 459*11696c5eSBiju Das #define APnWASPR 0x0a138 460*11696c5eSBiju Das #define APnWAMWR 0x0a13c 461*11696c5eSBiju Das 462*11696c5eSBiju Das #define APnBTR 0x0a140 463*11696c5eSBiju Das 464*11696c5eSBiju Das #define APnMLR 0x0a150 465*11696c5eSBiju Das #define APnSWAPR 0x0a180 466*11696c5eSBiju Das 467*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 468*11696c5eSBiju Das * Display Capture Registers 469*11696c5eSBiju Das */ 470*11696c5eSBiju Das 471*11696c5eSBiju Das #define DCMR 0x0c100 472*11696c5eSBiju Das #define DCMWR 0x0c104 473*11696c5eSBiju Das #define DCSAR 0x0c120 474*11696c5eSBiju Das #define DCMLR 0x0c150 475*11696c5eSBiju Das 476*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 477*11696c5eSBiju Das * Color Palette Registers 478*11696c5eSBiju Das */ 479*11696c5eSBiju Das 480*11696c5eSBiju Das #define CP1_000R 0x01000 481*11696c5eSBiju Das #define CP1_255R 0x013fc 482*11696c5eSBiju Das #define CP2_000R 0x02000 483*11696c5eSBiju Das #define CP2_255R 0x023fc 484*11696c5eSBiju Das #define CP3_000R 0x03000 485*11696c5eSBiju Das #define CP3_255R 0x033fc 486*11696c5eSBiju Das #define CP4_000R 0x04000 487*11696c5eSBiju Das #define CP4_255R 0x043fc 488*11696c5eSBiju Das 489*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 490*11696c5eSBiju Das * External Synchronization Control Registers 491*11696c5eSBiju Das */ 492*11696c5eSBiju Das 493*11696c5eSBiju Das #define ESCR02 0x10000 494*11696c5eSBiju Das #define ESCR13 0x01000 495*11696c5eSBiju Das #define ESCR_DCLKOINV (1 << 25) 496*11696c5eSBiju Das #define ESCR_DCLKSEL_DCLKIN (0 << 20) 497*11696c5eSBiju Das #define ESCR_DCLKSEL_CLKS (1 << 20) 498*11696c5eSBiju Das #define ESCR_DCLKSEL_MASK (1 << 20) 499*11696c5eSBiju Das #define ESCR_DCLKDIS (1 << 16) 500*11696c5eSBiju Das #define ESCR_SYNCSEL_OFF (0 << 8) 501*11696c5eSBiju Das #define ESCR_SYNCSEL_EXVSYNC (2 << 8) 502*11696c5eSBiju Das #define ESCR_SYNCSEL_EXHSYNC (3 << 8) 503*11696c5eSBiju Das #define ESCR_FRQSEL_MASK (0x3f << 0) 504*11696c5eSBiju Das 505*11696c5eSBiju Das #define OTAR02 0x10004 506*11696c5eSBiju Das #define OTAR13 0x01004 507*11696c5eSBiju Das 508*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 509*11696c5eSBiju Das * Dual Display Output Control Registers 510*11696c5eSBiju Das */ 511*11696c5eSBiju Das 512*11696c5eSBiju Das #define DORCR 0x11000 513*11696c5eSBiju Das #define DORCR_PG1T (1 << 30) 514*11696c5eSBiju Das #define DORCR_DK1S (1 << 28) 515*11696c5eSBiju Das #define DORCR_PG1D_DS0 (0 << 24) 516*11696c5eSBiju Das #define DORCR_PG1D_DS1 (1 << 24) 517*11696c5eSBiju Das #define DORCR_PG1D_FIX0 (2 << 24) 518*11696c5eSBiju Das #define DORCR_PG1D_DOOR (3 << 24) 519*11696c5eSBiju Das #define DORCR_PG1D_MASK (3 << 24) 520*11696c5eSBiju Das #define DORCR_DR0D (1 << 21) 521*11696c5eSBiju Das #define DORCR_PG0D_DS0 (0 << 16) 522*11696c5eSBiju Das #define DORCR_PG0D_DS1 (1 << 16) 523*11696c5eSBiju Das #define DORCR_PG0D_FIX0 (2 << 16) 524*11696c5eSBiju Das #define DORCR_PG0D_DOOR (3 << 16) 525*11696c5eSBiju Das #define DORCR_PG0D_MASK (3 << 16) 526*11696c5eSBiju Das #define DORCR_RGPV (1 << 4) 527*11696c5eSBiju Das #define DORCR_DPRS (1 << 0) 528*11696c5eSBiju Das 529*11696c5eSBiju Das #define DPTSR 0x11004 530*11696c5eSBiju Das #define DPTSR_PnDK(n) (1 << ((n) + 16)) 531*11696c5eSBiju Das #define DPTSR_PnTS(n) (1 << (n)) 532*11696c5eSBiju Das 533*11696c5eSBiju Das #define DAPTSR 0x11008 534*11696c5eSBiju Das #define DAPTSR_APnDK(n) (1 << ((n) + 16)) 535*11696c5eSBiju Das #define DAPTSR_APnTS(n) (1 << (n)) 536*11696c5eSBiju Das 537*11696c5eSBiju Das #define DS1PR 0x11020 538*11696c5eSBiju Das #define DS2PR 0x11024 539*11696c5eSBiju Das 540*11696c5eSBiju Das /* ----------------------------------------------------------------------------- 541*11696c5eSBiju Das * YC-RGB Conversion Coefficient Registers 542*11696c5eSBiju Das */ 543*11696c5eSBiju Das 544*11696c5eSBiju Das #define YNCR 0x11080 545*11696c5eSBiju Das #define YNOR 0x11084 546*11696c5eSBiju Das #define CRNOR 0x11088 547*11696c5eSBiju Das #define CBNOR 0x1108c 548*11696c5eSBiju Das #define RCRCR 0x11090 549*11696c5eSBiju Das #define GCRCR 0x11094 550*11696c5eSBiju Das #define GCBCR 0x11098 551*11696c5eSBiju Das #define BCBCR 0x1109c 552*11696c5eSBiju Das 553*11696c5eSBiju Das #endif /* __RCAR_DU_REGS_H__ */ 554