All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: linux-omap@vger.kernel.org, Adrian Hunter <adrian.hunter@nokia.com>
Subject: [PATCH 4/8] ARM: OMAP3: RX51: Connect VAUX3 to MMC2
Date: Mon, 25 May 2009 10:52:18 -0700	[thread overview]
Message-ID: <20090525175218.19679.40204.stgit@localhost> (raw)
In-Reply-To: <20090525174517.19679.18805.stgit@localhost>

From: Adrian Hunter <adrian.hunter@nokia.com>

Connect VAUX3 to MMC2

Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/board-rx51-peripherals.c |   30 +++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 233c745..da93b86 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -32,6 +32,9 @@
 
 #include "mmc-twl4030.h"
 
+#define SYSTEM_REV_B_USES_VAUX3	0x1699
+#define SYSTEM_REV_S_USES_VAUX3 0x8
+
 static int rx51_keymap[] = {
 	KEY(0, 0, KEY_Q),
 	KEY(0, 1, KEY_W),
@@ -147,7 +150,7 @@ static struct regulator_init_data rx51_vaux2 = {
 };
 
 /* VAUX3 - adds more power to VIO_18 rail */
-static struct regulator_init_data rx51_vaux3 = {
+static struct regulator_init_data rx51_vaux3_cam = {
 	.constraints = {
 		.name			= "VCAM_DIG_18",
 		.min_uV			= 1800000,
@@ -160,6 +163,22 @@ static struct regulator_init_data rx51_vaux3 = {
 	},
 };
 
+static struct regulator_init_data rx51_vaux3_mmc = {
+	.constraints = {
+		.name			= "VMMC2_30",
+		.min_uV			= 2800000,
+		.max_uV			= 3000000,
+		.apply_uV		= true,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE
+					| REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= 1,
+	.consumer_supplies	= &rx51_vmmc2_supply,
+};
+
 static struct regulator_init_data rx51_vaux4 = {
 	.constraints = {
 		.name			= "VCAM_ANA_28",
@@ -270,10 +289,8 @@ static struct twl4030_platform_data rx51_twldata = {
 
 	.vaux1			= &rx51_vaux1,
 	.vaux2			= &rx51_vaux2,
-	.vaux3			= &rx51_vaux3,
 	.vaux4			= &rx51_vaux4,
 	.vmmc1			= &rx51_vmmc1,
-	.vmmc2			= &rx51_vmmc2,
 	.vsim			= &rx51_vsim,
 	.vdac			= &rx51_vdac,
 };
@@ -289,6 +306,13 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = {
 
 static int __init rx51_i2c_init(void)
 {
+	if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) ||
+	    system_rev >= SYSTEM_REV_B_USES_VAUX3)
+		rx51_twldata.vaux3 = &rx51_vaux3_mmc;
+	else {
+		rx51_twldata.vaux3 = &rx51_vaux3_cam;
+		rx51_twldata.vmmc2 = &rx51_vmmc2;
+	}
 	omap_register_i2c_bus(1, 2600, rx51_peripherals_i2c_board_info_1,
 			ARRAY_SIZE(rx51_peripherals_i2c_board_info_1));
 	omap_register_i2c_bus(2, 100, NULL, 0);


  parent reply	other threads:[~2009-05-25 17:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-25 17:46 [PATCH 0/8] omap3 board updates for merge window after 2.6.30 Tony Lindgren
2009-05-25 17:48 ` [PATCH 1/8] ARM: OMAP3: mmc-twl4030 uses regulator framework Tony Lindgren
2009-05-25 22:47   ` Daniel Ribeiro
2009-05-26 12:59     ` Mark Brown
2009-05-27 16:55     ` [PATCH 1/8] ARM: OMAP3: mmc-twl4030 uses regulator framework, v2 Tony Lindgren
2009-05-25 17:49 ` [PATCH 2/8] ARM: OMAP3: Initialize regulators for Beagle and Overo Tony Lindgren
2009-05-28 16:20   ` Russell King - ARM Linux
2009-05-28 17:33     ` Tony Lindgren
2009-05-28 18:00       ` Mark Brown
2009-05-28 19:48         ` Russell King - ARM Linux
2009-05-29 10:05           ` Mark Brown
2009-05-25 17:51 ` [PATCH 3/8] ARM: OMAP3: pandora: setup regulator framework for MMC Tony Lindgren
2009-05-25 17:52 ` Tony Lindgren [this message]
2009-05-25 17:53 ` [PATCH 5/8] ARM: OMAP3: Add support for OMAP3 Zoom2 board Tony Lindgren
2009-05-28 16:05   ` Russell King - ARM Linux
2009-05-28 21:13     ` [PATCH 5/8] ARM: OMAP3: Add support for OMAP3 Zoom2 board, v2 Tony Lindgren
2009-05-28 21:16       ` Russell King - ARM Linux
2009-05-28 21:39         ` Tony Lindgren
2009-05-25 17:55 ` [PATCH 6/8] ARM: OMAP3: Defconfig for Zoom2 board Tony Lindgren
2009-05-25 17:56 ` [PATCH 7/8] ARM: OMAP3: Add omap3 EVM support Tony Lindgren
2009-05-28 16:06   ` Russell King - ARM Linux
2009-05-28 21:14     ` [PATCH 7/8] ARM: OMAP3: Add omap3 EVM support, v2 Tony Lindgren
2009-05-25 17:57 ` [PATCH 8/8] ARM: OMAP3: Add omap3 EVM defconfig Tony Lindgren
2009-05-27 19:47 ` [PATCH] ARM: OMAP3: pandora: add support for mode devices Grazvydas Ignotas
2009-05-27 20:24   ` Tony Lindgren
2009-05-27 23:39 ` [PATCH 0/8] omap3 board updates for merge window after 2.6.30 Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090525175218.19679.40204.stgit@localhost \
    --to=tony@atomide.com \
    --cc=adrian.hunter@nokia.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.