From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 4/4] ARM i.MX53 LOCO: Add USB support
Date: Thu, 12 Apr 2012 21:40:05 +0200 [thread overview]
Message-ID: <1334259605-21907-5-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1334259605-21907-1-git-send-email-s.hauer@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
arch/arm/boards/freescale-mx53-loco/board.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm/boards/freescale-mx53-loco/board.c b/arch/arm/boards/freescale-mx53-loco/board.c
index 6ae597a..78e8f9a 100644
--- a/arch/arm/boards/freescale-mx53-loco/board.c
+++ b/arch/arm/boards/freescale-mx53-loco/board.c
@@ -95,6 +95,8 @@ static struct pad_desc loco_pads[] = {
/* I2C0 */
MX53_PAD_CSI0_DAT8__I2C1_SDA,
MX53_PAD_CSI0_DAT9__I2C1_SCL,
+
+ MX53_PAD_PATA_DA_2__GPIO7_8,
};
static struct i2c_board_info i2c_devices[] = {
@@ -149,6 +151,7 @@ static void loco_fec_reset(void)
#define LOCO_SD3_CD IMX_GPIO_NR(3, 11)
#define LOCO_SD3_WP IMX_GPIO_NR(3, 12)
#define LOCO_SD1_CD IMX_GPIO_NR(3, 13)
+#define MX53_LOCO_USB_PWREN IMX_GPIO_NR(7, 8)
static struct esdhc_platform_data loco_sd1_data = {
.cd_gpio = LOCO_SD1_CD,
@@ -163,8 +166,19 @@ static struct esdhc_platform_data loco_sd3_data = {
.wp_type = ESDHC_WP_GPIO,
};
+static void loco_ehci_init(void)
+{
+ /* USB PWR enable */
+ gpio_direction_output(MX53_LOCO_USB_PWREN, 0);
+ gpio_set_value(MX53_LOCO_USB_PWREN, 1);
+
+ writel(0, MX53_OTG_BASE_ADDR + 0x384); /* setup portsc */
+ add_generic_usb_ehci_device(1, MX53_OTG_BASE_ADDR + 0x200, NULL);
+}
+
static int loco_devices_init(void)
{
+
imx53_iim_register_fec_ethaddr();
imx53_add_fec(&fec_info);
imx53_add_mmc0(&loco_sd1_data);
@@ -172,6 +186,9 @@ static int loco_devices_init(void)
i2c_register_board_info(0, i2c_devices, ARRAY_SIZE(i2c_devices));
imx53_add_i2c0(NULL);
+ if (IS_ENABLED(CONFIG_USB_EHCI))
+ loco_ehci_init();
+
loco_fec_reset();
set_silicon_rev(imx_silicon_revision());
--
1.7.10
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2012-04-12 19:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-12 19:40 ehci patches Sascha Hauer
2012-04-12 19:40 ` [PATCH 1/4] USB ehci: make cache handling simpler Sascha Hauer
2012-04-12 19:40 ` [PATCH 2/4] USB ehci: speed up initialization Sascha Hauer
2012-04-12 19:40 ` [PATCH 3/4] ARM i.MX53: Setup USB clocks Sascha Hauer
2012-04-12 19:40 ` Sascha Hauer [this message]
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=1334259605-21907-5-git-send-email-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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