diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 108 |
1 files changed, 98 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 3a7a29d1f9a7..991ac9c38032 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/mtd/partitions.h> | 28 | #include <linux/mtd/partitions.h> |
| 29 | #include <linux/mtd/nand.h> | 29 | #include <linux/mtd/nand.h> |
| 30 | 30 | ||
| 31 | #include <linux/regulator/machine.h> | ||
| 31 | #include <linux/i2c/twl4030.h> | 32 | #include <linux/i2c/twl4030.h> |
| 32 | 33 | ||
| 33 | #include <mach/hardware.h> | 34 | #include <mach/hardware.h> |
| @@ -105,6 +106,8 @@ static struct platform_device omap3beagle_nand_device = { | |||
| 105 | .resource = &omap3beagle_nand_resource, | 106 | .resource = &omap3beagle_nand_resource, |
| 106 | }; | 107 | }; |
| 107 | 108 | ||
| 109 | #include "sdram-micron-mt46h32m32lf-6.h" | ||
| 110 | |||
| 108 | static struct omap_uart_config omap3_beagle_uart_config __initdata = { | 111 | static struct omap_uart_config omap3_beagle_uart_config __initdata = { |
| 109 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), | 112 | .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)), |
| 110 | }; | 113 | }; |
| @@ -118,6 +121,23 @@ static struct twl4030_hsmmc_info mmc[] = { | |||
| 118 | {} /* Terminator */ | 121 | {} /* Terminator */ |
| 119 | }; | 122 | }; |
| 120 | 123 | ||
| 124 | static struct platform_device omap3_beagle_lcd_device = { | ||
| 125 | .name = "omap3beagle_lcd", | ||
| 126 | .id = -1, | ||
| 127 | }; | ||
| 128 | |||
| 129 | static struct omap_lcd_config omap3_beagle_lcd_config __initdata = { | ||
| 130 | .ctrl_name = "internal", | ||
| 131 | }; | ||
| 132 | |||
| 133 | static struct regulator_consumer_supply beagle_vmmc1_supply = { | ||
| 134 | .supply = "vmmc", | ||
| 135 | }; | ||
| 136 | |||
| 137 | static struct regulator_consumer_supply beagle_vsim_supply = { | ||
| 138 | .supply = "vmmc_aux", | ||
| 139 | }; | ||
| 140 | |||
| 121 | static struct gpio_led gpio_leds[]; | 141 | static struct gpio_led gpio_leds[]; |
| 122 | 142 | ||
| 123 | static int beagle_twl_gpio_setup(struct device *dev, | 143 | static int beagle_twl_gpio_setup(struct device *dev, |
| @@ -128,6 +148,10 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
| 128 | mmc[0].gpio_cd = gpio + 0; | 148 | mmc[0].gpio_cd = gpio + 0; |
| 129 | twl4030_mmc_init(mmc); | 149 | twl4030_mmc_init(mmc); |
| 130 | 150 | ||
| 151 | /* link regulators to MMC adapters */ | ||
| 152 | beagle_vmmc1_supply.dev = mmc[0].dev; | ||
| 153 | beagle_vsim_supply.dev = mmc[0].dev; | ||
| 154 | |||
| 131 | /* REVISIT: need ehci-omap hooks for external VBUS | 155 | /* REVISIT: need ehci-omap hooks for external VBUS |
| 132 | * power switch and overcurrent detect | 156 | * power switch and overcurrent detect |
| 133 | */ | 157 | */ |
| @@ -156,12 +180,85 @@ static struct twl4030_gpio_platform_data beagle_gpio_data = { | |||
| 156 | .setup = beagle_twl_gpio_setup, | 180 | .setup = beagle_twl_gpio_setup, |
| 157 | }; | 181 | }; |
| 158 | 182 | ||
| 183 | static struct regulator_consumer_supply beagle_vdac_supply = { | ||
| 184 | .supply = "vdac", | ||
| 185 | .dev = &omap3_beagle_lcd_device.dev, | ||
| 186 | }; | ||
| 187 | |||
| 188 | static struct regulator_consumer_supply beagle_vdvi_supply = { | ||
| 189 | .supply = "vdvi", | ||
| 190 | .dev = &omap3_beagle_lcd_device.dev, | ||
| 191 | }; | ||
| 192 | |||
| 193 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | ||
| 194 | static struct regulator_init_data beagle_vmmc1 = { | ||
| 195 | .constraints = { | ||
| 196 | .min_uV = 1850000, | ||
| 197 | .max_uV = 3150000, | ||
| 198 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 199 | | REGULATOR_MODE_STANDBY, | ||
| 200 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
| 201 | | REGULATOR_CHANGE_MODE | ||
| 202 | | REGULATOR_CHANGE_STATUS, | ||
| 203 | }, | ||
| 204 | .num_consumer_supplies = 1, | ||
| 205 | .consumer_supplies = &beagle_vmmc1_supply, | ||
| 206 | }; | ||
| 207 | |||
| 208 | /* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ | ||
| 209 | static struct regulator_init_data beagle_vsim = { | ||
| 210 | .constraints = { | ||
| 211 | .min_uV = 1800000, | ||
| 212 | .max_uV = 3000000, | ||
| 213 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 214 | | REGULATOR_MODE_STANDBY, | ||
| 215 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
| 216 | | REGULATOR_CHANGE_MODE | ||
| 217 | | REGULATOR_CHANGE_STATUS, | ||
| 218 | }, | ||
| 219 | .num_consumer_supplies = 1, | ||
| 220 | .consumer_supplies = &beagle_vsim_supply, | ||
| 221 | }; | ||
| 222 | |||
| 223 | /* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */ | ||
| 224 | static struct regulator_init_data beagle_vdac = { | ||
| 225 | .constraints = { | ||
| 226 | .min_uV = 1800000, | ||
| 227 | .max_uV = 1800000, | ||
| 228 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 229 | | REGULATOR_MODE_STANDBY, | ||
| 230 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 231 | | REGULATOR_CHANGE_STATUS, | ||
| 232 | }, | ||
| 233 | .num_consumer_supplies = 1, | ||
| 234 | .consumer_supplies = &beagle_vdac_supply, | ||
| 235 | }; | ||
| 236 | |||
| 237 | /* VPLL2 for digital video outputs */ | ||
| 238 | static struct regulator_init_data beagle_vpll2 = { | ||
| 239 | .constraints = { | ||
| 240 | .name = "VDVI", | ||
| 241 | .min_uV = 1800000, | ||
| 242 | .max_uV = 1800000, | ||
| 243 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 244 | | REGULATOR_MODE_STANDBY, | ||
| 245 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 246 | | REGULATOR_CHANGE_STATUS, | ||
| 247 | }, | ||
| 248 | .num_consumer_supplies = 1, | ||
| 249 | .consumer_supplies = &beagle_vdvi_supply, | ||
| 250 | }; | ||
| 251 | |||
| 159 | static struct twl4030_platform_data beagle_twldata = { | 252 | static struct twl4030_platform_data beagle_twldata = { |
| 160 | .irq_base = TWL4030_IRQ_BASE, | 253 | .irq_base = TWL4030_IRQ_BASE, |
| 161 | .irq_end = TWL4030_IRQ_END, | 254 | .irq_end = TWL4030_IRQ_END, |
| 162 | 255 | ||
| 163 | /* platform_data for children goes here */ | 256 | /* platform_data for children goes here */ |
| 164 | .gpio = &beagle_gpio_data, | 257 | .gpio = &beagle_gpio_data, |
| 258 | .vmmc1 = &beagle_vmmc1, | ||
| 259 | .vsim = &beagle_vsim, | ||
| 260 | .vdac = &beagle_vdac, | ||
| 261 | .vpll2 = &beagle_vpll2, | ||
| 165 | }; | 262 | }; |
| 166 | 263 | ||
| 167 | static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { | 264 | static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { |
| @@ -185,7 +282,7 @@ static int __init omap3_beagle_i2c_init(void) | |||
| 185 | 282 | ||
| 186 | static void __init omap3_beagle_init_irq(void) | 283 | static void __init omap3_beagle_init_irq(void) |
| 187 | { | 284 | { |
| 188 | omap2_init_common_hw(NULL); | 285 | omap2_init_common_hw(mt46h32m32lf6_sdrc_params); |
| 189 | omap_init_irq(); | 286 | omap_init_irq(); |
| 190 | #ifdef CONFIG_OMAP_32K_TIMER | 287 | #ifdef CONFIG_OMAP_32K_TIMER |
| 191 | omap2_gp_clockevent_set_gptimer(12); | 288 | omap2_gp_clockevent_set_gptimer(12); |
| @@ -193,15 +290,6 @@ static void __init omap3_beagle_init_irq(void) | |||
| 193 | omap_gpio_init(); | 290 | omap_gpio_init(); |
| 194 | } | 291 | } |
| 195 | 292 | ||
| 196 | static struct platform_device omap3_beagle_lcd_device = { | ||
| 197 | .name = "omap3beagle_lcd", | ||
| 198 | .id = -1, | ||
| 199 | }; | ||
| 200 | |||
| 201 | static struct omap_lcd_config omap3_beagle_lcd_config __initdata = { | ||
| 202 | .ctrl_name = "internal", | ||
| 203 | }; | ||
| 204 | |||
| 205 | static struct gpio_led gpio_leds[] = { | 293 | static struct gpio_led gpio_leds[] = { |
| 206 | { | 294 | { |
| 207 | .name = "beagleboard::usr0", | 295 | .name = "beagleboard::usr0", |
