diff options
author | Roger Quadros <roger.quadros@nokia.com> | 2010-05-10 04:35:17 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-05-18 08:06:02 -0400 |
commit | 03e111045e362e16e97fdd79a49590a763fe5216 (patch) | |
tree | bad112b47c08c319e52300c04fdbbe190590beed /arch/arm/mach-omap2 | |
parent | a40458eee7ee60a89f89602067921658b87ded73 (diff) |
OMAP: RX51: Add LCD Panel support
Adds basic support for LCD Panel on Nokia N900
Signed-off-by: Roger Quadros <roger.quadros@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-video.c | 109 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-rx51.c | 2 |
4 files changed, 125 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile index 4b9fc57770db..b03cbb434a31 100644 --- a/arch/arm/mach-omap2/Makefile +++ b/arch/arm/mach-omap2/Makefile | |||
@@ -122,6 +122,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o | |||
122 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ | 122 | obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ |
123 | board-rx51-sdram.o \ | 123 | board-rx51-sdram.o \ |
124 | board-rx51-peripherals.o \ | 124 | board-rx51-peripherals.o \ |
125 | board-rx51-video.o \ | ||
125 | hsmmc.o | 126 | hsmmc.o |
126 | obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ | 127 | obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ |
127 | board-zoom-peripherals.o \ | 128 | board-zoom-peripherals.o \ |
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 4377a4cf36eb..f40453774855 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -45,6 +45,7 @@ | |||
45 | /* list all spi devices here */ | 45 | /* list all spi devices here */ |
46 | enum { | 46 | enum { |
47 | RX51_SPI_WL1251, | 47 | RX51_SPI_WL1251, |
48 | RX51_SPI_MIPID, /* LCD panel */ | ||
48 | }; | 49 | }; |
49 | 50 | ||
50 | static struct wl12xx_platform_data wl1251_pdata; | 51 | static struct wl12xx_platform_data wl1251_pdata; |
@@ -54,6 +55,11 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = { | |||
54 | .single_channel = 1, | 55 | .single_channel = 1, |
55 | }; | 56 | }; |
56 | 57 | ||
58 | static struct omap2_mcspi_device_config mipid_mcspi_config = { | ||
59 | .turbo_mode = 0, | ||
60 | .single_channel = 1, | ||
61 | }; | ||
62 | |||
57 | static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { | 63 | static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { |
58 | [RX51_SPI_WL1251] = { | 64 | [RX51_SPI_WL1251] = { |
59 | .modalias = "wl1251", | 65 | .modalias = "wl1251", |
@@ -64,6 +70,13 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { | |||
64 | .controller_data = &wl1251_mcspi_config, | 70 | .controller_data = &wl1251_mcspi_config, |
65 | .platform_data = &wl1251_pdata, | 71 | .platform_data = &wl1251_pdata, |
66 | }, | 72 | }, |
73 | [RX51_SPI_MIPID] = { | ||
74 | .modalias = "acx565akm", | ||
75 | .bus_num = 1, | ||
76 | .chip_select = 2, | ||
77 | .max_speed_hz = 6000000, | ||
78 | .controller_data = &mipid_mcspi_config, | ||
79 | }, | ||
67 | }; | 80 | }; |
68 | 81 | ||
69 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 82 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
diff --git a/arch/arm/mach-omap2/board-rx51-video.c b/arch/arm/mach-omap2/board-rx51-video.c new file mode 100644 index 000000000000..b743a4f42649 --- /dev/null +++ b/arch/arm/mach-omap2/board-rx51-video.c | |||
@@ -0,0 +1,109 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-omap2/board-rx51-video.c | ||
3 | * | ||
4 | * Copyright (C) 2010 Nokia | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | |||
11 | #include <linux/kernel.h> | ||
12 | #include <linux/init.h> | ||
13 | #include <linux/platform_device.h> | ||
14 | #include <linux/gpio.h> | ||
15 | #include <linux/spi/spi.h> | ||
16 | #include <linux/mm.h> | ||
17 | |||
18 | #include <asm/mach-types.h> | ||
19 | #include <plat/mux.h> | ||
20 | #include <plat/display.h> | ||
21 | #include <plat/vram.h> | ||
22 | #include <plat/mcspi.h> | ||
23 | |||
24 | #include "mux.h" | ||
25 | |||
26 | #define RX51_LCD_RESET_GPIO 90 | ||
27 | |||
28 | #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) | ||
29 | |||
30 | static int rx51_lcd_enable(struct omap_dss_device *dssdev) | ||
31 | { | ||
32 | gpio_set_value(dssdev->reset_gpio, 1); | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | static void rx51_lcd_disable(struct omap_dss_device *dssdev) | ||
37 | { | ||
38 | gpio_set_value(dssdev->reset_gpio, 0); | ||
39 | } | ||
40 | |||
41 | static struct omap_dss_device rx51_lcd_device = { | ||
42 | .name = "lcd", | ||
43 | .driver_name = "panel-acx565akm", | ||
44 | .type = OMAP_DISPLAY_TYPE_SDI, | ||
45 | .phy.sdi.datapairs = 2, | ||
46 | .reset_gpio = RX51_LCD_RESET_GPIO, | ||
47 | .platform_enable = rx51_lcd_enable, | ||
48 | .platform_disable = rx51_lcd_disable, | ||
49 | }; | ||
50 | |||
51 | static struct omap_dss_device *rx51_dss_devices[] = { | ||
52 | &rx51_lcd_device, | ||
53 | }; | ||
54 | |||
55 | static struct omap_dss_board_info rx51_dss_board_info = { | ||
56 | .num_devices = ARRAY_SIZE(rx51_dss_devices), | ||
57 | .devices = rx51_dss_devices, | ||
58 | .default_device = &rx51_lcd_device, | ||
59 | }; | ||
60 | |||
61 | struct platform_device rx51_display_device = { | ||
62 | .name = "omapdss", | ||
63 | .id = -1, | ||
64 | .dev = { | ||
65 | .platform_data = &rx51_dss_board_info, | ||
66 | }, | ||
67 | }; | ||
68 | |||
69 | static struct platform_device *rx51_video_devices[] __initdata = { | ||
70 | &rx51_display_device, | ||
71 | }; | ||
72 | |||
73 | static int __init rx51_video_init(void) | ||
74 | { | ||
75 | if (!machine_is_nokia_rx51()) | ||
76 | return 0; | ||
77 | |||
78 | if (omap_mux_init_gpio(RX51_LCD_RESET_GPIO, OMAP_PIN_OUTPUT)) { | ||
79 | pr_err("%s cannot configure MUX for LCD RESET\n", __func__); | ||
80 | return 0; | ||
81 | } | ||
82 | |||
83 | if (gpio_request(RX51_LCD_RESET_GPIO, "LCD ACX565AKM reset")) { | ||
84 | pr_err("%s failed to get LCD Reset GPIO\n", __func__); | ||
85 | return 0; | ||
86 | } | ||
87 | |||
88 | gpio_direction_output(RX51_LCD_RESET_GPIO, 1); | ||
89 | |||
90 | platform_add_devices(rx51_video_devices, | ||
91 | ARRAY_SIZE(rx51_video_devices)); | ||
92 | return 0; | ||
93 | } | ||
94 | |||
95 | subsys_initcall(rx51_video_init); | ||
96 | |||
97 | void __init rx51_video_mem_init(void) | ||
98 | { | ||
99 | /* | ||
100 | * GFX 864x480x32bpp | ||
101 | * VID1/2 1280x720x32bpp double buffered | ||
102 | */ | ||
103 | omap_vram_set_sdram_vram(PAGE_ALIGN(864 * 480 * 4) + | ||
104 | 2 * PAGE_ALIGN(1280 * 720 * 4 * 2), 0); | ||
105 | } | ||
106 | |||
107 | #else | ||
108 | void __init rx51_video_mem_init(void) { } | ||
109 | #endif /* defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) */ | ||
diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index b155c366c650..1b86b5bb87a2 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #define RX51_GPIO_SLEEP_IND 162 | 36 | #define RX51_GPIO_SLEEP_IND 162 |
37 | 37 | ||
38 | struct omap_sdrc_params *rx51_get_sdram_timings(void); | 38 | struct omap_sdrc_params *rx51_get_sdram_timings(void); |
39 | extern void rx51_video_mem_init(void); | ||
39 | 40 | ||
40 | static struct gpio_led gpio_leds[] = { | 41 | static struct gpio_led gpio_leds[] = { |
41 | { | 42 | { |
@@ -143,6 +144,7 @@ static void __init rx51_init(void) | |||
143 | static void __init rx51_map_io(void) | 144 | static void __init rx51_map_io(void) |
144 | { | 145 | { |
145 | omap2_set_globals_343x(); | 146 | omap2_set_globals_343x(); |
147 | rx51_video_mem_init(); | ||
146 | omap34xx_map_common_io(); | 148 | omap34xx_map_common_io(); |
147 | } | 149 | } |
148 | 150 | ||