21 #include <linux/kernel.h>
31 #include <linux/input.h>
54 #define PANDORA_WIFI_IRQ_GPIO 21
55 #define PANDORA_WIFI_NRESET_GPIO 23
56 #define OMAP3_PANDORA_TS_GPIO 94
58 static struct mtd_partition omap3pandora_nand_partitions[] = {
87 .parts = omap3pandora_nand_partitions,
88 .nr_parts =
ARRAY_SIZE(omap3pandora_nand_partitions),
91 static struct gpio_led pandora_gpio_leds[] = {
93 .name =
"pandora::sd1",
94 .default_trigger =
"mmc0",
97 .name =
"pandora::sd2",
98 .default_trigger =
"mmc1",
101 .name =
"pandora::bluetooth",
104 .name =
"pandora::wifi",
110 .leds = pandora_gpio_leds,
118 .platform_data = &pandora_gpio_led_data,
123 .name =
"pandora-backlight",
127 #define GPIO_BUTTON(gpio_num, ev_type, ev_code, act_low, descr) \
132 .active_low = act_low, \
133 .debounce_interval = 4, \
134 .desc = "btn " descr, \
137 #define GPIO_BUTTON_LOW(gpio_num, event_code, description) \
138 GPIO_BUTTON(gpio_num, EV_KEY, event_code, 1, description)
161 .buttons = pandora_gpio_keys,
169 .platform_data = &pandora_gpio_key_info,
173 static const uint32_t board_keymap[] = {
221 .keymap = board_keymap,
226 .keymap_data = &board_map_data,
234 .driver_name =
"tpo_td043mtea1_panel",
236 .phy.dpi.data_lines = 24,
242 .driver_name =
"venc",
253 .num_devices =
ARRAY_SIZE(pandora_dss_devices),
254 .devices = pandora_dss_devices,
255 .default_device = &pandora_lcd_device,
258 static void pandora_wl1251_init_card(
struct mmc_card *
card)
265 card->
cccr.wide_bus = 1;
266 card->
cis.vendor = 0x104c;
267 card->
cis.device = 0x9066;
268 card->
cis.blksize = 512;
269 card->
cis.max_dtr = 20000000;
295 .init_card = pandora_wl1251_init_card,
300 static int omap3pandora_twl_gpio_setup(
struct device *
dev,
301 unsigned gpio,
unsigned ngpio)
306 omap3pandora_mmc[0].
gpio_cd = gpio + 0;
307 omap3pandora_mmc[1].
gpio_cd = gpio + 1;
308 omap_hsmmc_late_init(omap3pandora_mmc);
311 gpio_32khz = gpio + 13;
314 pr_err(
"Cannot get GPIO line %d, ret=%d\n", gpio_32khz, ret);
322 .setup = omap3pandora_twl_gpio_setup,
373 .num_consumer_supplies =
ARRAY_SIZE(pandora_vmmc1_supply),
374 .consumer_supplies = pandora_vmmc1_supply,
388 .num_consumer_supplies =
ARRAY_SIZE(pandora_vmmc2_supply),
389 .consumer_supplies = pandora_vmmc2_supply,
403 .num_consumer_supplies =
ARRAY_SIZE(pandora_vcc_lcd_supply),
404 .consumer_supplies = pandora_vcc_lcd_supply,
418 .num_consumer_supplies =
ARRAY_SIZE(pandora_usb_phy_supply),
419 .consumer_supplies = pandora_usb_phy_supply,
433 .num_consumer_supplies =
ARRAY_SIZE(pandora_vaux4_supplies),
434 .consumer_supplies = pandora_vaux4_supplies,
448 .num_consumer_supplies =
ARRAY_SIZE(pandora_adac_supply),
449 .consumer_supplies = pandora_adac_supply,
457 .num_consumer_supplies =
ARRAY_SIZE(pandora_vmmc3_supply),
458 .consumer_supplies = pandora_vmmc3_supply,
462 .supply_name =
"vwlan",
463 .microvolts = 1800000,
465 .startup_delay = 50000,
467 .enabled_at_boot = 0,
468 .init_data = &pandora_vmmc3,
472 .name =
"reg-fixed-voltage",
475 .platform_data = &pandora_vwlan,
482 .use_poweroff =
true,
486 .gpio = &omap3pandora_gpio_data,
487 .vmmc1 = &pandora_vmmc1,
488 .vmmc2 = &pandora_vmmc2,
489 .vaux1 = &pandora_vaux1,
490 .vaux2 = &pandora_vaux2,
491 .vaux4 = &pandora_vaux4,
492 .vsim = &pandora_vsim,
493 .keypad = &pandora_kp_data,
494 .bci = &pandora_bci_data,
495 .power = &pandora_power_data,
505 static int __init omap3pandora_i2c_init(
void)
511 omap3pandora_twldata.
vdac->constraints.apply_uV =
true;
513 omap3pandora_twldata.
vpll2->constraints.apply_uV =
true;
514 omap3pandora_twldata.
vpll2->num_consumer_supplies =
516 omap3pandora_twldata.
vpll2->consumer_supplies = pandora_vdds_supplies;
518 omap3_pmic_init(
"tps65950", &omap3pandora_twldata);
527 .modalias =
"tpo_td043mtea1_panel_spi",
530 .max_speed_hz = 375000,
531 .platform_data = &pandora_lcd_device,
535 static void __init pandora_wl1251_init(
void)
540 memset(&pandora_wl1251_pdata, 0,
sizeof(pandora_wl1251_pdata));
547 if (pandora_wl1251_pdata.irq < 0)
550 pandora_wl1251_pdata.use_eeprom =
true;
566 &pandora_vwlan_device,
577 .reset_gpio_port[0] = -
EINVAL,
578 .reset_gpio_port[1] = 16,
579 .reset_gpio_port[2] = -
EINVAL
582 #ifdef CONFIG_OMAP_MUX
588 static void __init omap3pandora_init(
void)
591 omap_hsmmc_init(omap3pandora_mmc);
592 omap3pandora_i2c_init();
593 pandora_wl1251_init();
599 mt46h32m32lf6_sdrc_params);
613 .atag_offset = 0x100,
618 .handle_irq = omap3_intc_handle_irq,
619 .init_machine = omap3pandora_init,