aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-cm-t35.c')
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c111
1 files changed, 72 insertions, 39 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 3af8aab435b5..e921e3be24a4 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -37,12 +37,13 @@
37#include <asm/mach/map.h> 37#include <asm/mach/map.h>
38 38
39#include <plat/board.h> 39#include <plat/board.h>
40#include <plat/common.h> 40#include "common.h"
41#include <plat/nand.h> 41#include <plat/nand.h>
42#include <plat/gpmc.h> 42#include <plat/gpmc.h>
43#include <plat/usb.h> 43#include <plat/usb.h>
44#include <video/omapdss.h> 44#include <video/omapdss.h>
45#include <video/omap-panel-generic-dpi.h> 45#include <video/omap-panel-generic-dpi.h>
46#include <video/omap-panel-dvi.h>
46#include <plat/mcspi.h> 47#include <plat/mcspi.h>
47 48
48#include <mach/hardware.h> 49#include <mach/hardware.h>
@@ -52,7 +53,8 @@
52#include "hsmmc.h" 53#include "hsmmc.h"
53#include "common-board-devices.h" 54#include "common-board-devices.h"
54 55
55#define CM_T35_GPIO_PENDOWN 57 56#define CM_T35_GPIO_PENDOWN 57
57#define SB_T35_USB_HUB_RESET_GPIO 167
56 58
57#define CM_T35_SMSC911X_CS 5 59#define CM_T35_SMSC911X_CS 5
58#define CM_T35_SMSC911X_GPIO 163 60#define CM_T35_SMSC911X_GPIO 163
@@ -242,8 +244,7 @@ static struct omap_dss_device cm_t35_lcd_device = {
242 .phy.dpi.data_lines = 18, 244 .phy.dpi.data_lines = 18,
243}; 245};
244 246
245static struct panel_generic_dpi_data dvi_panel = { 247static struct panel_dvi_platform_data dvi_panel = {
246 .name = "generic",
247 .platform_enable = cm_t35_panel_enable_dvi, 248 .platform_enable = cm_t35_panel_enable_dvi,
248 .platform_disable = cm_t35_panel_disable_dvi, 249 .platform_disable = cm_t35_panel_disable_dvi,
249}; 250};
@@ -251,7 +252,7 @@ static struct panel_generic_dpi_data dvi_panel = {
251static struct omap_dss_device cm_t35_dvi_device = { 252static struct omap_dss_device cm_t35_dvi_device = {
252 .name = "dvi", 253 .name = "dvi",
253 .type = OMAP_DISPLAY_TYPE_DPI, 254 .type = OMAP_DISPLAY_TYPE_DPI,
254 .driver_name = "generic_dpi_panel", 255 .driver_name = "dvi",
255 .data = &dvi_panel, 256 .data = &dvi_panel,
256 .phy.dpi.data_lines = 24, 257 .phy.dpi.data_lines = 24,
257}; 258};
@@ -339,8 +340,10 @@ static struct regulator_consumer_supply cm_t35_vsim_supply[] = {
339 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"), 340 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
340}; 341};
341 342
342static struct regulator_consumer_supply cm_t35_vdvi_supply[] = { 343static struct regulator_consumer_supply cm_t35_vio_supplies[] = {
343 REGULATOR_SUPPLY("vdvi", "omapdss"), 344 REGULATOR_SUPPLY("vcc", "spi1.0"),
345 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
346 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
344}; 347};
345 348
346/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 349/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
@@ -373,6 +376,19 @@ static struct regulator_init_data cm_t35_vsim = {
373 .consumer_supplies = cm_t35_vsim_supply, 376 .consumer_supplies = cm_t35_vsim_supply,
374}; 377};
375 378
379static struct regulator_init_data cm_t35_vio = {
380 .constraints = {
381 .min_uV = 1800000,
382 .max_uV = 1800000,
383 .apply_uV = true,
384 .valid_modes_mask = REGULATOR_MODE_NORMAL
385 | REGULATOR_MODE_STANDBY,
386 .valid_ops_mask = REGULATOR_CHANGE_MODE,
387 },
388 .num_consumer_supplies = ARRAY_SIZE(cm_t35_vio_supplies),
389 .consumer_supplies = cm_t35_vio_supplies,
390};
391
376static uint32_t cm_t35_keymap[] = { 392static uint32_t cm_t35_keymap[] = {
377 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT), 393 KEY(0, 0, KEY_A), KEY(0, 1, KEY_B), KEY(0, 2, KEY_LEFT),
378 KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN), 394 KEY(1, 0, KEY_UP), KEY(1, 1, KEY_ENTER), KEY(1, 2, KEY_DOWN),
@@ -421,6 +437,23 @@ static struct usbhs_omap_board_data usbhs_bdata __initdata = {
421 .reset_gpio_port[2] = -EINVAL 437 .reset_gpio_port[2] = -EINVAL
422}; 438};
423 439
440static void cm_t35_init_usbh(void)
441{
442 int err;
443
444 err = gpio_request_one(SB_T35_USB_HUB_RESET_GPIO,
445 GPIOF_OUT_INIT_LOW, "usb hub rst");
446 if (err) {
447 pr_err("SB-T35: usb hub rst gpio request failed: %d\n", err);
448 } else {
449 udelay(10);
450 gpio_set_value(SB_T35_USB_HUB_RESET_GPIO, 1);
451 msleep(1);
452 }
453
454 usbhs_init(&usbhs_bdata);
455}
456
424static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio, 457static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
425 unsigned ngpio) 458 unsigned ngpio)
426{ 459{
@@ -456,28 +489,18 @@ static struct twl4030_platform_data cm_t35_twldata = {
456 .gpio = &cm_t35_gpio_data, 489 .gpio = &cm_t35_gpio_data,
457 .vmmc1 = &cm_t35_vmmc1, 490 .vmmc1 = &cm_t35_vmmc1,
458 .vsim = &cm_t35_vsim, 491 .vsim = &cm_t35_vsim,
492 .vio = &cm_t35_vio,
459}; 493};
460 494
461static void __init cm_t35_init_i2c(void) 495static void __init cm_t35_init_i2c(void)
462{ 496{
463 omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB, 497 omap3_pmic_get_config(&cm_t35_twldata, TWL_COMMON_PDATA_USB,
464 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); 498 TWL_COMMON_REGULATOR_VDAC |
465 499 TWL_COMMON_PDATA_AUDIO);
466 cm_t35_twldata.vpll2->constraints.name = "VDVI";
467 cm_t35_twldata.vpll2->num_consumer_supplies =
468 ARRAY_SIZE(cm_t35_vdvi_supply);
469 cm_t35_twldata.vpll2->consumer_supplies = cm_t35_vdvi_supply;
470 500
471 omap3_pmic_init("tps65930", &cm_t35_twldata); 501 omap3_pmic_init("tps65930", &cm_t35_twldata);
472} 502}
473 503
474static void __init cm_t35_init_early(void)
475{
476 omap2_init_common_infrastructure();
477 omap2_init_common_devices(mt46h32m32lf6_sdrc_params,
478 mt46h32m32lf6_sdrc_params);
479}
480
481#ifdef CONFIG_OMAP_MUX 504#ifdef CONFIG_OMAP_MUX
482static struct omap_board_mux board_mux[] __initdata = { 505static struct omap_board_mux board_mux[] __initdata = {
483 /* nCS and IRQ for CM-T35 ethernet */ 506 /* nCS and IRQ for CM-T35 ethernet */
@@ -577,24 +600,28 @@ static void __init cm_t3x_common_dss_mux_init(int mux_mode)
577 600
578static void __init cm_t35_init_mux(void) 601static void __init cm_t35_init_mux(void)
579{ 602{
580 omap_mux_init_signal("gpio_70", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); 603 int mux_mode = OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT;
581 omap_mux_init_signal("gpio_71", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); 604
582 omap_mux_init_signal("gpio_72", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); 605 omap_mux_init_signal("dss_data0.dss_data0", mux_mode);
583 omap_mux_init_signal("gpio_73", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); 606 omap_mux_init_signal("dss_data1.dss_data1", mux_mode);
584 omap_mux_init_signal("gpio_74", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); 607 omap_mux_init_signal("dss_data2.dss_data2", mux_mode);
585 omap_mux_init_signal("gpio_75", OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); 608 omap_mux_init_signal("dss_data3.dss_data3", mux_mode);
586 cm_t3x_common_dss_mux_init(OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT); 609 omap_mux_init_signal("dss_data4.dss_data4", mux_mode);
610 omap_mux_init_signal("dss_data5.dss_data5", mux_mode);
611 cm_t3x_common_dss_mux_init(mux_mode);
587} 612}
588 613
589static void __init cm_t3730_init_mux(void) 614static void __init cm_t3730_init_mux(void)
590{ 615{
591 omap_mux_init_signal("sys_boot0", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); 616 int mux_mode = OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT;
592 omap_mux_init_signal("sys_boot1", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); 617
593 omap_mux_init_signal("sys_boot3", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); 618 omap_mux_init_signal("sys_boot0", mux_mode);
594 omap_mux_init_signal("sys_boot4", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); 619 omap_mux_init_signal("sys_boot1", mux_mode);
595 omap_mux_init_signal("sys_boot5", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); 620 omap_mux_init_signal("sys_boot3", mux_mode);
596 omap_mux_init_signal("sys_boot6", OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); 621 omap_mux_init_signal("sys_boot4", mux_mode);
597 cm_t3x_common_dss_mux_init(OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT); 622 omap_mux_init_signal("sys_boot5", mux_mode);
623 omap_mux_init_signal("sys_boot6", mux_mode);
624 cm_t3x_common_dss_mux_init(mux_mode);
598} 625}
599#else 626#else
600static inline void cm_t35_init_mux(void) {} 627static inline void cm_t35_init_mux(void) {}
@@ -610,6 +637,8 @@ static void __init cm_t3x_common_init(void)
610 omap_board_config_size = ARRAY_SIZE(cm_t35_config); 637 omap_board_config_size = ARRAY_SIZE(cm_t35_config);
611 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS); 638 omap3_mux_init(board_mux, OMAP_PACKAGE_CUS);
612 omap_serial_init(); 639 omap_serial_init();
640 omap_sdrc_init(mt46h32m32lf6_sdrc_params,
641 mt46h32m32lf6_sdrc_params);
613 cm_t35_init_i2c(); 642 cm_t35_init_i2c();
614 omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL); 643 omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
615 cm_t35_init_ethernet(); 644 cm_t35_init_ethernet();
@@ -617,7 +646,7 @@ static void __init cm_t3x_common_init(void)
617 cm_t35_init_display(); 646 cm_t35_init_display();
618 647
619 usb_musb_init(NULL); 648 usb_musb_init(NULL);
620 usbhs_init(&usbhs_bdata); 649 cm_t35_init_usbh();
621} 650}
622 651
623static void __init cm_t35_init(void) 652static void __init cm_t35_init(void)
@@ -634,21 +663,25 @@ static void __init cm_t3730_init(void)
634} 663}
635 664
636MACHINE_START(CM_T35, "Compulab CM-T35") 665MACHINE_START(CM_T35, "Compulab CM-T35")
637 .boot_params = 0x80000100, 666 .atag_offset = 0x100,
638 .reserve = omap_reserve, 667 .reserve = omap_reserve,
639 .map_io = omap3_map_io, 668 .map_io = omap3_map_io,
640 .init_early = cm_t35_init_early, 669 .init_early = omap35xx_init_early,
641 .init_irq = omap3_init_irq, 670 .init_irq = omap3_init_irq,
671 .handle_irq = omap3_intc_handle_irq,
642 .init_machine = cm_t35_init, 672 .init_machine = cm_t35_init,
643 .timer = &omap3_timer, 673 .timer = &omap3_timer,
674 .restart = omap_prcm_restart,
644MACHINE_END 675MACHINE_END
645 676
646MACHINE_START(CM_T3730, "Compulab CM-T3730") 677MACHINE_START(CM_T3730, "Compulab CM-T3730")
647 .boot_params = 0x80000100, 678 .atag_offset = 0x100,
648 .reserve = omap_reserve, 679 .reserve = omap_reserve,
649 .map_io = omap3_map_io, 680 .map_io = omap3_map_io,
650 .init_early = cm_t35_init_early, 681 .init_early = omap3630_init_early,
651 .init_irq = omap3_init_irq, 682 .init_irq = omap3_init_irq,
683 .handle_irq = omap3_intc_handle_irq,
652 .init_machine = cm_t3730_init, 684 .init_machine = cm_t3730_init,
653 .timer = &omap3_timer, 685 .timer = &omap3_timer,
686 .restart = omap_prcm_restart,
654MACHINE_END 687MACHINE_END