linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: linux-omap@vger.kernel.org
Cc: broonie@opensource.wolfsonmicro.com, lrg@ti.com, khilman@ti.com
Subject: [PATCHv2 3/5] omap3: beagle: instantiate smps regulators
Date: Wed, 13 Jul 2011 17:00:36 +0300	[thread overview]
Message-ID: <1310565638-13140-4-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1310565638-13140-1-git-send-email-t-kristo@ti.com>

VDD1 and VDD2 are now available. This requires SMPS regulator driver to work.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 arch/arm/mach-omap2/board-omap3beagle.c |   53 +++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 78cf5f2..d7ae648 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -31,6 +31,7 @@
 #include <linux/mmc/host.h>
 
 #include <linux/regulator/machine.h>
+#include <linux/regulator/omap-smps.h>
 #include <linux/i2c/twl.h>
 
 #include <mach/hardware.h>
@@ -274,6 +275,15 @@ static struct regulator_consumer_supply beagle_vsim_supply[] = {
 	REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
 };
 
+static struct regulator_consumer_supply beagle_smps1_supply[] = {
+	REGULATOR_SUPPLY("vcc", "mpu"),
+};
+
+static struct regulator_consumer_supply beagle_smps2_supply[] = {
+	REGULATOR_SUPPLY("vcc", "core"),
+};
+
+
 static struct gpio_led gpio_leds[];
 
 static int beagle_twl_gpio_setup(struct device *dev,
@@ -400,6 +410,30 @@ static struct regulator_init_data beagle_vpll2 = {
 	.consumer_supplies	= beagle_vdvi_supplies,
 };
 
+static struct regulator_init_data beagle_smps1 = {
+	.constraints = {
+		.name			= "VDD1",
+		.min_uV			= 600000,
+		.max_uV			= 1450000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(beagle_smps1_supply),
+	.consumer_supplies	= beagle_smps1_supply,
+};
+
+static struct regulator_init_data beagle_smps2 = {
+	.constraints = {
+		.name			= "VDD2",
+		.min_uV			= 600000,
+		.max_uV			= 1450000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL,
+		.valid_ops_mask		= REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(beagle_smps2_supply),
+	.consumer_supplies	= beagle_smps2_supply,
+};
+
 static struct twl4030_usb_data beagle_usb_data = {
 	.usb_mode	= T2_USB_MODE_ULPI,
 };
@@ -425,6 +459,16 @@ static struct twl4030_platform_data beagle_twldata = {
 	.vpll2		= &beagle_vpll2,
 };
 
+static struct regulator_init_data *beagle_smps_reg_list[] = {
+	&beagle_smps1,
+	&beagle_smps2,
+};
+
+static struct omap_smps_platform_data beagle_smps_info = {
+	.regulators 		= beagle_smps_reg_list,
+	.num_regulators		= ARRAY_SIZE(beagle_smps_reg_list),
+};
+
 static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
        {
                I2C_BOARD_INFO("eeprom", 0x50),
@@ -494,6 +538,14 @@ static struct platform_device keys_gpio = {
 	},
 };
 
+static struct platform_device beagle_smps = {
+	.name	= "omap-smps",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &beagle_smps_info,
+	},
+};
+
 static void __init omap3_beagle_init_early(void)
 {
 	omap2_init_common_infrastructure();
@@ -509,6 +561,7 @@ static void __init omap3_beagle_init_irq(void)
 static struct platform_device *omap3_beagle_devices[] __initdata = {
 	&leds_gpio,
 	&keys_gpio,
+	&beagle_smps,
 };
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
-- 
1.7.4.1


Texas Instruments Oy, Tekniikantie 12, 02150 Espoo. Y-tunnus: 0115040-6. Kotipaikka: Helsinki
 


  parent reply	other threads:[~2011-07-13 14:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-13 14:00 [PATCHv2 0/5] OMAP SMPS regulator driver Tero Kristo
2011-07-13 14:00 ` [PATCHv2 1/5] OMAP: move voltage.h and vp.h under platform include directory Tero Kristo
2011-07-13 14:00 ` [PATCHv2 2/5] regulator: omap smps regulator driver Tero Kristo
2011-07-13 14:40   ` Mark Brown
2011-07-13 15:53     ` Tero Kristo
2011-07-13 22:55       ` Mark Brown
2011-07-14  7:51         ` Tero Kristo
2011-07-14  6:29   ` Todd Poynor
2011-07-14  7:23     ` Tero Kristo
2011-07-13 14:00 ` Tero Kristo [this message]
2011-07-13 14:00 ` [PATCHv2 4/5] TEMP: OMAP3: beagle rev-c4: enable OPP6 Tero Kristo
2011-07-13 17:49   ` Premi, Sanjeev
2011-07-14  7:10     ` Tero Kristo
2011-07-14  8:46       ` Premi, Sanjeev
2011-07-13 14:00 ` [PATCHv2 5/5] omap: voltage: changed parameter of omap_voltage_lookup to const Tero Kristo
2011-07-13 19:00 ` [PATCHv2 0/5] OMAP SMPS regulator driver Kevin Hilman
2011-07-13 23:22   ` Mark Brown
2011-07-13 23:51     ` Kevin Hilman
2011-07-14  0:22 ` Kevin Hilman
2011-07-14  7:24   ` Tero Kristo
2011-07-18  8:19 ` 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=1310565638-13140-4-git-send-email-t-kristo@ti.com \
    --to=t-kristo@ti.com \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=khilman@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=lrg@ti.com \
    /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).