summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/board-omap3h1.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3h1.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3h1.c105
1 files changed, 88 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/board-omap3h1.c b/arch/arm/mach-omap2/board-omap3h1.c
index bb357945d2f..e2efe2682a3 100644
--- a/arch/arm/mach-omap2/board-omap3h1.c
+++ b/arch/arm/mach-omap2/board-omap3h1.c
@@ -26,6 +26,12 @@
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
+
+#include <linux/usb/musb.h>
+#include <linux/usb/phy.h>
+#include <linux/usb/phy-tusb-h1.h>
+#include <linux/usb/nop-usb-xceiv.h>
+
#include <linux/i2c/atmel_mxt_ts.h>
#include <linux/gpio.h>
@@ -55,7 +61,10 @@
#include "board-omap3h1.h"
#define NAND_CS 0
+
#define MPUIRQ_GPIO 31
+#define ATMEL_MXT_GPIO 105
+#define USB_IRQ 124
#ifdef CONFIG_MACH_OMAP3_H1_DVT
#define LCD_RESET_GPIO 94
@@ -63,7 +72,7 @@
#define LCD_RESET_GPIO 122
#endif
-#define ATMEL_MXT_GPIO 105
+
static struct mtd_partition omap3h1_nand_partitions[] = {
/* All the partition sizes are listed in terms of NAND block size */
@@ -174,14 +183,44 @@ static struct lm3530_platform_data omap3h1_backlight_platform_data = {
static struct mxt_platform_data mxt_data = {
- .irqflags = IRQF_TRIGGER_FALLING,
-};
+ .irqflags = IRQF_TRIGGER_FALLING,
+};
static struct platform_device bcm20702_bluetooth_device = {
.name = "bcm20702_bluetooth",
.id = -1,
};
+/* --------------------------------------------------------------------------- */
+/* USB settings
+ */
+
+static struct omap_musb_board_data musb_board_data = {
+ .interface_type = MUSB_INTERFACE_ULPI,
+ .mode = MUSB_OTG,
+ .power = 100,
+};
+
+static struct nop_usb_xceiv_platform_data nop_plat_data = {
+ .type = USB_PHY_TYPE_USB2,
+ .clk_rate = 60000000, /* 60 MHz */
+ .needs_vcc = 1,
+ .needs_reset = 0,
+};
+
+static struct platform_device nop_phy_device = {
+ .name = "nop_usb_xceiv",
+ .id = -1,
+ .dev = {
+ .platform_data = &nop_plat_data,
+ },
+};
+
+
+/* --------------------------------------------------------------------------- */
+/* REGULATORS
+ */
+
static struct regulator_init_data omap3h1_vbat_data = {
.constraints.always_on = true,
};
@@ -201,6 +240,10 @@ static struct platform_device omap3h1_vbat = {
},
};
+static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
+ .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
+};
+
/* --------------------------------------------------------------------------- */
static struct regulator_init_data tps65910_dummy = {
@@ -248,8 +291,6 @@ static struct regulator_init_data tps65910_vibrator = {
.consumer_supplies = tps65910_vibrator_supply,
};
-
-
/* --------------------------------------------------------------------------- */
@@ -340,7 +381,7 @@ static struct regulator_init_data tps65910_accel = {
.min_uV = 1800000,
.max_uV = 1800000,
.valid_modes_mask = REGULATOR_MODE_NORMAL,
- .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+ .valid_ops_mask = REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS,
.always_on = true,
.apply_uV = true,
},
@@ -404,17 +445,16 @@ static struct tps65910_board omap3h1_tps65910_pdata = {
.tps65910_pmic_init_data[TPS65910_REG_VMMC] = &tps65910_touch3,
.tps65910_pmic_init_data[TPS65910_REG_VAUX2] = &tps65910_vibrator,
- /* This one is actually connected to BT */
+ /* This one is connected to BT */
.tps65910_pmic_init_data[TPS65910_REG_VAUX33] = &tps65910_3v3,
-
+
/* not actually used */
.tps65910_pmic_init_data[TPS65910_REG_VRTC] = &tps65910_dummy,
.tps65910_pmic_init_data[TPS65910_REG_VDAC] = &tps65910_dummy,
.tps65910_pmic_init_data[TPS65910_REG_VAUX1] = &tps65910_dummy, /* 2v85 */
.tps65910_pmic_init_data[TPS65910_REG_VDD3] = &tps65910_dummy,
-
};
static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = {
@@ -437,11 +477,11 @@ static struct i2c_board_info __initdata omap3h1_i2c1_board_info[] = {
I2C_BOARD_INFO("mXT224", 0x4a),
.platform_data = &mxt_data,
},
- #ifndef CONFIG_MACH_OMAP3_H1_EVT1
+#ifndef CONFIG_MACH_OMAP3_H1_EVT1
{
I2C_BOARD_INFO("bq274xx", 0x55),
},
- #endif
+#endif
};
static struct i2c_board_info __initdata omap3h1_i2c3_board_info[] = {
@@ -463,7 +503,7 @@ static int __init omap3_h1_i2c_init(void)
gpio_request_one(ATMEL_MXT_GPIO, GPIOF_IN, "atmel_mxt_ts CHG");
omap3h1_i2c1_board_info[3].irq = gpio_to_irq(ATMEL_MXT_GPIO);
- gpio_request_one(MPUIRQ_GPIO, GPIOF_IN, "mpu6515");
+ gpio_request_one(MPUIRQ_GPIO, GPIOF_IN, "mpu6515 IRQ pin");
omap3h1_i2c1_board_info[1].irq = gpio_to_irq(MPUIRQ_GPIO);
/* Register buses */
@@ -476,6 +516,7 @@ static int __init omap3_h1_i2c_init(void)
static struct platform_device *omap3h1_devices[] __initdata = {
&omap3h1_vbat,
&bcm20702_bluetooth_device,
+ &nop_phy_device,
};
#ifdef CONFIG_OMAP_MUX
@@ -513,19 +554,43 @@ static struct omap_board_mux board_mux[] __initdata = {
OMAP3_MUX(MCSPI1_SOMI, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
OMAP3_MUX(MCSPI1_CS1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
- // TOUCH_RESET
+ /* TOUCH_RESET */
+
OMAP3_MUX(CAM_D6, OMAP_MUX_MODE4 | OMAP_PIN_INPUT_PULLUP),
+#ifdef CONFIG_MACH_OMAP3_H1_DVT
+ /* USB pin settings (mUSB) */
+
+ OMAP3_MUX(HSUSB0_CLK, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA0, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA1, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA2, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA3, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA4, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA5, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA6, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DATA7, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_DIR, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_NXT, (OMAP_MUX_MODE0 | OMAP_PIN_INPUT)),
+ OMAP3_MUX(HSUSB0_STP, (OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT)),
+#endif /* CONFIG_MACH_OMAP3_H1_DVT */
+
+ /* accelerometer */
+ OMAP3_MUX(JTAG_EMU1, (OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT)),
+
+ /* USB on */
+ OMAP3_MUX(ETK_D7, (OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT)),
+
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
#endif
static void __init omap3_h1_init(void)
{
- omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
+ omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
omap3_h1_i2c_init();
-
+
omap_display_init(&omap3h1_dss_data);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
@@ -535,8 +600,14 @@ static void __init omap3_h1_init(void)
NAND_BUSWIDTH_16, NULL);
platform_add_devices(omap3h1_devices, ARRAY_SIZE(omap3h1_devices));
+
omap3h1_spi_init();
- //h1_opp_init();
+
+ usb_bind_phy("musb-hdrc.0.auto", 0, "nop_usb_xceiv"); /* "tusb-usb-h1" */
+ usb_musb_init(&musb_board_data);
+ usbhs_init(&usbhs_bdata);
+
+ /* h1_opp_init(); */
}
MACHINE_START(OMAP3_H1, "Olio OMAP3 H1 Board")
@@ -549,6 +620,6 @@ MACHINE_START(OMAP3_H1, "Olio OMAP3 H1 Board")
.init_machine = omap3_h1_init,
.init_late = omap3630_init_late,
.init_time = omap3_secure_sync32k_timer_init,
- //.dt_compat = omap3_h1_boards_compat,
+ /* .dt_compat = omap3_h1_boards_compat, */
.restart = omap3xxx_restart,
MACHINE_END