mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matt Porter <matt@ohporter.com>
To: Tony Lindgren <tony@atomide.com>, Russell King <linux@arm.linux.org.uk>
Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] omap: board-omap3evm: add required smsc911x regulators
Date: Wed,  8 Feb 2012 17:06:21 -0500	[thread overview]
Message-ID: <1328738812-26755-1-git-send-email-mporter@ti.com> (raw)

This fixes smsc911x support on omap3evm that has been broken since
the smsc911x driver was updated to require the existence of vdd33a
and vddvario supplies.

Signed-off-by: Matt Porter <mporter@ti.com>
---
 arch/arm/mach-omap2/board-omap3evm.c |   46 +++++++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 003fe34..ca63dda 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -433,9 +433,10 @@ static struct twl4030_keypad_data omap3evm_kp_data = {
 /* ads7846 on SPI */
 static struct regulator_consumer_supply omap3evm_vio_supply[] = {
 	REGULATOR_SUPPLY("vcc", "spi1.0"),
+	REGULATOR_SUPPLY("vddvario", "smsc911x.0"),
 };
 
-/* VIO for ads7846 */
+/* VIO for ads7846, smsc911x, etc. */
 static struct regulator_init_data omap3evm_vio = {
 	.constraints = {
 		.min_uV			= 1800000,
@@ -450,6 +451,47 @@ static struct regulator_init_data omap3evm_vio = {
 	.consumer_supplies	= omap3evm_vio_supply,
 };
 
+/* OSK_3V3 for DVI, smsc911x, and expansion peripherals */
+static struct regulator_consumer_supply omap3evm_osk_3v3_supply[] = {
+	REGULATOR_SUPPLY("vdd33a", "smsc911x.0"),
+};
+
+static struct regulator_init_data omap3evm_osk_3v3 = {
+	.constraints = {
+		.min_uV			= 3300000,
+		.max_uV			= 3300000,
+		.valid_modes_mask	= REGULATOR_MODE_NORMAL
+					| REGULATOR_MODE_STANDBY,
+		.valid_ops_mask		= REGULATOR_CHANGE_MODE
+					| REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(omap3evm_osk_3v3_supply),
+	.consumer_supplies	= omap3evm_osk_3v3_supply,
+};
+
+/*
+ * TWL4030 GPIO15 can control this regulator, but it is treated
+ * as always on since it is pulled down, enabling this regulator
+ * by default.
+ */
+static struct fixed_voltage_config omap3evm_osk_regulator_data = {
+	.supply_name		= "osk_3v3",
+	.microvolts		= 3300000, /* 3.30V */
+	.gpio			= -EINVAL,
+	.startup_delay		= 0,
+	.enable_high		= 0,
+	.enabled_at_boot	= 1,
+	.init_data		= &omap3evm_osk_3v3,
+};
+
+static struct platform_device omap3evm_osk_regulator = {
+	.name		= "reg-fixed-voltage",
+	.id		= 0,
+	.dev = {
+		.platform_data	= &omap3evm_osk_regulator_data,
+	},
+};
+
 #ifdef CONFIG_WL12XX_PLATFORM_DATA
 
 #define OMAP3EVM_WLAN_PMENA_GPIO	(150)
@@ -631,6 +673,8 @@ static void __init omap3_evm_init(void)
 
 	omap3_evm_i2c_init();
 
+	platform_device_register(&omap3evm_osk_regulator);
+
 	omap_display_init(&omap3_evm_dss_data);
 
 	omap_serial_init();
-- 
1.7.5.4


             reply	other threads:[~2012-02-08 22:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-08 22:06 Matt Porter [this message]
2012-02-10 17:40 ` Tony Lindgren
2012-02-10 18:50   ` Matt Porter
2012-02-10 22:53     ` Tony Lindgren
2012-02-13 16:44       ` Matt Porter

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=1328738812-26755-1-git-send-email-mporter@ti.com \
    --to=matt@ohporter.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tony@atomide.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

all inboxes | Powered by JetHome®