15 #include <linux/kernel.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
58 #define HDMI_GPIO_LS_OE 41
59 #define HDMI_GPIO_HPD 63
60 #define DISPLAY_SEL_GPIO 59
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[] = {
140 { .name =
"kpd_col1.kpd_col1",
143 { .name =
"kpd_col1.kpd_col1",
146 { .name =
"kpd_col2.kpd_col2",
149 { .name =
"kpd_col3.kpd_col3",
152 { .name =
"kpd_col4.kpd_col4",
155 { .name =
"kpd_col5.kpd_col5",
158 { .name =
"gpmc_a23.kpd_col7",
161 { .name =
"gpmc_a22.kpd_col6",
164 { .name =
"kpd_row0.kpd_row0",
168 { .name =
"kpd_row1.kpd_row1",
172 { .name =
"kpd_row2.kpd_row2",
176 { .name =
"kpd_row3.kpd_row3",
180 { .name =
"kpd_row4.kpd_row4",
184 { .name =
"kpd_row5.kpd_row5",
188 { .name =
"gpmc_a18.kpd_row6",
192 { .name =
"gpmc_a19.kpd_row7",
199 .keymap = sdp4430_keymap,
204 .keymap_data = &sdp4430_keymap_data,
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",
253 .desc =
"Proximity Sensor",
262 .leds = 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,
277 .leds = sdp4430_pwm_leds,
284 .platform_data = &sdp4430_pwm_data,
288 static int omap_prox_activate(
struct device *
dev)
294 static void omap_prox_deactivate(
struct device *
dev)
300 .buttons = sdp4430_gpio_keys,
302 .enable = omap_prox_activate,
303 .disable = omap_prox_deactivate,
310 .platform_data = &sdp4430_gpio_keys_data,
318 .platform_data = &sdp4430_led_data,
323 .modalias =
"ks8851",
326 .max_speed_hz = 24000000,
334 static struct gpio sdp4430_eth_gpios[] __initdata = {
340 static int __init omap_ethernet_init(
void)
348 pr_err(
"Cannot request ETH GPIOs\n");
362 .num_consumer_supplies =
ARRAY_SIZE(sdp4430_vbat_supply),
363 .consumer_supplies = sdp4430_vbat_supply,
367 .supply_name =
"VBAT",
368 .microvolts = 3750000,
369 .init_data = &sdp4430_vbat_data,
374 .name =
"reg-fixed-voltage",
377 .platform_data = &sdp4430_vbat_pdata,
382 .name =
"dmic-codec",
387 .name =
"hdmi-audio-codec",
392 .card_name =
"SDP4430",
407 .mclk_freq = 38400000,
411 .name =
"omap-abe-twl6040",
414 .platform_data = &sdp4430_abe_audio_data,
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,
440 .nonremovable =
true,
457 .nonremovable =
true,
468 .dev_name =
"omap_hsmmc.4",
475 .num_consumer_supplies = 1,
476 .consumer_supplies = &omap4_sdp4430_vmmc5_supply,
480 .supply_name =
"vwl1271",
481 .microvolts = 1800000,
483 .startup_delay = 70000,
485 .enabled_at_boot = 0,
486 .init_data = &sdp4430_vmmc5,
490 .name =
"reg-fixed-voltage",
493 .platform_data = &sdp4430_vwlan,
508 .num_consumer_supplies =
ARRAY_SIZE(sdp4430_vaux_supply),
509 .consumer_supplies = sdp4430_vaux_supply,
527 .hs_left_step = 0x0f,
528 .hs_right_step = 0x0f,
529 .hf_left_step = 0x1d,
530 .hf_right_step = 0x1d,
543 .
codec = &twl6040_codec,
544 .vibra = &twl6040_vibra,
545 .audpwron_gpio = 127,
548 static struct i2c_board_info __initdata sdp4430_i2c_1_boardinfo[] = {
552 .platform_data = &twl6040_data,
558 .vusim = &sdp4430_vusim,
559 .vaux1 = &sdp4430_vaux1,
562 static struct i2c_board_info __initdata sdp4430_i2c_3_boardinfo[] = {
570 static struct i2c_board_info __initdata sdp4430_i2c_4_boardinfo[] = {
575 static int __init omap4_i2c_init(
void)
599 static void __init omap_sfh7741prox_init(
void)
606 pr_err(
"%s:failed to request GPIO %d, error %d\n",
618 .pins = { 0, 1, 2, 3, 4, 5 },
624 .driver_name =
"taal",
641 .pins = { 0, 1, 2, 3, 4, 5 },
647 .driver_name =
"taal",
665 .driver_name =
"hdmi_panel",
668 .data = &sdp4430_hdmi_data,
672 .picodlp_adapter_id = 2,
677 static void sdp4430_picodlp_init(
void)
680 const struct gpio picodlp_gpios[] = {
691 pr_err(
"Cannot request PicoDLP GPIOs, error %d\n", r);
710 .driver_name =
"picodlp_panel",
712 .phy.dpi.data_lines = 24,
714 .platform_enable = sdp4430_panel_enable_picodlp,
715 .platform_disable = sdp4430_panel_disable_picodlp,
716 .data = &sdp4430_picodlp_pdata,
721 &sdp4430_lcd2_device,
722 &sdp4430_hdmi_device,
723 &sdp4430_picodlp_device,
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)
740 pr_err(
"%s: Could not get display_sel GPIO\n", __func__);
742 sdp4430_picodlp_init();
758 #ifdef CONFIG_OMAP_MUX
794 #define board_mux NULL
797 static void __init omap4_sdp4430_wifi_mux_init(
void)
803 omap_mux_init_signal(
"sdmmc5_cmd.sdmmc5_cmd",
805 omap_mux_init_signal(
"sdmmc5_clk.sdmmc5_clk",
807 omap_mux_init_signal(
"sdmmc5_dat0.sdmmc5_dat0",
809 omap_mux_init_signal(
"sdmmc5_dat1.sdmmc5_dat1",
811 omap_mux_init_signal(
"sdmmc5_dat2.sdmmc5_dat2",
813 omap_mux_init_signal(
"sdmmc5_dat3.sdmmc5_dat3",
823 static void __init omap4_sdp4430_wifi_init(
void)
827 omap4_sdp4430_wifi_mux_init();
831 pr_err(
"Error setting wl12xx data: %d\n", ret);
834 pr_err(
"Error registering wl12xx device: %d\n", ret);
837 static void __init omap_4430sdp_init(
void)
840 int package = OMAP_PACKAGE_CBS;
843 package = OMAP_PACKAGE_CBL;
847 omap_sfh7741prox_init();
851 omap4_sdp4430_wifi_init();
856 status = omap_ethernet_init();
858 pr_err(
"Ethernet initialization failed: %d\n", status);
867 pr_err(
"Keypad initialization failed: %d\n", status);
869 omap_4430sdp_display_init();
874 .atag_offset = 0x100,
881 .init_machine = omap_4430sdp_init,