diff options
author | Grazvydas Ignotas <notasas@gmail.com> | 2010-02-17 17:09:25 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-17 20:23:20 -0500 |
commit | f6873eedd94df20cfb705856a78440a4c176c6b6 (patch) | |
tree | d9b9b4b0919b823de998b7ccc6c5c06469fa7a97 /arch/arm/mach-omap2/board-omap3pandora.c | |
parent | 7b097896e4a5b5ea4798db806e63a1138b1b8eb8 (diff) |
omap3: pandora: update regulator setup
Update pandora's regulator setup:
- add new regulators: VAUX2, VAUX4 and VSIM
- add new consumers: ads7846, nub controllers, USB PHY, audio DAC
- use dev names instead of struct device pointers
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3pandora.c')
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 111 |
1 files changed, 78 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 7ea389412b2a..a0acf8d1e806 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -227,27 +227,6 @@ static struct platform_device pandora_dss_device = { | |||
227 | }, | 227 | }, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static struct regulator_consumer_supply pandora_vcc_lcd_supply = { | ||
231 | .supply = "vcc", | ||
232 | .dev = &pandora_lcd_device.dev, | ||
233 | }; | ||
234 | |||
235 | static struct regulator_consumer_supply pandora_vdda_dac_supply = { | ||
236 | .supply = "vdda_dac", | ||
237 | .dev = &pandora_dss_device.dev, | ||
238 | }; | ||
239 | |||
240 | static struct regulator_consumer_supply pandora_vdds_supplies[] = { | ||
241 | { | ||
242 | .supply = "vdds_sdi", | ||
243 | .dev = &pandora_dss_device.dev, | ||
244 | }, | ||
245 | { | ||
246 | .supply = "vdds_dsi", | ||
247 | .dev = &pandora_dss_device.dev, | ||
248 | }, | ||
249 | }; | ||
250 | |||
251 | static struct omap2_hsmmc_info omap3pandora_mmc[] = { | 230 | static struct omap2_hsmmc_info omap3pandora_mmc[] = { |
252 | { | 231 | { |
253 | .mmc = 1, | 232 | .mmc = 1, |
@@ -273,14 +252,6 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = { | |||
273 | {} /* Terminator */ | 252 | {} /* Terminator */ |
274 | }; | 253 | }; |
275 | 254 | ||
276 | static struct regulator_consumer_supply pandora_vmmc1_supply = { | ||
277 | .supply = "vmmc", | ||
278 | }; | ||
279 | |||
280 | static struct regulator_consumer_supply pandora_vmmc2_supply = { | ||
281 | .supply = "vmmc", | ||
282 | }; | ||
283 | |||
284 | static int omap3pandora_twl_gpio_setup(struct device *dev, | 255 | static int omap3pandora_twl_gpio_setup(struct device *dev, |
285 | unsigned gpio, unsigned ngpio) | 256 | unsigned gpio, unsigned ngpio) |
286 | { | 257 | { |
@@ -289,10 +260,6 @@ static int omap3pandora_twl_gpio_setup(struct device *dev, | |||
289 | omap3pandora_mmc[1].gpio_cd = gpio + 1; | 260 | omap3pandora_mmc[1].gpio_cd = gpio + 1; |
290 | omap2_hsmmc_init(omap3pandora_mmc); | 261 | omap2_hsmmc_init(omap3pandora_mmc); |
291 | 262 | ||
292 | /* link regulators to MMC adapters */ | ||
293 | pandora_vmmc1_supply.dev = omap3pandora_mmc[0].dev; | ||
294 | pandora_vmmc2_supply.dev = omap3pandora_mmc[1].dev; | ||
295 | |||
296 | return 0; | 263 | return 0; |
297 | } | 264 | } |
298 | 265 | ||
@@ -303,6 +270,36 @@ static struct twl4030_gpio_platform_data omap3pandora_gpio_data = { | |||
303 | .setup = omap3pandora_twl_gpio_setup, | 270 | .setup = omap3pandora_twl_gpio_setup, |
304 | }; | 271 | }; |
305 | 272 | ||
273 | static struct regulator_consumer_supply pandora_vmmc1_supply = | ||
274 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); | ||
275 | |||
276 | static struct regulator_consumer_supply pandora_vmmc2_supply = | ||
277 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | ||
278 | |||
279 | static struct regulator_consumer_supply pandora_vdda_dac_supply = | ||
280 | REGULATOR_SUPPLY("vdda_dac", "omapdss"); | ||
281 | |||
282 | static struct regulator_consumer_supply pandora_vdds_supplies[] = { | ||
283 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), | ||
284 | REGULATOR_SUPPLY("vdds_dsi", "omapdss"), | ||
285 | }; | ||
286 | |||
287 | static struct regulator_consumer_supply pandora_vcc_lcd_supply = | ||
288 | REGULATOR_SUPPLY("vcc", "display0"); | ||
289 | |||
290 | static struct regulator_consumer_supply pandora_usb_phy_supply = | ||
291 | REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"); | ||
292 | |||
293 | /* ads7846 on SPI and 2 nub controllers on I2C */ | ||
294 | static struct regulator_consumer_supply pandora_vaux4_supplies[] = { | ||
295 | REGULATOR_SUPPLY("vcc", "spi1.0"), | ||
296 | REGULATOR_SUPPLY("vcc", "3-0066"), | ||
297 | REGULATOR_SUPPLY("vcc", "3-0067"), | ||
298 | }; | ||
299 | |||
300 | static struct regulator_consumer_supply pandora_adac_supply = | ||
301 | REGULATOR_SUPPLY("vcc", "soc-audio"); | ||
302 | |||
306 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ | 303 | /* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */ |
307 | static struct regulator_init_data pandora_vmmc1 = { | 304 | static struct regulator_init_data pandora_vmmc1 = { |
308 | .constraints = { | 305 | .constraints = { |
@@ -378,6 +375,51 @@ static struct regulator_init_data pandora_vaux1 = { | |||
378 | .consumer_supplies = &pandora_vcc_lcd_supply, | 375 | .consumer_supplies = &pandora_vcc_lcd_supply, |
379 | }; | 376 | }; |
380 | 377 | ||
378 | /* VAUX2 for USB host PHY */ | ||
379 | static struct regulator_init_data pandora_vaux2 = { | ||
380 | .constraints = { | ||
381 | .min_uV = 1800000, | ||
382 | .max_uV = 1800000, | ||
383 | .apply_uV = true, | ||
384 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
385 | | REGULATOR_MODE_STANDBY, | ||
386 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
387 | | REGULATOR_CHANGE_STATUS, | ||
388 | }, | ||
389 | .num_consumer_supplies = 1, | ||
390 | .consumer_supplies = &pandora_usb_phy_supply, | ||
391 | }; | ||
392 | |||
393 | /* VAUX4 for ads7846 and nubs */ | ||
394 | static struct regulator_init_data pandora_vaux4 = { | ||
395 | .constraints = { | ||
396 | .min_uV = 2800000, | ||
397 | .max_uV = 2800000, | ||
398 | .apply_uV = true, | ||
399 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
400 | | REGULATOR_MODE_STANDBY, | ||
401 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
402 | | REGULATOR_CHANGE_STATUS, | ||
403 | }, | ||
404 | .num_consumer_supplies = ARRAY_SIZE(pandora_vaux4_supplies), | ||
405 | .consumer_supplies = pandora_vaux4_supplies, | ||
406 | }; | ||
407 | |||
408 | /* VSIM for audio DAC */ | ||
409 | static struct regulator_init_data pandora_vsim = { | ||
410 | .constraints = { | ||
411 | .min_uV = 2800000, | ||
412 | .max_uV = 2800000, | ||
413 | .apply_uV = true, | ||
414 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
415 | | REGULATOR_MODE_STANDBY, | ||
416 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
417 | | REGULATOR_CHANGE_STATUS, | ||
418 | }, | ||
419 | .num_consumer_supplies = 1, | ||
420 | .consumer_supplies = &pandora_adac_supply, | ||
421 | }; | ||
422 | |||
381 | static struct twl4030_usb_data omap3pandora_usb_data = { | 423 | static struct twl4030_usb_data omap3pandora_usb_data = { |
382 | .usb_mode = T2_USB_MODE_ULPI, | 424 | .usb_mode = T2_USB_MODE_ULPI, |
383 | }; | 425 | }; |
@@ -402,6 +444,9 @@ static struct twl4030_platform_data omap3pandora_twldata = { | |||
402 | .vdac = &pandora_vdac, | 444 | .vdac = &pandora_vdac, |
403 | .vpll2 = &pandora_vpll2, | 445 | .vpll2 = &pandora_vpll2, |
404 | .vaux1 = &pandora_vaux1, | 446 | .vaux1 = &pandora_vaux1, |
447 | .vaux2 = &pandora_vaux2, | ||
448 | .vaux4 = &pandora_vaux4, | ||
449 | .vsim = &pandora_vsim, | ||
405 | .keypad = &pandora_kp_data, | 450 | .keypad = &pandora_kp_data, |
406 | }; | 451 | }; |
407 | 452 | ||