Go to the documentation of this file. 1 #ifndef __ASM_ARCH_REGS_LCD_H
2 #define __ASM_ARCH_REGS_LCD_H
4 #include <mach/bitfield.h>
18 #define TMEDRGBR (0x040)
19 #define TMEDCR (0x044)
29 #define OVL1C1 (0x050)
30 #define OVL1C2 (0x060)
31 #define OVL2C1 (0x070)
32 #define OVL2C2 (0x080)
37 #define LCCR3_BPP(x) ((((x) & 0x7) << 24) | (((x) & 0x8) ? (1 << 29) : 0))
39 #define LCCR3_PDFOR_0 (0 << 30)
40 #define LCCR3_PDFOR_1 (1 << 30)
41 #define LCCR3_PDFOR_2 (2 << 30)
42 #define LCCR3_PDFOR_3 (3 << 30)
44 #define LCCR4_PAL_FOR_0 (0 << 15)
45 #define LCCR4_PAL_FOR_1 (1 << 15)
46 #define LCCR4_PAL_FOR_2 (2 << 15)
47 #define LCCR4_PAL_FOR_3 (3 << 15)
48 #define LCCR4_PAL_FOR_MASK (3 << 15)
50 #define FDADR0 (0x200)
51 #define FDADR1 (0x210)
52 #define FDADR2 (0x220)
53 #define FDADR3 (0x230)
54 #define FDADR4 (0x240)
55 #define FDADR5 (0x250)
56 #define FDADR6 (0x260)
58 #define LCCR0_ENB (1 << 0)
59 #define LCCR0_CMS (1 << 1)
60 #define LCCR0_Color (LCCR0_CMS*0)
61 #define LCCR0_Mono (LCCR0_CMS*1)
62 #define LCCR0_SDS (1 << 2)
63 #define LCCR0_Sngl (LCCR0_SDS*0)
64 #define LCCR0_Dual (LCCR0_SDS*1)
66 #define LCCR0_LDM (1 << 3)
67 #define LCCR0_SFM (1 << 4)
68 #define LCCR0_IUM (1 << 5)
69 #define LCCR0_EFM (1 << 6)
70 #define LCCR0_PAS (1 << 7)
71 #define LCCR0_Pas (LCCR0_PAS*0)
72 #define LCCR0_Act (LCCR0_PAS*1)
73 #define LCCR0_DPD (1 << 9)
74 #define LCCR0_4PixMono (LCCR0_DPD*0)
75 #define LCCR0_8PixMono (LCCR0_DPD*1)
76 #define LCCR0_DIS (1 << 10)
77 #define LCCR0_QDM (1 << 11)
78 #define LCCR0_PDD (0xff << 12)
79 #define LCCR0_PDD_S 12
80 #define LCCR0_BM (1 << 20)
81 #define LCCR0_OUM (1 << 21)
82 #define LCCR0_LCDT (1 << 22)
83 #define LCCR0_RDSTM (1 << 23)
84 #define LCCR0_CMDIM (1 << 24)
85 #define LCCR0_OUC (1 << 25)
86 #define LCCR0_LDDALT (1 << 26)
88 #define LCCR1_PPL Fld (10, 0)
89 #define LCCR1_DisWdth(Pixel) (((Pixel) - 1) << FShft (LCCR1_PPL))
91 #define LCCR1_HSW Fld (6, 10)
92 #define LCCR1_HorSnchWdth(Tpix) (((Tpix) - 1) << FShft (LCCR1_HSW))
94 #define LCCR1_ELW Fld (8, 16)
95 #define LCCR1_EndLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_ELW))
97 #define LCCR1_BLW Fld (8, 24)
98 #define LCCR1_BegLnDel(Tpix) (((Tpix) - 1) << FShft (LCCR1_BLW))
100 #define LCCR2_LPP Fld (10, 0)
101 #define LCCR2_DisHght(Line) (((Line) - 1) << FShft (LCCR2_LPP))
103 #define LCCR2_VSW Fld (6, 10)
104 #define LCCR2_VrtSnchWdth(Tln) (((Tln) - 1) << FShft (LCCR2_VSW))
106 #define LCCR2_EFW Fld (8, 16)
107 #define LCCR2_EndFrmDel(Tln) ((Tln) << FShft (LCCR2_EFW))
109 #define LCCR2_BFW Fld (8, 24)
110 #define LCCR2_BegFrmDel(Tln) ((Tln) << FShft (LCCR2_BFW))
112 #define LCCR3_API (0xf << 16)
113 #define LCCR3_API_S 16
114 #define LCCR3_VSP (1 << 20)
115 #define LCCR3_HSP (1 << 21)
116 #define LCCR3_PCP (1 << 22)
117 #define LCCR3_PixRsEdg (LCCR3_PCP*0)
118 #define LCCR3_PixFlEdg (LCCR3_PCP*1)
120 #define LCCR3_OEP (1 << 23)
121 #define LCCR3_OutEnH (LCCR3_OEP*0)
122 #define LCCR3_OutEnL (LCCR3_OEP*1)
124 #define LCCR3_DPC (1 << 27)
125 #define LCCR3_PCD Fld (8, 0)
126 #define LCCR3_PixClkDiv(Div) (((Div) << FShft (LCCR3_PCD)))
128 #define LCCR3_ACB Fld (8, 8)
129 #define LCCR3_Acb(Acb) (((Acb) << FShft (LCCR3_ACB)))
131 #define LCCR3_HorSnchH (LCCR3_HSP*0)
132 #define LCCR3_HorSnchL (LCCR3_HSP*1)
134 #define LCCR3_VrtSnchH (LCCR3_VSP*0)
135 #define LCCR3_VrtSnchL (LCCR3_VSP*1)
137 #define LCCR5_IUM(x) (1 << ((x) + 23))
138 #define LCCR5_BSM(x) (1 << ((x) + 15))
139 #define LCCR5_EOFM(x) (1 << ((x) + 7))
140 #define LCCR5_SOFM(x) (1 << ((x) + 0))
142 #define LCSR_LDD (1 << 0)
143 #define LCSR_SOF (1 << 1)
144 #define LCSR_BER (1 << 2)
145 #define LCSR_ABC (1 << 3)
146 #define LCSR_IUL (1 << 4)
147 #define LCSR_IUU (1 << 5)
148 #define LCSR_OU (1 << 6)
149 #define LCSR_QD (1 << 7)
150 #define LCSR_EOF (1 << 8)
151 #define LCSR_BS (1 << 9)
152 #define LCSR_SINT (1 << 10)
153 #define LCSR_RD_ST (1 << 11)
154 #define LCSR_CMD_INT (1 << 12)
156 #define LCSR1_IU(x) (1 << ((x) + 23))
157 #define LCSR1_BS(x) (1 << ((x) + 15))
158 #define LCSR1_EOF(x) (1 << ((x) + 7))
159 #define LCSR1_SOF(x) (1 << ((x) - 1))
161 #define LDCMD_PAL (1 << 26)
164 #define OVLxC1_PPL(x) ((((x) - 1) & 0x3ff) << 0)
165 #define OVLxC1_LPO(x) ((((x) - 1) & 0x3ff) << 10)
166 #define OVLxC1_BPP(x) (((x) & 0xf) << 20)
167 #define OVLxC1_OEN (1 << 31)
168 #define OVLxC2_XPOS(x) (((x) & 0x3ff) << 0)
169 #define OVLxC2_YPOS(x) (((x) & 0x3ff) << 10)
170 #define OVL2C2_PFOR(x) (((x) & 0x7) << 20)
173 #define PRSR_DATA(x) ((x) & 0xff)
174 #define PRSR_A0 (1 << 8)
175 #define PRSR_ST_OK (1 << 9)
176 #define PRSR_CON_NT (1 << 10)
178 #define SMART_CMD_A0 (0x1 << 8)
179 #define SMART_CMD_READ_STATUS_REG (0x0 << 9)
180 #define SMART_CMD_READ_FRAME_BUFFER ((0x0 << 9) | SMART_CMD_A0)
181 #define SMART_CMD_WRITE_COMMAND (0x1 << 9)
182 #define SMART_CMD_WRITE_DATA ((0x1 << 9) | SMART_CMD_A0)
183 #define SMART_CMD_WRITE_FRAME ((0x2 << 9) | SMART_CMD_A0)
184 #define SMART_CMD_WAIT_FOR_VSYNC (0x3 << 9)
185 #define SMART_CMD_NOOP (0x4 << 9)
186 #define SMART_CMD_INTERRUPT (0x5 << 9)
188 #define SMART_CMD(x) (SMART_CMD_WRITE_COMMAND | ((x) & 0xff))
189 #define SMART_DAT(x) (SMART_CMD_WRITE_DATA | ((x) & 0xff))
195 #define SMART_CMD_DELAY (0x6 << 9)
196 #define SMART_DELAY(ms) (SMART_CMD_DELAY | ((ms) & 0xff))