diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-am3517evm.c')
-rw-r--r-- | arch/arm/mach-omap2/board-am3517evm.c | 113 |
1 files changed, 77 insertions, 36 deletions
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index d63f14b534b5..8cc2c9e9fb03 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -120,56 +120,95 @@ static int __init am3517_evm_i2c_init(void) | |||
120 | return 0; | 120 | return 0; |
121 | } | 121 | } |
122 | 122 | ||
123 | static struct panel_generic_dpi_data lcd_panel = { | 123 | static const struct display_timing am3517_evm_lcd_videomode = { |
124 | .name = "sharp_lq", | 124 | .pixelclock = { 0, 9000000, 0 }, |
125 | .num_gpios = 3, | 125 | |
126 | .gpios = { | 126 | .hactive = { 0, 480, 0 }, |
127 | LCD_PANEL_PWR, | 127 | .hfront_porch = { 0, 3, 0 }, |
128 | LCD_PANEL_BKLIGHT_PWR, | 128 | .hback_porch = { 0, 2, 0 }, |
129 | LCD_PANEL_PWM, | 129 | .hsync_len = { 0, 42, 0 }, |
130 | }, | 130 | |
131 | .vactive = { 0, 272, 0 }, | ||
132 | .vfront_porch = { 0, 3, 0 }, | ||
133 | .vback_porch = { 0, 2, 0 }, | ||
134 | .vsync_len = { 0, 11, 0 }, | ||
135 | |||
136 | .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | | ||
137 | DISPLAY_FLAGS_DE_LOW | DISPLAY_FLAGS_PIXDATA_POSEDGE, | ||
138 | }; | ||
139 | |||
140 | static struct panel_dpi_platform_data am3517_evm_lcd_pdata = { | ||
141 | .name = "lcd", | ||
142 | .source = "dpi.0", | ||
143 | |||
144 | .data_lines = 16, | ||
145 | |||
146 | .display_timing = &am3517_evm_lcd_videomode, | ||
147 | |||
148 | .enable_gpio = LCD_PANEL_PWR, | ||
149 | .backlight_gpio = LCD_PANEL_BKLIGHT_PWR, | ||
150 | }; | ||
151 | |||
152 | static struct platform_device am3517_evm_lcd_device = { | ||
153 | .name = "panel-dpi", | ||
154 | .id = 0, | ||
155 | .dev.platform_data = &am3517_evm_lcd_pdata, | ||
131 | }; | 156 | }; |
132 | 157 | ||
133 | static struct omap_dss_device am3517_evm_lcd_device = { | 158 | static struct connector_dvi_platform_data am3517_evm_dvi_connector_pdata = { |
134 | .type = OMAP_DISPLAY_TYPE_DPI, | 159 | .name = "dvi", |
135 | .name = "lcd", | 160 | .source = "tfp410.0", |
136 | .driver_name = "generic_dpi_panel", | 161 | .i2c_bus_num = -1, |
137 | .data = &lcd_panel, | ||
138 | .phy.dpi.data_lines = 16, | ||
139 | }; | 162 | }; |
140 | 163 | ||
141 | static struct omap_dss_device am3517_evm_tv_device = { | 164 | static struct platform_device am3517_evm_dvi_connector_device = { |
142 | .type = OMAP_DISPLAY_TYPE_VENC, | 165 | .name = "connector-dvi", |
143 | .name = "tv", | 166 | .id = 0, |
144 | .driver_name = "venc", | 167 | .dev.platform_data = &am3517_evm_dvi_connector_pdata, |
145 | .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, | ||
146 | }; | 168 | }; |
147 | 169 | ||
148 | static struct tfp410_platform_data dvi_panel = { | 170 | static struct encoder_tfp410_platform_data am3517_evm_tfp410_pdata = { |
149 | .power_down_gpio = -1, | 171 | .name = "tfp410.0", |
150 | .i2c_bus_num = -1, | 172 | .source = "dpi.0", |
173 | .data_lines = 24, | ||
174 | .power_down_gpio = -1, | ||
151 | }; | 175 | }; |
152 | 176 | ||
153 | static struct omap_dss_device am3517_evm_dvi_device = { | 177 | static struct platform_device am3517_evm_tfp410_device = { |
154 | .type = OMAP_DISPLAY_TYPE_DPI, | 178 | .name = "tfp410", |
155 | .name = "dvi", | 179 | .id = 0, |
156 | .driver_name = "tfp410", | 180 | .dev.platform_data = &am3517_evm_tfp410_pdata, |
157 | .data = &dvi_panel, | ||
158 | .phy.dpi.data_lines = 24, | ||
159 | }; | 181 | }; |
160 | 182 | ||
161 | static struct omap_dss_device *am3517_evm_dss_devices[] = { | 183 | static struct connector_atv_platform_data am3517_evm_tv_pdata = { |
162 | &am3517_evm_lcd_device, | 184 | .name = "tv", |
163 | &am3517_evm_tv_device, | 185 | .source = "venc.0", |
164 | &am3517_evm_dvi_device, | 186 | .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO, |
187 | .invert_polarity = false, | ||
188 | }; | ||
189 | |||
190 | static struct platform_device am3517_evm_tv_connector_device = { | ||
191 | .name = "connector-analog-tv", | ||
192 | .id = 0, | ||
193 | .dev.platform_data = &am3517_evm_tv_pdata, | ||
165 | }; | 194 | }; |
166 | 195 | ||
167 | static struct omap_dss_board_info am3517_evm_dss_data = { | 196 | static struct omap_dss_board_info am3517_evm_dss_data = { |
168 | .num_devices = ARRAY_SIZE(am3517_evm_dss_devices), | 197 | .default_display_name = "lcd", |
169 | .devices = am3517_evm_dss_devices, | ||
170 | .default_device = &am3517_evm_lcd_device, | ||
171 | }; | 198 | }; |
172 | 199 | ||
200 | static void __init am3517_evm_display_init(void) | ||
201 | { | ||
202 | gpio_request_one(LCD_PANEL_PWM, GPIOF_OUT_INIT_HIGH, "lcd panel pwm"); | ||
203 | |||
204 | omap_display_init(&am3517_evm_dss_data); | ||
205 | |||
206 | platform_device_register(&am3517_evm_tfp410_device); | ||
207 | platform_device_register(&am3517_evm_dvi_connector_device); | ||
208 | platform_device_register(&am3517_evm_lcd_device); | ||
209 | platform_device_register(&am3517_evm_tv_connector_device); | ||
210 | } | ||
211 | |||
173 | /* | 212 | /* |
174 | * Board initialization | 213 | * Board initialization |
175 | */ | 214 | */ |
@@ -295,7 +334,9 @@ static void __init am3517_evm_init(void) | |||
295 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 334 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
296 | 335 | ||
297 | am3517_evm_i2c_init(); | 336 | am3517_evm_i2c_init(); |
298 | omap_display_init(&am3517_evm_dss_data); | 337 | |
338 | am3517_evm_display_init(); | ||
339 | |||
299 | omap_serial_init(); | 340 | omap_serial_init(); |
300 | omap_sdrc_init(NULL, NULL); | 341 | omap_sdrc_init(NULL, NULL); |
301 | 342 | ||