aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 18:20:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 18:20:57 -0400
commit1f7f314bf2a77f1d499b41001ebdafb261f00f30 (patch)
treeaa7eddcf09fe38abb274dffb457e3c0949cfbb3d /arch/arm/mach-omap2
parent2a8ba8f032160552a3beffab8aae9019ff477504 (diff)
parentfce064cbda85dda330150e8d4d9f6db1a3300023 (diff)
Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: (23 commits) OMAP: DSS2: Fix omap_dss_probe() error path OMAP: DSS2: omap_dss_probe() conditional compilation cleanup board-omap3-beagle: add DSS2 support OMAP2: DSS: Add missing line for update bg color OMAP3630: DSS2: Updating MAX divider value OMAP: RX51: Update board defconfig OMAP: DSS2: Add ACX565AKM Panel Driver OMAP: RX51: Add Touch Controller in SPI board info OMAP: RX51: Add LCD Panel support OMAP: DSS2: TPO-TD03MTEA1: fix Kconfig dependency OMAP: LCD LS037V7DW01: Add Backlight driver support OMAP: DSS2: Taal: Fix DSI bus locking problem OMAP: DSS2: Taal: add mutex to protect panel data OMAP: DSS2: Make partial update width even OMAP: DSS2: Fix device disable when driver is not loaded OMAP: DSS2: VENC: don't call platform_enable/disable() twice OMAP: DSS2: check lock_fb_info() return value OMAP: DSS2: fix lock_fb_info() and omapfb_lock() locking order OMAP: DSS2: Use vdds_sdi regulator supply in SDI OMAP: DSS2: Remove redundant enable/disable calls from SDI ...
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/Makefile1
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c101
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c28
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c109
-rw-r--r--arch/arm/mach-omap2/board-rx51.c2
5 files changed, 215 insertions, 26 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index d28e9e5702a0..ea52b034e963 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -119,6 +119,7 @@ obj-$(CONFIG_MACH_NOKIA_N8X0) += board-n8x0.o
119obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \ 119obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
120 board-rx51-sdram.o \ 120 board-rx51-sdram.o \
121 board-rx51-peripherals.o \ 121 board-rx51-peripherals.o \
122 board-rx51-video.o \
122 hsmmc.o 123 hsmmc.o
123obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \ 124obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom2.o \
124 board-zoom-peripherals.o \ 125 board-zoom-peripherals.o \
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 962d377970e9..69b154cdc75d 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -39,6 +39,7 @@
39 39
40#include <plat/board.h> 40#include <plat/board.h>
41#include <plat/common.h> 41#include <plat/common.h>
42#include <plat/display.h>
42#include <plat/gpmc.h> 43#include <plat/gpmc.h>
43#include <plat/nand.h> 44#include <plat/nand.h>
44#include <plat/usb.h> 45#include <plat/usb.h>
@@ -106,6 +107,77 @@ static struct platform_device omap3beagle_nand_device = {
106 .resource = &omap3beagle_nand_resource, 107 .resource = &omap3beagle_nand_resource,
107}; 108};
108 109
110/* DSS */
111
112static int beagle_enable_dvi(struct omap_dss_device *dssdev)
113{
114 if (gpio_is_valid(dssdev->reset_gpio))
115 gpio_set_value(dssdev->reset_gpio, 1);
116
117 return 0;
118}
119
120static void beagle_disable_dvi(struct omap_dss_device *dssdev)
121{
122 if (gpio_is_valid(dssdev->reset_gpio))
123 gpio_set_value(dssdev->reset_gpio, 0);
124}
125
126static struct omap_dss_device beagle_dvi_device = {
127 .type = OMAP_DISPLAY_TYPE_DPI,
128 .name = "dvi",
129 .driver_name = "generic_panel",
130 .phy.dpi.data_lines = 24,
131 .reset_gpio = 170,
132 .platform_enable = beagle_enable_dvi,
133 .platform_disable = beagle_disable_dvi,
134};
135
136static struct omap_dss_device beagle_tv_device = {
137 .name = "tv",
138 .driver_name = "venc",
139 .type = OMAP_DISPLAY_TYPE_VENC,
140 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
141};
142
143static struct omap_dss_device *beagle_dss_devices[] = {
144 &beagle_dvi_device,
145 &beagle_tv_device,
146};
147
148static struct omap_dss_board_info beagle_dss_data = {
149 .num_devices = ARRAY_SIZE(beagle_dss_devices),
150 .devices = beagle_dss_devices,
151 .default_device = &beagle_dvi_device,
152};
153
154static struct platform_device beagle_dss_device = {
155 .name = "omapdss",
156 .id = -1,
157 .dev = {
158 .platform_data = &beagle_dss_data,
159 },
160};
161
162static struct regulator_consumer_supply beagle_vdac_supply =
163 REGULATOR_SUPPLY("vdda_dac", "omapdss");
164
165static struct regulator_consumer_supply beagle_vdvi_supply =
166 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
167
168static void __init beagle_display_init(void)
169{
170 int r;
171
172 r = gpio_request(beagle_dvi_device.reset_gpio, "DVI reset");
173 if (r < 0) {
174 printk(KERN_ERR "Unable to get DVI reset GPIO\n");
175 return;
176 }
177
178 gpio_direction_output(beagle_dvi_device.reset_gpio, 0);
179}
180
109#include "sdram-micron-mt46h32m32lf-6.h" 181#include "sdram-micron-mt46h32m32lf-6.h"
110 182
111static struct omap2_hsmmc_info mmc[] = { 183static struct omap2_hsmmc_info mmc[] = {
@@ -117,15 +189,6 @@ static struct omap2_hsmmc_info mmc[] = {
117 {} /* Terminator */ 189 {} /* Terminator */
118}; 190};
119 191
120static struct platform_device omap3_beagle_lcd_device = {
121 .name = "omap3beagle_lcd",
122 .id = -1,
123};
124
125static struct omap_lcd_config omap3_beagle_lcd_config __initdata = {
126 .ctrl_name = "internal",
127};
128
129static struct regulator_consumer_supply beagle_vmmc1_supply = { 192static struct regulator_consumer_supply beagle_vmmc1_supply = {
130 .supply = "vmmc", 193 .supply = "vmmc",
131}; 194};
@@ -181,16 +244,6 @@ static struct twl4030_gpio_platform_data beagle_gpio_data = {
181 .setup = beagle_twl_gpio_setup, 244 .setup = beagle_twl_gpio_setup,
182}; 245};
183 246
184static struct regulator_consumer_supply beagle_vdac_supply = {
185 .supply = "vdac",
186 .dev = &omap3_beagle_lcd_device.dev,
187};
188
189static struct regulator_consumer_supply beagle_vdvi_supply = {
190 .supply = "vdvi",
191 .dev = &omap3_beagle_lcd_device.dev,
192};
193
194/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ 247/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
195static struct regulator_init_data beagle_vmmc1 = { 248static struct regulator_init_data beagle_vmmc1 = {
196 .constraints = { 249 .constraints = {
@@ -349,14 +402,8 @@ static struct platform_device keys_gpio = {
349 }, 402 },
350}; 403};
351 404
352static struct omap_board_config_kernel omap3_beagle_config[] __initdata = {
353 { OMAP_TAG_LCD, &omap3_beagle_lcd_config },
354};
355
356static void __init omap3_beagle_init_irq(void) 405static void __init omap3_beagle_init_irq(void)
357{ 406{
358 omap_board_config = omap3_beagle_config;
359 omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
360 omap2_init_common_hw(mt46h32m32lf6_sdrc_params, 407 omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
361 mt46h32m32lf6_sdrc_params); 408 mt46h32m32lf6_sdrc_params);
362 omap_init_irq(); 409 omap_init_irq();
@@ -367,9 +414,9 @@ static void __init omap3_beagle_init_irq(void)
367} 414}
368 415
369static struct platform_device *omap3_beagle_devices[] __initdata = { 416static struct platform_device *omap3_beagle_devices[] __initdata = {
370 &omap3_beagle_lcd_device,
371 &leds_gpio, 417 &leds_gpio,
372 &keys_gpio, 418 &keys_gpio,
419 &beagle_dss_device,
373}; 420};
374 421
375static void __init omap3beagle_flash_init(void) 422static void __init omap3beagle_flash_init(void)
@@ -456,6 +503,8 @@ static void __init omap3_beagle_init(void)
456 /* Ensure SDRC pins are mux'd for self-refresh */ 503 /* Ensure SDRC pins are mux'd for self-refresh */
457 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); 504 omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
458 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); 505 omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
506
507 beagle_display_init();
459} 508}
460 509
461static void __init omap3_beagle_map_io(void) 510static void __init omap3_beagle_map_io(void)
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 966f5f84f2bd..abdf321c2d41 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -45,6 +45,8 @@
45/* list all spi devices here */ 45/* list all spi devices here */
46enum { 46enum {
47 RX51_SPI_WL1251, 47 RX51_SPI_WL1251,
48 RX51_SPI_MIPID, /* LCD panel */
49 RX51_SPI_TSC2005, /* Touch Controller */
48}; 50};
49 51
50static struct wl12xx_platform_data wl1251_pdata; 52static struct wl12xx_platform_data wl1251_pdata;
@@ -54,6 +56,16 @@ static struct omap2_mcspi_device_config wl1251_mcspi_config = {
54 .single_channel = 1, 56 .single_channel = 1,
55}; 57};
56 58
59static struct omap2_mcspi_device_config mipid_mcspi_config = {
60 .turbo_mode = 0,
61 .single_channel = 1,
62};
63
64static struct omap2_mcspi_device_config tsc2005_mcspi_config = {
65 .turbo_mode = 0,
66 .single_channel = 1,
67};
68
57static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { 69static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
58 [RX51_SPI_WL1251] = { 70 [RX51_SPI_WL1251] = {
59 .modalias = "wl1251", 71 .modalias = "wl1251",
@@ -64,6 +76,22 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
64 .controller_data = &wl1251_mcspi_config, 76 .controller_data = &wl1251_mcspi_config,
65 .platform_data = &wl1251_pdata, 77 .platform_data = &wl1251_pdata,
66 }, 78 },
79 [RX51_SPI_MIPID] = {
80 .modalias = "acx565akm",
81 .bus_num = 1,
82 .chip_select = 2,
83 .max_speed_hz = 6000000,
84 .controller_data = &mipid_mcspi_config,
85 },
86 [RX51_SPI_TSC2005] = {
87 .modalias = "tsc2005",
88 .bus_num = 1,
89 .chip_select = 0,
90 /* .irq = OMAP_GPIO_IRQ(RX51_TSC2005_IRQ_GPIO),*/
91 .max_speed_hz = 6000000,
92 .controller_data = &tsc2005_mcspi_config,
93 /* .platform_data = &tsc2005_config,*/
94 },
67}; 95};
68 96
69#if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) 97#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
30static int rx51_lcd_enable(struct omap_dss_device *dssdev)
31{
32 gpio_set_value(dssdev->reset_gpio, 1);
33 return 0;
34}
35
36static void rx51_lcd_disable(struct omap_dss_device *dssdev)
37{
38 gpio_set_value(dssdev->reset_gpio, 0);
39}
40
41static 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
51static struct omap_dss_device *rx51_dss_devices[] = {
52 &rx51_lcd_device,
53};
54
55static 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
61struct platform_device rx51_display_device = {
62 .name = "omapdss",
63 .id = -1,
64 .dev = {
65 .platform_data = &rx51_dss_board_info,
66 },
67};
68
69static struct platform_device *rx51_video_devices[] __initdata = {
70 &rx51_display_device,
71};
72
73static 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
95subsys_initcall(rx51_video_init);
96
97void __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
108void __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
38struct omap_sdrc_params *rx51_get_sdram_timings(void); 38struct omap_sdrc_params *rx51_get_sdram_timings(void);
39extern void rx51_video_mem_init(void);
39 40
40static struct gpio_led gpio_leds[] = { 41static struct gpio_led gpio_leds[] = {
41 { 42 {
@@ -143,6 +144,7 @@ static void __init rx51_init(void)
143static void __init rx51_map_io(void) 144static 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