diff options
author | Baruch Siach <baruch@tkos.co.il> | 2010-02-17 05:33:25 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2010-02-18 02:35:55 -0500 |
commit | 0f547dc1f6e4faf05fd9946c6b7e9a828e7f901e (patch) | |
tree | 708102846c2ccd2cf53349512f645175a90da2a8 /arch/arm/mach-mx25 | |
parent | 04a03e5fe3d337242e5c0a9c93d2fd24cff545ef (diff) |
mx25pdk: add LCD support
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx25')
-rw-r--r-- | arch/arm/mach-mx25/mach-mx25pdk.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/arch/arm/mach-mx25/mach-mx25pdk.c b/arch/arm/mach-mx25/mach-mx25pdk.c index 10be38eb82a8..99b9463ca154 100644 --- a/arch/arm/mach-mx25/mach-mx25pdk.c +++ b/arch/arm/mach-mx25/mach-mx25pdk.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <mach/imx-uart.h> | 35 | #include <mach/imx-uart.h> |
36 | #include <mach/mx25.h> | 36 | #include <mach/mx25.h> |
37 | #include <mach/mxc_nand.h> | 37 | #include <mach/mxc_nand.h> |
38 | #include <mach/imxfb.h> | ||
38 | #include "devices.h" | 39 | #include "devices.h" |
39 | #include <mach/iomux.h> | 40 | #include <mach/iomux.h> |
40 | 41 | ||
@@ -54,6 +55,31 @@ static struct pad_desc mx25pdk_pads[] = { | |||
54 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, | 55 | MX25_PAD_FEC_TX_CLK__FEC_TX_CLK, |
55 | MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */ | 56 | MX25_PAD_A17__GPIO_2_3, /* FEC_EN, GPIO 35 */ |
56 | MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */ | 57 | MX25_PAD_D12__GPIO_4_8, /* FEC_RESET_B, GPIO 104 */ |
58 | |||
59 | /* LCD */ | ||
60 | MX25_PAD_LD0__LD0, | ||
61 | MX25_PAD_LD1__LD1, | ||
62 | MX25_PAD_LD2__LD2, | ||
63 | MX25_PAD_LD3__LD3, | ||
64 | MX25_PAD_LD4__LD4, | ||
65 | MX25_PAD_LD5__LD5, | ||
66 | MX25_PAD_LD6__LD6, | ||
67 | MX25_PAD_LD7__LD7, | ||
68 | MX25_PAD_LD8__LD8, | ||
69 | MX25_PAD_LD9__LD9, | ||
70 | MX25_PAD_LD10__LD10, | ||
71 | MX25_PAD_LD11__LD11, | ||
72 | MX25_PAD_LD12__LD12, | ||
73 | MX25_PAD_LD13__LD13, | ||
74 | MX25_PAD_LD14__LD14, | ||
75 | MX25_PAD_LD15__LD15, | ||
76 | MX25_PAD_GPIO_E__LD16, | ||
77 | MX25_PAD_GPIO_F__LD17, | ||
78 | MX25_PAD_HSYNC__HSYNC, | ||
79 | MX25_PAD_VSYNC__VSYNC, | ||
80 | MX25_PAD_LSCLK__LSCLK, | ||
81 | MX25_PAD_OE_ACD__OE_ACD, | ||
82 | MX25_PAD_CONTRAST__CONTRAST, | ||
57 | }; | 83 | }; |
58 | 84 | ||
59 | static struct fec_platform_data mx25_fec_pdata = { | 85 | static struct fec_platform_data mx25_fec_pdata = { |
@@ -83,6 +109,34 @@ static struct mxc_nand_platform_data mx25pdk_nand_board_info = { | |||
83 | .flash_bbt = 1, | 109 | .flash_bbt = 1, |
84 | }; | 110 | }; |
85 | 111 | ||
112 | static struct imx_fb_videomode mx25pdk_modes[] = { | ||
113 | { | ||
114 | .mode = { | ||
115 | .name = "CRT-VGA", | ||
116 | .refresh = 60, | ||
117 | .xres = 640, | ||
118 | .yres = 480, | ||
119 | .pixclock = 39683, | ||
120 | .left_margin = 45, | ||
121 | .right_margin = 114, | ||
122 | .upper_margin = 33, | ||
123 | .lower_margin = 11, | ||
124 | .hsync_len = 1, | ||
125 | .vsync_len = 1, | ||
126 | }, | ||
127 | .bpp = 16, | ||
128 | .pcr = 0xFA208B80, | ||
129 | }, | ||
130 | }; | ||
131 | |||
132 | static struct imx_fb_platform_data mx25pdk_fb_pdata = { | ||
133 | .mode = mx25pdk_modes, | ||
134 | .num_modes = ARRAY_SIZE(mx25pdk_modes), | ||
135 | .pwmr = 0x00A903FF, | ||
136 | .lscr1 = 0x00120300, | ||
137 | .dmacr = 0x00020010, | ||
138 | }; | ||
139 | |||
86 | static void __init mx25pdk_init(void) | 140 | static void __init mx25pdk_init(void) |
87 | { | 141 | { |
88 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, | 142 | mxc_iomux_v3_setup_multiple_pads(mx25pdk_pads, |
@@ -92,6 +146,7 @@ static void __init mx25pdk_init(void) | |||
92 | mxc_register_device(&mxc_usbh2, NULL); | 146 | mxc_register_device(&mxc_usbh2, NULL); |
93 | mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info); | 147 | mxc_register_device(&mxc_nand_device, &mx25pdk_nand_board_info); |
94 | mxc_register_device(&mx25_rtc_device, NULL); | 148 | mxc_register_device(&mx25_rtc_device, NULL); |
149 | mxc_register_device(&mx25_fb_device, &mx25pdk_fb_pdata); | ||
95 | 150 | ||
96 | mx25pdk_fec_reset(); | 151 | mx25pdk_fec_reset(); |
97 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); | 152 | mxc_register_device(&mx25_fec_device, &mx25_fec_pdata); |