aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-4430sdp.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-03-17 22:28:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-17 22:28:15 -0400
commit0df0914d414a504b975f3cc66ace0c16ef55b7f3 (patch)
treec97ffa357943a8b226cdec1b9632c4cede813205 /arch/arm/mach-omap2/board-4430sdp.c
parent6899608533410557e6698cb9d4ff6df553916e98 (diff)
parent05f689400ea5fa3d71af82f910c8b140f87ad1f3 (diff)
Merge branch 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6
* 'omap-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6: (258 commits) omap: zoom: host should not pull up wl1271's irq line arm: plat-omap: iommu: fix request_mem_region() error path OMAP2+: Common CPU DIE ID reading code reads wrong registers for OMAP4430 omap4: mux: Remove duplicate mux modes omap: iovmm: don't check 'da' to set IOVMF_DA_FIXED flag omap: iovmm: disallow mapping NULL address when IOVMF_DA_ANON is set omap2+: mux: Fix compile when CONFIG_OMAP_MUX is not selected omap4: board-omap4panda: Initialise the serial pads omap3: board-3430sdp: Initialise the serial pads omap4: board-4430sdp: Initialise the serial pads omap2+: mux: Add macro for configuring static with omap_hwmod_mux_init omap2+: mux: Remove the use of IDLE flag omap2+: Add separate list for dynamic pads to mux perf: add OMAP support for the new power events OMAP4: Add IVA OPP enteries. OMAP4: Update Voltage Rail Values for MPU, IVA and CORE OMAP4: Enable 800 MHz and 1 GHz MPU-OPP OMAP3+: OPP: Replace voltage values with Macros OMAP3: wdtimer: Fix CORE idle transition Watchdog: omap_wdt: add fine grain runtime-pm ... Fix up various conflicts in - arch/arm/mach-omap2/board-omap3evm.c - arch/arm/mach-omap2/clock3xxx_data.c - arch/arm/mach-omap2/usb-musb.c - arch/arm/plat-omap/include/plat/usb.h - drivers/usb/musb/musb_core.h
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c190
1 files changed, 172 insertions, 18 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index f603f3b04cb..333ceb2c8fb 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -35,6 +35,7 @@
35#include <plat/common.h> 35#include <plat/common.h>
36#include <plat/usb.h> 36#include <plat/usb.h>
37#include <plat/mmc.h> 37#include <plat/mmc.h>
38#include <plat/omap4-keypad.h>
38 39
39#include "mux.h" 40#include "mux.h"
40#include "hsmmc.h" 41#include "hsmmc.h"
@@ -47,6 +48,90 @@
47#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 48#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
48#define OMAP4_SFH7741_ENABLE_GPIO 188 49#define OMAP4_SFH7741_ENABLE_GPIO 188
49 50
51static const int sdp4430_keymap[] = {
52 KEY(0, 0, KEY_E),
53 KEY(0, 1, KEY_R),
54 KEY(0, 2, KEY_T),
55 KEY(0, 3, KEY_HOME),
56 KEY(0, 4, KEY_F5),
57 KEY(0, 5, KEY_UNKNOWN),
58 KEY(0, 6, KEY_I),
59 KEY(0, 7, KEY_LEFTSHIFT),
60
61 KEY(1, 0, KEY_D),
62 KEY(1, 1, KEY_F),
63 KEY(1, 2, KEY_G),
64 KEY(1, 3, KEY_SEND),
65 KEY(1, 4, KEY_F6),
66 KEY(1, 5, KEY_UNKNOWN),
67 KEY(1, 6, KEY_K),
68 KEY(1, 7, KEY_ENTER),
69
70 KEY(2, 0, KEY_X),
71 KEY(2, 1, KEY_C),
72 KEY(2, 2, KEY_V),
73 KEY(2, 3, KEY_END),
74 KEY(2, 4, KEY_F7),
75 KEY(2, 5, KEY_UNKNOWN),
76 KEY(2, 6, KEY_DOT),
77 KEY(2, 7, KEY_CAPSLOCK),
78
79 KEY(3, 0, KEY_Z),
80 KEY(3, 1, KEY_KPPLUS),
81 KEY(3, 2, KEY_B),
82 KEY(3, 3, KEY_F1),
83 KEY(3, 4, KEY_F8),
84 KEY(3, 5, KEY_UNKNOWN),
85 KEY(3, 6, KEY_O),
86 KEY(3, 7, KEY_SPACE),
87
88 KEY(4, 0, KEY_W),
89 KEY(4, 1, KEY_Y),
90 KEY(4, 2, KEY_U),
91 KEY(4, 3, KEY_F2),
92 KEY(4, 4, KEY_VOLUMEUP),
93 KEY(4, 5, KEY_UNKNOWN),
94 KEY(4, 6, KEY_L),
95 KEY(4, 7, KEY_LEFT),
96
97 KEY(5, 0, KEY_S),
98 KEY(5, 1, KEY_H),
99 KEY(5, 2, KEY_J),
100 KEY(5, 3, KEY_F3),
101 KEY(5, 4, KEY_F9),
102 KEY(5, 5, KEY_VOLUMEDOWN),
103 KEY(5, 6, KEY_M),
104 KEY(5, 7, KEY_RIGHT),
105
106 KEY(6, 0, KEY_Q),
107 KEY(6, 1, KEY_A),
108 KEY(6, 2, KEY_N),
109 KEY(6, 3, KEY_BACK),
110 KEY(6, 4, KEY_BACKSPACE),
111 KEY(6, 5, KEY_UNKNOWN),
112 KEY(6, 6, KEY_P),
113 KEY(6, 7, KEY_UP),
114
115 KEY(7, 0, KEY_PROG1),
116 KEY(7, 1, KEY_PROG2),
117 KEY(7, 2, KEY_PROG3),
118 KEY(7, 3, KEY_PROG4),
119 KEY(7, 4, KEY_F4),
120 KEY(7, 5, KEY_UNKNOWN),
121 KEY(7, 6, KEY_OK),
122 KEY(7, 7, KEY_DOWN),
123};
124
125static struct matrix_keymap_data sdp4430_keymap_data = {
126 .keymap = sdp4430_keymap,
127 .keymap_size = ARRAY_SIZE(sdp4430_keymap),
128};
129
130static struct omap4_keypad_platform_data sdp4430_keypad_data = {
131 .keymap_data = &sdp4430_keymap_data,
132 .rows = 8,
133 .cols = 8,
134};
50static struct gpio_led sdp4430_gpio_leds[] = { 135static struct gpio_led sdp4430_gpio_leds[] = {
51 { 136 {
52 .name = "omap4:green:debug0", 137 .name = "omap4:green:debug0",
@@ -238,16 +323,13 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = {
238 { OMAP_TAG_LCD, &sdp4430_lcd_config }, 323 { OMAP_TAG_LCD, &sdp4430_lcd_config },
239}; 324};
240 325
241static void __init omap_4430sdp_init_irq(void) 326static void __init omap_4430sdp_init_early(void)
242{ 327{
243 omap_board_config = sdp4430_config;
244 omap_board_config_size = ARRAY_SIZE(sdp4430_config);
245 omap2_init_common_infrastructure(); 328 omap2_init_common_infrastructure();
246 omap2_init_common_devices(NULL, NULL); 329 omap2_init_common_devices(NULL, NULL);
247#ifdef CONFIG_OMAP_32K_TIMER 330#ifdef CONFIG_OMAP_32K_TIMER
248 omap2_gp_clockevent_set_gptimer(1); 331 omap2_gp_clockevent_set_gptimer(1);
249#endif 332#endif
250 gic_init_irq();
251} 333}
252 334
253static struct omap_musb_board_data musb_board_data = { 335static struct omap_musb_board_data musb_board_data = {
@@ -266,11 +348,6 @@ static struct twl4030_usb_data omap4_usbphy_data = {
266 348
267static struct omap2_hsmmc_info mmc[] = { 349static struct omap2_hsmmc_info mmc[] = {
268 { 350 {
269 .mmc = 1,
270 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
271 .gpio_wp = -EINVAL,
272 },
273 {
274 .mmc = 2, 351 .mmc = 2,
275 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, 352 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
276 .gpio_cd = -EINVAL, 353 .gpio_cd = -EINVAL,
@@ -278,19 +355,24 @@ static struct omap2_hsmmc_info mmc[] = {
278 .nonremovable = true, 355 .nonremovable = true,
279 .ocr_mask = MMC_VDD_29_30, 356 .ocr_mask = MMC_VDD_29_30,
280 }, 357 },
358 {
359 .mmc = 1,
360 .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
361 .gpio_wp = -EINVAL,
362 },
281 {} /* Terminator */ 363 {} /* Terminator */
282}; 364};
283 365
284static struct regulator_consumer_supply sdp4430_vaux_supply[] = { 366static struct regulator_consumer_supply sdp4430_vaux_supply[] = {
285 { 367 {
286 .supply = "vmmc", 368 .supply = "vmmc",
287 .dev_name = "mmci-omap-hs.1", 369 .dev_name = "omap_hsmmc.1",
288 }, 370 },
289}; 371};
290static struct regulator_consumer_supply sdp4430_vmmc_supply[] = { 372static struct regulator_consumer_supply sdp4430_vmmc_supply[] = {
291 { 373 {
292 .supply = "vmmc", 374 .supply = "vmmc",
293 .dev_name = "mmci-omap-hs.0", 375 .dev_name = "omap_hsmmc.0",
294 }, 376 },
295}; 377};
296 378
@@ -424,7 +506,6 @@ static struct regulator_init_data sdp4430_vana = {
424 .constraints = { 506 .constraints = {
425 .min_uV = 2100000, 507 .min_uV = 2100000,
426 .max_uV = 2100000, 508 .max_uV = 2100000,
427 .apply_uV = true,
428 .valid_modes_mask = REGULATOR_MODE_NORMAL 509 .valid_modes_mask = REGULATOR_MODE_NORMAL
429 | REGULATOR_MODE_STANDBY, 510 | REGULATOR_MODE_STANDBY,
430 .valid_ops_mask = REGULATOR_CHANGE_MODE 511 .valid_ops_mask = REGULATOR_CHANGE_MODE
@@ -436,7 +517,6 @@ static struct regulator_init_data sdp4430_vcxio = {
436 .constraints = { 517 .constraints = {
437 .min_uV = 1800000, 518 .min_uV = 1800000,
438 .max_uV = 1800000, 519 .max_uV = 1800000,
439 .apply_uV = true,
440 .valid_modes_mask = REGULATOR_MODE_NORMAL 520 .valid_modes_mask = REGULATOR_MODE_NORMAL
441 | REGULATOR_MODE_STANDBY, 521 | REGULATOR_MODE_STANDBY,
442 .valid_ops_mask = REGULATOR_CHANGE_MODE 522 .valid_ops_mask = REGULATOR_CHANGE_MODE
@@ -448,7 +528,6 @@ static struct regulator_init_data sdp4430_vdac = {
448 .constraints = { 528 .constraints = {
449 .min_uV = 1800000, 529 .min_uV = 1800000,
450 .max_uV = 1800000, 530 .max_uV = 1800000,
451 .apply_uV = true,
452 .valid_modes_mask = REGULATOR_MODE_NORMAL 531 .valid_modes_mask = REGULATOR_MODE_NORMAL
453 | REGULATOR_MODE_STANDBY, 532 | REGULATOR_MODE_STANDBY,
454 .valid_ops_mask = REGULATOR_CHANGE_MODE 533 .valid_ops_mask = REGULATOR_CHANGE_MODE
@@ -547,9 +626,76 @@ static struct omap_board_mux board_mux[] __initdata = {
547 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), 626 OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT),
548 { .reg_offset = OMAP_MUX_TERMINATOR }, 627 { .reg_offset = OMAP_MUX_TERMINATOR },
549}; 628};
629
630static struct omap_device_pad serial2_pads[] __initdata = {
631 OMAP_MUX_STATIC("uart2_cts.uart2_cts",
632 OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
633 OMAP_MUX_STATIC("uart2_rts.uart2_rts",
634 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
635 OMAP_MUX_STATIC("uart2_rx.uart2_rx",
636 OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
637 OMAP_MUX_STATIC("uart2_tx.uart2_tx",
638 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
639};
640
641static struct omap_device_pad serial3_pads[] __initdata = {
642 OMAP_MUX_STATIC("uart3_cts_rctx.uart3_cts_rctx",
643 OMAP_PIN_INPUT_PULLUP | OMAP_MUX_MODE0),
644 OMAP_MUX_STATIC("uart3_rts_sd.uart3_rts_sd",
645 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
646 OMAP_MUX_STATIC("uart3_rx_irrx.uart3_rx_irrx",
647 OMAP_PIN_INPUT | OMAP_MUX_MODE0),
648 OMAP_MUX_STATIC("uart3_tx_irtx.uart3_tx_irtx",
649 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
650};
651
652static struct omap_device_pad serial4_pads[] __initdata = {
653 OMAP_MUX_STATIC("uart4_rx.uart4_rx",
654 OMAP_PIN_INPUT | OMAP_MUX_MODE0),
655 OMAP_MUX_STATIC("uart4_tx.uart4_tx",
656 OMAP_PIN_OUTPUT | OMAP_MUX_MODE0),
657};
658
659static struct omap_board_data serial2_data = {
660 .id = 1,
661 .pads = serial2_pads,
662 .pads_cnt = ARRAY_SIZE(serial2_pads),
663};
664
665static struct omap_board_data serial3_data = {
666 .id = 2,
667 .pads = serial3_pads,
668 .pads_cnt = ARRAY_SIZE(serial3_pads),
669};
670
671static struct omap_board_data serial4_data = {
672 .id = 3,
673 .pads = serial4_pads,
674 .pads_cnt = ARRAY_SIZE(serial4_pads),
675};
676
677static inline void board_serial_init(void)
678{
679 struct omap_board_data bdata;
680 bdata.flags = 0;
681 bdata.pads = NULL;
682 bdata.pads_cnt = 0;
683 bdata.id = 0;
684 /* pass dummy data for UART1 */
685 omap_serial_init_port(&bdata);
686
687 omap_serial_init_port(&serial2_data);
688 omap_serial_init_port(&serial3_data);
689 omap_serial_init_port(&serial4_data);
690}
550#else 691#else
551#define board_mux NULL 692#define board_mux NULL
552#endif 693
694static inline void board_serial_init(void)
695{
696 omap_serial_init();
697}
698 #endif
553 699
554static void __init omap_4430sdp_init(void) 700static void __init omap_4430sdp_init(void)
555{ 701{
@@ -560,10 +706,13 @@ static void __init omap_4430sdp_init(void)
560 package = OMAP_PACKAGE_CBL; 706 package = OMAP_PACKAGE_CBL;
561 omap4_mux_init(board_mux, package); 707 omap4_mux_init(board_mux, package);
562 708
709 omap_board_config = sdp4430_config;
710 omap_board_config_size = ARRAY_SIZE(sdp4430_config);
711
563 omap4_i2c_init(); 712 omap4_i2c_init();
564 omap_sfh7741prox_init(); 713 omap_sfh7741prox_init();
565 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices)); 714 platform_add_devices(sdp4430_devices, ARRAY_SIZE(sdp4430_devices));
566 omap_serial_init(); 715 board_serial_init();
567 omap4_twl6030_hsmmc_init(mmc); 716 omap4_twl6030_hsmmc_init(mmc);
568 717
569 usb_musb_init(&musb_board_data); 718 usb_musb_init(&musb_board_data);
@@ -576,6 +725,10 @@ static void __init omap_4430sdp_init(void)
576 spi_register_board_info(sdp4430_spi_board_info, 725 spi_register_board_info(sdp4430_spi_board_info,
577 ARRAY_SIZE(sdp4430_spi_board_info)); 726 ARRAY_SIZE(sdp4430_spi_board_info));
578 } 727 }
728
729 status = omap4_keyboard_init(&sdp4430_keypad_data);
730 if (status)
731 pr_err("Keypad initialization failed: %d\n", status);
579} 732}
580 733
581static void __init omap_4430sdp_map_io(void) 734static void __init omap_4430sdp_map_io(void)
@@ -587,9 +740,10 @@ static void __init omap_4430sdp_map_io(void)
587MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board") 740MACHINE_START(OMAP_4430SDP, "OMAP4430 4430SDP board")
588 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */ 741 /* Maintainer: Santosh Shilimkar - Texas Instruments Inc */
589 .boot_params = 0x80000100, 742 .boot_params = 0x80000100,
590 .map_io = omap_4430sdp_map_io,
591 .reserve = omap_reserve, 743 .reserve = omap_reserve,
592 .init_irq = omap_4430sdp_init_irq, 744 .map_io = omap_4430sdp_map_io,
745 .init_early = omap_4430sdp_init_early,
746 .init_irq = gic_init_irq,
593 .init_machine = omap_4430sdp_init, 747 .init_machine = omap_4430sdp_init,
594 .timer = &omap_timer, 748 .timer = &omap_timer,
595MACHINE_END 749MACHINE_END