diff options
author | Koen Kooi <koen@openembedded.org> | 2009-07-30 11:19:10 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-07-30 11:19:10 +0200 |
commit | f2e6ca6bfa79d166ee72224bbb95ca1a71125d43 (patch) | |
tree | b2facdc46191d38b9917a7d390c44f668f19183f /recipes/linux/linux-omap-pm/dss2/0096-DSS2-Overo-add-vdac-dsi-regulators-fix-panel-name.patch | |
parent | 0501fbe7b6f99eddc8ee9b0d3dab9ebac4722166 (diff) |
linux-omap-pm git: add patch for fix musb oops and dss2 patches
Diffstat (limited to 'recipes/linux/linux-omap-pm/dss2/0096-DSS2-Overo-add-vdac-dsi-regulators-fix-panel-name.patch')
-rw-r--r-- | recipes/linux/linux-omap-pm/dss2/0096-DSS2-Overo-add-vdac-dsi-regulators-fix-panel-name.patch | 278 |
1 files changed, 278 insertions, 0 deletions
diff --git a/recipes/linux/linux-omap-pm/dss2/0096-DSS2-Overo-add-vdac-dsi-regulators-fix-panel-name.patch b/recipes/linux/linux-omap-pm/dss2/0096-DSS2-Overo-add-vdac-dsi-regulators-fix-panel-name.patch new file mode 100644 index 0000000000..c81d79e7ca --- /dev/null +++ b/recipes/linux/linux-omap-pm/dss2/0096-DSS2-Overo-add-vdac-dsi-regulators-fix-panel-name.patch @@ -0,0 +1,278 @@ +From 1ccb690cf0a478e3bbbf9bf1ee0f03a33918b87e Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen <tomi.valkeinen@nokia.com> +Date: Mon, 1 Jun 2009 20:17:40 +0300 +Subject: [PATCH 096/146] DSS2: Overo: add vdac/dsi regulators, fix panel names + +--- + arch/arm/mach-omap2/board-overo.c | 224 ++++++++++++++++++++++--------------- + 1 files changed, 132 insertions(+), 92 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c +index 39f95f5..07868f9 100644 +--- a/arch/arm/mach-omap2/board-overo.c ++++ b/arch/arm/mach-omap2/board-overo.c +@@ -183,9 +183,110 @@ static inline void __init overo_init_smsc911x(void) + static inline void __init overo_init_smsc911x(void) { return; } + #endif + ++/* DSS */ + static int lcd_enabled; + static int dvi_enabled; + ++#define OVERO_GPIO_LCD_EN 144 ++ ++static void __init overo_display_init(void) ++{ ++ int r; ++ ++ r = gpio_request(OVERO_GPIO_LCD_EN, "display enable"); ++ if (r) ++ printk("fail1\n"); ++ r = gpio_direction_output(OVERO_GPIO_LCD_EN, 1); ++ if (r) ++ printk("fail2\n"); ++ gpio_export(OVERO_GPIO_LCD_EN, 0); ++} ++ ++static int overo_panel_enable_dvi(struct omap_dss_device *dssdev) ++{ ++ if (lcd_enabled) { ++ printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); ++ return -EINVAL; ++ } ++ dvi_enabled = 1; ++ ++ gpio_set_value(OVERO_GPIO_LCD_EN, 1); ++ ++ return 0; ++} ++ ++static void overo_panel_disable_dvi(struct omap_dss_device *dssdev) ++{ ++ gpio_set_value(OVERO_GPIO_LCD_EN, 0); ++ ++ dvi_enabled = 0; ++} ++ ++static struct omap_dss_device overo_dvi_device = { ++ .type = OMAP_DISPLAY_TYPE_DPI, ++ .name = "dvi", ++ .driver_name = "generic_panel", ++ .phy.dpi.data_lines = 24, ++ .platform_enable = overo_panel_enable_dvi, ++ .platform_disable = overo_panel_disable_dvi, ++}; ++ ++static int overo_panel_enable_lcd(struct omap_dss_device *dssdev) ++{ ++ if (dvi_enabled) { ++ printk(KERN_ERR "cannot enable LCD, DVI is enabled\n"); ++ return -EINVAL; ++ } ++ ++ gpio_set_value(OVERO_GPIO_LCD_EN, 1); ++ lcd_enabled = 1; ++ return 0; ++} ++ ++static void overo_panel_disable_lcd(struct omap_dss_device *dssdev) ++{ ++ gpio_set_value(OVERO_GPIO_LCD_EN, 0); ++ lcd_enabled = 0; ++} ++ ++static struct omap_dss_device overo_lcd_device = { ++ .type = OMAP_DISPLAY_TYPE_DPI, ++ .name = "lcd", ++ .driver_name = "samsung_lte_panel", ++ .phy.dpi.data_lines = 24, ++ .platform_enable = overo_panel_enable_lcd, ++ .platform_disable = overo_panel_disable_lcd, ++}; ++ ++static struct omap_dss_device *overo_dss_devices[] = { ++ &overo_dvi_device, ++ &overo_lcd_device, ++}; ++ ++static struct omap_dss_board_info overo_dss_data = { ++ .num_devices = ARRAY_SIZE(overo_dss_devices), ++ .devices = overo_dss_devices, ++ .default_device = &overo_dvi_device, ++}; ++ ++static struct platform_device overo_dss_device = { ++ .name = "omapdss", ++ .id = -1, ++ .dev = { ++ .platform_data = &overo_dss_data, ++ }, ++}; ++ ++static struct regulator_consumer_supply overo_vdda_dac_supply = { ++ .supply = "vdda_dac", ++ .dev = &overo_dss_device.dev, ++}; ++ ++static struct regulator_consumer_supply overo_vdds_dsi_supply = { ++ .supply = "vdds_dsi", ++ .dev = &overo_dss_device.dev, ++}; ++ + static struct mtd_partition overo_nand_partitions[] = { + { + .name = "xloader", +@@ -235,7 +336,6 @@ static struct platform_device overo_nand_device = { + .resource = &overo_nand_resource, + }; + +- + static void __init overo_flash_init(void) + { + u8 cs = 0; +@@ -334,6 +434,35 @@ static struct regulator_init_data overo_vmmc1 = { + .consumer_supplies = &overo_vmmc1_supply, + }; + ++/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ ++static struct regulator_init_data overo_vdac = { ++ .constraints = { ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &overo_vdda_dac_supply, ++}; ++ ++/* VPLL2 for digital video outputs */ ++static struct regulator_init_data overo_vpll2 = { ++ .constraints = { ++ .name = "VDVI", ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &overo_vdds_dsi_supply, ++}; ++ + /* mmc2 (WLAN) and Bluetooth don't use twl4030 regulators */ + + static struct twl4030_platform_data overo_twldata = { +@@ -342,6 +471,8 @@ static struct twl4030_platform_data overo_twldata = { + .gpio = &overo_gpio_data, + .usb = &overo_usb_data, + .vmmc1 = &overo_vmmc1, ++ .vdac = &overo_vdac, ++ .vpll2 = &overo_vpll2, + }; + + static struct i2c_board_info __initdata overo_i2c_boardinfo[] = { +@@ -369,97 +500,6 @@ static void __init overo_init_irq(void) + omap_gpio_init(); + } + +-/* DSS */ +- +-#define OVERO_GPIO_LCD_EN 144 +- +-static void __init overo_display_init(void) +-{ +- int r; +- +- r = gpio_request(OVERO_GPIO_LCD_EN, "display enable"); +- if (r) +- printk("fail1\n"); +- r = gpio_direction_output(OVERO_GPIO_LCD_EN, 1); +- if (r) +- printk("fail2\n"); +- gpio_export(OVERO_GPIO_LCD_EN, 0); +-} +- +-static int overo_panel_enable_dvi(struct omap_dss_device *dssdev) +-{ +- if (lcd_enabled) { +- printk(KERN_ERR "cannot enable DVI, LCD is enabled\n"); +- return -EINVAL; +- } +- dvi_enabled = 1; +- +- gpio_set_value(OVERO_GPIO_LCD_EN, 1); +- +- return 0; +-} +- +-static void overo_panel_disable_dvi(struct omap_dss_device *dssdev) +-{ +- gpio_set_value(OVERO_GPIO_LCD_EN, 0); +- +- dvi_enabled = 0; +-} +- +-static struct omap_dss_device overo_dvi_device = { +- .type = OMAP_DISPLAY_TYPE_DPI, +- .name = "dvi", +- .driver_name = "panel_generic", +- .phy.dpi.data_lines = 24, +- .platform_enable = overo_panel_enable_dvi, +- .platform_disable = overo_panel_disable_dvi, +-}; +- +-static int overo_panel_enable_lcd(struct omap_dss_device *dssdev) +-{ +- if (dvi_enabled) { +- printk(KERN_ERR "cannot enable LCD, DVI is enabled\n"); +- return -EINVAL; +- } +- +- gpio_set_value(OVERO_GPIO_LCD_EN, 1); +- lcd_enabled = 1; +- return 0; +-} +- +-static void overo_panel_disable_lcd(struct omap_dss_device *dssdev) +-{ +- gpio_set_value(OVERO_GPIO_LCD_EN, 0); +- lcd_enabled = 0; +-} +- +-static struct omap_dss_device overo_lcd_device = { +- .type = OMAP_DISPLAY_TYPE_DPI, +- .name = "lcd", +- .driver_name = "samsung-lte430wq-f0c", +- .phy.dpi.data_lines = 24, +- .platform_enable = overo_panel_enable_lcd, +- .platform_disable = overo_panel_disable_lcd, +-}; +- +-static struct omap_dss_device *overo_dss_devices[] = { +- &overo_dvi_device, +- &overo_lcd_device, +-}; +- +-static struct omap_dss_board_info overo_dss_data = { +- .num_devices = ARRAY_SIZE(overo_dss_devices), +- .devices = overo_dss_devices, +- .default_device = &overo_dvi_device, +-}; +- +-static struct platform_device overo_dss_device = { +- .name = "omapdss", +- .id = -1, +- .dev = { +- .platform_data = &overo_dss_data, +- }, +-}; + + static struct omap_board_config_kernel overo_config[] __initdata = { + { OMAP_TAG_UART, &overo_uart_config }, +-- +1.6.2.4 + |