From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 11/11] MXS: Enable USB on M28EVK
Date: Tue, 1 May 2012 03:56:03 +0200 [thread overview]
Message-ID: <1335837363-12376-12-git-send-email-marex@denx.de> (raw)
In-Reply-To: <1335837363-12376-1-git-send-email-marex@denx.de>
Enable the second USB port on M28EVK board.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Chen Peter-B29397 <B29397@freescale.com>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Li Frank-B20596 <B20596@freescale.com>
Cc: Linux USB <linux-usb@vger.kernel.org>
Cc: Liu JunJie-B08287 <B08287@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Shi Make-B15407 <B15407@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Subodh Nijsure <snijsure@grid-net.com>
Cc: Wolfgang Denk <wd@denx.de>
---
arch/arm/mach-mxs/Kconfig | 2 ++
arch/arm/mach-mxs/mach-m28evk.c | 21 +++++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
index c57f996..05f6e84 100644
--- a/arch/arm/mach-mxs/Kconfig
+++ b/arch/arm/mach-mxs/Kconfig
@@ -81,6 +81,8 @@ config MODULE_M28
select MXS_HAVE_PLATFORM_MXS_I2C
select MXS_HAVE_PLATFORM_MXS_MMC
select MXS_HAVE_PLATFORM_MXSFB
+ select MXS_HAVE_PLATFORM_USB
+ select USB_ARCH_HAS_EHCI
select MXS_OCOTP
config MODULE_APX4
diff --git a/arch/arm/mach-mxs/mach-m28evk.c b/arch/arm/mach-mxs/mach-m28evk.c
index 06d7996..912c8d4 100644
--- a/arch/arm/mach-mxs/mach-m28evk.c
+++ b/arch/arm/mach-mxs/mach-m28evk.c
@@ -39,6 +39,8 @@
#define MX28EVK_BL_ENABLE MXS_GPIO_NR(3, 18)
#define M28EVK_LCD_ENABLE MXS_GPIO_NR(3, 28)
+#define M28EVK_USB_ENABLE MXS_GPIO_NR(3, 13)
+#define M28EVK_USBOTG_ENABLE MXS_GPIO_NR(3, 12)
#define MX28EVK_MMC0_WRITE_PROTECT MXS_GPIO_NR(2, 12)
#define MX28EVK_MMC1_WRITE_PROTECT MXS_GPIO_NR(0, 28)
@@ -210,6 +212,16 @@ static const iomux_cfg_t m28evk_pads[] __initconst = {
/* Backlight */
MX28_PAD_PWM3__GPIO_3_28 | MXS_PAD_CTRL,
+
+ /* USB */
+ MX28_PAD_SSP2_SS2__USB0_OVERCURRENT,
+ MX28_PAD_SSP2_SS1__USB1_OVERCURRENT,
+ MX28_PAD_PWM2__USB0_ID |
+ MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP,
+ MX28_PAD_AUART3_TX__GPIO_3_13 |
+ MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP,
+ MX28_PAD_AUART3_RX__GPIO_3_12 |
+ MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP,
};
/* led */
@@ -292,6 +304,13 @@ static const struct mxsfb_platform_data m28evk_mxsfb_pdata __initconst = {
.ld_intf_width = STMLCDIF_18BIT,
};
+static struct imx_usb_platform_data m28_usb_data = {
+ .gpio_vbus = M28EVK_USBOTG_ENABLE,
+ .gpio_vbus_inverted = 1,
+ .gadget_mode = 0,
+ .host_mode = 1,
+};
+
static struct at24_platform_data m28evk_eeprom = {
.byte_len = 16384,
.page_size = 32,
@@ -344,6 +363,8 @@ static void __init m28evk_init(void)
mx28_add_mxs_i2c(0);
i2c_register_board_info(0, m28_stk5v3_i2c_boardinfo,
ARRAY_SIZE(m28_stk5v3_i2c_boardinfo));
+
+ mx28_add_mxs_usbh(0, &m28_usb_data);
}
static void __init m28evk_timer_init(void)
--
1.7.10
next prev parent reply other threads:[~2012-05-01 1:56 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-01 1:55 [RFC PATCH 00/11 V7] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-05-01 1:55 ` [PATCH 01/11] MXS: Make clk_disable return integer Marek Vasut
2012-05-01 1:55 ` [PATCH 02/11] MXS: Add USB EHCI and USB PHY clock handling Marek Vasut
2012-05-01 1:55 ` [PATCH 03/11] MXS: Fixup i.MX233 USB base address name Marek Vasut
2012-05-01 1:55 ` [PATCH 04/11] MXS: Add data shared between imx-otg and EHCI driver Marek Vasut
2012-05-01 1:55 ` [PATCH 05/11] MXS: Modify the ci13xxx_udc to avoid adding UDC Marek Vasut
2012-05-01 1:55 ` [PATCH 06/11] MXS: Add small registration glue for ci13xxx_udc Marek Vasut
2012-05-01 1:55 ` [PATCH 07/11] MXS: Add separate MXS EHCI HCD driver Marek Vasut
2012-05-01 1:56 ` [PATCH 08/11] MXS: Add imx-otg driver Marek Vasut
2012-05-01 1:56 ` [PATCH 09/11] MXS: Add USB PHY driver Marek Vasut
2012-05-01 1:56 ` [PATCH 10/11] MXS: Add platform registration hooks for USB EHCI Marek Vasut
2012-05-01 1:56 ` Marek Vasut [this message]
2012-05-01 3:13 ` [RFC PATCH 00/11 V7] MXS: Add i.MX28 USB Host driver Chen Peter-B29397
2012-05-01 3:21 ` Marek Vasut
2012-05-01 3:36 ` Chen Peter-B29397
2012-05-01 3:49 ` Marek Vasut
2012-05-01 7:52 ` Chen Peter-B29397
2012-05-01 13:55 ` Marek Vasut
2012-05-03 3:24 ` Chen Peter-B29397
2012-05-03 13:27 ` Marek Vasut
2012-05-09 3:29 ` Chen Peter-B29397
2012-05-09 8:43 ` Marek Vasut
2012-05-09 10:19 ` Chen Peter-B29397
2012-05-09 10:31 ` Marek Vasut
2012-05-08 0:58 ` Marek Vasut
2012-05-10 10:19 ` Juergen Beisert
2012-05-10 18:10 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2012-04-29 22:34 [RFC PATCH 00/11 V6] " Marek Vasut
2012-04-29 22:34 ` [PATCH 11/11] MXS: Enable USB on M28EVK Marek Vasut
2012-04-18 17:46 [RFC PATCH 00/10 V3] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-04-22 12:59 ` [RFC PATCH 00/11 V4] " Marek Vasut
2012-04-22 12:59 ` [PATCH 11/11] MXS: Enable USB on M28EVK Marek Vasut
2012-04-23 1:57 ` Chen Peter-B29397
2012-04-23 2:18 ` Marek Vasut
2012-04-24 3:18 ` [RFC PATCH 00/11 V5] MXS: Add i.MX28 USB Host driver Marek Vasut
2012-04-24 3:18 ` [PATCH 11/11] MXS: Enable USB on M28EVK Marek Vasut
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=1335837363-12376-12-git-send-email-marex@denx.de \
--to=marex@denx.de \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).