aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51-peripherals.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-05-20 14:07:23 -0400
committerTony Lindgren <tony@atomide.com>2010-05-20 14:07:23 -0400
commitdf760137ad3cbfa15ceed42478f81bff01b6e799 (patch)
treebe939c9d11094858d74141a4c62cb23f477754d8 /arch/arm/mach-omap2/board-rx51-peripherals.c
parent754b8e653412106ff613f4750b197f807fcd8347 (diff)
parentde997718b64df2f766736f23f8557da450b83a25 (diff)
Merge branch 'omap-boards' into omap-for-linus
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c77
1 files changed, 65 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 4377a4cf36eb..8179d55106d5 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -277,7 +277,7 @@ static struct regulator_consumer_supply rx51_vmmc1_supply = {
277 .dev_name = "mmci-omap-hs.0", 277 .dev_name = "mmci-omap-hs.0",
278}; 278};
279 279
280static struct regulator_consumer_supply rx51_vmmc2_supply = { 280static struct regulator_consumer_supply rx51_vaux3_supply = {
281 .supply = "vmmc", 281 .supply = "vmmc",
282 .dev_name = "mmci-omap-hs.1", 282 .dev_name = "mmci-omap-hs.1",
283}; 283};
@@ -287,6 +287,35 @@ static struct regulator_consumer_supply rx51_vsim_supply = {
287 .dev_name = "mmci-omap-hs.1", 287 .dev_name = "mmci-omap-hs.1",
288}; 288};
289 289
290static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
291 /* tlv320aic3x analog supplies */
292 {
293 .supply = "AVDD",
294 .dev_name = "2-0018",
295 },
296 {
297 .supply = "DRVDD",
298 .dev_name = "2-0018",
299 },
300 /* Keep vmmc as last item. It is not iterated for newer boards */
301 {
302 .supply = "vmmc",
303 .dev_name = "mmci-omap-hs.1",
304 },
305};
306
307static struct regulator_consumer_supply rx51_vio_supplies[] = {
308 /* tlv320aic3x digital supplies */
309 {
310 .supply = "IOVDD",
311 .dev_name = "2-0018"
312 },
313 {
314 .supply = "DVDD",
315 .dev_name = "2-0018"
316 },
317};
318
290static struct regulator_init_data rx51_vaux1 = { 319static struct regulator_init_data rx51_vaux1 = {
291 .constraints = { 320 .constraints = {
292 .name = "V28", 321 .name = "V28",
@@ -338,7 +367,7 @@ static struct regulator_init_data rx51_vaux3_mmc = {
338 | REGULATOR_CHANGE_STATUS, 367 | REGULATOR_CHANGE_STATUS,
339 }, 368 },
340 .num_consumer_supplies = 1, 369 .num_consumer_supplies = 1,
341 .consumer_supplies = &rx51_vmmc2_supply, 370 .consumer_supplies = &rx51_vaux3_supply,
342}; 371};
343 372
344static struct regulator_init_data rx51_vaux4 = { 373static struct regulator_init_data rx51_vaux4 = {
@@ -370,9 +399,9 @@ static struct regulator_init_data rx51_vmmc1 = {
370 399
371static struct regulator_init_data rx51_vmmc2 = { 400static struct regulator_init_data rx51_vmmc2 = {
372 .constraints = { 401 .constraints = {
373 .name = "VMMC2_30", 402 .name = "V28_A",
374 .min_uV = 1850000, 403 .min_uV = 2800000,
375 .max_uV = 3150000, 404 .max_uV = 3000000,
376 .apply_uV = true, 405 .apply_uV = true,
377 .valid_modes_mask = REGULATOR_MODE_NORMAL 406 .valid_modes_mask = REGULATOR_MODE_NORMAL
378 | REGULATOR_MODE_STANDBY, 407 | REGULATOR_MODE_STANDBY,
@@ -380,8 +409,8 @@ static struct regulator_init_data rx51_vmmc2 = {
380 | REGULATOR_CHANGE_MODE 409 | REGULATOR_CHANGE_MODE
381 | REGULATOR_CHANGE_STATUS, 410 | REGULATOR_CHANGE_STATUS,
382 }, 411 },
383 .num_consumer_supplies = 1, 412 .num_consumer_supplies = ARRAY_SIZE(rx51_vmmc2_supplies),
384 .consumer_supplies = &rx51_vmmc2_supply, 413 .consumer_supplies = rx51_vmmc2_supplies,
385}; 414};
386 415
387static struct regulator_init_data rx51_vsim = { 416static struct regulator_init_data rx51_vsim = {
@@ -411,6 +440,20 @@ static struct regulator_init_data rx51_vdac = {
411 }, 440 },
412}; 441};
413 442
443static struct regulator_init_data rx51_vio = {
444 .constraints = {
445 .min_uV = 1800000,
446 .max_uV = 1800000,
447 .valid_modes_mask = REGULATOR_MODE_NORMAL
448 | REGULATOR_MODE_STANDBY,
449 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
450 | REGULATOR_CHANGE_MODE
451 | REGULATOR_CHANGE_STATUS,
452 },
453 .num_consumer_supplies = ARRAY_SIZE(rx51_vio_supplies),
454 .consumer_supplies = rx51_vio_supplies,
455};
456
414static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) 457static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n)
415{ 458{
416 /* FIXME this gpio setup is just a placeholder for now */ 459 /* FIXME this gpio setup is just a placeholder for now */
@@ -618,6 +661,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
618 .vmmc1 = &rx51_vmmc1, 661 .vmmc1 = &rx51_vmmc1,
619 .vsim = &rx51_vsim, 662 .vsim = &rx51_vsim,
620 .vdac = &rx51_vdac, 663 .vdac = &rx51_vdac,
664 .vio = &rx51_vio,
621}; 665};
622 666
623static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { 667static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = {
@@ -629,18 +673,27 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = {
629 }, 673 },
630}; 674};
631 675
676static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
677 {
678 I2C_BOARD_INFO("tlv320aic3x", 0x18),
679 },
680};
681
632static int __init rx51_i2c_init(void) 682static int __init rx51_i2c_init(void)
633{ 683{
634 if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) || 684 if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) ||
635 system_rev >= SYSTEM_REV_B_USES_VAUX3) 685 system_rev >= SYSTEM_REV_B_USES_VAUX3) {
636 rx51_twldata.vaux3 = &rx51_vaux3_mmc; 686 rx51_twldata.vaux3 = &rx51_vaux3_mmc;
637 else { 687 /* Only older boards use VMMC2 for internal MMC */
688 rx51_vmmc2.num_consumer_supplies--;
689 } else {
638 rx51_twldata.vaux3 = &rx51_vaux3_cam; 690 rx51_twldata.vaux3 = &rx51_vaux3_cam;
639 rx51_twldata.vmmc2 = &rx51_vmmc2;
640 } 691 }
692 rx51_twldata.vmmc2 = &rx51_vmmc2;
641 omap_register_i2c_bus(1, 2200, rx51_peripherals_i2c_board_info_1, 693 omap_register_i2c_bus(1, 2200, rx51_peripherals_i2c_board_info_1,
642 ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); 694 ARRAY_SIZE(rx51_peripherals_i2c_board_info_1));
643 omap_register_i2c_bus(2, 100, NULL, 0); 695 omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2,
696 ARRAY_SIZE(rx51_peripherals_i2c_board_info_2));
644 omap_register_i2c_bus(3, 400, NULL, 0); 697 omap_register_i2c_bus(3, 400, NULL, 0);
645 return 0; 698 return 0;
646} 699}