From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 07/12] omap3evm: Initialize vmmc and vmmc_aux regulators
Date: Mon, 16 Nov 2009 15:27:57 -0800 [thread overview]
Message-ID: <20091116232757.24892.39771.stgit@localhost> (raw)
In-Reply-To: <20091116232435.24892.81547.stgit@localhost>
From: Mike Rapoport <mike@compulab.co.il>
Initialize vmmc and vmmc_aux regulators
Note that the omap3evm_twldata.vmmc1 and omap3evm_twldata.vsim
are set in omap3_evm_i2c_init() to avoid a merge conflict
with the MFD tree. These will be initialized in omap3evm_i2c_boardinfo
as a fix later on.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap2/board-omap3evm.c | 51 ++++++++++++++++++++++++++++++++++
1 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 64c1ae0..148de2e 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -28,6 +28,8 @@
#include <linux/i2c/twl4030.h>
#include <linux/usb/otg.h>
+#include <linux/regulator/machine.h>
+
#include <mach/hardware.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -125,6 +127,44 @@ static inline void __init omap3evm_init_smc911x(void)
gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
}
+static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
+ .supply = "vmmc",
+};
+
+static struct regulator_consumer_supply omap3evm_vsim_supply = {
+ .supply = "vmmc_aux",
+};
+
+/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
+static struct regulator_init_data omap3evm_vmmc1 = {
+ .constraints = {
+ .min_uV = 1850000,
+ .max_uV = 3150000,
+ .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 = &omap3evm_vmmc1_supply,
+};
+
+/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
+static struct regulator_init_data omap3evm_vsim = {
+ .constraints = {
+ .min_uV = 1800000,
+ .max_uV = 3000000,
+ .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 = &omap3evm_vsim_supply,
+};
+
static struct twl4030_hsmmc_info mmc[] = {
{
.mmc = 1,
@@ -167,6 +207,10 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0;
twl4030_mmc_init(mmc);
+ /* link regulators to MMC adapters */
+ omap3evm_vmmc1_supply.dev = mmc[0].dev;
+ omap3evm_vsim_supply.dev = mmc[0].dev;
+
/*
* Most GPIOs are for USB OTG. Some are mostly sent to
* the P2 connector; notably LEDA for the LCD backlight.
@@ -259,6 +303,13 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
static int __init omap3_evm_i2c_init(void)
{
+ /*
+ * REVISIT: These entries can be set in omap3evm_twl_data
+ * after a merge with MFD tree
+ */
+ omap3evm_twldata.vmmc1 = &omap3evm_vmmc1;
+ omap3evm_twldata.vsim = &omap3evm_vsim;
+
omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
ARRAY_SIZE(omap3evm_i2c_boardinfo));
omap_register_i2c_bus(2, 400, NULL, 0);
next prev parent reply other threads:[~2009-11-16 23:27 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-16 23:26 [PATCH 00/12] Mostly board updates for 2.6.33 merge window Tony Lindgren
2009-11-16 23:26 ` [PATCH 01/12] omap: Cleanup the coding style in id.c Tony Lindgren
2009-11-16 23:26 ` [PATCH 02/12] omap: GPIO module enable/disable Tony Lindgren
2009-11-16 23:27 ` [PATCH 03/12] omap3: defconfigs: remove SYSFS_DEPRECATED flag Tony Lindgren
2009-11-16 23:27 ` [PATCH 04/12] omap3: Update 3430SDP defconfig Tony Lindgren
2009-11-16 23:27 ` [PATCH 05/12] omap3evm: Add board revision function Tony Lindgren
2009-11-17 3:56 ` Hiremath, Vaibhav
2009-11-18 22:47 ` [PATCH 05/12] omap3evm: Add board revision function, v2 Tony Lindgren
2009-11-16 23:27 ` [PATCH 06/12] omap3evm: ehci: Update EHCI support on OMAP3EVM (Rev >= E) Tony Lindgren
2009-11-16 23:27 ` Tony Lindgren [this message]
2009-11-16 23:28 ` [PATCH 08/12] omap3evm: MIgrate to smsc911x ethernet driver Tony Lindgren
2009-11-16 23:28 ` [PATCH 09/12] omap3: zoom: split board file for software reuse Tony Lindgren
2009-11-16 23:40 ` [PATCH] omap: Fix keymap for zoom2 according to matrix keypad framwork Tony Lindgren
2009-11-16 23:28 ` [PATCH 10/12] omap3: zoom: rename zoom2 name to generic zoom Tony Lindgren
2009-11-16 23:28 ` [PATCH 11/12] omap3: zoom: Drop i2c-1 speed to 2400 Tony Lindgren
2009-11-16 23:37 ` [PATCH 12/12] omap3: zoom: Introduce zoom3 board support Tony Lindgren
2009-11-17 0:02 ` [PATCH 13/12] omap: zoom3: defconfig creation Tony Lindgren
2009-11-17 0:03 ` [PATCH 14/12] omap: zoom2: update defconfig for LL_DEBUG_NONE 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=20091116232757.24892.39771.stgit@localhost \
--to=tony@atomide.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).