diff options
author | Guennadi Liakhovetski <lg@denx.de> | 2009-06-23 07:26:23 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-06-23 08:25:26 -0400 |
commit | 574ec547c7771881e18e4e76ca970e323bcdc774 (patch) | |
tree | f82b3599bf835663a298e7708f90ae804c4cd932 /arch/arm/mach-mx3/pcm037.c | |
parent | 32c1ad9ab2ae4171d8f3dd0c70a611f799ad6775 (diff) |
ARM: add support for the EET board, based on the i.MX31 pcm037 module
The "EET" variant of the pcm037 board has an OLED display, using a S6E63D6
display controller on the first SPI interface, using GPIO57 as a chip-select
for it. S6E63D6 is initialised in the boot-loader, so we only have to take care
of the LCD. EET also adds several buttons and LEDs on GPIOs. This patch adds a
"pcm037_variant=" kernel command line parameter to specify at boot-time which
board the kernel is running on, default is "pcm970", specify "eet" for the EET
board.
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/pcm037.c')
-rw-r--r-- | arch/arm/mach-mx3/pcm037.c | 65 |
1 files changed, 59 insertions, 6 deletions
diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c index d7b29b724a61..840cfda341d0 100644 --- a/arch/arm/mach-mx3/pcm037.c +++ b/arch/arm/mach-mx3/pcm037.c | |||
@@ -52,6 +52,41 @@ | |||
52 | #include <mach/mxc_nand.h> | 52 | #include <mach/mxc_nand.h> |
53 | 53 | ||
54 | #include "devices.h" | 54 | #include "devices.h" |
55 | #include "pcm037.h" | ||
56 | |||
57 | static enum pcm037_board_variant pcm037_instance = PCM037_PCM970; | ||
58 | |||
59 | static int __init pcm037_variant_setup(char *str) | ||
60 | { | ||
61 | if (!strcmp("eet", str)) | ||
62 | pcm037_instance = PCM037_EET; | ||
63 | else if (strcmp("pcm970", str)) | ||
64 | pr_warning("Unknown pcm037 baseboard variant %s\n", str); | ||
65 | |||
66 | return 1; | ||
67 | } | ||
68 | |||
69 | /* Supported values: "pcm970" (default) and "eet" */ | ||
70 | __setup("pcm037_variant=", pcm037_variant_setup); | ||
71 | |||
72 | enum pcm037_board_variant pcm037_variant(void) | ||
73 | { | ||
74 | return pcm037_instance; | ||
75 | } | ||
76 | |||
77 | /* UART1 with RTS/CTS handshake signals */ | ||
78 | static unsigned int pcm037_uart1_handshake_pins[] = { | ||
79 | MX31_PIN_CTS1__CTS1, | ||
80 | MX31_PIN_RTS1__RTS1, | ||
81 | MX31_PIN_TXD1__TXD1, | ||
82 | MX31_PIN_RXD1__RXD1, | ||
83 | }; | ||
84 | |||
85 | /* UART1 without RTS/CTS handshake signals */ | ||
86 | static unsigned int pcm037_uart1_pins[] = { | ||
87 | MX31_PIN_TXD1__TXD1, | ||
88 | MX31_PIN_RXD1__RXD1, | ||
89 | }; | ||
55 | 90 | ||
56 | static unsigned int pcm037_pins[] = { | 91 | static unsigned int pcm037_pins[] = { |
57 | /* I2C */ | 92 | /* I2C */ |
@@ -76,11 +111,6 @@ static unsigned int pcm037_pins[] = { | |||
76 | MX31_PIN_CSPI1_SS0__SS0, | 111 | MX31_PIN_CSPI1_SS0__SS0, |
77 | MX31_PIN_CSPI1_SS1__SS1, | 112 | MX31_PIN_CSPI1_SS1__SS1, |
78 | MX31_PIN_CSPI1_SS2__SS2, | 113 | MX31_PIN_CSPI1_SS2__SS2, |
79 | /* UART1 */ | ||
80 | MX31_PIN_CTS1__CTS1, | ||
81 | MX31_PIN_RTS1__RTS1, | ||
82 | MX31_PIN_TXD1__TXD1, | ||
83 | MX31_PIN_RXD1__RXD1, | ||
84 | /* UART2 */ | 114 | /* UART2 */ |
85 | MX31_PIN_TXD2__TXD2, | 115 | MX31_PIN_TXD2__TXD2, |
86 | MX31_PIN_RXD2__RXD2, | 116 | MX31_PIN_RXD2__RXD2, |
@@ -459,6 +489,22 @@ static const struct fb_videomode fb_modedb[] = { | |||
459 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, | 489 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_OE_ACT_HIGH, |
460 | .vmode = FB_VMODE_NONINTERLACED, | 490 | .vmode = FB_VMODE_NONINTERLACED, |
461 | .flag = 0, | 491 | .flag = 0, |
492 | }, { | ||
493 | /* 240x320 @ 60 Hz */ | ||
494 | .name = "CMEL-OLED", | ||
495 | .refresh = 60, | ||
496 | .xres = 240, | ||
497 | .yres = 320, | ||
498 | .pixclock = 185925, | ||
499 | .left_margin = 9, | ||
500 | .right_margin = 16, | ||
501 | .upper_margin = 7, | ||
502 | .lower_margin = 9, | ||
503 | .hsync_len = 1, | ||
504 | .vsync_len = 1, | ||
505 | .sync = FB_SYNC_OE_ACT_HIGH | FB_SYNC_CLK_INVERT, | ||
506 | .vmode = FB_VMODE_NONINTERLACED, | ||
507 | .flag = 0, | ||
462 | }, | 508 | }, |
463 | }; | 509 | }; |
464 | 510 | ||
@@ -479,6 +525,14 @@ static void __init mxc_board_init(void) | |||
479 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), | 525 | mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), |
480 | "pcm037"); | 526 | "pcm037"); |
481 | 527 | ||
528 | if (pcm037_variant() == PCM037_EET) | ||
529 | mxc_iomux_setup_multiple_pins(pcm037_uart1_pins, | ||
530 | ARRAY_SIZE(pcm037_uart1_pins), "pcm037_uart1"); | ||
531 | else | ||
532 | mxc_iomux_setup_multiple_pins(pcm037_uart1_handshake_pins, | ||
533 | ARRAY_SIZE(pcm037_uart1_handshake_pins), | ||
534 | "pcm037_uart1"); | ||
535 | |||
482 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 536 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
483 | 537 | ||
484 | mxc_register_device(&mxc_uart_device0, &uart_pdata); | 538 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
@@ -542,4 +596,3 @@ MACHINE_START(PCM037, "Phytec Phycore pcm037") | |||
542 | .init_machine = mxc_board_init, | 596 | .init_machine = mxc_board_init, |
543 | .timer = &pcm037_timer, | 597 | .timer = &pcm037_timer, |
544 | MACHINE_END | 598 | MACHINE_END |
545 | |||