|
@@ -395,3 +395,92 @@ static struct matrix_keymap_data cm_t35_keymap_data = {
|
|
|
static struct twl4030_keypad_data cm_t35_kp_data = {
|
|
|
.keymap_data = &cm_t35_keymap_data,
|
|
|
.rows = 3,
|
|
|
+ .cols = 3,
|
|
|
+ .rep = 1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap2_hsmmc_info mmc[] = {
|
|
|
+ {
|
|
|
+ .mmc = 1,
|
|
|
+ .caps = MMC_CAP_4_BIT_DATA,
|
|
|
+ .gpio_cd = -EINVAL,
|
|
|
+ .gpio_wp = -EINVAL,
|
|
|
+ .deferred = true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ .mmc = 2,
|
|
|
+ .caps = MMC_CAP_4_BIT_DATA,
|
|
|
+ .transceiver = 1,
|
|
|
+ .gpio_cd = -EINVAL,
|
|
|
+ .gpio_wp = -EINVAL,
|
|
|
+ .ocr_mask = 0x00100000, /* 3.3V */
|
|
|
+ },
|
|
|
+ {} /* Terminator */
|
|
|
+};
|
|
|
+
|
|
|
+static struct usbhs_omap_board_data usbhs_bdata __initdata = {
|
|
|
+ .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
|
|
|
+ .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
|
|
|
+ .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
|
|
|
+
|
|
|
+ .phy_reset = true,
|
|
|
+ .reset_gpio_port[0] = OMAP_MAX_GPIO_LINES + 6,
|
|
|
+ .reset_gpio_port[1] = OMAP_MAX_GPIO_LINES + 7,
|
|
|
+ .reset_gpio_port[2] = -EINVAL
|
|
|
+};
|
|
|
+
|
|
|
+static void __init cm_t35_init_usbh(void)
|
|
|
+{
|
|
|
+ int err;
|
|
|
+
|
|
|
+ err = gpio_request_one(SB_T35_USB_HUB_RESET_GPIO,
|
|
|
+ GPIOF_OUT_INIT_LOW, "usb hub rst");
|
|
|
+ if (err) {
|
|
|
+ pr_err("SB-T35: usb hub rst gpio request failed: %d\n", err);
|
|
|
+ } else {
|
|
|
+ udelay(10);
|
|
|
+ gpio_set_value(SB_T35_USB_HUB_RESET_GPIO, 1);
|
|
|
+ msleep(1);
|
|
|
+ }
|
|
|
+
|
|
|
+ usbhs_init(&usbhs_bdata);
|
|
|
+}
|
|
|
+
|
|
|
+static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
|
|
|
+ unsigned ngpio)
|
|
|
+{
|
|
|
+ int wlan_rst = gpio + 2;
|
|
|
+
|
|
|
+ if (gpio_request_one(wlan_rst, GPIOF_OUT_INIT_HIGH, "WLAN RST") == 0) {
|
|
|
+ gpio_export(wlan_rst, 0);
|
|
|
+ udelay(10);
|
|
|
+ gpio_set_value_cansleep(wlan_rst, 0);
|
|
|
+ udelay(10);
|
|
|
+ gpio_set_value_cansleep(wlan_rst, 1);
|
|
|
+ } else {
|
|
|
+ pr_err("CM-T35: could not obtain gpio for WiFi reset\n");
|
|
|
+ }
|
|
|
+
|
|
|
+ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
|
|
+ mmc[0].gpio_cd = gpio + 0;
|
|
|
+ omap_hsmmc_late_init(mmc);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static struct twl4030_gpio_platform_data cm_t35_gpio_data = {
|
|
|
+ .setup = cm_t35_twl_gpio_setup,
|
|
|
+};
|
|
|
+
|
|
|
+static struct twl4030_power_data cm_t35_power_data = {
|
|
|
+ .use_poweroff = true,
|
|
|
+};
|
|
|
+
|
|
|
+static struct twl4030_platform_data cm_t35_twldata = {
|
|
|
+ /* platform_data for children goes here */
|
|
|
+ .keypad = &cm_t35_kp_data,
|
|
|
+ .gpio = &cm_t35_gpio_data,
|
|
|
+ .vmmc1 = &cm_t35_vmmc1,
|
|
|
+ .vsim = &cm_t35_vsim,
|
|
|
+ .vio = &cm_t35_vio,
|
|
|
+ .power = &cm_t35_power_data,
|