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/gpio_keys.h>
24 #include <linux/regulator/machine.h>
25 #include <linux/regulator/fixed.h>
26 #include <linux/leds.h>
27 #include <linux/leds_pwm.h>
29 #include <mach/hardware.h>
30 #include <asm/hardware/gic.h>
31 #include <asm/mach-types.h>
32 #include <asm/mach/arch.h>
33 #include <asm/mach/map.h>
35 #include <plat/board.h>
39 #include <plat/omap4-keypad.h>
40 #include <video/omapdss.h>
41 #include <video/omap-panel-nokia-dsi.h>
42 #include <video/omap-panel-picodlp.h>
43 #include <linux/wl12xx.h>
48 #include "common-board-devices.h"
50 #define ETH_KS8851_IRQ 34
51 #define ETH_KS8851_POWER_ON 48
52 #define ETH_KS8851_QUART 138
53 #define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
54 #define OMAP4_SFH7741_ENABLE_GPIO 188
55 #define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
56 #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
57 #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
58 #define DLP_POWER_ON_GPIO 40
60 #define GPIO_WIFI_PMENA 54
61 #define GPIO_WIFI_IRQ 53
63 static const int sdp4430_keymap
[] = {
69 KEY(0, 5, KEY_UNKNOWN
),
71 KEY(0, 7, KEY_LEFTSHIFT
),
78 KEY(1, 5, KEY_UNKNOWN
),
87 KEY(2, 5, KEY_UNKNOWN
),
89 KEY(2, 7, KEY_CAPSLOCK
),
92 KEY(3, 1, KEY_KPPLUS
),
96 KEY(3, 5, KEY_UNKNOWN
),
104 KEY(4, 4, KEY_VOLUMEUP
),
105 KEY(4, 5, KEY_UNKNOWN
),
114 KEY(5, 5, KEY_VOLUMEDOWN
),
116 KEY(5, 7, KEY_RIGHT
),
122 KEY(6, 4, KEY_BACKSPACE
),
123 KEY(6, 5, KEY_UNKNOWN
),
127 KEY(7, 0, KEY_PROG1
),
128 KEY(7, 1, KEY_PROG2
),
129 KEY(7, 2, KEY_PROG3
),
130 KEY(7, 3, KEY_PROG4
),
132 KEY(7, 5, KEY_UNKNOWN
),
136 static struct omap_device_pad keypad_pads
[] = {
137 { .name
= "kpd_col1.kpd_col1",
138 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
140 { .name
= "kpd_col1.kpd_col1",
141 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
143 { .name
= "kpd_col2.kpd_col2",
144 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
146 { .name
= "kpd_col3.kpd_col3",
147 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
149 { .name
= "kpd_col4.kpd_col4",
150 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
152 { .name
= "kpd_col5.kpd_col5",
153 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
155 { .name
= "gpmc_a23.kpd_col7",
156 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
158 { .name
= "gpmc_a22.kpd_col6",
159 .enable
= OMAP_WAKEUP_EN
| OMAP_MUX_MODE1
,
161 { .name
= "kpd_row0.kpd_row0",
162 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
163 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
165 { .name
= "kpd_row1.kpd_row1",
166 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
167 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
169 { .name
= "kpd_row2.kpd_row2",
170 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
171 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
173 { .name
= "kpd_row3.kpd_row3",
174 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
175 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
177 { .name
= "kpd_row4.kpd_row4",
178 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
179 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
181 { .name
= "kpd_row5.kpd_row5",
182 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
183 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
185 { .name
= "gpmc_a18.kpd_row6",
186 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
187 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
189 { .name
= "gpmc_a19.kpd_row7",
190 .enable
= OMAP_PULL_ENA
| OMAP_PULL_UP
| OMAP_WAKEUP_EN
|
191 OMAP_MUX_MODE1
| OMAP_INPUT_EN
,
195 static struct matrix_keymap_data sdp4430_keymap_data
= {
196 .keymap
= sdp4430_keymap
,
197 .keymap_size
= ARRAY_SIZE(sdp4430_keymap
),
200 static struct omap4_keypad_platform_data sdp4430_keypad_data
= {
201 .keymap_data
= &sdp4430_keymap_data
,
206 static struct omap_board_data keypad_data
= {
209 .pads_cnt
= ARRAY_SIZE(keypad_pads
),
212 static struct gpio_led sdp4430_gpio_leds
[] = {
214 .name
= "omap4:green:debug0",
218 .name
= "omap4:green:debug1",
222 .name
= "omap4:green:debug2",
226 .name
= "omap4:green:debug3",
230 .name
= "omap4:green:debug4",
234 .name
= "omap4:blue:user",
238 .name
= "omap4:red:user",
242 .name
= "omap4:green:user",
248 static struct gpio_keys_button sdp4430_gpio_keys
[] = {
250 .desc
= "Proximity Sensor",
252 .code
= SW_FRONT_PROXIMITY
,
253 .gpio
= OMAP4_SFH7741_SENSOR_OUTPUT_GPIO
,
258 static struct gpio_led_platform_data sdp4430_led_data
= {
259 .leds
= sdp4430_gpio_leds
,
260 .num_leds
= ARRAY_SIZE(sdp4430_gpio_leds
),
263 static struct led_pwm sdp4430_pwm_leds
[] = {
265 .name
= "omap4:green:chrg",
267 .max_brightness
= 255,
268 .pwm_period_ns
= 7812500,
272 static struct led_pwm_platform_data sdp4430_pwm_data
= {
273 .num_leds
= ARRAY_SIZE(sdp4430_pwm_leds
),
274 .leds
= sdp4430_pwm_leds
,
277 static struct platform_device sdp4430_leds_pwm
= {
281 .platform_data
= &sdp4430_pwm_data
,
285 static int omap_prox_activate(struct device
*dev
)
287 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO
, 1);
291 static void omap_prox_deactivate(struct device
*dev
)
293 gpio_set_value(OMAP4_SFH7741_ENABLE_GPIO
, 0);
296 static struct gpio_keys_platform_data sdp4430_gpio_keys_data
= {
297 .buttons
= sdp4430_gpio_keys
,
298 .nbuttons
= ARRAY_SIZE(sdp4430_gpio_keys
),
299 .enable
= omap_prox_activate
,
300 .disable
= omap_prox_deactivate
,
303 static struct platform_device sdp4430_gpio_keys_device
= {
307 .platform_data
= &sdp4430_gpio_keys_data
,
311 static struct platform_device sdp4430_leds_gpio
= {
315 .platform_data
= &sdp4430_led_data
,
318 static struct spi_board_info sdp4430_spi_board_info
[] __initdata
= {
320 .modalias
= "ks8851",
323 .max_speed_hz
= 24000000,
324 .irq
= ETH_KS8851_IRQ
,
328 static struct gpio sdp4430_eth_gpios
[] __initdata
= {
329 { ETH_KS8851_POWER_ON
, GPIOF_OUT_INIT_HIGH
, "eth_power" },
330 { ETH_KS8851_QUART
, GPIOF_OUT_INIT_HIGH
, "quart" },
331 { ETH_KS8851_IRQ
, GPIOF_IN
, "eth_irq" },
334 static int __init
omap_ethernet_init(void)
338 /* Request of GPIO lines */
339 status
= gpio_request_array(sdp4430_eth_gpios
,
340 ARRAY_SIZE(sdp4430_eth_gpios
));
342 pr_err("Cannot request ETH GPIOs\n");
347 static struct regulator_consumer_supply sdp4430_vbat_supply
[] = {
348 REGULATOR_SUPPLY("vddvibl", "twl6040-vibra"),
349 REGULATOR_SUPPLY("vddvibr", "twl6040-vibra"),
352 static struct regulator_init_data sdp4430_vbat_data
= {
356 .num_consumer_supplies
= ARRAY_SIZE(sdp4430_vbat_supply
),
357 .consumer_supplies
= sdp4430_vbat_supply
,
360 static struct fixed_voltage_config sdp4430_vbat_pdata
= {
361 .supply_name
= "VBAT",
362 .microvolts
= 3750000,
363 .init_data
= &sdp4430_vbat_data
,
367 static struct platform_device sdp4430_vbat
= {
368 .name
= "reg-fixed-voltage",
371 .platform_data
= &sdp4430_vbat_pdata
,
375 static struct platform_device sdp4430_dmic_codec
= {
376 .name
= "dmic-codec",
380 static struct platform_device
*sdp4430_devices
[] __initdata
= {
381 &sdp4430_gpio_keys_device
,
388 static struct omap_musb_board_data musb_board_data
= {
389 .interface_type
= MUSB_INTERFACE_UTMI
,
394 static struct omap2_hsmmc_info mmc
[] = {
397 .caps
= MMC_CAP_4_BIT_DATA
| MMC_CAP_8_BIT_DATA
,
400 .nonremovable
= true,
401 .ocr_mask
= MMC_VDD_29_30
,
406 .caps
= MMC_CAP_4_BIT_DATA
| MMC_CAP_8_BIT_DATA
,
412 .caps
= MMC_CAP_4_BIT_DATA
| MMC_CAP_POWER_OFF_CARD
,
413 .pm_caps
= MMC_PM_KEEP_POWER
,
416 .ocr_mask
= MMC_VDD_165_195
,
417 .nonremovable
= true,
422 static struct regulator_consumer_supply sdp4430_vaux_supply
[] = {
423 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"),
426 static struct regulator_consumer_supply omap4_sdp4430_vmmc5_supply
= {
428 .dev_name
= "omap_hsmmc.4",
431 static struct regulator_init_data sdp4430_vmmc5
= {
433 .valid_ops_mask
= REGULATOR_CHANGE_STATUS
,
435 .num_consumer_supplies
= 1,
436 .consumer_supplies
= &omap4_sdp4430_vmmc5_supply
,
439 static struct fixed_voltage_config sdp4430_vwlan
= {
440 .supply_name
= "vwl1271",
441 .microvolts
= 1800000, /* 1.8V */
442 .gpio
= GPIO_WIFI_PMENA
,
443 .startup_delay
= 70000, /* 70msec */
445 .enabled_at_boot
= 0,
446 .init_data
= &sdp4430_vmmc5
,
449 static struct platform_device omap_vwlan_device
= {
450 .name
= "reg-fixed-voltage",
453 .platform_data
= &sdp4430_vwlan
,
457 static int omap4_twl6030_hsmmc_late_init(struct device
*dev
)
460 struct platform_device
*pdev
= container_of(dev
,
461 struct platform_device
, dev
);
462 struct omap_mmc_platform_data
*pdata
= dev
->platform_data
;
464 /* Setting MMC1 Card detect Irq */
466 ret
= twl6030_mmc_card_detect_config();
468 pr_err("Failed configuring MMC1 card detect\n");
469 pdata
->slots
[0].card_detect_irq
= TWL6030_IRQ_BASE
+
470 MMCDETECT_INTR_OFFSET
;
471 pdata
->slots
[0].card_detect
= twl6030_mmc_card_detect
;
476 static __init
void omap4_twl6030_hsmmc_set_late_init(struct device
*dev
)
478 struct omap_mmc_platform_data
*pdata
;
480 /* dev can be null if CONFIG_MMC_OMAP_HS is not set */
482 pr_err("Failed %s\n", __func__
);
485 pdata
= dev
->platform_data
;
486 pdata
->init
= omap4_twl6030_hsmmc_late_init
;
489 static int __init
omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info
*controllers
)
491 struct omap2_hsmmc_info
*c
;
493 omap2_hsmmc_init(controllers
);
494 for (c
= controllers
; c
->mmc
; c
++)
495 omap4_twl6030_hsmmc_set_late_init(c
->dev
);
500 static struct regulator_init_data sdp4430_vaux1
= {
505 .valid_modes_mask
= REGULATOR_MODE_NORMAL
506 | REGULATOR_MODE_STANDBY
,
507 .valid_ops_mask
= REGULATOR_CHANGE_VOLTAGE
508 | REGULATOR_CHANGE_MODE
509 | REGULATOR_CHANGE_STATUS
,
511 .num_consumer_supplies
= ARRAY_SIZE(sdp4430_vaux_supply
),
512 .consumer_supplies
= sdp4430_vaux_supply
,
515 static struct regulator_init_data sdp4430_vusim
= {
520 .valid_modes_mask
= REGULATOR_MODE_NORMAL
521 | REGULATOR_MODE_STANDBY
,
522 .valid_ops_mask
= REGULATOR_CHANGE_VOLTAGE
523 | REGULATOR_CHANGE_MODE
524 | REGULATOR_CHANGE_STATUS
,
528 static struct twl4030_codec_data twl6040_codec
= {
529 /* single-step ramp for headset and handsfree */
530 .hs_left_step
= 0x0f,
531 .hs_right_step
= 0x0f,
532 .hf_left_step
= 0x1d,
533 .hf_right_step
= 0x1d,
536 static struct twl4030_vibra_data twl6040_vibra
= {
541 .vddvibl_uV
= 0, /* fixed volt supply - VBAT */
542 .vddvibr_uV
= 0, /* fixed volt supply - VBAT */
545 static struct twl4030_audio_data twl6040_audio
= {
546 .codec
= &twl6040_codec
,
547 .vibra
= &twl6040_vibra
,
548 .audpwron_gpio
= 127,
549 .naudint_irq
= OMAP44XX_IRQ_SYS_2N
,
550 .irq_base
= TWL6040_CODEC_IRQ_BASE
,
553 static struct twl4030_platform_data sdp4430_twldata
= {
554 .audio
= &twl6040_audio
,
556 .vusim
= &sdp4430_vusim
,
557 .vaux1
= &sdp4430_vaux1
,
560 static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo
[] = {
562 I2C_BOARD_INFO("tmp105", 0x48),
565 I2C_BOARD_INFO("bh1780", 0x29),
568 static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo
[] = {
570 I2C_BOARD_INFO("hmc5843", 0x1e),
573 static int __init
omap4_i2c_init(void)
575 omap4_pmic_get_config(&sdp4430_twldata
, TWL_COMMON_PDATA_USB
,
576 TWL_COMMON_REGULATOR_VDAC
|
577 TWL_COMMON_REGULATOR_VAUX2
|
578 TWL_COMMON_REGULATOR_VAUX3
|
579 TWL_COMMON_REGULATOR_VMMC
|
580 TWL_COMMON_REGULATOR_VPP
|
581 TWL_COMMON_REGULATOR_VANA
|
582 TWL_COMMON_REGULATOR_VCXIO
|
583 TWL_COMMON_REGULATOR_VUSB
|
584 TWL_COMMON_REGULATOR_CLK32KG
);
585 omap4_pmic_init("twl6030", &sdp4430_twldata
);
586 omap_register_i2c_bus(2, 400, NULL
, 0);
587 omap_register_i2c_bus(3, 400, sdp4430_i2c_3_boardinfo
,
588 ARRAY_SIZE(sdp4430_i2c_3_boardinfo
));
589 omap_register_i2c_bus(4, 400, sdp4430_i2c_4_boardinfo
,
590 ARRAY_SIZE(sdp4430_i2c_4_boardinfo
));
594 static void __init
omap_sfh7741prox_init(void)
598 error
= gpio_request_one(OMAP4_SFH7741_ENABLE_GPIO
,
599 GPIOF_OUT_INIT_LOW
, "sfh7741");
601 pr_err("%s:failed to request GPIO %d, error %d\n",
602 __func__
, OMAP4_SFH7741_ENABLE_GPIO
, error
);
605 static void sdp4430_hdmi_mux_init(void)
607 /* PAD0_HDMI_HPD_PAD1_HDMI_CEC */
608 omap_mux_init_signal("hdmi_hpd",
609 OMAP_PIN_INPUT_PULLUP
);
610 omap_mux_init_signal("hdmi_cec",
611 OMAP_PIN_INPUT_PULLUP
);
612 /* PAD0_HDMI_DDC_SCL_PAD1_HDMI_DDC_SDA */
613 omap_mux_init_signal("hdmi_ddc_scl",
614 OMAP_PIN_INPUT_PULLUP
);
615 omap_mux_init_signal("hdmi_ddc_sda",
616 OMAP_PIN_INPUT_PULLUP
);
619 static struct gpio sdp4430_hdmi_gpios
[] = {
620 { HDMI_GPIO_HPD
, GPIOF_OUT_INIT_HIGH
, "hdmi_gpio_hpd" },
621 { HDMI_GPIO_LS_OE
, GPIOF_OUT_INIT_HIGH
, "hdmi_gpio_ls_oe" },
624 static int sdp4430_panel_enable_hdmi(struct omap_dss_device
*dssdev
)
628 status
= gpio_request_array(sdp4430_hdmi_gpios
,
629 ARRAY_SIZE(sdp4430_hdmi_gpios
));
631 pr_err("%s: Cannot request HDMI GPIOs\n", __func__
);
636 static void sdp4430_panel_disable_hdmi(struct omap_dss_device
*dssdev
)
638 gpio_free(HDMI_GPIO_LS_OE
);
639 gpio_free(HDMI_GPIO_HPD
);
642 static struct nokia_dsi_panel_data dsi1_panel
= {
650 static struct omap_dss_device sdp4430_lcd_device
= {
652 .driver_name
= "taal",
653 .type
= OMAP_DISPLAY_TYPE_DSI
,
669 /* Logic Clock = 172.8 MHz */
671 /* Pixel Clock = 34.56 MHz */
673 .lcd_clk_src
= OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DISPC
,
675 .dispc_fclk_src
= OMAP_DSS_CLK_SRC_FCK
,
679 .regn
= 16, /* Fint = 2.4 MHz */
680 .regm
= 180, /* DDR Clock = 216 MHz */
681 .regm_dispc
= 5, /* PLL1_CLK1 = 172.8 MHz */
682 .regm_dsi
= 5, /* PLL1_CLK2 = 172.8 MHz */
684 .lp_clk_div
= 10, /* LP Clock = 8.64 MHz */
685 .dsi_fclk_src
= OMAP_DSS_CLK_SRC_DSI_PLL_HSDIV_DSI
,
688 .channel
= OMAP_DSS_CHANNEL_LCD
,
691 static struct nokia_dsi_panel_data dsi2_panel
= {
699 static struct omap_dss_device sdp4430_lcd2_device
= {
701 .driver_name
= "taal",
702 .type
= OMAP_DISPLAY_TYPE_DSI
,
718 /* Logic Clock = 172.8 MHz */
720 /* Pixel Clock = 34.56 MHz */
722 .lcd_clk_src
= OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DISPC
,
724 .dispc_fclk_src
= OMAP_DSS_CLK_SRC_FCK
,
728 .regn
= 16, /* Fint = 2.4 MHz */
729 .regm
= 180, /* DDR Clock = 216 MHz */
730 .regm_dispc
= 5, /* PLL1_CLK1 = 172.8 MHz */
731 .regm_dsi
= 5, /* PLL1_CLK2 = 172.8 MHz */
733 .lp_clk_div
= 10, /* LP Clock = 8.64 MHz */
734 .dsi_fclk_src
= OMAP_DSS_CLK_SRC_DSI2_PLL_HSDIV_DSI
,
737 .channel
= OMAP_DSS_CHANNEL_LCD2
,
740 static void sdp4430_lcd_init(void)
744 r
= gpio_request_one(dsi1_panel
.reset_gpio
, GPIOF_DIR_OUT
,
747 pr_err("%s: Could not get lcd1_reset_gpio\n", __func__
);
749 r
= gpio_request_one(dsi2_panel
.reset_gpio
, GPIOF_DIR_OUT
,
752 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__
);
755 static struct omap_dss_device sdp4430_hdmi_device
= {
757 .driver_name
= "hdmi_panel",
758 .type
= OMAP_DISPLAY_TYPE_HDMI
,
759 .platform_enable
= sdp4430_panel_enable_hdmi
,
760 .platform_disable
= sdp4430_panel_disable_hdmi
,
761 .channel
= OMAP_DSS_CHANNEL_DIGIT
,
764 static struct picodlp_panel_data sdp4430_picodlp_pdata
= {
765 .picodlp_adapter_id
= 2,
770 static void sdp4430_picodlp_init(void)
773 const struct gpio picodlp_gpios
[] = {
774 {DLP_POWER_ON_GPIO
, GPIOF_OUT_INIT_LOW
,
776 {sdp4430_picodlp_pdata
.emu_done_gpio
, GPIOF_IN
,
778 {sdp4430_picodlp_pdata
.pwrgood_gpio
, GPIOF_OUT_INIT_LOW
,
782 r
= gpio_request_array(picodlp_gpios
, ARRAY_SIZE(picodlp_gpios
));
784 pr_err("Cannot request PicoDLP GPIOs, error %d\n", r
);
787 static int sdp4430_panel_enable_picodlp(struct omap_dss_device
*dssdev
)
789 gpio_set_value(DISPLAY_SEL_GPIO
, 0);
790 gpio_set_value(DLP_POWER_ON_GPIO
, 1);
795 static void sdp4430_panel_disable_picodlp(struct omap_dss_device
*dssdev
)
797 gpio_set_value(DLP_POWER_ON_GPIO
, 0);
798 gpio_set_value(DISPLAY_SEL_GPIO
, 1);
801 static struct omap_dss_device sdp4430_picodlp_device
= {
803 .driver_name
= "picodlp_panel",
804 .type
= OMAP_DISPLAY_TYPE_DPI
,
805 .phy
.dpi
.data_lines
= 24,
806 .channel
= OMAP_DSS_CHANNEL_LCD2
,
807 .platform_enable
= sdp4430_panel_enable_picodlp
,
808 .platform_disable
= sdp4430_panel_disable_picodlp
,
809 .data
= &sdp4430_picodlp_pdata
,
812 static struct omap_dss_device
*sdp4430_dss_devices
[] = {
814 &sdp4430_lcd2_device
,
815 &sdp4430_hdmi_device
,
816 &sdp4430_picodlp_device
,
819 static struct omap_dss_board_info sdp4430_dss_data
= {
820 .num_devices
= ARRAY_SIZE(sdp4430_dss_devices
),
821 .devices
= sdp4430_dss_devices
,
822 .default_device
= &sdp4430_lcd_device
,
825 static void omap_4430sdp_display_init(void)
829 /* Enable LCD2 by default (instead of Pico DLP) */
830 r
= gpio_request_one(DISPLAY_SEL_GPIO
, GPIOF_OUT_INIT_HIGH
,
833 pr_err("%s: Could not get display_sel GPIO\n", __func__
);
836 sdp4430_hdmi_mux_init();
837 sdp4430_picodlp_init();
838 omap_display_init(&sdp4430_dss_data
);
841 #ifdef CONFIG_OMAP_MUX
842 static struct omap_board_mux board_mux
[] __initdata
= {
843 OMAP4_MUX(USBB2_ULPITLL_CLK
, OMAP_MUX_MODE4
| OMAP_PIN_OUTPUT
),
844 { .reg_offset
= OMAP_MUX_TERMINATOR
},
848 #define board_mux NULL
851 static void omap4_sdp4430_wifi_mux_init(void)
853 omap_mux_init_gpio(GPIO_WIFI_IRQ
, OMAP_PIN_INPUT
|
854 OMAP_PIN_OFF_WAKEUPENABLE
);
855 omap_mux_init_gpio(GPIO_WIFI_PMENA
, OMAP_PIN_OUTPUT
);
857 omap_mux_init_signal("sdmmc5_cmd.sdmmc5_cmd",
858 OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLUP
);
859 omap_mux_init_signal("sdmmc5_clk.sdmmc5_clk",
860 OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLUP
);
861 omap_mux_init_signal("sdmmc5_dat0.sdmmc5_dat0",
862 OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLUP
);
863 omap_mux_init_signal("sdmmc5_dat1.sdmmc5_dat1",
864 OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLUP
);
865 omap_mux_init_signal("sdmmc5_dat2.sdmmc5_dat2",
866 OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLUP
);
867 omap_mux_init_signal("sdmmc5_dat3.sdmmc5_dat3",
868 OMAP_MUX_MODE0
| OMAP_PIN_INPUT_PULLUP
);
872 static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata
= {
873 .irq
= OMAP_GPIO_IRQ(GPIO_WIFI_IRQ
),
874 .board_ref_clock
= WL12XX_REFCLOCK_26
,
875 .board_tcxo_clock
= WL12XX_TCXOCLOCK_26
,
878 static void omap4_sdp4430_wifi_init(void)
880 omap4_sdp4430_wifi_mux_init();
881 if (wl12xx_set_platform_data(&omap4_sdp4430_wlan_data
))
882 pr_err("Error setting wl12xx data\n");
883 platform_device_register(&omap_vwlan_device
);
886 static void __init
omap_4430sdp_init(void)
889 int package
= OMAP_PACKAGE_CBS
;
891 if (omap_rev() == OMAP4430_REV_ES1_0
)
892 package
= OMAP_PACKAGE_CBL
;
893 omap4_mux_init(board_mux
, NULL
, package
);
896 omap_sfh7741prox_init();
897 platform_add_devices(sdp4430_devices
, ARRAY_SIZE(sdp4430_devices
));
899 omap_sdrc_init(NULL
, NULL
);
900 omap4_sdp4430_wifi_init();
901 omap4_twl6030_hsmmc_init(mmc
);
903 usb_musb_init(&musb_board_data
);
905 status
= omap_ethernet_init();
907 pr_err("Ethernet initialization failed: %d\n", status
);
909 sdp4430_spi_board_info
[0].irq
= gpio_to_irq(ETH_KS8851_IRQ
);
910 spi_register_board_info(sdp4430_spi_board_info
,
911 ARRAY_SIZE(sdp4430_spi_board_info
));
914 status
= omap4_keyboard_init(&sdp4430_keypad_data
, &keypad_data
);
916 pr_err("Keypad initialization failed: %d\n", status
);
918 omap_4430sdp_display_init();
921 MACHINE_START(OMAP_4430SDP
, "OMAP4430 4430SDP board")
922 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
923 .atag_offset
= 0x100,
924 .reserve
= omap_reserve
,
925 .map_io
= omap4_map_io
,
926 .init_early
= omap4430_init_early
,
927 .init_irq
= gic_init_irq
,
928 .handle_irq
= gic_handle_irq
,
929 .init_machine
= omap_4430sdp_init
,
930 .timer
= &omap4_timer
,
931 .restart
= omap_prcm_restart
,