|
@@ -366,3 +366,130 @@ static inline void igep_leds_init(void)
|
|
|
igep_gpio_leds[0].gpio = IGEP3_GPIO_LED0_RED;
|
|
|
igep_gpio_leds[1].gpio = IGEP3_GPIO_LED0_GREEN;
|
|
|
igep_gpio_leds[2].gpio = IGEP3_GPIO_LED1_RED;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (gpio_request_array(igep_gpio_leds, ARRAY_SIZE(igep_gpio_leds))) {
|
|
|
+ pr_warning("IGEP v2: Could not obtain leds gpios\n");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ for (i = 0; i < ARRAY_SIZE(igep_gpio_leds); i++)
|
|
|
+ gpio_export(igep_gpio_leds[i].gpio, 0);
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
+static struct gpio igep2_twl_gpios[] = {
|
|
|
+ { -EINVAL, GPIOF_IN, "GPIO_EHCI_NOC" },
|
|
|
+ { -EINVAL, GPIOF_OUT_INIT_LOW, "GPIO_USBH_CPEN" },
|
|
|
+};
|
|
|
+
|
|
|
+static int igep_twl_gpio_setup(struct device *dev,
|
|
|
+ unsigned gpio, unsigned ngpio)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
|
|
|
+ mmc[0].gpio_cd = gpio + 0;
|
|
|
+ omap_hsmmc_late_init(mmc);
|
|
|
+
|
|
|
+ /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
|
|
|
+#if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
|
|
|
+ ret = gpio_request_one(gpio + TWL4030_GPIO_MAX + 1, GPIOF_OUT_INIT_HIGH,
|
|
|
+ "gpio-led:green:d1");
|
|
|
+ if (ret == 0)
|
|
|
+ gpio_export(gpio + TWL4030_GPIO_MAX + 1, 0);
|
|
|
+ else
|
|
|
+ pr_warning("IGEP: Could not obtain gpio GPIO_LED1_GREEN\n");
|
|
|
+#else
|
|
|
+ igep_gpio_leds[3].gpio = gpio + TWL4030_GPIO_MAX + 1;
|
|
|
+#endif
|
|
|
+
|
|
|
+ if (machine_is_igep0030())
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ /*
|
|
|
+ * REVISIT: need ehci-omap hooks for external VBUS
|
|
|
+ * power switch and overcurrent detect
|
|
|
+ */
|
|
|
+ igep2_twl_gpios[0].gpio = gpio + 1;
|
|
|
+
|
|
|
+ /* TWL4030_GPIO_MAX + 0 == ledA, GPIO_USBH_CPEN (out, active low) */
|
|
|
+ igep2_twl_gpios[1].gpio = gpio + TWL4030_GPIO_MAX;
|
|
|
+
|
|
|
+ ret = gpio_request_array(igep2_twl_gpios, ARRAY_SIZE(igep2_twl_gpios));
|
|
|
+ if (ret < 0)
|
|
|
+ pr_err("IGEP2: Could not obtain gpio for USBH_CPEN");
|
|
|
+
|
|
|
+ return 0;
|
|
|
+};
|
|
|
+
|
|
|
+static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
|
|
|
+ .use_leds = true,
|
|
|
+ .setup = igep_twl_gpio_setup,
|
|
|
+};
|
|
|
+
|
|
|
+static struct tfp410_platform_data dvi_panel = {
|
|
|
+ .i2c_bus_num = 3,
|
|
|
+ .power_down_gpio = IGEP2_GPIO_DVI_PUP,
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_dss_device igep2_dvi_device = {
|
|
|
+ .type = OMAP_DISPLAY_TYPE_DPI,
|
|
|
+ .name = "dvi",
|
|
|
+ .driver_name = "tfp410",
|
|
|
+ .data = &dvi_panel,
|
|
|
+ .phy.dpi.data_lines = 24,
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_dss_device *igep2_dss_devices[] = {
|
|
|
+ &igep2_dvi_device
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_dss_board_info igep2_dss_data = {
|
|
|
+ .num_devices = ARRAY_SIZE(igep2_dss_devices),
|
|
|
+ .devices = igep2_dss_devices,
|
|
|
+ .default_device = &igep2_dvi_device,
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device *igep_devices[] __initdata = {
|
|
|
+ &igep_vwlan_device,
|
|
|
+};
|
|
|
+
|
|
|
+static int igep2_keymap[] = {
|
|
|
+ KEY(0, 0, KEY_LEFT),
|
|
|
+ KEY(0, 1, KEY_RIGHT),
|
|
|
+ KEY(0, 2, KEY_A),
|
|
|
+ KEY(0, 3, KEY_B),
|
|
|
+ KEY(1, 0, KEY_DOWN),
|
|
|
+ KEY(1, 1, KEY_UP),
|
|
|
+ KEY(1, 2, KEY_E),
|
|
|
+ KEY(1, 3, KEY_F),
|
|
|
+ KEY(2, 0, KEY_ENTER),
|
|
|
+ KEY(2, 1, KEY_I),
|
|
|
+ KEY(2, 2, KEY_J),
|
|
|
+ KEY(2, 3, KEY_K),
|
|
|
+ KEY(3, 0, KEY_M),
|
|
|
+ KEY(3, 1, KEY_N),
|
|
|
+ KEY(3, 2, KEY_O),
|
|
|
+ KEY(3, 3, KEY_P)
|
|
|
+};
|
|
|
+
|
|
|
+static struct matrix_keymap_data igep2_keymap_data = {
|
|
|
+ .keymap = igep2_keymap,
|
|
|
+ .keymap_size = ARRAY_SIZE(igep2_keymap),
|
|
|
+};
|
|
|
+
|
|
|
+static struct twl4030_keypad_data igep2_keypad_pdata = {
|
|
|
+ .keymap_data = &igep2_keymap_data,
|
|
|
+ .rows = 4,
|
|
|
+ .cols = 4,
|
|
|
+ .rep = 1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct twl4030_platform_data igep_twldata = {
|
|
|
+ /* platform_data for children goes here */
|
|
|
+ .gpio = &igep_twl4030_gpio_pdata,
|
|
|
+ .vmmc1 = &igep_vmmc1,
|
|
|
+ .vio = &igep_vio,
|
|
|
+};
|
|
|
+
|