]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: ehci-mx6: introduce config for high active power pin
authorStefan Agner <stefan.agner@toradex.com>
Wed, 13 Jul 2016 07:25:38 +0000 (00:25 -0700)
committerStefano Babic <sbabic@denx.de>
Tue, 19 Jul 2016 17:52:14 +0000 (19:52 +0200)
Add a new config CONFIG_MXC_USB_OTG_HACTIVE which configures the
OTG Power Pin to be high active. Low active is the reset value
of the affected configuration register, hence the config option
is named by the non-reset configuration.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
configs/mx7dsabresd_defconfig
configs/warp7_defconfig
drivers/usb/host/Kconfig
drivers/usb/host/ehci-mx6.c

index 9dbc9c7298c1dc7d1f4ba9da31bc038d77218969..d6dafcd289923f7591c3b8cc5989475790ed7afd 100644 (file)
@@ -30,6 +30,7 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_USB_GADGET=y
 CONFIG_CI_UDC=y
 CONFIG_USB_GADGET_DOWNLOAD=y
index bd9b5bb2ea2660ff435b49ab48b36da1600f7d01..37706694624e1ca9cb868bedff42e4e9a02e8978 100644 (file)
@@ -24,4 +24,5 @@ CONFIG_CMD_EXT4_WRITE=y
 CONFIG_CMD_FAT=y
 CONFIG_USB=y
 CONFIG_USB_EHCI_HCD=y
+CONFIG_MXC_USB_OTG_HACTIVE=y
 CONFIG_OF_LIBFDT=y
index 7992cb4632cb6af3ee2a7387849f97a807179afe..09db938f207c7b2d03165ba212e1ae22a365de8a 100644 (file)
@@ -81,6 +81,15 @@ config USB_EHCI_MX7
        ---help---
          Enables support for the on-chip EHCI controller on i.MX7 SoCs.
 
+if USB_EHCI_MX7
+
+config MXC_USB_OTG_HACTIVE
+       bool "USB Power pin high active"
+       ---help---
+         Set the USB Power pin polarity to be high active (PWR_POL)
+
+endif
+
 config USB_EHCI_MSM
        bool "Support for Qualcomm on-chip EHCI USB controller"
        depends on DM_USB
index 277f4616464955aa7a29aee6e9473e3236658d6a..8352c2bfc5c0bde0e1d4923326f4a44b3a1f1924 100644 (file)
@@ -216,7 +216,11 @@ static void usb_power_config(int index)
        clrbits_le32(phy_cfg2, USBNC_PHYCFG2_ACAENB);
 
        /* Set power polarity to high active */
+#ifdef CONFIG_MXC_USB_OTG_HACTIVE
        setbits_le32(ctrl, UCTRL_PWR_POL);
+#else
+       clrbits_le32(ctrl, UCTRL_PWR_POL);
+#endif
 }
 
 int usb_phy_mode(int port)