aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-05-31 04:02:48 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-08-28 03:23:20 -0400
commitc78fb21decade8511b252ab8d60f8c93315eb271 (patch)
tree495560cefc0fba2bdd90f986dd806489d3ff3c49
parent5302556cd4f1db53a2925570eb18d660a669f237 (diff)
ARM: OMAP: devkit8000: use new display drivers
Use new display drivers for devkit8000 board. The new OMAP display drivers were merged for 3.11, and we can now change the board files to use the new ones and phase out the old ones. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Tony Lindgren <tony@atomide.com>
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c96
1 files changed, 65 insertions, 31 deletions
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index f1d91ba5d1ac..cdc4fb9960a9 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -112,50 +112,81 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = {
112 REGULATOR_SUPPLY("vcc", "spi2.0"), 112 REGULATOR_SUPPLY("vcc", "spi2.0"),
113}; 113};
114 114
115static struct panel_generic_dpi_data lcd_panel = { 115static const struct display_timing devkit8000_lcd_videomode = {
116 .name = "innolux_at070tn83", 116 .pixelclock = { 0, 40000000, 0 },
117 /* gpios filled in code */ 117
118 .hactive = { 0, 800, 0 },
119 .hfront_porch = { 0, 1, 0 },
120 .hback_porch = { 0, 1, 0 },
121 .hsync_len = { 0, 48, 0 },
122
123 .vactive = { 0, 480, 0 },
124 .vfront_porch = { 0, 12, 0 },
125 .vback_porch = { 0, 25, 0 },
126 .vsync_len = { 0, 3, 0 },
127
128 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
129 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
118}; 130};
119 131
120static struct omap_dss_device devkit8000_lcd_device = { 132static struct panel_dpi_platform_data devkit8000_lcd_pdata = {
121 .name = "lcd", 133 .name = "lcd",
122 .type = OMAP_DISPLAY_TYPE_DPI, 134 .source = "dpi.0",
123 .driver_name = "generic_dpi_panel", 135
124 .data = &lcd_panel, 136 .data_lines = 24,
125 .phy.dpi.data_lines = 24, 137
138 .display_timing = &devkit8000_lcd_videomode,
139
140 .enable_gpio = -1, /* filled in code */
141 .backlight_gpio = -1,
126}; 142};
127 143
128static struct tfp410_platform_data dvi_panel = { 144static struct platform_device devkit8000_lcd_device = {
129 .power_down_gpio = -1, 145 .name = "panel-dpi",
130 .i2c_bus_num = 1, 146 .id = 0,
147 .dev.platform_data = &devkit8000_lcd_pdata,
131}; 148};
132 149
133static struct omap_dss_device devkit8000_dvi_device = { 150static struct connector_dvi_platform_data devkit8000_dvi_connector_pdata = {
134 .name = "dvi", 151 .name = "dvi",
135 .type = OMAP_DISPLAY_TYPE_DPI, 152 .source = "tfp410.0",
136 .driver_name = "tfp410", 153 .i2c_bus_num = 1,
137 .data = &dvi_panel,
138 .phy.dpi.data_lines = 24,
139}; 154};
140 155
141static struct omap_dss_device devkit8000_tv_device = { 156static struct platform_device devkit8000_dvi_connector_device = {
142 .name = "tv", 157 .name = "connector-dvi",
143 .driver_name = "venc", 158 .id = 0,
144 .type = OMAP_DISPLAY_TYPE_VENC, 159 .dev.platform_data = &devkit8000_dvi_connector_pdata,
145 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
146}; 160};
147 161
162static struct encoder_tfp410_platform_data devkit8000_tfp410_pdata = {
163 .name = "tfp410.0",
164 .source = "dpi.0",
165 .data_lines = 24,
166 .power_down_gpio = -1, /* filled in code */
167};
148 168
149static struct omap_dss_device *devkit8000_dss_devices[] = { 169static struct platform_device devkit8000_tfp410_device = {
150 &devkit8000_lcd_device, 170 .name = "tfp410",
151 &devkit8000_dvi_device, 171 .id = 0,
152 &devkit8000_tv_device, 172 .dev.platform_data = &devkit8000_tfp410_pdata,
173};
174
175static struct connector_atv_platform_data devkit8000_tv_pdata = {
176 .name = "tv",
177 .source = "venc.0",
178 .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
179 .invert_polarity = false,
180};
181
182static struct platform_device devkit8000_tv_connector_device = {
183 .name = "connector-analog-tv",
184 .id = 0,
185 .dev.platform_data = &devkit8000_tv_pdata,
153}; 186};
154 187
155static struct omap_dss_board_info devkit8000_dss_data = { 188static struct omap_dss_board_info devkit8000_dss_data = {
156 .num_devices = ARRAY_SIZE(devkit8000_dss_devices), 189 .default_display_name = "lcd",
157 .devices = devkit8000_dss_devices,
158 .default_device = &devkit8000_lcd_device,
159}; 190};
160 191
161static uint32_t board_keymap[] = { 192static uint32_t board_keymap[] = {
@@ -204,11 +235,10 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
204 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; 235 gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
205 236
206 /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */ 237 /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
207 lcd_panel.num_gpios = 1; 238 devkit8000_lcd_pdata.enable_gpio = gpio + TWL4030_GPIO_MAX + 0;
208 lcd_panel.gpios[0] = gpio + TWL4030_GPIO_MAX + 0;
209 239
210 /* gpio + 7 is "DVI_PD" (out, active low) */ 240 /* gpio + 7 is "DVI_PD" (out, active low) */
211 dvi_panel.power_down_gpio = gpio + 7; 241 devkit8000_tfp410_pdata.power_down_gpio = gpio + 7;
212 242
213 return 0; 243 return 0;
214} 244}
@@ -413,6 +443,10 @@ static struct platform_device *devkit8000_devices[] __initdata = {
413 &leds_gpio, 443 &leds_gpio,
414 &keys_gpio, 444 &keys_gpio,
415 &omap_dm9000_dev, 445 &omap_dm9000_dev,
446 &devkit8000_lcd_device,
447 &devkit8000_tfp410_device,
448 &devkit8000_dvi_connector_device,
449 &devkit8000_tv_connector_device,
416}; 450};
417 451
418static struct usbhs_omap_platform_data usbhs_bdata __initdata = { 452static struct usbhs_omap_platform_data usbhs_bdata __initdata = {