mx53loco: Turn on VUSB regulator
authorFabio Estevam <fabio.estevam@freescale.com>
Mon, 7 May 2012 10:26:00 +0000 (10:26 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Tue, 15 May 2012 06:31:34 +0000 (08:31 +0200)
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>
Acked-by: Jason Liu <r64343@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
board/freescale/mx53loco/mx53loco.c
include/fsl_pmic.h

index 8f5ded988d10c00503f737dc0fad6af461437db4..a49b00a81252ae4a673aa8163fce15244a860bcc 100644 (file)
@@ -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;
index 3b7cd37fb70c9e61f2c2f0a6715b15d387c62da6..64c1e2ef65e15bab8f9f5aaf0a6cdb4b1fee6c5a 100644 (file)
@@ -131,5 +131,6 @@ enum {
 #define VUSBSEL_MC34708                (1 << 2)
 #define VUSBEN_MC34708         (1 << 3)
 #define SWBST_CTRL             31
+#define SWBST_AUTO             0x8
 
 #endif