Commit | Line | Data |
---|---|---|
a6490335 K |
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> | |
a6490335 | 15 | #include <linux/spi/spi.h> |
2203747c | 16 | #include <linux/platform_data/spi-omap2-mcspi.h> |
a0b38cc4 | 17 | #include <video/omapdss.h> |
20012c77 | 18 | #include <video/omap-panel-data.h> |
a6490335 | 19 | |
20012c77 | 20 | #include "board-zoom.h" |
e4c060db | 21 | #include "soc.h" |
dbc04161 | 22 | #include "common.h" |
4b25408f | 23 | |
a6490335 K |
24 | #define LCD_PANEL_RESET_GPIO_PROD 96 |
25 | #define LCD_PANEL_RESET_GPIO_PILOT 55 | |
26 | #define LCD_PANEL_QVGA_GPIO 56 | |
27 | ||
d901ffa6 TV |
28 | static struct panel_nec_nl8048hl11_platform_data zoom_lcd_pdata = { |
29 | .name = "lcd", | |
30 | .source = "dpi.0", | |
bc593f5d | 31 | |
d901ffa6 | 32 | .data_lines = 24, |
a6490335 | 33 | |
d901ffa6 TV |
34 | .res_gpio = -1, /* filled in code */ |
35 | .qvga_gpio = LCD_PANEL_QVGA_GPIO, | |
a6490335 K |
36 | }; |
37 | ||
38 | static struct omap_dss_board_info zoom_dss_data = { | |
d901ffa6 | 39 | .default_display_name = "lcd", |
a6490335 K |
40 | }; |
41 | ||
20012c77 AT |
42 | static void __init zoom_lcd_panel_init(void) |
43 | { | |
d901ffa6 | 44 | zoom_lcd_pdata.res_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ? |
20012c77 AT |
45 | LCD_PANEL_RESET_GPIO_PROD : |
46 | LCD_PANEL_RESET_GPIO_PILOT; | |
47 | } | |
48 | ||
a6490335 K |
49 | static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { |
50 | .turbo_mode = 1, | |
a6490335 K |
51 | }; |
52 | ||
53 | static struct spi_board_info nec_8048_spi_board_info[] __initdata = { | |
54 | [0] = { | |
d901ffa6 | 55 | .modalias = "panel-nec-nl8048hl11", |
a6490335 K |
56 | .bus_num = 1, |
57 | .chip_select = 2, | |
58 | .max_speed_hz = 375000, | |
59 | .controller_data = &dss_lcd_mcspi_config, | |
d901ffa6 | 60 | .platform_data = &zoom_lcd_pdata, |
a6490335 K |
61 | }, |
62 | }; | |
63 | ||
a6490335 K |
64 | void __init zoom_display_init(void) |
65 | { | |
d5e13227 | 66 | omap_display_init(&zoom_dss_data); |
d901ffa6 | 67 | zoom_lcd_panel_init(); |
a6490335 K |
68 | spi_register_board_info(nec_8048_spi_board_info, |
69 | ARRAY_SIZE(nec_8048_spi_board_info)); | |
a6490335 K |
70 | } |
71 |