diff options
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 167 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock24xx.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/clock34xx.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/sdrc.c | 16 |
5 files changed, 181 insertions, 28 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index 491364e44c7d..5bda9fdbee9e 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <plat/common.h> | 37 | #include <plat/common.h> |
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 | 41 | ||
41 | #include <plat/control.h> | 42 | #include <plat/control.h> |
42 | #include <plat/gpmc-smc91x.h> | 43 | #include <plat/gpmc-smc91x.h> |
@@ -152,31 +153,152 @@ static struct spi_board_info sdp3430_spi_board_info[] __initdata = { | |||
152 | }, | 153 | }, |
153 | }; | 154 | }; |
154 | 155 | ||
155 | static struct platform_device sdp3430_lcd_device = { | 156 | |
156 | .name = "sdp2430_lcd", | 157 | #define SDP3430_LCD_PANEL_BACKLIGHT_GPIO 8 |
157 | .id = -1, | 158 | #define SDP3430_LCD_PANEL_ENABLE_GPIO 5 |
159 | |||
160 | static unsigned backlight_gpio; | ||
161 | static unsigned enable_gpio; | ||
162 | static int lcd_enabled; | ||
163 | static int dvi_enabled; | ||
164 | |||
165 | static void __init sdp3430_display_init(void) | ||
166 | { | ||
167 | int r; | ||
168 | |||
169 | enable_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO; | ||
170 | backlight_gpio = SDP3430_LCD_PANEL_BACKLIGHT_GPIO; | ||
171 | |||
172 | r = gpio_request(enable_gpio, "LCD reset"); | ||
173 | if (r) { | ||
174 | printk(KERN_ERR "failed to get LCD reset GPIO\n"); | ||
175 | goto err0; | ||
176 | } | ||
177 | |||
178 | r = gpio_request(backlight_gpio, "LCD Backlight"); | ||
179 | if (r) { | ||
180 | printk(KERN_ERR "failed to get LCD backlight GPIO\n"); | ||
181 | goto err1; | ||
182 | } | ||
183 | |||
184 | gpio_direction_output(enable_gpio, 0); | ||
185 | gpio_direction_output(backlight_gpio, 0); | ||
186 | |||
187 | return; | ||
188 | err1: | ||
189 | gpio_free(enable_gpio); | ||
190 | err0: | ||
191 | return; | ||
192 | } | ||
193 | |||
194 | static int sdp3430_panel_enable_lcd(struct omap_dss_device *dssdev) | ||
195 | { | ||
196 | if (dvi_enabled) { | ||
197 | printk(KERN_ERR "cannot enable LCD, DVI is enabled\n"); | ||
198 | return -EINVAL; | ||
199 | } | ||
200 | |||
201 | gpio_direction_output(enable_gpio, 1); | ||
202 | gpio_direction_output(backlight_gpio, 1); | ||
203 | |||
204 | lcd_enabled = 1; | ||
205 | |||
206 | return 0; | ||
207 | } | ||
208 | |||
209 | static void sdp3430_panel_disable_lcd(struct omap_dss_device *dssdev) | ||
210 | { | ||
211 | lcd_enabled = 0; | ||
212 | |||
213 | gpio_direction_output(enable_gpio, 0); | ||
214 | gpio_direction_output(backlight_gpio, 0); | ||
215 | } | ||
216 | |||
217 | static int sdp3430_panel_enable_dvi(struct omap_dss_device *dssdev) | ||
218 | { | ||
219 | if (lcd_enabled) { | ||
220 | printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); | ||
221 | return -EINVAL; | ||
222 | } | ||
223 | |||
224 | dvi_enabled = 1; | ||
225 | |||
226 | return 0; | ||
227 | } | ||
228 | |||
229 | static void sdp3430_panel_disable_dvi(struct omap_dss_device *dssdev) | ||
230 | { | ||
231 | dvi_enabled = 0; | ||
232 | } | ||
233 | |||
234 | static int sdp3430_panel_enable_tv(struct omap_dss_device *dssdev) | ||
235 | { | ||
236 | return 0; | ||
237 | } | ||
238 | |||
239 | static void sdp3430_panel_disable_tv(struct omap_dss_device *dssdev) | ||
240 | { | ||
241 | } | ||
242 | |||
243 | |||
244 | static struct omap_dss_device sdp3430_lcd_device = { | ||
245 | .name = "lcd", | ||
246 | .driver_name = "sharp_ls_panel", | ||
247 | .type = OMAP_DISPLAY_TYPE_DPI, | ||
248 | .phy.dpi.data_lines = 16, | ||
249 | .platform_enable = sdp3430_panel_enable_lcd, | ||
250 | .platform_disable = sdp3430_panel_disable_lcd, | ||
158 | }; | 251 | }; |
159 | 252 | ||
160 | static struct regulator_consumer_supply sdp3430_vdac_supply = { | 253 | static struct omap_dss_device sdp3430_dvi_device = { |
161 | .supply = "vdac", | 254 | .name = "dvi", |
162 | .dev = &sdp3430_lcd_device.dev, | 255 | .driver_name = "generic_panel", |
256 | .type = OMAP_DISPLAY_TYPE_DPI, | ||
257 | .phy.dpi.data_lines = 24, | ||
258 | .platform_enable = sdp3430_panel_enable_dvi, | ||
259 | .platform_disable = sdp3430_panel_disable_dvi, | ||
163 | }; | 260 | }; |
164 | 261 | ||
165 | static struct regulator_consumer_supply sdp3430_vdvi_supply = { | 262 | static struct omap_dss_device sdp3430_tv_device = { |
166 | .supply = "vdvi", | 263 | .name = "tv", |
167 | .dev = &sdp3430_lcd_device.dev, | 264 | .driver_name = "venc", |
265 | .type = OMAP_DISPLAY_TYPE_VENC, | ||
266 | .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, | ||
267 | .platform_enable = sdp3430_panel_enable_tv, | ||
268 | .platform_disable = sdp3430_panel_disable_tv, | ||
168 | }; | 269 | }; |
169 | 270 | ||
170 | static struct platform_device *sdp3430_devices[] __initdata = { | 271 | |
272 | static struct omap_dss_device *sdp3430_dss_devices[] = { | ||
171 | &sdp3430_lcd_device, | 273 | &sdp3430_lcd_device, |
274 | &sdp3430_dvi_device, | ||
275 | &sdp3430_tv_device, | ||
172 | }; | 276 | }; |
173 | 277 | ||
174 | static struct omap_lcd_config sdp3430_lcd_config __initdata = { | 278 | static struct omap_dss_board_info sdp3430_dss_data = { |
175 | .ctrl_name = "internal", | 279 | .num_devices = ARRAY_SIZE(sdp3430_dss_devices), |
280 | .devices = sdp3430_dss_devices, | ||
281 | .default_device = &sdp3430_lcd_device, | ||
282 | }; | ||
283 | |||
284 | static struct platform_device sdp3430_dss_device = { | ||
285 | .name = "omapdss", | ||
286 | .id = -1, | ||
287 | .dev = { | ||
288 | .platform_data = &sdp3430_dss_data, | ||
289 | }, | ||
290 | }; | ||
291 | |||
292 | static struct regulator_consumer_supply sdp3430_vdda_dac_supply = { | ||
293 | .supply = "vdda_dac", | ||
294 | .dev = &sdp3430_dss_device.dev, | ||
295 | }; | ||
296 | |||
297 | static struct platform_device *sdp3430_devices[] __initdata = { | ||
298 | &sdp3430_dss_device, | ||
176 | }; | 299 | }; |
177 | 300 | ||
178 | static struct omap_board_config_kernel sdp3430_config[] __initdata = { | 301 | static struct omap_board_config_kernel sdp3430_config[] __initdata = { |
179 | { OMAP_TAG_LCD, &sdp3430_lcd_config }, | ||
180 | }; | 302 | }; |
181 | 303 | ||
182 | static void __init omap_3430sdp_init_irq(void) | 304 | static void __init omap_3430sdp_init_irq(void) |
@@ -392,22 +514,34 @@ static struct regulator_init_data sdp3430_vdac = { | |||
392 | | REGULATOR_CHANGE_STATUS, | 514 | | REGULATOR_CHANGE_STATUS, |
393 | }, | 515 | }, |
394 | .num_consumer_supplies = 1, | 516 | .num_consumer_supplies = 1, |
395 | .consumer_supplies = &sdp3430_vdac_supply, | 517 | .consumer_supplies = &sdp3430_vdda_dac_supply, |
396 | }; | 518 | }; |
397 | 519 | ||
398 | /* VPLL2 for digital video outputs */ | 520 | /* VPLL2 for digital video outputs */ |
521 | static struct regulator_consumer_supply sdp3430_vpll2_supplies[] = { | ||
522 | { | ||
523 | .supply = "vdvi", | ||
524 | .dev = &sdp3430_lcd_device.dev, | ||
525 | }, | ||
526 | { | ||
527 | .supply = "vdds_dsi", | ||
528 | .dev = &sdp3430_dss_device.dev, | ||
529 | } | ||
530 | }; | ||
531 | |||
399 | static struct regulator_init_data sdp3430_vpll2 = { | 532 | static struct regulator_init_data sdp3430_vpll2 = { |
400 | .constraints = { | 533 | .constraints = { |
401 | .name = "VDVI", | 534 | .name = "VDVI", |
402 | .min_uV = 1800000, | 535 | .min_uV = 1800000, |
403 | .max_uV = 1800000, | 536 | .max_uV = 1800000, |
537 | .apply_uV = true, | ||
404 | .valid_modes_mask = REGULATOR_MODE_NORMAL | 538 | .valid_modes_mask = REGULATOR_MODE_NORMAL |
405 | | REGULATOR_MODE_STANDBY, | 539 | | REGULATOR_MODE_STANDBY, |
406 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 540 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
407 | | REGULATOR_CHANGE_STATUS, | 541 | | REGULATOR_CHANGE_STATUS, |
408 | }, | 542 | }, |
409 | .num_consumer_supplies = 1, | 543 | .num_consumer_supplies = ARRAY_SIZE(sdp3430_vpll2_supplies), |
410 | .consumer_supplies = &sdp3430_vdvi_supply, | 544 | .consumer_supplies = sdp3430_vpll2_supplies, |
411 | }; | 545 | }; |
412 | 546 | ||
413 | static struct twl4030_codec_audio_data sdp3430_audio = { | 547 | static struct twl4030_codec_audio_data sdp3430_audio = { |
@@ -521,6 +655,7 @@ static void __init omap_3430sdp_init(void) | |||
521 | omap_serial_init(); | 655 | omap_serial_init(); |
522 | usb_musb_init(); | 656 | usb_musb_init(); |
523 | board_smc91x_init(); | 657 | board_smc91x_init(); |
658 | sdp3430_display_init(); | ||
524 | enable_board_wakeup_source(); | 659 | enable_board_wakeup_source(); |
525 | usb_ehci_init(&ehci_pdata); | 660 | usb_ehci_init(&ehci_pdata); |
526 | } | 661 | } |
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c index e70e7e000eaa..845b478ebeee 100644 --- a/arch/arm/mach-omap2/clock24xx.c +++ b/arch/arm/mach-omap2/clock24xx.c | |||
@@ -116,10 +116,10 @@ static struct omap_clk omap24xx_clks[] = { | |||
116 | CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), | 116 | CLK(NULL, "mdm_ick", &mdm_ick, CK_243X), |
117 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), | 117 | CLK(NULL, "mdm_osc_ck", &mdm_osc_ck, CK_243X), |
118 | /* DSS domain clocks */ | 118 | /* DSS domain clocks */ |
119 | CLK("omapfb", "ick", &dss_ick, CK_243X | CK_242X), | 119 | CLK("omapdss", "ick", &dss_ick, CK_243X | CK_242X), |
120 | CLK("omapfb", "dss1_fck", &dss1_fck, CK_243X | CK_242X), | 120 | CLK("omapdss", "dss1_fck", &dss1_fck, CK_243X | CK_242X), |
121 | CLK("omapfb", "dss2_fck", &dss2_fck, CK_243X | CK_242X), | 121 | CLK("omapdss", "dss2_fck", &dss2_fck, CK_243X | CK_242X), |
122 | CLK("omapfb", "tv_fck", &dss_54m_fck, CK_243X | CK_242X), | 122 | CLK("omapdss", "tv_fck", &dss_54m_fck, CK_243X | CK_242X), |
123 | /* L3 domain clocks */ | 123 | /* L3 domain clocks */ |
124 | CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), | 124 | CLK(NULL, "core_l3_ck", &core_l3_ck, CK_243X | CK_242X), |
125 | CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), | 125 | CLK(NULL, "ssi_fck", &ssi_ssr_sst_fck, CK_243X | CK_242X), |
diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c index 9f2feaf79865..ecbb5cd8eec8 100644 --- a/arch/arm/mach-omap2/clock34xx.c +++ b/arch/arm/mach-omap2/clock34xx.c | |||
@@ -236,13 +236,13 @@ static struct omap_clk omap34xx_clks[] = { | |||
236 | CLK("omap_rng", "ick", &rng_ick, CK_343X), | 236 | CLK("omap_rng", "ick", &rng_ick, CK_343X), |
237 | CLK(NULL, "sha11_ick", &sha11_ick, CK_343X), | 237 | CLK(NULL, "sha11_ick", &sha11_ick, CK_343X), |
238 | CLK(NULL, "des1_ick", &des1_ick, CK_343X), | 238 | CLK(NULL, "des1_ick", &des1_ick, CK_343X), |
239 | CLK("omapfb", "dss1_fck", &dss1_alwon_fck_3430es1, CK_3430ES1), | 239 | CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es1, CK_3430ES1), |
240 | CLK("omapfb", "dss1_fck", &dss1_alwon_fck_3430es2, CK_3430ES2), | 240 | CLK("omapdss", "dss1_fck", &dss1_alwon_fck_3430es2, CK_3430ES2), |
241 | CLK("omapfb", "tv_fck", &dss_tv_fck, CK_343X), | 241 | CLK("omapdss", "tv_fck", &dss_tv_fck, CK_343X), |
242 | CLK("omapfb", "video_fck", &dss_96m_fck, CK_343X), | 242 | CLK("omapdss", "video_fck", &dss_96m_fck, CK_343X), |
243 | CLK("omapfb", "dss2_fck", &dss2_alwon_fck, CK_343X), | 243 | CLK("omapdss", "dss2_fck", &dss2_alwon_fck, CK_343X), |
244 | CLK("omapfb", "ick", &dss_ick_3430es1, CK_3430ES1), | 244 | CLK("omapdss", "ick", &dss_ick_3430es1, CK_3430ES1), |
245 | CLK("omapfb", "ick", &dss_ick_3430es2, CK_3430ES2), | 245 | CLK("omapdss", "ick", &dss_ick_3430es2, CK_3430ES2), |
246 | CLK(NULL, "cam_mclk", &cam_mclk, CK_343X), | 246 | CLK(NULL, "cam_mclk", &cam_mclk, CK_343X), |
247 | CLK(NULL, "cam_ick", &cam_ick, CK_343X), | 247 | CLK(NULL, "cam_ick", &cam_ick, CK_343X), |
248 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X), | 248 | CLK(NULL, "csi2_96m_fck", &csi2_96m_fck, CK_343X), |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 59d28b2fd8c5..6a4d8e468703 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -22,17 +22,18 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/io.h> | 23 | #include <linux/io.h> |
24 | #include <linux/clk.h> | 24 | #include <linux/clk.h> |
25 | #include <linux/omapfb.h> | ||
25 | 26 | ||
26 | #include <asm/tlb.h> | 27 | #include <asm/tlb.h> |
27 | 28 | ||
28 | #include <asm/mach/map.h> | 29 | #include <asm/mach/map.h> |
29 | 30 | ||
30 | #include <plat/mux.h> | 31 | #include <plat/mux.h> |
31 | #include <plat/omapfb.h> | ||
32 | #include <plat/sram.h> | 32 | #include <plat/sram.h> |
33 | #include <plat/sdrc.h> | 33 | #include <plat/sdrc.h> |
34 | #include <plat/gpmc.h> | 34 | #include <plat/gpmc.h> |
35 | #include <plat/serial.h> | 35 | #include <plat/serial.h> |
36 | #include <plat/vram.h> | ||
36 | 37 | ||
37 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdev is ready */ | 38 | #ifndef CONFIG_ARCH_OMAP4 /* FIXME: Remove this once clkdev is ready */ |
38 | #include "clock.h" | 39 | #include "clock.h" |
@@ -264,6 +265,7 @@ void __init omap2_map_common_io(void) | |||
264 | omap2_check_revision(); | 265 | omap2_check_revision(); |
265 | omap_sram_init(); | 266 | omap_sram_init(); |
266 | omapfb_reserve_sdram(); | 267 | omapfb_reserve_sdram(); |
268 | omap_vram_reserve_sdram(); | ||
267 | } | 269 | } |
268 | 270 | ||
269 | /* | 271 | /* |
diff --git a/arch/arm/mach-omap2/sdrc.c b/arch/arm/mach-omap2/sdrc.c index 9a592199321c..cbfbd142e946 100644 --- a/arch/arm/mach-omap2/sdrc.c +++ b/arch/arm/mach-omap2/sdrc.c | |||
@@ -160,3 +160,19 @@ void __init omap2_sdrc_init(struct omap_sdrc_params *sdrc_cs0, | |||
160 | sdrc_write_reg(l, SDRC_POWER); | 160 | sdrc_write_reg(l, SDRC_POWER); |
161 | omap2_sms_save_context(); | 161 | omap2_sms_save_context(); |
162 | } | 162 | } |
163 | |||
164 | void omap2_sms_write_rot_control(u32 val, unsigned ctx) | ||
165 | { | ||
166 | sms_write_reg(val, SMS_ROT_CONTROL(ctx)); | ||
167 | } | ||
168 | |||
169 | void omap2_sms_write_rot_size(u32 val, unsigned ctx) | ||
170 | { | ||
171 | sms_write_reg(val, SMS_ROT_SIZE(ctx)); | ||
172 | } | ||
173 | |||
174 | void omap2_sms_write_rot_physical_ba(u32 val, unsigned ctx) | ||
175 | { | ||
176 | sms_write_reg(val, SMS_ROT_PHYSICAL_BA(ctx)); | ||
177 | } | ||
178 | |||