blob: 66259f6158e035affb316de2c5842c763d24c10b [file] [log] [blame]
Russell King53d7ad12005-05-05 14:06:31 +01001/*
2 * This structure describes the machine which we are running on.
3 */
Juergen Beisert72330b02008-12-16 11:44:07 +01004
5#define PCR_TFT (1 << 31)
6#define PCR_COLOR (1 << 30)
7#define PCR_PBSIZ_1 (0 << 28)
8#define PCR_PBSIZ_2 (1 << 28)
9#define PCR_PBSIZ_4 (2 << 28)
10#define PCR_PBSIZ_8 (3 << 28)
11#define PCR_BPIX_1 (0 << 25)
12#define PCR_BPIX_2 (1 << 25)
13#define PCR_BPIX_4 (2 << 25)
14#define PCR_BPIX_8 (3 << 25)
15#define PCR_BPIX_12 (4 << 25)
Sascha Hauerf497d012009-03-18 11:29:31 +010016#define PCR_BPIX_16 (5 << 25)
17#define PCR_BPIX_18 (6 << 25)
Juergen Beisert72330b02008-12-16 11:44:07 +010018#define PCR_PIXPOL (1 << 24)
19#define PCR_FLMPOL (1 << 23)
20#define PCR_LPPOL (1 << 22)
21#define PCR_CLKPOL (1 << 21)
22#define PCR_OEPOL (1 << 20)
23#define PCR_SCLKIDLE (1 << 19)
24#define PCR_END_SEL (1 << 18)
25#define PCR_END_BYTE_SWAP (1 << 17)
26#define PCR_REV_VS (1 << 16)
27#define PCR_ACD_SEL (1 << 15)
28#define PCR_ACD(x) (((x) & 0x7f) << 8)
29#define PCR_SCLK_SEL (1 << 7)
30#define PCR_SHARP (1 << 6)
31#define PCR_PCD(x) ((x) & 0x3f)
32
33#define PWMR_CLS(x) (((x) & 0x1ff) << 16)
34#define PWMR_LDMSK (1 << 15)
35#define PWMR_SCR1 (1 << 10)
36#define PWMR_SCR0 (1 << 9)
37#define PWMR_CC_EN (1 << 8)
38#define PWMR_PW(x) ((x) & 0xff)
39
40#define LSCR1_PS_RISE_DELAY(x) (((x) & 0x7f) << 26)
41#define LSCR1_CLS_RISE_DELAY(x) (((x) & 0x3f) << 16)
42#define LSCR1_REV_TOGGLE_DELAY(x) (((x) & 0xf) << 8)
43#define LSCR1_GRAY2(x) (((x) & 0xf) << 4)
44#define LSCR1_GRAY1(x) (((x) & 0xf))
45
46#define DMACR_BURST (1 << 31)
47#define DMACR_HM(x) (((x) & 0xf) << 16)
48#define DMACR_TM(x) ((x) & 0xf)
49
Sascha Hauer27889272008-12-16 11:44:09 +010050struct imx_fb_platform_data {
Russell King53d7ad12005-05-05 14:06:31 +010051 u_long pixclock;
52
53 u_short xres;
54 u_short yres;
55
Pavel Pisa9da505d2007-10-16 01:29:44 -070056 u_int nonstd;
Russell King53d7ad12005-05-05 14:06:31 +010057 u_char bpp;
58 u_char hsync_len;
59 u_char left_margin;
60 u_char right_margin;
61
62 u_char vsync_len;
63 u_char upper_margin;
64 u_char lower_margin;
65 u_char sync;
66
67 u_int cmap_greyscale:1,
68 cmap_inverse:1,
69 cmap_static:1,
70 unused:29;
71
72 u_int pcr;
73 u_int pwmr;
74 u_int lscr1;
Sascha Hauer772a9e632005-07-17 20:15:36 +010075 u_int dmacr;
Russell King53d7ad12005-05-05 14:06:31 +010076
77 u_char * fixed_screen_cpu;
78 dma_addr_t fixed_screen_dma;
79
Holger Schurigfde36472009-03-30 14:35:39 +010080 int (*init)(struct platform_device *);
81 void (*exit)(struct platform_device *);
Sascha Hauerc0b90a32009-01-15 15:37:22 +010082
Russell King53d7ad12005-05-05 14:06:31 +010083 void (*lcd_power)(int);
84 void (*backlight_power)(int);
85};
Sascha Hauer27889272008-12-16 11:44:09 +010086
87void set_imx_fb_info(struct imx_fb_platform_data *);