diff options
| -rw-r--r-- | arch/arm/configs/omap_3430sdp_defconfig | 28 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 167 |
2 files changed, 176 insertions, 19 deletions
diff --git a/arch/arm/configs/omap_3430sdp_defconfig b/arch/arm/configs/omap_3430sdp_defconfig index 84829587d55a..592457cfbbe5 100644 --- a/arch/arm/configs/omap_3430sdp_defconfig +++ b/arch/arm/configs/omap_3430sdp_defconfig | |||
| @@ -963,10 +963,32 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
| 963 | # | 963 | # |
| 964 | # CONFIG_FB_S1D13XXX is not set | 964 | # CONFIG_FB_S1D13XXX is not set |
| 965 | # CONFIG_FB_VIRTUAL is not set | 965 | # CONFIG_FB_VIRTUAL is not set |
| 966 | CONFIG_FB_OMAP=y | 966 | # CONFIG_FB_METRONOME is not set |
| 967 | # CONFIG_FB_OMAP_LCDC_EXTERNAL is not set | 967 | # CONFIG_FB_MB862XX is not set |
| 968 | # CONFIG_FB_BROADSHEET is not set | ||
| 969 | # CONFIG_FB_OMAP_LCD_VGA is not set | ||
| 968 | # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set | 970 | # CONFIG_FB_OMAP_BOOTLOADER_INIT is not set |
| 969 | CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2 | 971 | CONFIG_OMAP2_VRAM=y |
| 972 | CONFIG_OMAP2_VRFB=y | ||
| 973 | CONFIG_OMAP2_DSS=y | ||
| 974 | CONFIG_OMAP2_VRAM_SIZE=4 | ||
| 975 | CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y | ||
| 976 | # CONFIG_OMAP2_DSS_RFBI is not set | ||
| 977 | CONFIG_OMAP2_DSS_VENC=y | ||
| 978 | # CONFIG_OMAP2_DSS_SDI is not set | ||
| 979 | # CONFIG_OMAP2_DSS_DSI is not set | ||
| 980 | # CONFIG_OMAP2_DSS_FAKE_VSYNC is not set | ||
| 981 | CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 | ||
| 982 | CONFIG_FB_OMAP2=y | ||
| 983 | CONFIG_FB_OMAP2_DEBUG_SUPPORT=y | ||
| 984 | # CONFIG_FB_OMAP2_FORCE_AUTO_UPDATE is not set | ||
| 985 | CONFIG_FB_OMAP2_NUM_FBS=3 | ||
| 986 | |||
| 987 | # | ||
| 988 | # OMAP2/3 Display Device Drivers | ||
| 989 | # | ||
| 990 | CONFIG_PANEL_GENERIC=y | ||
| 991 | CONFIG_PANEL_SHARP_LS037V7DW01=y | ||
| 970 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 992 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
| 971 | 993 | ||
| 972 | # | 994 | # |
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 | } |
