From: Dinh.Nguyen@freescale.com
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk,
s.hauer@pengutronix.de, valentin.longchamp@epfl.ch,
daniel@caiaq.de, grant.likely@secretlab.ca,
bryan.wu@canonical.com, amit.kucheria@canonical.com,
r.herring@freescale.com, Jun.Li@freescale.com,
xiao-lizhang@freescale.com,
Dinh Nguyen <Dinh.Nguyen@freescale.com>
Subject: [PATCHv4 2.6.34-rc4 3/7] mxc: Add new defines for USB HW register bits on Freescale SoCs.
Date: Fri, 16 Apr 2010 14:16:07 -0500 [thread overview]
Message-ID: <1271445371-18501-3-git-send-email-Dinh.Nguyen@freescale.com> (raw)
In-Reply-To: <1271445371-18501-2-git-send-email-Dinh.Nguyen@freescale.com>
From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
This patch adds new register bit defines for the USB HW on Freescale
SoCs.
This patch applies to 2.6.34-rc4.
Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
---
arch/arm/plat-mxc/include/mach/mxc_ehci.h | 48 +++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-mxc/include/mach/mxc_ehci.h b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
index 4b9b836..c5b1e7b 100644
--- a/arch/arm/plat-mxc/include/mach/mxc_ehci.h
+++ b/arch/arm/plat-mxc/include/mach/mxc_ehci.h
@@ -1,6 +1,30 @@
#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H
#define __INCLUDE_ASM_ARCH_MXC_EHCI_H
+#define USBOTG_OFFSET 0
+#define USBH1_OFFSET 0x200
+#define USBH2_OFFSET 0x400
+#define USBH3_OFFSET 0x600
+#define USBOTHER_REGS_OFFSET 0x800
+
+#define USBCMD_OFFSET 0x140
+
+#define ULPI_VIEWPORT_OFFSET 0x170
+#define PORTSC_OFFSET 0x184
+#define USBMODE_OFFSET 0x1a8
+#define USBMODE_CM_HOST 3
+
+#define USBCTRL_OFFSET 0
+#define USB_PHY_CTR_FUNC_OFFSET 0x8
+#define USB_PHY_CTR_FUNC2_OFFSET 0xc
+#define USB_CTRL_1_OFFSET 0x10
+
+
+/* USBCMD */
+#define UCMD_RUN_STOP (1 << 0) /* controller run/stop */
+#define UCMD_RESET (1 << 1) /* controller reset */
+#define UCMD_ITC_NO_THRESHOLD (~(0xff << 16)) /* Interrupt Threshold Control */
+
/* values for portsc field */
#define MXC_EHCI_PHY_LOW_POWER_SUSPEND (1 << 23)
#define MXC_EHCI_FORCE_FS (1 << 24)
@@ -26,6 +50,30 @@
#define MXC_EHCI_IPPUE_DOWN (1 << 8)
#define MXC_EHCI_IPPUE_UP (1 << 9)
+/* USB_CTRL */
+#define UCTRL_OUIE (1 << 28) /* OTG ULPI intr enable */
+#define UCTRL_OWIE (1 << 27) /* OTG wakeup intr enable */
+#define UCTRL_OBPVAL_RXDP (1 << 26) /* OTG RxDp status in bypass mode */
+#define UCTRL_OBPVAL_RXDM (1 << 25) /* OTG RxDm status in bypass mode */
+#define UCTRL_OPM (1 << 24) /* OTG power mask */
+#define UCTRL_H1UIE (1 << 12) /* Host1 ULPI interrupt enable */
+#define UCTRL_H1WIE (1 << 11) /* HOST1 wakeup intr enable */
+#define UCTRL_H1PM (1 << 8) /* HOST1 power mask */
+
+/* USB_PHY_CTRL_FUNC */
+#define USB_UTMI_PHYCTRL_OC_DIS (1 << 8) /* OTG Disable Overcurrent Event */
+#define USB_UH1_OC_DIS (1 << 5) /* UH1 Disable Overcurrent Event */
+
+/* USB_CTRL_1 */
+#define USB_CTRL_UH1_EXT_CLK_EN (1 << 25)
+#define USB_CTRL_UH2_EXT_CLK_EN (1 << 26)
+
+/* USB_PHY_CTRL_FUNC2*/
+#define USB_UTMI_PHYCTRL2_PLLDIV_MASK 0x3
+#define USB_UTMI_PHYCTRL2_PLLDIV_SHIFT 0
+#define USB_UTMI_PHYCTRL2_HSDEVSEL_MASK 0x3
+#define USB_UTMI_PHYCTRL2_HSDEVSEL_SHIFT 19
+
struct mxc_usbh_platform_data {
int (*init)(struct platform_device *pdev);
int (*exit)(struct platform_device *pdev);
--
1.6.0.4
next prev parent reply other threads:[~2010-04-16 19:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-16 19:16 [PATCHv4 2.6.34-rc4 1/7] mxc: Update GPIO for USB support on Freescale MX51 Babbage HW Dinh.Nguyen
2010-04-16 19:16 ` [PATCHv4 2.6.34-rc4 2/7] mx5: Add USB device definitions for " Dinh.Nguyen
2010-04-16 19:16 ` Dinh.Nguyen [this message]
2010-04-16 19:16 ` [PATCHv4 2.6.34-rc4 4/7] mx5: Enable board specific functions for enabling USB host on Babbage Dinh.Nguyen
2010-04-16 19:16 ` [PATCHv4 2.6.34-rc4 5/7] mxc: Add generic USB HW initialization for MX51 Dinh.Nguyen
2010-04-16 19:16 ` [PATCHv4 2.6.34-rc4 6/7] mxc-usb: Add call to initialize MXC USB HW registers Dinh.Nguyen
2010-04-16 19:16 ` [PATCHv4 2.6.34-rc4 7/7] mx5: Add USB to Freescale MX51 defconfig Dinh.Nguyen
2010-04-17 17:07 ` [PATCHv4 2.6.34-rc4 5/7] mxc: Add generic USB HW initialization for MX51 Daniel Mack
2010-04-19 1:03 ` Amit Kucheria
2010-04-19 7:38 ` Daniel Mack
2010-04-18 2:07 ` Sascha Hauer
2010-04-19 15:40 ` [PATCHv4 2.6.34-rc4 5/7] mxc: Add generic USB HWinitialization " Nguyen Dinh-R00091
2010-04-19 15:58 ` Sascha Hauer
2010-04-19 16:59 ` Daniel Mack
2010-04-19 17:04 ` Daniel Mack
2010-04-19 0:32 ` [PATCHv4 2.6.34-rc4 2/7] mx5: Add USB device definitions for Freescale MX51 Babbage HW Amit Kucheria
2010-04-19 14:48 ` Nguyen Dinh-R00091
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=1271445371-18501-3-git-send-email-Dinh.Nguyen@freescale.com \
--to=dinh.nguyen@freescale.com \
--cc=Jun.Li@freescale.com \
--cc=amit.kucheria@canonical.com \
--cc=bryan.wu@canonical.com \
--cc=daniel@caiaq.de \
--cc=grant.likely@secretlab.ca \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=r.herring@freescale.com \
--cc=s.hauer@pengutronix.de \
--cc=valentin.longchamp@epfl.ch \
--cc=xiao-lizhang@freescale.com \
/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
all inboxes | Powered by JetHome®