diff mbox

[U-Boot,15/27] power: twl6030: Configure VUSB voltage on USB device setup

Message ID 1456597155-10711-16-git-send-email-contact@paulk.fr
State Accepted
Commit 0343f71f0901c87ac38b274eb303d18b70c1e3e9
Delegated to: Tom Rini
Headers show

Commit Message

Paul Kocialkowski Feb. 27, 2016, 6:19 p.m. UTC
This explicitly sets VUSB voltage to 3.3V when enabling USB.

Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
---
 drivers/power/twl6030.c | 4 ++++
 include/twl6030.h       | 2 ++
 2 files changed, 6 insertions(+)

Comments

Tom Rini March 17, 2016, 1:58 a.m. UTC | #1
On Sat, Feb 27, 2016 at 07:19:03PM +0100, Paul Kocialkowski wrote:

> This explicitly sets VUSB voltage to 3.3V when enabling USB.
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/drivers/power/twl6030.c b/drivers/power/twl6030.c
index 7ed9129..df43cca 100644
--- a/drivers/power/twl6030.c
+++ b/drivers/power/twl6030.c
@@ -248,6 +248,10 @@  void twl6030_usb_device_settings()
 {
 	u8 value = 0;
 
+	/* 3.3V voltage output for VUSB */
+	twl6030_i2c_write_u8(TWL6030_CHIP_PM, TWL6030_VUSB_CFG_VOLTAGE,
+		TWL6030_CFG_VOLTAGE_33);
+
 	/* Enable P1 output for VUSB */
 	twl6030_i2c_write_u8(TWL6030_CHIP_PM, TWL6030_VUSB_CFG_STATE,
 		TWL6030_CFG_STATE_P1 | TWL6030_CFG_STATE_ON);
diff --git a/include/twl6030.h b/include/twl6030.h
index 04295c9..e68393c 100644
--- a/include/twl6030.h
+++ b/include/twl6030.h
@@ -32,6 +32,7 @@ 
 #define TWL6030_VMMC_CFG_STATE		0x9A
 #define TWL6030_VMMC_CFG_VOLTAGE	0x9B
 #define TWL6030_VUSB_CFG_STATE		0xA2
+#define TWL6030_VUSB_CFG_VOLTAGE	0xA3
 
 #define TWL6030_CFG_GRP_P1		(1 << 0)
 #define TWL6030_CFG_STATE_ON		(1 << 0)
@@ -39,6 +40,7 @@ 
 #define TWL6030_CFG_VOLTAGE_18		0x09
 #define TWL6030_CFG_VOLTAGE_28		0x13
 #define TWL6030_CFG_VOLTAGE_30		0x15
+#define TWL6030_CFG_VOLTAGE_33		0x18
 
 #define MISC1			0xE4
 #define VAC_MEAS		(1 << 2)