Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Russell King | 53d7ad1 | 2005-05-05 14:06:31 +0100 | [diff] [blame] | 2 | /* |
| 3 | * This structure describes the machine which we are running on. |
| 4 | */ |
Uwe Kleine-König | ad851bf | 2010-11-04 17:07:48 +0100 | [diff] [blame] | 5 | #ifndef __MACH_IMXFB_H__ |
| 6 | #define __MACH_IMXFB_H__ |
Juergen Beisert | 72330b0 | 2008-12-16 11:44:07 +0100 | [diff] [blame] | 7 | |
Sascha Hauer | 343684f | 2009-03-19 08:25:41 +0100 | [diff] [blame] | 8 | #include <linux/fb.h> |
| 9 | |
Juergen Beisert | 72330b0 | 2008-12-16 11:44:07 +0100 | [diff] [blame] | 10 | #define PCR_TFT (1 << 31) |
| 11 | #define PCR_COLOR (1 << 30) |
| 12 | #define PCR_PBSIZ_1 (0 << 28) |
| 13 | #define PCR_PBSIZ_2 (1 << 28) |
| 14 | #define PCR_PBSIZ_4 (2 << 28) |
| 15 | #define PCR_PBSIZ_8 (3 << 28) |
| 16 | #define PCR_BPIX_1 (0 << 25) |
| 17 | #define PCR_BPIX_2 (1 << 25) |
| 18 | #define PCR_BPIX_4 (2 << 25) |
| 19 | #define PCR_BPIX_8 (3 << 25) |
| 20 | #define PCR_BPIX_12 (4 << 25) |
Sascha Hauer | f497d01 | 2009-03-18 11:29:31 +0100 | [diff] [blame] | 21 | #define PCR_BPIX_16 (5 << 25) |
| 22 | #define PCR_BPIX_18 (6 << 25) |
Juergen Beisert | 72330b0 | 2008-12-16 11:44:07 +0100 | [diff] [blame] | 23 | #define PCR_PIXPOL (1 << 24) |
| 24 | #define PCR_FLMPOL (1 << 23) |
| 25 | #define PCR_LPPOL (1 << 22) |
| 26 | #define PCR_CLKPOL (1 << 21) |
| 27 | #define PCR_OEPOL (1 << 20) |
| 28 | #define PCR_SCLKIDLE (1 << 19) |
| 29 | #define PCR_END_SEL (1 << 18) |
| 30 | #define PCR_END_BYTE_SWAP (1 << 17) |
| 31 | #define PCR_REV_VS (1 << 16) |
| 32 | #define PCR_ACD_SEL (1 << 15) |
| 33 | #define PCR_ACD(x) (((x) & 0x7f) << 8) |
| 34 | #define PCR_SCLK_SEL (1 << 7) |
| 35 | #define PCR_SHARP (1 << 6) |
| 36 | #define PCR_PCD(x) ((x) & 0x3f) |
| 37 | |
| 38 | #define PWMR_CLS(x) (((x) & 0x1ff) << 16) |
| 39 | #define PWMR_LDMSK (1 << 15) |
| 40 | #define PWMR_SCR1 (1 << 10) |
| 41 | #define PWMR_SCR0 (1 << 9) |
| 42 | #define PWMR_CC_EN (1 << 8) |
| 43 | #define PWMR_PW(x) ((x) & 0xff) |
| 44 | |
| 45 | #define LSCR1_PS_RISE_DELAY(x) (((x) & 0x7f) << 26) |
| 46 | #define LSCR1_CLS_RISE_DELAY(x) (((x) & 0x3f) << 16) |
| 47 | #define LSCR1_REV_TOGGLE_DELAY(x) (((x) & 0xf) << 8) |
| 48 | #define LSCR1_GRAY2(x) (((x) & 0xf) << 4) |
| 49 | #define LSCR1_GRAY1(x) (((x) & 0xf)) |
| 50 | |
Sascha Hauer | 343684f | 2009-03-19 08:25:41 +0100 | [diff] [blame] | 51 | struct imx_fb_videomode { |
| 52 | struct fb_videomode mode; |
| 53 | u32 pcr; |
Martin Kaiser | b62ea41 | 2017-04-21 16:47:11 +0200 | [diff] [blame] | 54 | bool aus_mode; |
Sascha Hauer | 343684f | 2009-03-19 08:25:41 +0100 | [diff] [blame] | 55 | unsigned char bpp; |
| 56 | }; |
| 57 | |
Sascha Hauer | 2788927 | 2008-12-16 11:44:09 +0100 | [diff] [blame] | 58 | struct imx_fb_platform_data { |
Sascha Hauer | 343684f | 2009-03-19 08:25:41 +0100 | [diff] [blame] | 59 | struct imx_fb_videomode *mode; |
| 60 | int num_modes; |
Russell King | 53d7ad1 | 2005-05-05 14:06:31 +0100 | [diff] [blame] | 61 | |
Russell King | 53d7ad1 | 2005-05-05 14:06:31 +0100 | [diff] [blame] | 62 | u_int pwmr; |
| 63 | u_int lscr1; |
Sascha Hauer | 772a9e6 | 2005-07-17 20:15:36 +0100 | [diff] [blame] | 64 | u_int dmacr; |
Russell King | 53d7ad1 | 2005-05-05 14:06:31 +0100 | [diff] [blame] | 65 | |
Holger Schurig | fde3647 | 2009-03-30 14:35:39 +0100 | [diff] [blame] | 66 | int (*init)(struct platform_device *); |
| 67 | void (*exit)(struct platform_device *); |
Russell King | 53d7ad1 | 2005-05-05 14:06:31 +0100 | [diff] [blame] | 68 | }; |
Sascha Hauer | 2788927 | 2008-12-16 11:44:09 +0100 | [diff] [blame] | 69 | |
Uwe Kleine-König | ad851bf | 2010-11-04 17:07:48 +0100 | [diff] [blame] | 70 | #endif /* ifndef __MACH_IMXFB_H__ */ |