浏览代码

mx53loco: Turn on VUSB regulator

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>
Fabio Estevam 13 年之前
父节点
当前提交
768a059710
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. 9 0
      board/freescale/mx53loco/mx53loco.c
  2. 1 0
      include/fsl_pmic.h

+ 9 - 0
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;

+ 1 - 0
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