public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/4] mx53loco: Turn on VUSB regulator
Date: Mon,  7 May 2012 17:26:00 -0300	[thread overview]
Message-ID: <1336422361-14245-3-git-send-email-festevam@gmail.com> (raw)
In-Reply-To: <1336422361-14245-1-git-send-email-festevam@gmail.com>

From: Fabio Estevam <fabio.estevam@freescale.com>

On the mx53loco board with mc34708 PMIC it is necessary to turn on VUSB regulator
so that the mx53 USBH1 PHY receives the 3.3V voltage.

Tested by inserting a USB pen drive in the upper USB slot (USBH1) and then issued the
commands:

usb start

usb info

,which correctly detected and printed the USB pen drive information.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
---
 board/freescale/mx53loco/mx53loco.c |    9 +++++++++
 include/fsl_pmic.h                  |    1 +
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/board/freescale/mx53loco/mx53loco.c b/board/freescale/mx53loco/mx53loco.c
index 8c18b99..4d3b73d 100644
--- a/board/freescale/mx53loco/mx53loco.c
+++ b/board/freescale/mx53loco/mx53loco.c
@@ -359,6 +359,15 @@ static int power_init(void)
 		pmic_reg_read(p, REG_POWER_CTL2, &val);
 		val = (val & ~TIMER_MASK_MC34708) | TIMER_4S_MC34708;
 		ret |= pmic_reg_write(p, REG_POWER_CTL2, val);
+
+		/* Set VUSBSEL and VUSBEN for USB PHY supply*/
+		pmic_reg_read(p, REG_MODE_0, &val);
+		val |= (VUSBSEL_MC34708 | VUSBEN_MC34708);
+		ret |= pmic_reg_write(p, REG_MODE_0, val);
+
+		/* Set SWBST to 5V in auto mode */
+		val = SWBST_AUTO;
+		ret |= pmic_reg_write(p, SWBST_CTRL, val);
 	}
 
 	return ret;
diff --git a/include/fsl_pmic.h b/include/fsl_pmic.h
index 3b7cd37..64c1e2e 100644
--- a/include/fsl_pmic.h
+++ b/include/fsl_pmic.h
@@ -131,5 +131,6 @@ enum {
 #define VUSBSEL_MC34708		(1 << 2)
 #define VUSBEN_MC34708		(1 << 3)
 #define SWBST_CTRL		31
+#define SWBST_AUTO		0x8
 
 #endif
-- 
1.7.1

  parent reply	other threads:[~2012-05-07 20:26 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 20:25 [U-Boot] [PATCH 1/3] pmic: dialog: Avoid name conflicts Fabio Estevam
2012-05-07 20:25 ` [U-Boot] [PATCH 2/4] mx53loco: Add mc34708 support and set mx53 frequency at 1GHz Fabio Estevam
2012-05-09  8:57   ` Liu Hui-R64343
2012-05-09  9:11   ` Stefano Babic
2012-05-09  9:17   ` Stefano Babic
2012-05-07 20:26 ` Fabio Estevam [this message]
2012-05-09  8:58   ` [U-Boot] [PATCH 3/4] mx53loco: Turn on VUSB regulator Liu Hui-R64343
2012-05-09  9:11   ` Stefano Babic
2012-05-09  9:18   ` Stefano Babic
2012-05-07 20:26 ` [U-Boot] [PATCH 4/4] mx53loco: Add CONFIG_REVISION_TAG Fabio Estevam
2012-05-08 13:40   ` [U-Boot] [PATCH v2 " Fabio Estevam
2012-05-09  9:11     ` Stefano Babic
2012-05-09  9:18     ` Stefano Babic
2012-05-09  9:15   ` [U-Boot] [PATCH " Liu Hui-R64343
2012-05-09 11:20     ` Fabio Estevam
     [not found]       ` <AD13664F485EE54694E29A7F9D5BE1AF1898C2@039-SN2MPN1-022.039d.mgd.msft.net>
2012-05-09 12:05         ` Stefano Babic
2012-05-09  9:11 ` [U-Boot] [PATCH 1/3] pmic: dialog: Avoid name conflicts Stefano Babic
2012-05-09  9:18 ` Stefano Babic

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=1336422361-14245-3-git-send-email-festevam@gmail.com \
    --to=festevam@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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