aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-igep0020.c
diff options
context:
space:
mode:
authorEnric Balletbo i Serra <eballetbo@iseebcn.com>2010-02-17 17:09:26 -0500
committerTony Lindgren <tony@atomide.com>2010-02-17 20:23:20 -0500
commit691de27f3cdb71a3bb41a5b5cf83ed85ab1b9240 (patch)
tree42f75d6059bebf9992ebeab1525c93b707c442c1 /arch/arm/mach-omap2/board-igep0020.c
parentd0885486d7cc9ec5f72f04719bb91a39521c8971 (diff)
omap3: Enable DSS2 for IGEP v2 board
Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-igep0020.c')
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c75
1 files changed, 75 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index f6102c737272..f6899f9dc1c4 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -28,6 +28,7 @@
28#include <plat/common.h> 28#include <plat/common.h>
29#include <plat/gpmc.h> 29#include <plat/gpmc.h>
30#include <plat/usb.h> 30#include <plat/usb.h>
31#include <plat/display.h>
31 32
32#include "mux.h" 33#include "mux.h"
33#include "hsmmc.h" 34#include "hsmmc.h"
@@ -38,6 +39,7 @@
38#define IGEP2_GPIO_LED0_RED 26 39#define IGEP2_GPIO_LED0_RED 26
39#define IGEP2_GPIO_LED0_GREEN 27 40#define IGEP2_GPIO_LED0_GREEN 27
40#define IGEP2_GPIO_LED1_RED 28 41#define IGEP2_GPIO_LED1_RED 28
42#define IGEP2_GPIO_DVI_PUP 170
41 43
42#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE) 44#if defined(CONFIG_SMSC911X) || defined(CONFIG_SMSC911X_MODULE)
43 45
@@ -164,6 +166,76 @@ static struct twl4030_usb_data igep2_usb_data = {
164 .usb_mode = T2_USB_MODE_ULPI, 166 .usb_mode = T2_USB_MODE_ULPI,
165}; 167};
166 168
169static int igep2_enable_dvi(struct omap_dss_device *dssdev)
170{
171 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1);
172
173 return 0;
174}
175
176static void igep2_disable_dvi(struct omap_dss_device *dssdev)
177{
178 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
179}
180
181static struct omap_dss_device igep2_dvi_device = {
182 .type = OMAP_DISPLAY_TYPE_DPI,
183 .name = "dvi",
184 .driver_name = "generic_panel",
185 .phy.dpi.data_lines = 24,
186 .platform_enable = igep2_enable_dvi,
187 .platform_disable = igep2_disable_dvi,
188};
189
190static struct omap_dss_device *igep2_dss_devices[] = {
191 &igep2_dvi_device
192};
193
194static struct omap_dss_board_info igep2_dss_data = {
195 .num_devices = ARRAY_SIZE(igep2_dss_devices),
196 .devices = igep2_dss_devices,
197 .default_device = &igep2_dvi_device,
198};
199
200static struct platform_device igep2_dss_device = {
201 .name = "omapdss",
202 .id = -1,
203 .dev = {
204 .platform_data = &igep2_dss_data,
205 },
206};
207
208static struct regulator_consumer_supply igep2_vpll2_supply = {
209 .supply = "vdds_dsi",
210 .dev = &igep2_dss_device.dev,
211};
212
213static struct regulator_init_data igep2_vpll2 = {
214 .constraints = {
215 .name = "VDVI",
216 .min_uV = 1800000,
217 .max_uV = 1800000,
218 .apply_uV = true,
219 .valid_modes_mask = REGULATOR_MODE_NORMAL
220 | REGULATOR_MODE_STANDBY,
221 .valid_ops_mask = REGULATOR_CHANGE_MODE
222 | REGULATOR_CHANGE_STATUS,
223 },
224 .num_consumer_supplies = 1,
225 .consumer_supplies = &igep2_vpll2_supply,
226};
227
228static void __init igep2_display_init(void)
229{
230 if (gpio_request(IGEP2_GPIO_DVI_PUP, "GPIO_DVI_PUP") &&
231 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 1))
232 pr_err("IGEP v2: Could not obtain gpio GPIO_DVI_PUP\n");
233}
234
235static struct platform_device *igep2_devices[] __initdata = {
236 &igep2_dss_device,
237};
238
167static void __init igep2_init_irq(void) 239static void __init igep2_init_irq(void)
168{ 240{
169 omap_board_config = igep2_config; 241 omap_board_config = igep2_config;
@@ -191,6 +263,7 @@ static struct twl4030_platform_data igep2_twldata = {
191 .codec = &igep2_codec_data, 263 .codec = &igep2_codec_data,
192 .gpio = &igep2_gpio_data, 264 .gpio = &igep2_gpio_data,
193 .vmmc1 = &igep2_vmmc1, 265 .vmmc1 = &igep2_vmmc1,
266 .vpll2 = &igep2_vpll2,
194 267
195}; 268};
196 269
@@ -236,10 +309,12 @@ static void __init igep2_init(void)
236{ 309{
237 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); 310 omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
238 igep2_i2c_init(); 311 igep2_i2c_init();
312 platform_add_devices(igep2_devices, ARRAY_SIZE(igep2_devices));
239 omap_serial_init(); 313 omap_serial_init();
240 usb_musb_init(); 314 usb_musb_init();
241 usb_ehci_init(&ehci_pdata); 315 usb_ehci_init(&ehci_pdata);
242 316
317 igep2_display_init();
243 igep2_init_smsc911x(); 318 igep2_init_smsc911x();
244 319
245 /* GPIO userspace leds */ 320 /* GPIO userspace leds */