aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/Makefile3
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c12
-rw-r--r--arch/arm/mach-omap2/board-3630sdp.c1
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c23
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c23
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c26
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c12
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c12
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c12
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c23
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c168
-rw-r--r--arch/arm/mach-omap2/board-zoom-peripherals.c49
-rw-r--r--arch/arm/mach-omap2/board-zoom.c1
-rw-r--r--arch/arm/mach-omap2/include/mach/board-zoom.h3
-rw-r--r--arch/arm/plat-omap/include/plat/display.h9
-rw-r--r--arch/arm/plat-omap/include/plat/panel-generic-dpi.h37
16 files changed, 374 insertions, 40 deletions
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index cd7332f50b2d..1c0c2b02d870 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -187,16 +187,19 @@ obj-$(CONFIG_MACH_NOKIA_RX51) += board-rx51.o \
187 hsmmc.o 187 hsmmc.o
188obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom.o \ 188obj-$(CONFIG_MACH_OMAP_ZOOM2) += board-zoom.o \
189 board-zoom-peripherals.o \ 189 board-zoom-peripherals.o \
190 board-zoom-display.o \
190 board-flash.o \ 191 board-flash.o \
191 hsmmc.o \ 192 hsmmc.o \
192 board-zoom-debugboard.o 193 board-zoom-debugboard.o
193obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom.o \ 194obj-$(CONFIG_MACH_OMAP_ZOOM3) += board-zoom.o \
194 board-zoom-peripherals.o \ 195 board-zoom-peripherals.o \
196 board-zoom-display.o \
195 board-flash.o \ 197 board-flash.o \
196 hsmmc.o \ 198 hsmmc.o \
197 board-zoom-debugboard.o 199 board-zoom-debugboard.o
198obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \ 200obj-$(CONFIG_MACH_OMAP_3630SDP) += board-3630sdp.o \
199 board-zoom-peripherals.o \ 201 board-zoom-peripherals.o \
202 board-zoom-display.o \
200 board-flash.o \ 203 board-flash.o \
201 hsmmc.o 204 hsmmc.o
202obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \ 205obj-$(CONFIG_MACH_CM_T35) += board-cm-t35.o \
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 3b39ef1a680a..d4e41ef86aa5 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -38,6 +38,7 @@
38#include <plat/dma.h> 38#include <plat/dma.h>
39#include <plat/gpmc.h> 39#include <plat/gpmc.h>
40#include <plat/display.h> 40#include <plat/display.h>
41#include <plat/panel-generic-dpi.h>
41 42
42#include <plat/gpmc-smc91x.h> 43#include <plat/gpmc-smc91x.h>
43 44
@@ -270,13 +271,18 @@ static struct omap_dss_device sdp3430_lcd_device = {
270 .platform_disable = sdp3430_panel_disable_lcd, 271 .platform_disable = sdp3430_panel_disable_lcd,
271}; 272};
272 273
274static struct panel_generic_dpi_data dvi_panel = {
275 .name = "generic",
276 .platform_enable = sdp3430_panel_enable_dvi,
277 .platform_disable = sdp3430_panel_disable_dvi,
278};
279
273static struct omap_dss_device sdp3430_dvi_device = { 280static struct omap_dss_device sdp3430_dvi_device = {
274 .name = "dvi", 281 .name = "dvi",
275 .driver_name = "generic_panel",
276 .type = OMAP_DISPLAY_TYPE_DPI, 282 .type = OMAP_DISPLAY_TYPE_DPI,
283 .driver_name = "generic_dpi_panel",
284 .data = &dvi_panel,
277 .phy.dpi.data_lines = 24, 285 .phy.dpi.data_lines = 24,
278 .platform_enable = sdp3430_panel_enable_dvi,
279 .platform_disable = sdp3430_panel_disable_dvi,
280}; 286};
281 287
282static struct omap_dss_device sdp3430_tv_device = { 288static struct omap_dss_device sdp3430_tv_device = {
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c
index 5d41dbe059a3..62645640f5e4 100644
--- a/arch/arm/mach-omap2/board-3630sdp.c
+++ b/arch/arm/mach-omap2/board-3630sdp.c
@@ -207,6 +207,7 @@ static void __init omap_sdp_init(void)
207{ 207{
208 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP); 208 omap3_mux_init(board_mux, OMAP_PACKAGE_CBP);
209 zoom_peripherals_init(); 209 zoom_peripherals_init();
210 zoom_display_init();
210 board_smc91x_init(); 211 board_smc91x_init();
211 board_flash_init(sdp_flash_partitions, chip_sel_sdp); 212 board_flash_init(sdp_flash_partitions, chip_sel_sdp);
212 enable_board_wakeup_source(); 213 enable_board_wakeup_source();
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index bc1562648020..10d60b7743cf 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.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/display.h> 37#include <plat/display.h>
38#include <plat/panel-generic-dpi.h>
38 39
39#include "mux.h" 40#include "mux.h"
40#include "control.h" 41#include "control.h"
@@ -303,13 +304,18 @@ static void am3517_evm_panel_disable_lcd(struct omap_dss_device *dssdev)
303 lcd_enabled = 0; 304 lcd_enabled = 0;
304} 305}
305 306
307static struct panel_generic_dpi_data lcd_panel = {
308 .name = "sharp_lq",
309 .platform_enable = am3517_evm_panel_enable_lcd,
310 .platform_disable = am3517_evm_panel_disable_lcd,
311};
312
306static struct omap_dss_device am3517_evm_lcd_device = { 313static struct omap_dss_device am3517_evm_lcd_device = {
307 .type = OMAP_DISPLAY_TYPE_DPI, 314 .type = OMAP_DISPLAY_TYPE_DPI,
308 .name = "lcd", 315 .name = "lcd",
309 .driver_name = "sharp_lq_panel", 316 .driver_name = "generic_dpi_panel",
317 .data = &lcd_panel,
310 .phy.dpi.data_lines = 16, 318 .phy.dpi.data_lines = 16,
311 .platform_enable = am3517_evm_panel_enable_lcd,
312 .platform_disable = am3517_evm_panel_disable_lcd,
313}; 319};
314 320
315static int am3517_evm_panel_enable_tv(struct omap_dss_device *dssdev) 321static int am3517_evm_panel_enable_tv(struct omap_dss_device *dssdev)
@@ -346,13 +352,18 @@ static void am3517_evm_panel_disable_dvi(struct omap_dss_device *dssdev)
346 dvi_enabled = 0; 352 dvi_enabled = 0;
347} 353}
348 354
355static struct panel_generic_dpi_data dvi_panel = {
356 .name = "generic",
357 .platform_enable = am3517_evm_panel_enable_dvi,
358 .platform_disable = am3517_evm_panel_disable_dvi,
359};
360
349static struct omap_dss_device am3517_evm_dvi_device = { 361static struct omap_dss_device am3517_evm_dvi_device = {
350 .type = OMAP_DISPLAY_TYPE_DPI, 362 .type = OMAP_DISPLAY_TYPE_DPI,
351 .name = "dvi", 363 .name = "dvi",
352 .driver_name = "generic_panel", 364 .driver_name = "generic_dpi_panel",
365 .data = &dvi_panel,
353 .phy.dpi.data_lines = 24, 366 .phy.dpi.data_lines = 24,
354 .platform_enable = am3517_evm_panel_enable_dvi,
355 .platform_disable = am3517_evm_panel_disable_dvi,
356}; 367};
357 368
358static struct omap_dss_device *am3517_evm_dss_devices[] = { 369static struct omap_dss_device *am3517_evm_dss_devices[] = {
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index 486a3de5f401..dac141610666 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -46,6 +46,7 @@
46#include <plat/gpmc.h> 46#include <plat/gpmc.h>
47#include <plat/usb.h> 47#include <plat/usb.h>
48#include <plat/display.h> 48#include <plat/display.h>
49#include <plat/panel-generic-dpi.h>
49#include <plat/mcspi.h> 50#include <plat/mcspi.h>
50 51
51#include <mach/hardware.h> 52#include <mach/hardware.h>
@@ -351,22 +352,32 @@ static void cm_t35_panel_disable_tv(struct omap_dss_device *dssdev)
351{ 352{
352} 353}
353 354
355static struct panel_generic_dpi_data lcd_panel = {
356 .name = "toppoly_tdo35s",
357 .platform_enable = cm_t35_panel_enable_lcd,
358 .platform_disable = cm_t35_panel_disable_lcd,
359};
360
354static struct omap_dss_device cm_t35_lcd_device = { 361static struct omap_dss_device cm_t35_lcd_device = {
355 .name = "lcd", 362 .name = "lcd",
356 .driver_name = "toppoly_tdo35s_panel",
357 .type = OMAP_DISPLAY_TYPE_DPI, 363 .type = OMAP_DISPLAY_TYPE_DPI,
364 .driver_name = "generic_dpi_panel",
365 .data = &lcd_panel,
358 .phy.dpi.data_lines = 18, 366 .phy.dpi.data_lines = 18,
359 .platform_enable = cm_t35_panel_enable_lcd, 367};
360 .platform_disable = cm_t35_panel_disable_lcd, 368
369static struct panel_generic_dpi_data dvi_panel = {
370 .name = "generic",
371 .platform_enable = cm_t35_panel_enable_dvi,
372 .platform_disable = cm_t35_panel_disable_dvi,
361}; 373};
362 374
363static struct omap_dss_device cm_t35_dvi_device = { 375static struct omap_dss_device cm_t35_dvi_device = {
364 .name = "dvi", 376 .name = "dvi",
365 .driver_name = "generic_panel",
366 .type = OMAP_DISPLAY_TYPE_DPI, 377 .type = OMAP_DISPLAY_TYPE_DPI,
378 .driver_name = "generic_dpi_panel",
379 .data = &dvi_panel,
367 .phy.dpi.data_lines = 24, 380 .phy.dpi.data_lines = 24,
368 .platform_enable = cm_t35_panel_enable_dvi,
369 .platform_disable = cm_t35_panel_disable_dvi,
370}; 381};
371 382
372static struct omap_dss_device cm_t35_tv_device = { 383static struct omap_dss_device cm_t35_tv_device = {
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 451e7ff08b18..00bb1fc5e017 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -46,6 +46,7 @@
46#include <plat/nand.h> 46#include <plat/nand.h>
47#include <plat/usb.h> 47#include <plat/usb.h>
48#include <plat/display.h> 48#include <plat/display.h>
49#include <plat/panel-generic-dpi.h>
49 50
50#include <plat/mcspi.h> 51#include <plat/mcspi.h>
51#include <linux/input/matrix_keypad.h> 52#include <linux/input/matrix_keypad.h>
@@ -149,23 +150,32 @@ static struct regulator_consumer_supply devkit8000_vmmc1_supply =
149static struct regulator_consumer_supply devkit8000_vio_supply = 150static struct regulator_consumer_supply devkit8000_vio_supply =
150 REGULATOR_SUPPLY("vcc", "spi2.0"); 151 REGULATOR_SUPPLY("vcc", "spi2.0");
151 152
153static struct panel_generic_dpi_data lcd_panel = {
154 .name = "generic",
155 .platform_enable = devkit8000_panel_enable_lcd,
156 .platform_disable = devkit8000_panel_disable_lcd,
157};
158
152static struct omap_dss_device devkit8000_lcd_device = { 159static struct omap_dss_device devkit8000_lcd_device = {
153 .name = "lcd", 160 .name = "lcd",
154 .driver_name = "generic_panel",
155 .type = OMAP_DISPLAY_TYPE_DPI, 161 .type = OMAP_DISPLAY_TYPE_DPI,
162 .driver_name = "generic_dpi_panel",
163 .data = &lcd_panel,
156 .phy.dpi.data_lines = 24, 164 .phy.dpi.data_lines = 24,
157 .reset_gpio = -EINVAL, /* will be replaced */
158 .platform_enable = devkit8000_panel_enable_lcd,
159 .platform_disable = devkit8000_panel_disable_lcd,
160}; 165};
166
167static struct panel_generic_dpi_data dvi_panel = {
168 .name = "generic",
169 .platform_enable = devkit8000_panel_enable_dvi,
170 .platform_disable = devkit8000_panel_disable_dvi,
171};
172
161static struct omap_dss_device devkit8000_dvi_device = { 173static struct omap_dss_device devkit8000_dvi_device = {
162 .name = "dvi", 174 .name = "dvi",
163 .driver_name = "generic_panel",
164 .type = OMAP_DISPLAY_TYPE_DPI, 175 .type = OMAP_DISPLAY_TYPE_DPI,
176 .driver_name = "generic_dpi_panel",
177 .data = &dvi_panel,
165 .phy.dpi.data_lines = 24, 178 .phy.dpi.data_lines = 24,
166 .reset_gpio = -EINVAL, /* will be replaced */
167 .platform_enable = devkit8000_panel_enable_dvi,
168 .platform_disable = devkit8000_panel_disable_dvi,
169}; 179};
170 180
171static struct omap_dss_device devkit8000_tv_device = { 181static struct omap_dss_device devkit8000_tv_device = {
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0afa3011db0f..ebaa230e67ed 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -31,6 +31,7 @@
31#include <plat/gpmc.h> 31#include <plat/gpmc.h>
32#include <plat/usb.h> 32#include <plat/usb.h>
33#include <plat/display.h> 33#include <plat/display.h>
34#include <plat/panel-generic-dpi.h>
34#include <plat/onenand.h> 35#include <plat/onenand.h>
35 36
36#include "mux.h" 37#include "mux.h"
@@ -459,13 +460,18 @@ static void igep2_disable_dvi(struct omap_dss_device *dssdev)
459 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0); 460 gpio_direction_output(IGEP2_GPIO_DVI_PUP, 0);
460} 461}
461 462
463static struct panel_generic_dpi_data dvi_panel = {
464 .name = "generic",
465 .platform_enable = igep2_enable_dvi,
466 .platform_disable = igep2_disable_dvi,
467};
468
462static struct omap_dss_device igep2_dvi_device = { 469static struct omap_dss_device igep2_dvi_device = {
463 .type = OMAP_DISPLAY_TYPE_DPI, 470 .type = OMAP_DISPLAY_TYPE_DPI,
464 .name = "dvi", 471 .name = "dvi",
465 .driver_name = "generic_panel", 472 .driver_name = "generic_dpi_panel",
473 .data = &dvi_panel,
466 .phy.dpi.data_lines = 24, 474 .phy.dpi.data_lines = 24,
467 .platform_enable = igep2_enable_dvi,
468 .platform_disable = igep2_disable_dvi,
469}; 475};
470 476
471static struct omap_dss_device *igep2_dss_devices[] = { 477static struct omap_dss_device *igep2_dss_devices[] = {
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 6c127605942f..a4fe8e1ee1bd 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -41,6 +41,7 @@
41#include <plat/board.h> 41#include <plat/board.h>
42#include <plat/common.h> 42#include <plat/common.h>
43#include <plat/display.h> 43#include <plat/display.h>
44#include <plat/panel-generic-dpi.h>
44#include <plat/gpmc.h> 45#include <plat/gpmc.h>
45#include <plat/nand.h> 46#include <plat/nand.h>
46#include <plat/usb.h> 47#include <plat/usb.h>
@@ -194,14 +195,19 @@ static void beagle_disable_dvi(struct omap_dss_device *dssdev)
194 gpio_set_value(dssdev->reset_gpio, 0); 195 gpio_set_value(dssdev->reset_gpio, 0);
195} 196}
196 197
198static struct panel_generic_dpi_data dvi_panel = {
199 .name = "generic",
200 .platform_enable = beagle_enable_dvi,
201 .platform_disable = beagle_disable_dvi,
202};
203
197static struct omap_dss_device beagle_dvi_device = { 204static struct omap_dss_device beagle_dvi_device = {
198 .type = OMAP_DISPLAY_TYPE_DPI, 205 .type = OMAP_DISPLAY_TYPE_DPI,
199 .name = "dvi", 206 .name = "dvi",
200 .driver_name = "generic_panel", 207 .driver_name = "generic_dpi_panel",
208 .data = &dvi_panel,
201 .phy.dpi.data_lines = 24, 209 .phy.dpi.data_lines = 24,
202 .reset_gpio = 170, 210 .reset_gpio = 170,
203 .platform_enable = beagle_enable_dvi,
204 .platform_disable = beagle_disable_dvi,
205}; 211};
206 212
207static struct omap_dss_device beagle_tv_device = { 213static struct omap_dss_device beagle_tv_device = {
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3de8d9b8ec76..323c3809ce39 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -43,6 +43,7 @@
43#include <plat/common.h> 43#include <plat/common.h>
44#include <plat/mcspi.h> 44#include <plat/mcspi.h>
45#include <plat/display.h> 45#include <plat/display.h>
46#include <plat/panel-generic-dpi.h>
46 47
47#include "mux.h" 48#include "mux.h"
48#include "sdram-micron-mt46h32m32lf-6.h" 49#include "sdram-micron-mt46h32m32lf-6.h"
@@ -301,13 +302,18 @@ static void omap3_evm_disable_dvi(struct omap_dss_device *dssdev)
301 dvi_enabled = 0; 302 dvi_enabled = 0;
302} 303}
303 304
305static struct panel_generic_dpi_data dvi_panel = {
306 .name = "generic",
307 .platform_enable = omap3_evm_enable_dvi,
308 .platform_disable = omap3_evm_disable_dvi,
309};
310
304static struct omap_dss_device omap3_evm_dvi_device = { 311static struct omap_dss_device omap3_evm_dvi_device = {
305 .name = "dvi", 312 .name = "dvi",
306 .driver_name = "generic_panel",
307 .type = OMAP_DISPLAY_TYPE_DPI, 313 .type = OMAP_DISPLAY_TYPE_DPI,
314 .driver_name = "generic_dpi_panel",
315 .data = &dvi_panel,
308 .phy.dpi.data_lines = 24, 316 .phy.dpi.data_lines = 24,
309 .platform_enable = omap3_evm_enable_dvi,
310 .platform_disable = omap3_evm_disable_dvi,
311}; 317};
312 318
313static struct omap_dss_device *omap3_evm_dss_devices[] = { 319static struct omap_dss_device *omap3_evm_dss_devices[] = {
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 9df9d9367608..2a2dad447e86 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -40,6 +40,7 @@
40#include <plat/nand.h> 40#include <plat/nand.h>
41#include <plat/usb.h> 41#include <plat/usb.h>
42#include <plat/display.h> 42#include <plat/display.h>
43#include <plat/panel-generic-dpi.h>
43 44
44#include <plat/mcspi.h> 45#include <plat/mcspi.h>
45#include <linux/input/matrix_keypad.h> 46#include <linux/input/matrix_keypad.h>
@@ -160,13 +161,18 @@ static void omap3_stalker_disable_lcd(struct omap_dss_device *dssdev)
160 lcd_enabled = 0; 161 lcd_enabled = 0;
161} 162}
162 163
164static struct panel_generic_dpi_data lcd_panel = {
165 .name = "generic",
166 .platform_enable = omap3_stalker_enable_lcd,
167 .platform_disable = omap3_stalker_disable_lcd,
168};
169
163static struct omap_dss_device omap3_stalker_lcd_device = { 170static struct omap_dss_device omap3_stalker_lcd_device = {
164 .name = "lcd", 171 .name = "lcd",
165 .driver_name = "generic_panel", 172 .driver_name = "generic_dpi_panel",
173 .data = &lcd_panel,
166 .phy.dpi.data_lines = 24, 174 .phy.dpi.data_lines = 24,
167 .type = OMAP_DISPLAY_TYPE_DPI, 175 .type = OMAP_DISPLAY_TYPE_DPI,
168 .platform_enable = omap3_stalker_enable_lcd,
169 .platform_disable = omap3_stalker_disable_lcd,
170}; 176};
171 177
172static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev) 178static int omap3_stalker_enable_tv(struct omap_dss_device *dssdev)
@@ -208,13 +214,18 @@ static void omap3_stalker_disable_dvi(struct omap_dss_device *dssdev)
208 dvi_enabled = 0; 214 dvi_enabled = 0;
209} 215}
210 216
217static struct panel_generic_dpi_data dvi_panel = {
218 .name = "generic",
219 .platform_enable = omap3_stalker_enable_dvi,
220 .platform_disable = omap3_stalker_disable_dvi,
221};
222
211static struct omap_dss_device omap3_stalker_dvi_device = { 223static struct omap_dss_device omap3_stalker_dvi_device = {
212 .name = "dvi", 224 .name = "dvi",
213 .driver_name = "generic_panel",
214 .type = OMAP_DISPLAY_TYPE_DPI, 225 .type = OMAP_DISPLAY_TYPE_DPI,
226 .driver_name = "generic_dpi_panel",
227 .data = &dvi_panel,
215 .phy.dpi.data_lines = 24, 228 .phy.dpi.data_lines = 24,
216 .platform_enable = omap3_stalker_enable_dvi,
217 .platform_disable = omap3_stalker_disable_dvi,
218}; 229};
219 230
220static struct omap_dss_device *omap3_stalker_dss_devices[] = { 231static struct omap_dss_device *omap3_stalker_dss_devices[] = {
diff --git a/arch/arm/mach-omap2/board-zoom-display.c b/arch/arm/mach-omap2/board-zoom-display.c
new file mode 100644
index 000000000000..6bcd43657aed
--- /dev/null
+++ b/arch/arm/mach-omap2/board-zoom-display.c
@@ -0,0 +1,168 @@
1/*
2 * Copyright (C) 2010 Texas Instruments Inc.
3 *
4 * Modified from mach-omap2/board-zoom-peripherals.c
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/i2c/twl.h>
16#include <linux/spi/spi.h>
17#include <plat/mcspi.h>
18#include <plat/display.h>
19
20#define LCD_PANEL_RESET_GPIO_PROD 96
21#define LCD_PANEL_RESET_GPIO_PILOT 55
22#define LCD_PANEL_QVGA_GPIO 56
23
24static void zoom_lcd_panel_init(void)
25{
26 int ret;
27 unsigned char lcd_panel_reset_gpio;
28
29 lcd_panel_reset_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
30 LCD_PANEL_RESET_GPIO_PROD :
31 LCD_PANEL_RESET_GPIO_PILOT;
32
33 ret = gpio_request(lcd_panel_reset_gpio, "lcd reset");
34 if (ret) {
35 pr_err("Failed to get LCD reset GPIO (gpio%d).\n",
36 lcd_panel_reset_gpio);
37 return;
38 }
39 gpio_direction_output(lcd_panel_reset_gpio, 1);
40
41 ret = gpio_request(LCD_PANEL_QVGA_GPIO, "lcd qvga");
42 if (ret) {
43 pr_err("Failed to get LCD_PANEL_QVGA_GPIO (gpio%d).\n",
44 LCD_PANEL_QVGA_GPIO);
45 goto err0;
46 }
47 gpio_direction_output(LCD_PANEL_QVGA_GPIO, 1);
48
49 return;
50err0:
51 gpio_free(lcd_panel_reset_gpio);
52}
53
54static int zoom_panel_enable_lcd(struct omap_dss_device *dssdev)
55{
56 return 0;
57}
58
59static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev)
60{
61}
62
63/*
64 * PWMA/B register offsets (TWL4030_MODULE_PWMA)
65 */
66#define TWL_INTBR_PMBR1 0xD
67#define TWL_INTBR_GPBR1 0xC
68#define TWL_LED_PWMON 0x0
69#define TWL_LED_PWMOFF 0x1
70
71static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level)
72{
73 unsigned char c;
74 u8 mux_pwm, enb_pwm;
75
76 if (level > 100)
77 return -1;
78
79 twl_i2c_read_u8(TWL4030_MODULE_INTBR, &mux_pwm, TWL_INTBR_PMBR1);
80 twl_i2c_read_u8(TWL4030_MODULE_INTBR, &enb_pwm, TWL_INTBR_GPBR1);
81
82 if (level == 0) {
83 /* disable pwm1 output and clock */
84 enb_pwm = enb_pwm & 0xF5;
85 /* change pwm1 pin to gpio pin */
86 mux_pwm = mux_pwm & 0xCF;
87 twl_i2c_write_u8(TWL4030_MODULE_INTBR,
88 enb_pwm, TWL_INTBR_GPBR1);
89 twl_i2c_write_u8(TWL4030_MODULE_INTBR,
90 mux_pwm, TWL_INTBR_PMBR1);
91 return 0;
92 }
93
94 if (!((enb_pwm & 0xA) && (mux_pwm & 0x30))) {
95 /* change gpio pin to pwm1 pin */
96 mux_pwm = mux_pwm | 0x30;
97 /* enable pwm1 output and clock*/
98 enb_pwm = enb_pwm | 0x0A;
99 twl_i2c_write_u8(TWL4030_MODULE_INTBR,
100 mux_pwm, TWL_INTBR_PMBR1);
101 twl_i2c_write_u8(TWL4030_MODULE_INTBR,
102 enb_pwm, TWL_INTBR_GPBR1);
103 }
104
105 c = ((50 * (100 - level)) / 100) + 1;
106 twl_i2c_write_u8(TWL4030_MODULE_PWM1, 0x7F, TWL_LED_PWMOFF);
107 twl_i2c_write_u8(TWL4030_MODULE_PWM1, c, TWL_LED_PWMON);
108
109 return 0;
110}
111
112static struct omap_dss_device zoom_lcd_device = {
113 .name = "lcd",
114 .driver_name = "NEC_8048_panel",
115 .type = OMAP_DISPLAY_TYPE_DPI,
116 .phy.dpi.data_lines = 24,
117 .platform_enable = zoom_panel_enable_lcd,
118 .platform_disable = zoom_panel_disable_lcd,
119 .max_backlight_level = 100,
120 .set_backlight = zoom_set_bl_intensity,
121};
122
123static struct omap_dss_device *zoom_dss_devices[] = {
124 &zoom_lcd_device,
125};
126
127static struct omap_dss_board_info zoom_dss_data = {
128 .num_devices = ARRAY_SIZE(zoom_dss_devices),
129 .devices = zoom_dss_devices,
130 .default_device = &zoom_lcd_device,
131};
132
133static struct platform_device zoom_dss_device = {
134 .name = "omapdss",
135 .id = -1,
136 .dev = {
137 .platform_data = &zoom_dss_data,
138 },
139};
140
141static struct omap2_mcspi_device_config dss_lcd_mcspi_config = {
142 .turbo_mode = 1,
143 .single_channel = 1, /* 0: slave, 1: master */
144};
145
146static struct spi_board_info nec_8048_spi_board_info[] __initdata = {
147 [0] = {
148 .modalias = "nec_8048_spi",
149 .bus_num = 1,
150 .chip_select = 2,
151 .max_speed_hz = 375000,
152 .controller_data = &dss_lcd_mcspi_config,
153 },
154};
155
156static struct platform_device *zoom_display_devices[] __initdata = {
157 &zoom_dss_device,
158};
159
160void __init zoom_display_init(void)
161{
162 platform_add_devices(zoom_display_devices,
163 ARRAY_SIZE(zoom_display_devices));
164 spi_register_board_info(nec_8048_spi_board_info,
165 ARRAY_SIZE(nec_8048_spi_board_info));
166 zoom_lcd_panel_init();
167}
168
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 3fbd0edd712e..14d95afa3f0d 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -35,6 +35,8 @@
35#define OMAP_ZOOM_WLAN_PMENA_GPIO (101) 35#define OMAP_ZOOM_WLAN_PMENA_GPIO (101)
36#define OMAP_ZOOM_WLAN_IRQ_GPIO (162) 36#define OMAP_ZOOM_WLAN_IRQ_GPIO (162)
37 37
38#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES)
39
38/* Zoom2 has Qwerty keyboard*/ 40/* Zoom2 has Qwerty keyboard*/
39static uint32_t board_keymap[] = { 41static uint32_t board_keymap[] = {
40 KEY(0, 0, KEY_E), 42 KEY(0, 0, KEY_E),
@@ -224,9 +226,43 @@ static struct omap2_hsmmc_info mmc[] = {
224 {} /* Terminator */ 226 {} /* Terminator */
225}; 227};
226 228
229static struct regulator_consumer_supply zoom_vpll2_supply =
230 REGULATOR_SUPPLY("vdds_dsi", "omapdss");
231
232static struct regulator_consumer_supply zoom_vdda_dac_supply =
233 REGULATOR_SUPPLY("vdda_dac", "omapdss");
234
235static struct regulator_init_data zoom_vpll2 = {
236 .constraints = {
237 .min_uV = 1800000,
238 .max_uV = 1800000,
239 .valid_modes_mask = REGULATOR_MODE_NORMAL
240 | REGULATOR_MODE_STANDBY,
241 .valid_ops_mask = REGULATOR_CHANGE_MODE
242 | REGULATOR_CHANGE_STATUS,
243 },
244 .num_consumer_supplies = 1,
245 .consumer_supplies = &zoom_vpll2_supply,
246};
247
248static struct regulator_init_data zoom_vdac = {
249 .constraints = {
250 .min_uV = 1800000,
251 .max_uV = 1800000,
252 .valid_modes_mask = REGULATOR_MODE_NORMAL
253 | REGULATOR_MODE_STANDBY,
254 .valid_ops_mask = REGULATOR_CHANGE_MODE
255 | REGULATOR_CHANGE_STATUS,
256 },
257 .num_consumer_supplies = 1,
258 .consumer_supplies = &zoom_vdda_dac_supply,
259};
260
227static int zoom_twl_gpio_setup(struct device *dev, 261static int zoom_twl_gpio_setup(struct device *dev,
228 unsigned gpio, unsigned ngpio) 262 unsigned gpio, unsigned ngpio)
229{ 263{
264 int ret;
265
230 /* gpio + 0 is "mmc0_cd" (input/IRQ) */ 266 /* gpio + 0 is "mmc0_cd" (input/IRQ) */
231 mmc[0].gpio_cd = gpio + 0; 267 mmc[0].gpio_cd = gpio + 0;
232 omap2_hsmmc_init(mmc); 268 omap2_hsmmc_init(mmc);
@@ -238,7 +274,15 @@ static int zoom_twl_gpio_setup(struct device *dev,
238 zoom_vsim_supply.dev = mmc[0].dev; 274 zoom_vsim_supply.dev = mmc[0].dev;
239 zoom_vmmc2_supply.dev = mmc[1].dev; 275 zoom_vmmc2_supply.dev = mmc[1].dev;
240 276
241 return 0; 277 ret = gpio_request(LCD_PANEL_ENABLE_GPIO, "lcd enable");
278 if (ret) {
279 pr_err("Failed to get LCD_PANEL_ENABLE_GPIO (gpio%d).\n",
280 LCD_PANEL_ENABLE_GPIO);
281 return ret;
282 }
283 gpio_direction_output(LCD_PANEL_ENABLE_GPIO, 0);
284
285 return ret;
242} 286}
243 287
244/* EXTMUTE callback function */ 288/* EXTMUTE callback function */
@@ -301,7 +345,8 @@ static struct twl4030_platform_data zoom_twldata = {
301 .vmmc1 = &zoom_vmmc1, 345 .vmmc1 = &zoom_vmmc1,
302 .vmmc2 = &zoom_vmmc2, 346 .vmmc2 = &zoom_vmmc2,
303 .vsim = &zoom_vsim, 347 .vsim = &zoom_vsim,
304 348 .vpll2 = &zoom_vpll2,
349 .vdac = &zoom_vdac,
305}; 350};
306 351
307static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = { 352static struct i2c_board_info __initdata zoom_i2c_boardinfo[] = {
diff --git a/arch/arm/mach-omap2/board-zoom.c b/arch/arm/mach-omap2/board-zoom.c
index e041c537ea37..e26754c24ee8 100644
--- a/arch/arm/mach-omap2/board-zoom.c
+++ b/arch/arm/mach-omap2/board-zoom.c
@@ -130,6 +130,7 @@ static void __init omap_zoom_init(void)
130 ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS); 130 ARRAY_SIZE(zoom_nand_partitions), ZOOM_NAND_CS);
131 zoom_debugboard_init(); 131 zoom_debugboard_init();
132 zoom_peripherals_init(); 132 zoom_peripherals_init();
133 zoom_display_init();
133} 134}
134 135
135MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board") 136MACHINE_START(OMAP_ZOOM2, "OMAP Zoom2 board")
diff --git a/arch/arm/mach-omap2/include/mach/board-zoom.h b/arch/arm/mach-omap2/include/mach/board-zoom.h
index f93ca3928c3b..d20bd9c1a106 100644
--- a/arch/arm/mach-omap2/include/mach/board-zoom.h
+++ b/arch/arm/mach-omap2/include/mach/board-zoom.h
@@ -1,9 +1,12 @@
1/* 1/*
2 * Defines for zoom boards 2 * Defines for zoom boards
3 */ 3 */
4#include <plat/display.h>
5
4#define ZOOM_NAND_CS 0 6#define ZOOM_NAND_CS 0
5 7
6extern int __init zoom_debugboard_init(void); 8extern int __init zoom_debugboard_init(void);
7extern void __init zoom_peripherals_init(void); 9extern void __init zoom_peripherals_init(void);
10extern void __init zoom_display_init(void);
8 11
9#define ZOOM2_HEADSET_EXTMUTE_GPIO 153 12#define ZOOM2_HEADSET_EXTMUTE_GPIO 153
diff --git a/arch/arm/plat-omap/include/plat/display.h b/arch/arm/plat-omap/include/plat/display.h
index c915a661f1f5..537f4e449f50 100644
--- a/arch/arm/plat-omap/include/plat/display.h
+++ b/arch/arm/plat-omap/include/plat/display.h
@@ -42,6 +42,10 @@
42#define DISPC_IRQ_SYNC_LOST (1 << 14) 42#define DISPC_IRQ_SYNC_LOST (1 << 14)
43#define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15) 43#define DISPC_IRQ_SYNC_LOST_DIGIT (1 << 15)
44#define DISPC_IRQ_WAKEUP (1 << 16) 44#define DISPC_IRQ_WAKEUP (1 << 16)
45#define DISPC_IRQ_SYNC_LOST2 (1 << 17)
46#define DISPC_IRQ_VSYNC2 (1 << 18)
47#define DISPC_IRQ_ACBIAS_COUNT_STAT2 (1 << 21)
48#define DISPC_IRQ_FRAMEDONE2 (1 << 22)
45 49
46struct omap_dss_device; 50struct omap_dss_device;
47struct omap_overlay_manager; 51struct omap_overlay_manager;
@@ -64,6 +68,7 @@ enum omap_plane {
64enum omap_channel { 68enum omap_channel {
65 OMAP_DSS_CHANNEL_LCD = 0, 69 OMAP_DSS_CHANNEL_LCD = 0,
66 OMAP_DSS_CHANNEL_DIGIT = 1, 70 OMAP_DSS_CHANNEL_DIGIT = 1,
71 OMAP_DSS_CHANNEL_LCD2 = 2,
67}; 72};
68 73
69enum omap_color_mode { 74enum omap_color_mode {
@@ -142,6 +147,7 @@ enum omap_dss_display_state {
142enum omap_dss_overlay_managers { 147enum omap_dss_overlay_managers {
143 OMAP_DSS_OVL_MGR_LCD, 148 OMAP_DSS_OVL_MGR_LCD,
144 OMAP_DSS_OVL_MGR_TV, 149 OMAP_DSS_OVL_MGR_TV,
150 OMAP_DSS_OVL_MGR_LCD2,
145}; 151};
146 152
147enum omap_dss_rotation_type { 153enum omap_dss_rotation_type {
@@ -268,6 +274,7 @@ struct omap_overlay_info {
268 u16 out_width; /* if 0, out_width == width */ 274 u16 out_width; /* if 0, out_width == width */
269 u16 out_height; /* if 0, out_height == height */ 275 u16 out_height; /* if 0, out_height == height */
270 u8 global_alpha; 276 u8 global_alpha;
277 u8 pre_mult_alpha;
271}; 278};
272 279
273struct omap_overlay { 280struct omap_overlay {
@@ -351,6 +358,8 @@ struct omap_dss_device {
351 358
352 enum omap_display_type type; 359 enum omap_display_type type;
353 360
361 enum omap_channel channel;
362
354 union { 363 union {
355 struct { 364 struct {
356 u8 data_lines; 365 u8 data_lines;
diff --git a/arch/arm/plat-omap/include/plat/panel-generic-dpi.h b/arch/arm/plat-omap/include/plat/panel-generic-dpi.h
new file mode 100644
index 000000000000..790619734bcd
--- /dev/null
+++ b/arch/arm/plat-omap/include/plat/panel-generic-dpi.h
@@ -0,0 +1,37 @@
1/*
2 * Header for generic DPI panel driver
3 *
4 * Copyright (C) 2010 Canonical Ltd.
5 * Author: Bryan Wu <bryan.wu@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H
21#define __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H
22
23#include "display.h"
24
25/**
26 * struct panel_generic_dpi_data - panel driver configuration data
27 * @name: panel name
28 * @platform_enable: platform specific panel enable function
29 * @platform_disable: platform specific panel disable function
30 */
31struct panel_generic_dpi_data {
32 const char *name;
33 int (*platform_enable)(struct omap_dss_device *dssdev);
34 void (*platform_disable)(struct omap_dss_device *dssdev);
35};
36
37#endif /* __ARCH_ARM_PLAT_OMAP_PANEL_GENERIC_DPI_H */