|
@@ -303,3 +303,132 @@ static struct gpio_led gpio_leds[] = {
|
|
|
{"wifi", NULL, HTCPLD_GPIO_LED_WIFI, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
|
|
|
{"bt", NULL, HTCPLD_GPIO_LED_BT, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
|
|
|
{"caps", NULL, HTCPLD_GPIO_LED_CAPS, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
|
|
|
+ {"alt", NULL, HTCPLD_GPIO_LED_ALT, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_led_platform_data gpio_leds_data = {
|
|
|
+ .leds = gpio_leds,
|
|
|
+ .num_leds = ARRAY_SIZE(gpio_leds),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device gpio_leds_device = {
|
|
|
+ .name = "leds-gpio",
|
|
|
+ .id = 0,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &gpio_leds_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* HTC PLD chips */
|
|
|
+
|
|
|
+static struct resource htcpld_resources[] = {
|
|
|
+ [0] = {
|
|
|
+ .flags = IORESOURCE_IRQ,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct htcpld_chip_platform_data htcpld_chips[] = {
|
|
|
+ [0] = {
|
|
|
+ .addr = 0x03,
|
|
|
+ .reset = 0x04,
|
|
|
+ .num_gpios = 8,
|
|
|
+ .gpio_out_base = HTCPLD_BASE(0, 0),
|
|
|
+ .gpio_in_base = HTCPLD_BASE(4, 0),
|
|
|
+ },
|
|
|
+ [1] = {
|
|
|
+ .addr = 0x04,
|
|
|
+ .reset = 0x8e,
|
|
|
+ .num_gpios = 8,
|
|
|
+ .gpio_out_base = HTCPLD_BASE(1, 0),
|
|
|
+ .gpio_in_base = HTCPLD_BASE(5, 0),
|
|
|
+ },
|
|
|
+ [2] = {
|
|
|
+ .addr = 0x05,
|
|
|
+ .reset = 0x80,
|
|
|
+ .num_gpios = 8,
|
|
|
+ .gpio_out_base = HTCPLD_BASE(2, 0),
|
|
|
+ .gpio_in_base = HTCPLD_BASE(6, 0),
|
|
|
+ .irq_base = HTCPLD_IRQ(0, 0),
|
|
|
+ .num_irqs = 8,
|
|
|
+ },
|
|
|
+ [3] = {
|
|
|
+ .addr = 0x06,
|
|
|
+ .reset = 0x40,
|
|
|
+ .num_gpios = 8,
|
|
|
+ .gpio_out_base = HTCPLD_BASE(3, 0),
|
|
|
+ .gpio_in_base = HTCPLD_BASE(7, 0),
|
|
|
+ .irq_base = HTCPLD_IRQ(1, 0),
|
|
|
+ .num_irqs = 8,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct htcpld_core_platform_data htcpld_pfdata = {
|
|
|
+ .int_reset_gpio_hi = HTCPLD_GPIO_INT_RESET_HI,
|
|
|
+ .int_reset_gpio_lo = HTCPLD_GPIO_INT_RESET_LO,
|
|
|
+ .i2c_adapter_id = 1,
|
|
|
+
|
|
|
+ .chip = htcpld_chips,
|
|
|
+ .num_chip = ARRAY_SIZE(htcpld_chips),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device htcpld_device = {
|
|
|
+ .name = "i2c-htcpld",
|
|
|
+ .id = -1,
|
|
|
+ .resource = htcpld_resources,
|
|
|
+ .num_resources = ARRAY_SIZE(htcpld_resources),
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &htcpld_pfdata,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* USB Device */
|
|
|
+static struct omap_usb_config htcherald_usb_config __initdata = {
|
|
|
+ .otg = 0,
|
|
|
+ .register_host = 0,
|
|
|
+ .register_dev = 1,
|
|
|
+ .hmc_mode = 4,
|
|
|
+ .pins[0] = 2,
|
|
|
+};
|
|
|
+
|
|
|
+/* LCD Device resources */
|
|
|
+static struct omap_lcd_config htcherald_lcd_config __initdata = {
|
|
|
+ .ctrl_name = "internal",
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device lcd_device = {
|
|
|
+ .name = "lcd_htcherald",
|
|
|
+ .id = -1,
|
|
|
+};
|
|
|
+
|
|
|
+/* MMC Card */
|
|
|
+#if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)
|
|
|
+static struct omap_mmc_platform_data htc_mmc1_data = {
|
|
|
+ .nr_slots = 1,
|
|
|
+ .switch_slot = NULL,
|
|
|
+ .slots[0] = {
|
|
|
+ .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
|
|
|
+ .name = "mmcblk",
|
|
|
+ .nomux = 1,
|
|
|
+ .wires = 4,
|
|
|
+ .switch_pin = -1,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct omap_mmc_platform_data *htc_mmc_data[1];
|
|
|
+#endif
|
|
|
+
|
|
|
+
|
|
|
+/* Platform devices for the Herald */
|
|
|
+static struct platform_device *devices[] __initdata = {
|
|
|
+ &kp_device,
|
|
|
+ &lcd_device,
|
|
|
+ &htcpld_device,
|
|
|
+ &gpio_leds_device,
|
|
|
+ &herald_gpiokeys_device,
|
|
|
+};
|
|
|
+
|
|
|
+/*
|
|
|
+ * Touchscreen
|
|
|
+ */
|
|
|
+static const struct ads7846_platform_data htcherald_ts_platform_data = {
|
|
|
+ .model = 7846,
|