|
@@ -217,3 +217,101 @@ static struct platform_device latch2_gpio_device = {
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static const struct gpio latch_gpios[] __initconst = {
|
|
|
|
+ {
|
|
|
|
+ .gpio = LATCH1_GPIO_BASE + 6,
|
|
|
|
+ .flags = GPIOF_OUT_INIT_LOW,
|
|
|
|
+ .label = "dockit1",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .gpio = LATCH1_GPIO_BASE + 7,
|
|
|
|
+ .flags = GPIOF_OUT_INIT_LOW,
|
|
|
|
+ .label = "dockit2",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .gpio = AMS_DELTA_GPIO_PIN_SCARD_RSTIN,
|
|
|
|
+ .flags = GPIOF_OUT_INIT_LOW,
|
|
|
|
+ .label = "scard_rstin",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .gpio = AMS_DELTA_GPIO_PIN_SCARD_CMDVCC,
|
|
|
|
+ .flags = GPIOF_OUT_INIT_LOW,
|
|
|
|
+ .label = "scard_cmdvcc",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .gpio = AMS_DELTA_GPIO_PIN_MODEM_CODEC,
|
|
|
|
+ .flags = GPIOF_OUT_INIT_LOW,
|
|
|
|
+ .label = "modem_codec",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .gpio = AMS_DELTA_LATCH2_GPIO_BASE + 14,
|
|
|
|
+ .flags = GPIOF_OUT_INIT_LOW,
|
|
|
|
+ .label = "hookflash1",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ .gpio = AMS_DELTA_LATCH2_GPIO_BASE + 15,
|
|
|
|
+ .flags = GPIOF_OUT_INIT_LOW,
|
|
|
|
+ .label = "hookflash2",
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct regulator_consumer_supply modem_nreset_consumers[] = {
|
|
|
|
+ REGULATOR_SUPPLY("RESET#", "serial8250.1"),
|
|
|
|
+ REGULATOR_SUPPLY("POR", "cx20442-codec"),
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct regulator_init_data modem_nreset_data = {
|
|
|
|
+ .constraints = {
|
|
|
|
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
|
|
|
+ .boot_on = 1,
|
|
|
|
+ },
|
|
|
|
+ .num_consumer_supplies = ARRAY_SIZE(modem_nreset_consumers),
|
|
|
|
+ .consumer_supplies = modem_nreset_consumers,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct fixed_voltage_config modem_nreset_config = {
|
|
|
|
+ .supply_name = "modem_nreset",
|
|
|
|
+ .microvolts = 3300000,
|
|
|
|
+ .gpio = AMS_DELTA_GPIO_PIN_MODEM_NRESET,
|
|
|
|
+ .startup_delay = 25000,
|
|
|
|
+ .enable_high = 1,
|
|
|
|
+ .enabled_at_boot = 1,
|
|
|
|
+ .init_data = &modem_nreset_data,
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct platform_device modem_nreset_device = {
|
|
|
|
+ .name = "reg-fixed-voltage",
|
|
|
|
+ .id = -1,
|
|
|
|
+ .dev = {
|
|
|
|
+ .platform_data = &modem_nreset_config,
|
|
|
|
+ },
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+struct modem_private_data {
|
|
|
|
+ struct regulator *regulator;
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+static struct modem_private_data modem_priv;
|
|
|
|
+
|
|
|
|
+void ams_delta_latch_write(int base, int ngpio, u16 mask, u16 value)
|
|
|
|
+{
|
|
|
|
+ int bit = 0;
|
|
|
|
+ u16 bitpos = 1 << bit;
|
|
|
|
+
|
|
|
|
+ for (; bit < ngpio; bit++, bitpos = bitpos << 1) {
|
|
|
|
+ if (!(mask & bitpos))
|
|
|
|
+ continue;
|
|
|
|
+ else
|
|
|
|
+ gpio_set_value(base + bit, (value & bitpos) != 0);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+EXPORT_SYMBOL(ams_delta_latch_write);
|
|
|
|
+
|
|
|
|
+static struct resource ams_delta_nand_resources[] = {
|
|
|
|
+ [0] = {
|
|
|
|
+ .start = OMAP1_MPUIO_BASE,
|
|
|
|
+ .end = OMAP1_MPUIO_BASE +
|
|
|
|
+ OMAP_MPUIO_IO_CNTL + sizeof(u32) - 1,
|
|
|
|
+ .flags = IORESOURCE_MEM,
|
|
|
|
+ },
|
|
|
|
+};
|