2 * Board support file for OMAP4430 SDP.
4 * Copyright (C) 2009 Texas Instruments
6 * Author: Santosh Shilimkar <santosh.shilimkar@ti.com>
8 * Based on mach-omap2/board-3430sdp.c
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2 as
12 * published by the Free Software Foundation.
15 #include <linux/kernel.h>
16 #include <linux/init.h>
17 #include <linux/platform_device.h>
19 #include <linux/gpio.h>
20 #include <linux/usb/otg.h>
21 #include <linux/spi/spi.h>
22 #include <linux/i2c/twl.h>
23 #include <linux/mfd/twl6040.h>
24 #include <linux/gpio_keys.h>
25 #include <linux/regulator/machine.h>
26 #include <linux/regulator/fixed.h>
27 #include <linux/leds.h>
28 #include <linux/leds_pwm.h>
29 #include <linux/platform_data/omap4-keypad.h>
31 #include <asm/hardware/gic.h>
32 #include <asm/mach-types.h>
33 #include <asm/mach/arch.h>
34 #include <asm/mach/map.h>
38 #include "omap4-keypad.h"
39 #include <video/omapdss.h>
40 #include <video/omap-panel-nokia-dsi.h>
41 #include <video/omap-panel-picodlp.h>
42 #include <linux/wl12xx.h>
43 #include <linux/platform_data/omap-abe-twl6040.h>
50 #include "common-board-devices.h"
52 #define ETH_KS8851_IRQ 34
53 #define ETH_KS8851_POWER_ON 48
54 #define ETH_KS8851_QUART 138
55 #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
56 #define OMAP4_SFH7741_ENABLE_GPIO 188
57 #define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
58 #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
59 #define HDMI_GPIO_HPD 63 /* Hotplug detect */
60 #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
61 #define DLP_POWER_ON_GPIO 40
63 #define GPIO_WIFI_PMENA 54
64 #define GPIO_WIFI_IRQ 53
66 static const int sdp4430_keymap[] = {
72 KEY(0, 5, KEY_UNKNOWN),
74 KEY(0, 7, KEY_LEFTSHIFT),
81 KEY(1, 5, KEY_UNKNOWN),
90 KEY(2, 5, KEY_UNKNOWN),
92 KEY(2, 7, KEY_CAPSLOCK),
95 KEY(3, 1, KEY_KPPLUS),
99 KEY(3, 5, KEY_UNKNOWN),
101 KEY(3, 7, KEY_SPACE),
107 KEY(4, 4, KEY_VOLUMEUP),
108 KEY(4, 5, KEY_UNKNOWN),
117 KEY(5, 5, KEY_VOLUMEDOWN),
119 KEY(5, 7, KEY_RIGHT),
125 KEY(6, 4, KEY_BACKSPACE),
126 KEY(6, 5, KEY_UNKNOWN),
130 KEY(7, 0, KEY_PROG1),
131 KEY(7, 1, KEY_PROG2),
132 KEY(7, 2, KEY_PROG3),
133 KEY(7, 3, KEY_PROG4),
135 KEY(7, 5, KEY_UNKNOWN),
139 static struct omap_device_pad keypad_pads[] = {
140 { .name = "kpd_col1.kpd_col1",
141 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
143 { .name = "kpd_col1.kpd_col1",
144 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
146 { .name = "kpd_col2.kpd_col2",
147 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
149 { .name = "kpd_col3.kpd_col3",
150 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
152 { .name = "kpd_col4.kpd_col4",
153 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
155 { .name = "kpd_col5.kpd_col5",
156 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
158 { .name = "gpmc_a23.kpd_col7",
159 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
161 { .name = "gpmc_a22.kpd_col6",
162 .enable = OMAP_WAKEUP_EN | OMAP_MUX_MODE1,
164 { .name = "kpd_row0.kpd_row0",
165 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
166 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
168 { .name = "kpd_row1.kpd_row1",
169 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
170 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
172 { .name = "kpd_row2.kpd_row2",
173 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
174 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
176 { .name = "kpd_row3.kpd_row3",
177 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
178 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
180 { .name = "kpd_row4.kpd_row4",
181 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
182 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
184 { .name = "kpd_row5.kpd_row5",
185 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
186 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
188 { .name = "gpmc_a18.kpd_row6",
189 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
190 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
192 { .name = "gpmc_a19.kpd_row7",
193 .enable = OMAP_PULL_ENA | OMAP_PULL_UP | OMAP_WAKEUP_EN |
194 OMAP_MUX_MODE1 | OMAP_INPUT_EN,
198 static struct matrix_keymap_data sdp4430_keymap_data = {
199 .keymap = sdp4430_keymap,
200 .keymap_size = ARRAY_SIZE(sdp4430_keymap),
203 static struct omap4_keypad_platform_data sdp4430_keypad_data = {
204 .keymap_data = &sdp4430_keymap_data,
209 static struct omap_board_data keypad_data = {
212 .pads_cnt = ARRAY_SIZE(keypad_pads),
215 static struct gpio_led sdp4430_gpio_leds[] = {
217 .name = "omap4:green:debug0",
221 .name = "omap4:green:debug1",
225 .name = "omap4:green:debug2",
229 .name = "omap4:green:debug3",
233 .name = "omap4:green:debug4",
237 .name = "omap4:blue:user",
241 .name = "omap4:red:user",
245 .name = "omap4:green:user",
251 static struct gpio_keys_button sdp4430_gpio_keys[] = {
253 .desc = "Proximity Sensor",
255 .code = SW_FRONT_PROXIMITY,
256 .gpio = OMAP4_SFH7741_SENSOR_OUTPUT_GPIO,
261 static struct gpio_led_platform_data sdp4430_led_data = {
262 .leds = sdp4430_gpio_leds,
263 .num_leds = ARRAY_SIZE(sdp4430_gpio_leds),
266 static struct led_pwm sdp4430_pwm_leds[] = {
268 .name = "omap4:green:chrg",
270 .max_brightness = 255,
271 .pwm_period_ns = 7812500,
275 static struct led_pwm_platform_data sdp4430_pwm_data = {
276 .num_leds = ARRAY_SIZE(sdp4430_pwm_leds),
277 .leds = sdp4430_pwm_leds,
280 static struct platform_device sdp4430_leds_pwm = {
284 .platform_data = &sdp4430_pwm_data,
288 static int omap_prox_activate(struct device *dev)
290 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 1);
294 static void omap_prox_deactivate(struct device *dev)
296 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO , 0);
299 static struct gpio_keys_platform_data sdp4430_gpio_keys_data = {
300 .buttons = sdp4430_gpio_keys,
301 .nbuttons = ARRAY_SIZE(sdp4430_gpio_keys),
302 .enable = omap_prox_activate,
303 .disable = omap_prox_deactivate,
306 static struct platform_device sdp4430_gpio_keys_device = {
310 .platform_data = &sdp4430_gpio_keys_data,
314 static struct platform_device sdp4430_leds_gpio = {
318 .platform_data = &sdp4430_led_data,
321 static struct spi_board_info sdp4430_spi_board_info[] __initdata = {
323 .modalias = "ks8851",
326 .max_speed_hz = 24000000,
328 * .irq is set to gpio_to_irq(ETH_KS8851_IRQ)
329 * in omap_4430sdp_init
334 static struct gpio sdp4430_eth_gpios[] __initdata = {
335 { ETH_KS8851_POWER_ON, GPIOF_OUT_INIT_HIGH, "eth_power" },
336 { ETH_KS8851_QUART, GPIOF_OUT_INIT_HIGH, "quart" },
337 { ETH_KS8851_IRQ, GPIOF_IN, "eth_irq" },
340 static int __init omap_ethernet_init(void)
344 /* Request of GPIO lines */
345 status = gpio_request_array(sdp4430_eth_gpios,
346 ARRAY_SIZE(sdp4430_eth_gpios));
348 pr_err("Cannot request ETH GPIOs\n");
353 static struct regulator_consumer_supply sdp4430_vbat_supply[] = {
354 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
355 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
358 static struct regulator_init_data sdp4430_vbat_data = {
362 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vbat_supply),
363 .consumer_supplies = sdp4430_vbat_supply,
366 static struct fixed_voltage_config sdp4430_vbat_pdata = {
367 .supply_name = "VBAT",
368 .microvolts = 3750000,
369 .init_data = &sdp4430_vbat_data,
373 static struct platform_device sdp4430_vbat = {
374 .name = "reg-fixed-voltage",
377 .platform_data = &sdp4430_vbat_pdata,
381 static struct platform_device sdp4430_dmic_codec = {
382 .name = "dmic-codec",
386 static struct platform_device sdp4430_hdmi_audio_codec = {
387 .name = "hdmi-audio-codec",
391 static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
392 .card_name = "SDP4430",
393 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
394 .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
396 .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
397 .has_vibra = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
403 .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
406 /* MCLK input is 38.4MHz */
407 .mclk_freq = 38400000,
410 static struct platform_device sdp4430_abe_audio = {
411 .name = "omap-abe-twl6040",
414 .platform_data = &sdp4430_abe_audio_data,
418 static struct platform_device *sdp4430_devices[] __initdata = {
419 &sdp4430_gpio_keys_device,
425 &sdp4430_hdmi_audio_codec,
428 static struct omap_musb_board_data musb_board_data = {
429 .interface_type = MUSB_INTERFACE_UTMI,
434 static struct omap2_hsmmc_info mmc[] = {
437 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
440 .nonremovable = true,
441 .ocr_mask = MMC_VDD_29_30,
446 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
452 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
453 .pm_caps = MMC_PM_KEEP_POWER,
456 .ocr_mask = MMC_VDD_165_195,
457 .nonremovable = true,
462 static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
463 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
466 static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply = {
468 .dev_name = "omap_hsmmc.4",
471 static struct regulator_init_data sdp4430_vmmc5 = {
473 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
475 .num_consumer_supplies = 1,
476 .consumer_supplies = &omap4_sdp4430_vmmc5_supply,
479 static struct fixed_voltage_config sdp4430_vwlan = {
480 .supply_name = "vwl1271",
481 .microvolts = 1800000, /* 1.8V */
482 .gpio = GPIO_WIFI_PMENA,
483 .startup_delay = 70000, /* 70msec */
485 .enabled_at_boot = 0,
486 .init_data = &sdp4430_vmmc5,
489 static struct platform_device omap_vwlan_device = {
490 .name = "reg-fixed-voltage",
493 .platform_data = &sdp4430_vwlan,
497 static struct regulator_init_data sdp4430_vaux1 = {
502 .valid_modes_mask = REGULATOR_MODE_NORMAL
503 | REGULATOR_MODE_STANDBY,
504 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
505 | REGULATOR_CHANGE_MODE
506 | REGULATOR_CHANGE_STATUS,
508 .num_consumer_supplies = ARRAY_SIZE(sdp4430_vaux_supply),
509 .consumer_supplies = sdp4430_vaux_supply,
512 static struct regulator_init_data sdp4430_vusim = {
517 .valid_modes_mask = REGULATOR_MODE_NORMAL
518 | REGULATOR_MODE_STANDBY,
519 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
520 | REGULATOR_CHANGE_MODE
521 | REGULATOR_CHANGE_STATUS,
525 static struct twl6040_codec_data twl6040_codec = {
526 /* single-step ramp for headset and handsfree */
527 .hs_left_step = 0x0f,
528 .hs_right_step = 0x0f,
529 .hf_left_step = 0x1d,
530 .hf_right_step = 0x1d,
533 static struct twl6040_vibra_data twl6040_vibra = {
538 .vddvibl_uV = 0, /* fixed volt supply - VBAT */
539 .vddvibr_uV = 0, /* fixed volt supply - VBAT */
542 static struct twl6040_platform_data twl6040_data = {
543 .codec = &twl6040_codec,
544 .vibra = &twl6040_vibra,
545 .audpwron_gpio = 127,
548 static struct i2c_board_info __initdata sdp4430_i2c_1_boardinfo[] = {
550 I2C_BOARD_INFO("twl6040", 0x4b),
551 .irq = 119 + OMAP44XX_IRQ_GIC_START,
552 .platform_data = &twl6040_data,
556 static struct twl4030_platform_data sdp4430_twldata = {
558 .vusim = &sdp4430_vusim,
559 .vaux1 = &sdp4430_vaux1,
562 static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
564 I2C_BOARD_INFO("tmp105", 0x48),
567 I2C_BOARD_INFO("bh1780", 0x29),
570 static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
572 I2C_BOARD_INFO("hmc5843", 0x1e),
575 static int __init omap4_i2c_init(void)
577 omap4_pmic_get_config(&sdp4430_twldata, TWL_COMMON_PDATA_USB,
578 TWL_COMMON_REGULATOR_VDAC |
579 TWL_COMMON_REGULATOR_VAUX2 |
580 TWL_COMMON_REGULATOR_VAUX3 |
581 TWL_COMMON_REGULATOR_VMMC |
582 TWL_COMMON_REGULATOR_VPP |
583 TWL_COMMON_REGULATOR_VANA |
584 TWL_COMMON_REGULATOR_VCXIO |
585 TWL_COMMON_REGULATOR_VUSB |
586 TWL_COMMON_REGULATOR_CLK32KG |
587 TWL_COMMON_REGULATOR_V1V8 |
588 TWL_COMMON_REGULATOR_V2V1);
589 omap4_pmic_init("twl6030", &sdp4430_twldata, sdp4430_i2c_1_boardinfo,
590 ARRAY_SIZE(sdp4430_i2c_1_boardinfo));
591 omap_register_i2c_bus(2, 400, NULL, 0);
592 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo,
593 ARRAY_SIZE(sdp4430_i2c_3_boardinfo));
594 omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo,
595 ARRAY_SIZE(sdp4430_i2c_4_boardinfo));
599 static void __init omap_sfh7741prox_init(void)
603 error = gpio_request_one(OMAP4_SFH7741_ENABLE_GPIO,
604 GPIOF_OUT_INIT_LOW, "sfh7741");
606 pr_err("%s:failed to request GPIO %d, error %d\n",
607 __func__, OMAP4_SFH7741_ENABLE_GPIO, error);
610 static struct nokia_dsi_panel_data dsi1_panel = {
618 .pins = { 0, 1, 2, 3, 4, 5 },
622 static struct omap_dss_device sdp4430_lcd_device = {
624 .driver_name = "taal",
625 .type = OMAP_DISPLAY_TYPE_DSI,
630 .channel = OMAP_DSS_CHANNEL_LCD,
633 static struct nokia_dsi_panel_data dsi2_panel = {
641 .pins = { 0, 1, 2, 3, 4, 5 },
645 static struct omap_dss_device sdp4430_lcd2_device = {
647 .driver_name = "taal",
648 .type = OMAP_DISPLAY_TYPE_DSI,
654 .channel = OMAP_DSS_CHANNEL_LCD2,
657 static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
658 .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
659 .ls_oe_gpio = HDMI_GPIO_LS_OE,
660 .hpd_gpio = HDMI_GPIO_HPD,
663 static struct omap_dss_device sdp4430_hdmi_device = {
665 .driver_name = "hdmi_panel",
666 .type = OMAP_DISPLAY_TYPE_HDMI,
667 .channel = OMAP_DSS_CHANNEL_DIGIT,
668 .data = &sdp4430_hdmi_data,
671 static struct picodlp_panel_data sdp4430_picodlp_pdata = {
672 .picodlp_adapter_id = 2,
677 static void sdp4430_picodlp_init(void)
680 const struct gpio picodlp_gpios[] = {
681 {DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
683 {sdp4430_picodlp_pdata.emu_done_gpio, GPIOF_IN,
685 {sdp4430_picodlp_pdata.pwrgood_gpio, GPIOF_OUT_INIT_LOW,
689 r = gpio_request_array(picodlp_gpios, ARRAY_SIZE(picodlp_gpios));
691 pr_err("Cannot request PicoDLP GPIOs, error %d\n", r);
694 static int sdp4430_panel_enable_picodlp(struct omap_dss_device *dssdev)
696 gpio_set_value(DISPLAY_SEL_GPIO, 0);
697 gpio_set_value(DLP_POWER_ON_GPIO, 1);
702 static void sdp4430_panel_disable_picodlp(struct omap_dss_device *dssdev)
704 gpio_set_value(DLP_POWER_ON_GPIO, 0);
705 gpio_set_value(DISPLAY_SEL_GPIO, 1);
708 static struct omap_dss_device sdp4430_picodlp_device = {
710 .driver_name = "picodlp_panel",
711 .type = OMAP_DISPLAY_TYPE_DPI,
712 .phy.dpi.data_lines = 24,
713 .channel = OMAP_DSS_CHANNEL_LCD2,
714 .platform_enable = sdp4430_panel_enable_picodlp,
715 .platform_disable = sdp4430_panel_disable_picodlp,
716 .data = &sdp4430_picodlp_pdata,
719 static struct omap_dss_device *sdp4430_dss_devices[] = {
721 &sdp4430_lcd2_device,
722 &sdp4430_hdmi_device,
723 &sdp4430_picodlp_device,
726 static struct omap_dss_board_info sdp4430_dss_data = {
727 .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
728 .devices = sdp4430_dss_devices,
729 .default_device = &sdp4430_lcd_device,
732 static void __init omap_4430sdp_display_init(void)
736 /* Enable LCD2 by default (instead of Pico DLP) */
737 r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH,
740 pr_err("%s: Could not get display_sel GPIO\n", __func__);
742 sdp4430_picodlp_init();
743 omap_display_init(&sdp4430_dss_data);
745 * OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
746 * later have external pull up on the HDMI I2C lines
748 if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
749 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
753 omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
754 omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
755 omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
758 #ifdef CONFIG_OMAP_MUX
759 static struct omap_board_mux board_mux[] __initdata = {
760 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
761 /* NIRQ2 for twl6040 */
762 OMAP4_MUX(SYS_NIRQ2, OMAP_MUX_MODE0 |
763 OMAP_PIN_INPUT_PULLUP | OMAP_PIN_OFF_WAKEUPENABLE),
764 /* GPIO_127 for twl6040 */
765 OMAP4_MUX(HDQ_SIO, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
767 OMAP4_MUX(ABE_PDM_UL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
768 OMAP4_MUX(ABE_PDM_DL_DATA, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
769 OMAP4_MUX(ABE_PDM_FRAME, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
770 OMAP4_MUX(ABE_PDM_LB_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
771 OMAP4_MUX(ABE_CLKS, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
773 OMAP4_MUX(ABE_DMIC_CLK1, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT),
774 OMAP4_MUX(ABE_DMIC_DIN1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
775 OMAP4_MUX(ABE_DMIC_DIN2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
776 OMAP4_MUX(ABE_DMIC_DIN3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
778 OMAP4_MUX(ABE_MCBSP1_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
779 OMAP4_MUX(ABE_MCBSP1_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
780 OMAP4_MUX(ABE_MCBSP1_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT |
782 OMAP4_MUX(ABE_MCBSP1_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
784 OMAP4_MUX(ABE_MCBSP2_CLKX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
785 OMAP4_MUX(ABE_MCBSP2_DR, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLDOWN),
786 OMAP4_MUX(ABE_MCBSP2_DX, OMAP_MUX_MODE0 | OMAP_PIN_OUTPUT |
788 OMAP4_MUX(ABE_MCBSP2_FSX, OMAP_MUX_MODE0 | OMAP_PIN_INPUT),
790 { .reg_offset = OMAP_MUX_TERMINATOR },
794 #define board_mux NULL
797 static void __init omap4_sdp4430_wifi_mux_init(void)
799 omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT |
800 OMAP_PIN_OFF_WAKEUPENABLE);
801 omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT);
803 omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd",
804 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
805 omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk",
806 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
807 omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0",
808 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
809 omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1",
810 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
811 omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2",
812 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
813 omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3",
814 OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP);
818 static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = {
819 .board_ref_clock = WL12XX_REFCLOCK_26,
820 .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
823 static void __init omap4_sdp4430_wifi_init(void)
827 omap4_sdp4430_wifi_mux_init();
828 omap4_sdp4430_wlan_data.irq = gpio_to_irq(GPIO_WIFI_IRQ);
829 ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
831 pr_err("Error setting wl12xx data: %d\n", ret);
832 ret = platform_device_register(&omap_vwlan_device);
834 pr_err("Error registering wl12xx device: %d\n", ret);
837 static void __init omap_4430sdp_init(void)
840 int package = OMAP_PACKAGE_CBS;
842 if (omap_rev() == OMAP4430_REV_ES1_0)
843 package = OMAP_PACKAGE_CBL;
844 omap4_mux_init(board_mux, NULL, package);
847 omap_sfh7741prox_init();
848 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
850 omap_sdrc_init(NULL, NULL);
851 omap4_sdp4430_wifi_init();
852 omap4_twl6030_hsmmc_init(mmc);
854 usb_musb_init(&musb_board_data);
856 status = omap_ethernet_init();
858 pr_err("Ethernet initialization failed: %d\n", status);
860 sdp4430_spi_board_info[0].irq = gpio_to_irq(ETH_KS8851_IRQ);
861 spi_register_board_info(sdp4430_spi_board_info,
862 ARRAY_SIZE(sdp4430_spi_board_info));
865 status = omap4_keyboard_init(&sdp4430_keypad_data, &keypad_data);
867 pr_err("Keypad initialization failed: %d\n", status);
869 omap_4430sdp_display_init();
872 MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
873 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
874 .atag_offset = 0x100,
875 .smp = smp_ops(omap4_smp_ops),
876 .reserve = omap_reserve,
877 .map_io = omap4_map_io,
878 .init_early = omap4430_init_early,
879 .init_irq = gic_init_irq,
880 .handle_irq = gic_handle_irq,
881 .init_machine = omap_4430sdp_init,
882 .init_late = omap4430_init_late,
883 .timer = &omap4_timer,
884 .restart = omap_prcm_restart,