aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap3beagle.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c45
1 files changed, 12 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7be8d659d91d..79c6909eeb78 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -42,7 +42,7 @@
42#include <plat/board.h> 42#include <plat/board.h>
43#include "common.h" 43#include "common.h"
44#include <video/omapdss.h> 44#include <video/omapdss.h>
45#include <video/omap-panel-dvi.h> 45#include <video/omap-panel-tfp410.h>
46#include <plat/gpmc.h> 46#include <plat/gpmc.h>
47#include <plat/nand.h> 47#include <plat/nand.h>
48#include <plat/usb.h> 48#include <plat/usb.h>
@@ -83,11 +83,13 @@ static struct {
83 int usb_pwr_level; 83 int usb_pwr_level;
84 int reset_gpio; 84 int reset_gpio;
85 int usr_button_gpio; 85 int usr_button_gpio;
86 int mmc_caps;
86} beagle_config = { 87} beagle_config = {
87 .mmc1_gpio_wp = -EINVAL, 88 .mmc1_gpio_wp = -EINVAL,
88 .usb_pwr_level = GPIOF_OUT_INIT_LOW, 89 .usb_pwr_level = GPIOF_OUT_INIT_LOW,
89 .reset_gpio = 129, 90 .reset_gpio = 129,
90 .usr_button_gpio = 4, 91 .usr_button_gpio = 4,
92 .mmc_caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
91}; 93};
92 94
93static struct gpio omap3_beagle_rev_gpios[] __initdata = { 95static struct gpio omap3_beagle_rev_gpios[] __initdata = {
@@ -145,10 +147,12 @@ static void __init omap3_beagle_init_rev(void)
145 printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n"); 147 printk(KERN_INFO "OMAP3 Beagle Rev: xM Ax/Bx\n");
146 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; 148 omap3_beagle_version = OMAP3BEAGLE_BOARD_XM;
147 beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH; 149 beagle_config.usb_pwr_level = GPIOF_OUT_INIT_HIGH;
150 beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
148 break; 151 break;
149 case 2: 152 case 2:
150 printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); 153 printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n");
151 omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; 154 omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC;
155 beagle_config.mmc_caps &= ~MMC_CAP_8_BIT_DATA;
152 break; 156 break;
153 default: 157 default:
154 printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); 158 printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev);
@@ -189,33 +193,17 @@ static struct mtd_partition omap3beagle_nand_partitions[] = {
189 193
190/* DSS */ 194/* DSS */
191 195
192static int beagle_enable_dvi(struct omap_dss_device *dssdev) 196static struct tfp410_platform_data dvi_panel = {
193{
194 if (gpio_is_valid(dssdev->reset_gpio))
195 gpio_set_value(dssdev->reset_gpio, 1);
196
197 return 0;
198}
199
200static void beagle_disable_dvi(struct omap_dss_device *dssdev)
201{
202 if (gpio_is_valid(dssdev->reset_gpio))
203 gpio_set_value(dssdev->reset_gpio, 0);
204}
205
206static struct panel_dvi_platform_data dvi_panel = {
207 .platform_enable = beagle_enable_dvi,
208 .platform_disable = beagle_disable_dvi,
209 .i2c_bus_num = 3, 197 .i2c_bus_num = 3,
198 .power_down_gpio = -1,
210}; 199};
211 200
212static struct omap_dss_device beagle_dvi_device = { 201static struct omap_dss_device beagle_dvi_device = {
213 .type = OMAP_DISPLAY_TYPE_DPI, 202 .type = OMAP_DISPLAY_TYPE_DPI,
214 .name = "dvi", 203 .name = "dvi",
215 .driver_name = "dvi", 204 .driver_name = "tfp410",
216 .data = &dvi_panel, 205 .data = &dvi_panel,
217 .phy.dpi.data_lines = 24, 206 .phy.dpi.data_lines = 24,
218 .reset_gpio = -EINVAL,
219}; 207};
220 208
221static struct omap_dss_device beagle_tv_device = { 209static struct omap_dss_device beagle_tv_device = {
@@ -236,22 +224,12 @@ static struct omap_dss_board_info beagle_dss_data = {
236 .default_device = &beagle_dvi_device, 224 .default_device = &beagle_dvi_device,
237}; 225};
238 226
239static void __init beagle_display_init(void)
240{
241 int r;
242
243 r = gpio_request_one(beagle_dvi_device.reset_gpio, GPIOF_OUT_INIT_LOW,
244 "DVI reset");
245 if (r < 0)
246 printk(KERN_ERR "Unable to get DVI reset GPIO\n");
247}
248
249#include "sdram-micron-mt46h32m32lf-6.h" 227#include "sdram-micron-mt46h32m32lf-6.h"
250 228
251static struct omap2_hsmmc_info mmc[] = { 229static struct omap2_hsmmc_info mmc[] = {
252 { 230 {
253 .mmc = 1, 231 .mmc = 1,
254 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 232 .caps = MMC_CAP_4_BIT_DATA,
255 .gpio_wp = -EINVAL, 233 .gpio_wp = -EINVAL,
256 .deferred = true, 234 .deferred = true,
257 }, 235 },
@@ -309,7 +287,7 @@ static int beagle_twl_gpio_setup(struct device *dev,
309 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) 287 if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
310 pr_err("%s: unable to configure EHCI_nOC\n", __func__); 288 pr_err("%s: unable to configure EHCI_nOC\n", __func__);
311 } 289 }
312 beagle_dvi_device.reset_gpio = beagle_config.reset_gpio; 290 dvi_panel.power_down_gpio = beagle_config.reset_gpio;
313 291
314 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level, 292 gpio_request_one(gpio + TWL4030_GPIO_MAX, beagle_config.usb_pwr_level,
315 "nEN_USB_PWR"); 293 "nEN_USB_PWR");
@@ -523,6 +501,7 @@ static void __init omap3_beagle_init(void)
523 501
524 if (beagle_config.mmc1_gpio_wp != -EINVAL) 502 if (beagle_config.mmc1_gpio_wp != -EINVAL)
525 omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); 503 omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
504 mmc[0].caps = beagle_config.mmc_caps;
526 omap_hsmmc_init(mmc); 505 omap_hsmmc_init(mmc);
527 506
528 omap3_beagle_i2c_init(); 507 omap3_beagle_i2c_init();
@@ -552,7 +531,6 @@ static void __init omap3_beagle_init(void)
552 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 531 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
553 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 532 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
554 533
555 beagle_display_init();
556 beagle_opp_init(); 534 beagle_opp_init();
557} 535}
558 536
@@ -565,6 +543,7 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
565 .init_irq = omap3_init_irq, 543 .init_irq = omap3_init_irq,
566 .handle_irq = omap3_intc_handle_irq, 544 .handle_irq = omap3_intc_handle_irq,
567 .init_machine = omap3_beagle_init, 545 .init_machine = omap3_beagle_init,
546 .init_late = omap3_init_late,
568 .timer = &omap3_secure_timer, 547 .timer = &omap3_secure_timer,
569 .restart = omap_prcm_restart, 548 .restart = omap_prcm_restart,
570MACHINE_END 549MACHINE_END