summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2009-12-09 02:25:19 +0100
committerMarc Kleine-Budde <mkl@pengutronix.de>2009-12-10 12:37:37 +0100
commitea94a18f4bd6dd7a87ce7a29b946e5887e8871fc (patch)
tree21db1e1f354d451349cdfbffd3b4e790e86c7fbb
parent56ec7d9b036d10ead597fb7ecd24c98841397099 (diff)
downloadbarebox-ea94a18f4bd6dd7a87ce7a29b946e5887e8871fc.tar.gz
i.MX35 3stack: enable USB host
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r--board/freescale-mx35-3-stack/3stack.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/board/freescale-mx35-3-stack/3stack.c b/board/freescale-mx35-3-stack/3stack.c
index 765efef..8d326df 100644
--- a/board/freescale-mx35-3-stack/3stack.c
+++ b/board/freescale-mx35-3-stack/3stack.c
@@ -427,6 +427,21 @@ static int f3s_pmic_init_all(struct mc9sdz60 *mc9sdz60)
return err;
}
+static int f3s_enable_usbhost(struct mc9sdz60 *mc9sdz60)
+{
+ int err = 0;
+
+ /* MUX3_CTR to be low for USB Host2 DP & DM */
+ err |= mc9sdz60_set_bits(mc9sdz60, MC9SDZ60_REG_GPIO_2, 0x1 << 6, 0);
+ /* CAN_PWDN to be high for USB Host2 Power & OC */
+ err |= mc9sdz60_set_bits(mc9sdz60, MC9SDZ60_REG_GPIO_2, 0x1 << 1, 0x1 << 1);
+
+ if (err)
+ dev_err(&mc9sdz60->client->dev, "Failed to enable USB Host!\n");
+
+ return err;
+}
+
static int f3s_pmic_init(void)
{
struct mc13892 *mc13892;
@@ -460,6 +475,10 @@ static int f3s_pmic_init(void)
f3s_pmic_init_all(mc9sdz60);
+ /* HACK: enable usb host here, should be moved to linux */
+ if (rev == 20)
+ f3s_enable_usbhost(mc9sdz60);
+
return 0;
}