blob: 20790b6c0e9050fbf22ddeaa40fb1c86fa526e49 [file] [log] [blame]
Wei Ni87540de2012-10-17 13:24:50 +00001/*
2 * (C) Copyright 2010
3 * NVIDIA Corporation <www.nvidia.com>
4 *
Wolfgang Denk1a459662013-07-08 09:37:19 +02005 * SPDX-License-Identifier: GPL-2.0+
Wei Ni87540de2012-10-17 13:24:50 +00006 */
7
8#ifndef __ASM_ARCH_TEGRA_DC_H
9#define __ASM_ARCH_TEGRA_DC_H
10
11/* Register definitions for the Tegra display controller */
12
13/* CMD register 0x000 ~ 0x43 */
14struct dc_cmd_reg {
15 /* Address 0x000 ~ 0x002 */
16 uint gen_incr_syncpt; /* _CMD_GENERAL_INCR_SYNCPT_0 */
17 uint gen_incr_syncpt_ctrl; /* _CMD_GENERAL_INCR_SYNCPT_CNTRL_0 */
18 uint gen_incr_syncpt_err; /* _CMD_GENERAL_INCR_SYNCPT_ERROR_0 */
19
20 uint reserved0[5]; /* reserved_0[5] */
21
22 /* Address 0x008 ~ 0x00a */
23 uint win_a_incr_syncpt; /* _CMD_WIN_A_INCR_SYNCPT_0 */
24 uint win_a_incr_syncpt_ctrl; /* _CMD_WIN_A_INCR_SYNCPT_CNTRL_0 */
25 uint win_a_incr_syncpt_err; /* _CMD_WIN_A_INCR_SYNCPT_ERROR_0 */
26
27 uint reserved1[5]; /* reserved_1[5] */
28
29 /* Address 0x010 ~ 0x012 */
30 uint win_b_incr_syncpt; /* _CMD_WIN_B_INCR_SYNCPT_0 */
31 uint win_b_incr_syncpt_ctrl; /* _CMD_WIN_B_INCR_SYNCPT_CNTRL_0 */
32 uint win_b_incr_syncpt_err; /* _CMD_WIN_B_INCR_SYNCPT_ERROR_0 */
33
34 uint reserved2[5]; /* reserved_2[5] */
35
36 /* Address 0x018 ~ 0x01a */
37 uint win_c_incr_syncpt; /* _CMD_WIN_C_INCR_SYNCPT_0 */
38 uint win_c_incr_syncpt_ctrl; /* _CMD_WIN_C_INCR_SYNCPT_CNTRL_0 */
39 uint win_c_incr_syncpt_err; /* _CMD_WIN_C_INCR_SYNCPT_ERROR_0 */
40
41 uint reserved3[13]; /* reserved_3[13] */
42
43 /* Address 0x028 */
44 uint cont_syncpt_vsync; /* _CMD_CONT_SYNCPT_VSYNC_0 */
45
46 uint reserved4[7]; /* reserved_4[7] */
47
48 /* Address 0x030 ~ 0x033 */
49 uint ctxsw; /* _CMD_CTXSW_0 */
50 uint disp_cmd_opt0; /* _CMD_DISPLAY_COMMAND_OPTION0_0 */
51 uint disp_cmd; /* _CMD_DISPLAY_COMMAND_0 */
52 uint sig_raise; /* _CMD_SIGNAL_RAISE_0 */
53
54 uint reserved5[2]; /* reserved_0[2] */
55
56 /* Address 0x036 ~ 0x03e */
57 uint disp_pow_ctrl; /* _CMD_DISPLAY_POWER_CONTROL_0 */
58 uint int_stat; /* _CMD_INT_STATUS_0 */
59 uint int_mask; /* _CMD_INT_MASK_0 */
60 uint int_enb; /* _CMD_INT_ENABLE_0 */
61 uint int_type; /* _CMD_INT_TYPE_0 */
62 uint int_polarity; /* _CMD_INT_POLARITY_0 */
63 uint sig_raise1; /* _CMD_SIGNAL_RAISE1_0 */
64 uint sig_raise2; /* _CMD_SIGNAL_RAISE2_0 */
65 uint sig_raise3; /* _CMD_SIGNAL_RAISE3_0 */
66
67 uint reserved6; /* reserved_6 */
68
69 /* Address 0x040 ~ 0x043 */
70 uint state_access; /* _CMD_STATE_ACCESS_0 */
71 uint state_ctrl; /* _CMD_STATE_CONTROL_0 */
72 uint disp_win_header; /* _CMD_DISPLAY_WINDOW_HEADER_0 */
73 uint reg_act_ctrl; /* _CMD_REG_ACT_CONTROL_0 */
74};
75
76enum {
77 PIN_REG_COUNT = 4,
78 PIN_OUTPUT_SEL_COUNT = 7,
79};
80
81/* COM register 0x300 ~ 0x329 */
82struct dc_com_reg {
83 /* Address 0x300 ~ 0x301 */
84 uint crc_ctrl; /* _COM_CRC_CONTROL_0 */
85 uint crc_checksum; /* _COM_CRC_CHECKSUM_0 */
86
87 /* _COM_PIN_OUTPUT_ENABLE0/1/2/3_0: Address 0x302 ~ 0x305 */
88 uint pin_output_enb[PIN_REG_COUNT];
89
90 /* _COM_PIN_OUTPUT_POLARITY0/1/2/3_0: Address 0x306 ~ 0x309 */
91 uint pin_output_polarity[PIN_REG_COUNT];
92
93 /* _COM_PIN_OUTPUT_DATA0/1/2/3_0: Address 0x30a ~ 0x30d */
94 uint pin_output_data[PIN_REG_COUNT];
95
96 /* _COM_PIN_INPUT_ENABLE0_0: Address 0x30e ~ 0x311 */
97 uint pin_input_enb[PIN_REG_COUNT];
98
99 /* Address 0x312 ~ 0x313 */
100 uint pin_input_data0; /* _COM_PIN_INPUT_DATA0_0 */
101 uint pin_input_data1; /* _COM_PIN_INPUT_DATA1_0 */
102
103 /* _COM_PIN_OUTPUT_SELECT0/1/2/3/4/5/6_0: Address 0x314 ~ 0x31a */
104 uint pin_output_sel[PIN_OUTPUT_SEL_COUNT];
105
106 /* Address 0x31b ~ 0x329 */
107 uint pin_misc_ctrl; /* _COM_PIN_MISC_CONTROL_0 */
108 uint pm0_ctrl; /* _COM_PM0_CONTROL_0 */
109 uint pm0_duty_cycle; /* _COM_PM0_DUTY_CYCLE_0 */
110 uint pm1_ctrl; /* _COM_PM1_CONTROL_0 */
111 uint pm1_duty_cycle; /* _COM_PM1_DUTY_CYCLE_0 */
112 uint spi_ctrl; /* _COM_SPI_CONTROL_0 */
113 uint spi_start_byte; /* _COM_SPI_START_BYTE_0 */
114 uint hspi_wr_data_ab; /* _COM_HSPI_WRITE_DATA_AB_0 */
115 uint hspi_wr_data_cd; /* _COM_HSPI_WRITE_DATA_CD */
116 uint hspi_cs_dc; /* _COM_HSPI_CS_DC_0 */
117 uint scratch_reg_a; /* _COM_SCRATCH_REGISTER_A_0 */
118 uint scratch_reg_b; /* _COM_SCRATCH_REGISTER_B_0 */
119 uint gpio_ctrl; /* _COM_GPIO_CTRL_0 */
120 uint gpio_debounce_cnt; /* _COM_GPIO_DEBOUNCE_COUNTER_0 */
121 uint crc_checksum_latched; /* _COM_CRC_CHECKSUM_LATCHED_0 */
122};
123
124enum dc_disp_h_pulse_pos {
125 H_PULSE0_POSITION_A,
126 H_PULSE0_POSITION_B,
127 H_PULSE0_POSITION_C,
128 H_PULSE0_POSITION_D,
129 H_PULSE0_POSITION_COUNT,
130};
131
132struct _disp_h_pulse {
133 /* _DISP_H_PULSE0/1/2_CONTROL_0 */
134 uint h_pulse_ctrl;
135 /* _DISP_H_PULSE0/1/2_POSITION_A/B/C/D_0 */
136 uint h_pulse_pos[H_PULSE0_POSITION_COUNT];
137};
138
139enum dc_disp_v_pulse_pos {
140 V_PULSE0_POSITION_A,
141 V_PULSE0_POSITION_B,
142 V_PULSE0_POSITION_C,
143 V_PULSE0_POSITION_COUNT,
144};
145
146struct _disp_v_pulse0 {
147 /* _DISP_H_PULSE0/1_CONTROL_0 */
148 uint v_pulse_ctrl;
149 /* _DISP_H_PULSE0/1_POSITION_A/B/C_0 */
150 uint v_pulse_pos[V_PULSE0_POSITION_COUNT];
151};
152
153struct _disp_v_pulse2 {
154 /* _DISP_H_PULSE2/3_CONTROL_0 */
155 uint v_pulse_ctrl;
156 /* _DISP_H_PULSE2/3_POSITION_A_0 */
157 uint v_pulse_pos_a;
158};
159
160enum dc_disp_h_pulse_reg {
161 H_PULSE0,
162 H_PULSE1,
163 H_PULSE2,
164 H_PULSE_COUNT,
165};
166
167enum dc_disp_pp_select {
168 PP_SELECT_A,
169 PP_SELECT_B,
170 PP_SELECT_C,
171 PP_SELECT_D,
172 PP_SELECT_COUNT,
173};
174
175/* DISP register 0x400 ~ 0x4c1 */
176struct dc_disp_reg {
177 /* Address 0x400 ~ 0x40a */
178 uint disp_signal_opt0; /* _DISP_DISP_SIGNAL_OPTIONS0_0 */
179 uint disp_signal_opt1; /* _DISP_DISP_SIGNAL_OPTIONS1_0 */
180 uint disp_win_opt; /* _DISP_DISP_WIN_OPTIONS_0 */
181 uint mem_high_pri; /* _DISP_MEM_HIGH_PRIORITY_0 */
182 uint mem_high_pri_timer; /* _DISP_MEM_HIGH_PRIORITY_TIMER_0 */
183 uint disp_timing_opt; /* _DISP_DISP_TIMING_OPTIONS_0 */
184 uint ref_to_sync; /* _DISP_REF_TO_SYNC_0 */
185 uint sync_width; /* _DISP_SYNC_WIDTH_0 */
186 uint back_porch; /* _DISP_BACK_PORCH_0 */
187 uint disp_active; /* _DISP_DISP_ACTIVE_0 */
188 uint front_porch; /* _DISP_FRONT_PORCH_0 */
189
190 /* Address 0x40b ~ 0x419: _DISP_H_PULSE0/1/2_ */
191 struct _disp_h_pulse h_pulse[H_PULSE_COUNT];
192
193 /* Address 0x41a ~ 0x421 */
194 struct _disp_v_pulse0 v_pulse0; /* _DISP_V_PULSE0_ */
195 struct _disp_v_pulse0 v_pulse1; /* _DISP_V_PULSE1_ */
196
197 /* Address 0x422 ~ 0x425 */
198 struct _disp_v_pulse2 v_pulse3; /* _DISP_V_PULSE2_ */
199 struct _disp_v_pulse2 v_pulse4; /* _DISP_V_PULSE3_ */
200
201 /* Address 0x426 ~ 0x429 */
202 uint m0_ctrl; /* _DISP_M0_CONTROL_0 */
203 uint m1_ctrl; /* _DISP_M1_CONTROL_0 */
204 uint di_ctrl; /* _DISP_DI_CONTROL_0 */
205 uint pp_ctrl; /* _DISP_PP_CONTROL_0 */
206
207 /* Address 0x42a ~ 0x42d: _DISP_PP_SELECT_A/B/C/D_0 */
208 uint pp_select[PP_SELECT_COUNT];
209
210 /* Address 0x42e ~ 0x435 */
211 uint disp_clk_ctrl; /* _DISP_DISP_CLOCK_CONTROL_0 */
212 uint disp_interface_ctrl; /* _DISP_DISP_INTERFACE_CONTROL_0 */
213 uint disp_color_ctrl; /* _DISP_DISP_COLOR_CONTROL_0 */
214 uint shift_clk_opt; /* _DISP_SHIFT_CLOCK_OPTIONS_0 */
215 uint data_enable_opt; /* _DISP_DATA_ENABLE_OPTIONS_0 */
216 uint serial_interface_opt; /* _DISP_SERIAL_INTERFACE_OPTIONS_0 */
217 uint lcd_spi_opt; /* _DISP_LCD_SPI_OPTIONS_0 */
218 uint border_color; /* _DISP_BORDER_COLOR_0 */
219
220 /* Address 0x436 ~ 0x439 */
221 uint color_key0_lower; /* _DISP_COLOR_KEY0_LOWER_0 */
222 uint color_key0_upper; /* _DISP_COLOR_KEY0_UPPER_0 */
223 uint color_key1_lower; /* _DISP_COLOR_KEY1_LOWER_0 */
224 uint color_key1_upper; /* _DISP_COLOR_KEY1_UPPER_0 */
225
226 uint reserved0[2]; /* reserved_0[2] */
227
228 /* Address 0x43c ~ 0x442 */
229 uint cursor_foreground; /* _DISP_CURSOR_FOREGROUND_0 */
230 uint cursor_background; /* _DISP_CURSOR_BACKGROUND_0 */
231 uint cursor_start_addr; /* _DISP_CURSOR_START_ADDR_0 */
232 uint cursor_start_addr_ns; /* _DISP_CURSOR_START_ADDR_NS_0 */
233 uint cursor_pos; /* _DISP_CURSOR_POSITION_0 */
234 uint cursor_pos_ns; /* _DISP_CURSOR_POSITION_NS_0 */
235 uint seq_ctrl; /* _DISP_INIT_SEQ_CONTROL_0 */
236
237 /* Address 0x442 ~ 0x446 */
238 uint spi_init_seq_data_a; /* _DISP_SPI_INIT_SEQ_DATA_A_0 */
239 uint spi_init_seq_data_b; /* _DISP_SPI_INIT_SEQ_DATA_B_0 */
240 uint spi_init_seq_data_c; /* _DISP_SPI_INIT_SEQ_DATA_C_0 */
241 uint spi_init_seq_data_d; /* _DISP_SPI_INIT_SEQ_DATA_D_0 */
242
243 uint reserved1[0x39]; /* reserved1[0x39], */
244
245 /* Address 0x480 ~ 0x484 */
246 uint dc_mccif_fifoctrl; /* _DISP_DC_MCCIF_FIFOCTRL_0 */
247 uint mccif_disp0a_hyst; /* _DISP_MCCIF_DISPLAY0A_HYST_0 */
248 uint mccif_disp0b_hyst; /* _DISP_MCCIF_DISPLAY0B_HYST_0 */
249 uint mccif_disp0c_hyst; /* _DISP_MCCIF_DISPLAY0C_HYST_0 */
250 uint mccif_disp1b_hyst; /* _DISP_MCCIF_DISPLAY1B_HYST_0 */
251
252 uint reserved2[0x3b]; /* reserved2[0x3b] */
253
254 /* Address 0x4c0 ~ 0x4c1 */
255 uint dac_crt_ctrl; /* _DISP_DAC_CRT_CTRL_0 */
256 uint disp_misc_ctrl; /* _DISP_DISP_MISC_CONTROL_0 */
257};
258
259enum dc_winc_filter_p {
260 WINC_FILTER_COUNT = 0x10,
261};
262
263/* Window A/B/C register 0x500 ~ 0x628 */
264struct dc_winc_reg {
265
266 /* Address 0x500 */
267 uint color_palette; /* _WINC_COLOR_PALETTE_0 */
268
269 uint reserved0[0xff]; /* reserved_0[0xff] */
270
271 /* Address 0x600 */
272 uint palette_color_ext; /* _WINC_PALETTE_COLOR_EXT_0 */
273
274 /* _WINC_H_FILTER_P00~0F_0 */
275 /* Address 0x601 ~ 0x610 */
276 uint h_filter_p[WINC_FILTER_COUNT];
277
278 /* Address 0x611 ~ 0x618 */
279 uint csc_yof; /* _WINC_CSC_YOF_0 */
280 uint csc_kyrgb; /* _WINC_CSC_KYRGB_0 */
281 uint csc_kur; /* _WINC_CSC_KUR_0 */
282 uint csc_kvr; /* _WINC_CSC_KVR_0 */
283 uint csc_kug; /* _WINC_CSC_KUG_0 */
284 uint csc_kvg; /* _WINC_CSC_KVG_0 */
285 uint csc_kub; /* _WINC_CSC_KUB_0 */
286 uint csc_kvb; /* _WINC_CSC_KVB_0 */
287
288 /* Address 0x619 ~ 0x628: _WINC_V_FILTER_P00~0F_0 */
289 uint v_filter_p[WINC_FILTER_COUNT];
290};
291
292/* WIN A/B/C Register 0x700 ~ 0x714*/
293struct dc_win_reg {
294 /* Address 0x700 ~ 0x714 */
295 uint win_opt; /* _WIN_WIN_OPTIONS_0 */
296 uint byte_swap; /* _WIN_BYTE_SWAP_0 */
297 uint buffer_ctrl; /* _WIN_BUFFER_CONTROL_0 */
298 uint color_depth; /* _WIN_COLOR_DEPTH_0 */
299 uint pos; /* _WIN_POSITION_0 */
300 uint size; /* _WIN_SIZE_0 */
301 uint prescaled_size; /* _WIN_PRESCALED_SIZE_0 */
302 uint h_initial_dda; /* _WIN_H_INITIAL_DDA_0 */
303 uint v_initial_dda; /* _WIN_V_INITIAL_DDA_0 */
304 uint dda_increment; /* _WIN_DDA_INCREMENT_0 */
305 uint line_stride; /* _WIN_LINE_STRIDE_0 */
306 uint buf_stride; /* _WIN_BUF_STRIDE_0 */
307 uint uv_buf_stride; /* _WIN_UV_BUF_STRIDE_0 */
308 uint buffer_addr_mode; /* _WIN_BUFFER_ADDR_MODE_0 */
309 uint dv_ctrl; /* _WIN_DV_CONTROL_0 */
310 uint blend_nokey; /* _WIN_BLEND_NOKEY_0 */
311 uint blend_1win; /* _WIN_BLEND_1WIN_0 */
312 uint blend_2win_x; /* _WIN_BLEND_2WIN_X_0 */
313 uint blend_2win_y; /* _WIN_BLEND_2WIN_Y_0 */
314 uint blend_3win_xy; /* _WIN_BLEND_3WIN_XY_0 */
315 uint hp_fetch_ctrl; /* _WIN_HP_FETCH_CONTROL_0 */
316};
317
318/* WINBUF A/B/C Register 0x800 ~ 0x80a */
319struct dc_winbuf_reg {
320 /* Address 0x800 ~ 0x80a */
321 uint start_addr; /* _WINBUF_START_ADDR_0 */
322 uint start_addr_ns; /* _WINBUF_START_ADDR_NS_0 */
323 uint start_addr_u; /* _WINBUF_START_ADDR_U_0 */
324 uint start_addr_u_ns; /* _WINBUF_START_ADDR_U_NS_0 */
325 uint start_addr_v; /* _WINBUF_START_ADDR_V_0 */
326 uint start_addr_v_ns; /* _WINBUF_START_ADDR_V_NS_0 */
327 uint addr_h_offset; /* _WINBUF_ADDR_H_OFFSET_0 */
328 uint addr_h_offset_ns; /* _WINBUF_ADDR_H_OFFSET_NS_0 */
329 uint addr_v_offset; /* _WINBUF_ADDR_V_OFFSET_0 */
330 uint addr_v_offset_ns; /* _WINBUF_ADDR_V_OFFSET_NS_0 */
331 uint uflow_status; /* _WINBUF_UFLOW_STATUS_0 */
332};
333
334/* Display Controller (DC_) regs */
335struct dc_ctlr {
336 struct dc_cmd_reg cmd; /* CMD register 0x000 ~ 0x43 */
337 uint reserved0[0x2bc];
338
339 struct dc_com_reg com; /* COM register 0x300 ~ 0x329 */
340 uint reserved1[0xd6];
341
342 struct dc_disp_reg disp; /* DISP register 0x400 ~ 0x4c1 */
343 uint reserved2[0x3e];
344
345 struct dc_winc_reg winc; /* Window A/B/C 0x500 ~ 0x628 */
346 uint reserved3[0xd7];
347
348 struct dc_win_reg win; /* WIN A/B/C 0x700 ~ 0x714*/
349 uint reserved4[0xeb];
350
351 struct dc_winbuf_reg winbuf; /* WINBUF A/B/C 0x800 ~ 0x80a */
352};
353
354#define BIT(pos) (1U << pos)
355
356/* DC_CMD_DISPLAY_COMMAND 0x032 */
357#define CTRL_MODE_SHIFT 5
358#define CTRL_MODE_MASK (0x3 << CTRL_MODE_SHIFT)
359enum {
360 CTRL_MODE_STOP,
361 CTRL_MODE_C_DISPLAY,
362 CTRL_MODE_NC_DISPLAY,
363};
364
365/* _WIN_COLOR_DEPTH_0 */
366enum win_color_depth_id {
367 COLOR_DEPTH_P1,
368 COLOR_DEPTH_P2,
369 COLOR_DEPTH_P4,
370 COLOR_DEPTH_P8,
371 COLOR_DEPTH_B4G4R4A4,
372 COLOR_DEPTH_B5G5R5A,
373 COLOR_DEPTH_B5G6R5,
374 COLOR_DEPTH_AB5G5R5,
375 COLOR_DEPTH_B8G8R8A8 = 12,
376 COLOR_DEPTH_R8G8B8A8,
377 COLOR_DEPTH_B6x2G6x2R6x2A8,
378 COLOR_DEPTH_R6x2G6x2B6x2A8,
379 COLOR_DEPTH_YCbCr422,
380 COLOR_DEPTH_YUV422,
381 COLOR_DEPTH_YCbCr420P,
382 COLOR_DEPTH_YUV420P,
383 COLOR_DEPTH_YCbCr422P,
384 COLOR_DEPTH_YUV422P,
385 COLOR_DEPTH_YCbCr422R,
386 COLOR_DEPTH_YUV422R,
387 COLOR_DEPTH_YCbCr422RA,
388 COLOR_DEPTH_YUV422RA,
389};
390
391/* DC_CMD_DISPLAY_POWER_CONTROL 0x036 */
392#define PW0_ENABLE BIT(0)
393#define PW1_ENABLE BIT(2)
394#define PW2_ENABLE BIT(4)
395#define PW3_ENABLE BIT(6)
396#define PW4_ENABLE BIT(8)
397#define PM0_ENABLE BIT(16)
398#define PM1_ENABLE BIT(18)
399#define SPI_ENABLE BIT(24)
400#define HSPI_ENABLE BIT(25)
401
402/* DC_CMD_STATE_CONTROL 0x041 */
403#define GENERAL_ACT_REQ BIT(0)
404#define WIN_A_ACT_REQ BIT(1)
405#define WIN_B_ACT_REQ BIT(2)
406#define WIN_C_ACT_REQ BIT(3)
407#define GENERAL_UPDATE BIT(8)
408#define WIN_A_UPDATE BIT(9)
409#define WIN_B_UPDATE BIT(10)
410#define WIN_C_UPDATE BIT(11)
411
412/* DC_CMD_DISPLAY_WINDOW_HEADER 0x042 */
413#define WINDOW_A_SELECT BIT(4)
414#define WINDOW_B_SELECT BIT(5)
415#define WINDOW_C_SELECT BIT(6)
416
417/* DC_DISP_DISP_CLOCK_CONTROL 0x42e */
418#define SHIFT_CLK_DIVIDER_SHIFT 0
419#define SHIFT_CLK_DIVIDER_MASK (0xff << SHIFT_CLK_DIVIDER_SHIFT)
420#define PIXEL_CLK_DIVIDER_SHIFT 8
421#define PIXEL_CLK_DIVIDER_MSK (0xf << PIXEL_CLK_DIVIDER_SHIFT)
422enum {
423 PIXEL_CLK_DIVIDER_PCD1,
424 PIXEL_CLK_DIVIDER_PCD1H,
425 PIXEL_CLK_DIVIDER_PCD2,
426 PIXEL_CLK_DIVIDER_PCD3,
427 PIXEL_CLK_DIVIDER_PCD4,
428 PIXEL_CLK_DIVIDER_PCD6,
429 PIXEL_CLK_DIVIDER_PCD8,
430 PIXEL_CLK_DIVIDER_PCD9,
431 PIXEL_CLK_DIVIDER_PCD12,
432 PIXEL_CLK_DIVIDER_PCD16,
433 PIXEL_CLK_DIVIDER_PCD18,
434 PIXEL_CLK_DIVIDER_PCD24,
435 PIXEL_CLK_DIVIDER_PCD13,
436};
437
438/* DC_DISP_DISP_INTERFACE_CONTROL 0x42f */
439#define DATA_FORMAT_SHIFT 0
440#define DATA_FORMAT_MASK (0xf << DATA_FORMAT_SHIFT)
441enum {
442 DATA_FORMAT_DF1P1C,
443 DATA_FORMAT_DF1P2C24B,
444 DATA_FORMAT_DF1P2C18B,
445 DATA_FORMAT_DF1P2C16B,
446 DATA_FORMAT_DF2S,
447 DATA_FORMAT_DF3S,
448 DATA_FORMAT_DFSPI,
449 DATA_FORMAT_DF1P3C24B,
450 DATA_FORMAT_DF1P3C18B,
451};
452#define DATA_ALIGNMENT_SHIFT 8
453enum {
454 DATA_ALIGNMENT_MSB,
455 DATA_ALIGNMENT_LSB,
456};
457#define DATA_ORDER_SHIFT 9
458enum {
459 DATA_ORDER_RED_BLUE,
460 DATA_ORDER_BLUE_RED,
461};
462
463/* DC_DISP_DATA_ENABLE_OPTIONS 0x432 */
464#define DE_SELECT_SHIFT 0
465#define DE_SELECT_MASK (0x3 << DE_SELECT_SHIFT)
466#define DE_SELECT_ACTIVE_BLANK 0x0
467#define DE_SELECT_ACTIVE 0x1
468#define DE_SELECT_ACTIVE_IS 0x2
469#define DE_CONTROL_SHIFT 2
470#define DE_CONTROL_MASK (0x7 << DE_CONTROL_SHIFT)
471enum {
472 DE_CONTROL_ONECLK,
473 DE_CONTROL_NORMAL,
474 DE_CONTROL_EARLY_EXT,
475 DE_CONTROL_EARLY,
476 DE_CONTROL_ACTIVE_BLANK,
477};
478
479/* DC_WIN_WIN_OPTIONS 0x700 */
480#define H_DIRECTION BIT(0)
481enum {
482 H_DIRECTION_INCREMENT,
483 H_DIRECTION_DECREMENT,
484};
485#define V_DIRECTION BIT(2)
486enum {
487 V_DIRECTION_INCREMENT,
488 V_DIRECTION_DECREMENT,
489};
490#define COLOR_EXPAND BIT(6)
491#define CP_ENABLE BIT(16)
492#define DV_ENABLE BIT(20)
493#define WIN_ENABLE BIT(30)
494
495/* DC_WIN_BYTE_SWAP 0x701 */
496#define BYTE_SWAP_SHIFT 0
497#define BYTE_SWAP_MASK (3 << BYTE_SWAP_SHIFT)
498enum {
499 BYTE_SWAP_NOSWAP,
500 BYTE_SWAP_SWAP2,
501 BYTE_SWAP_SWAP4,
502 BYTE_SWAP_SWAP4HW
503};
504
505/* DC_WIN_POSITION 0x704 */
506#define H_POSITION_SHIFT 0
507#define H_POSITION_MASK (0x1FFF << H_POSITION_SHIFT)
508#define V_POSITION_SHIFT 16
509#define V_POSITION_MASK (0x1FFF << V_POSITION_SHIFT)
510
511/* DC_WIN_SIZE 0x705 */
512#define H_SIZE_SHIFT 0
513#define H_SIZE_MASK (0x1FFF << H_SIZE_SHIFT)
514#define V_SIZE_SHIFT 16
515#define V_SIZE_MASK (0x1FFF << V_SIZE_SHIFT)
516
517/* DC_WIN_PRESCALED_SIZE 0x706 */
518#define H_PRESCALED_SIZE_SHIFT 0
519#define H_PRESCALED_SIZE_MASK (0x7FFF << H_PRESCALED_SIZE)
520#define V_PRESCALED_SIZE_SHIFT 16
521#define V_PRESCALED_SIZE_MASK (0x1FFF << V_PRESCALED_SIZE)
522
523/* DC_WIN_DDA_INCREMENT 0x709 */
524#define H_DDA_INC_SHIFT 0
525#define H_DDA_INC_MASK (0xFFFF << H_DDA_INC_SHIFT)
526#define V_DDA_INC_SHIFT 16
527#define V_DDA_INC_MASK (0xFFFF << V_DDA_INC_SHIFT)
528
529#endif /* __ASM_ARCH_TEGRA_DC_H */