[U-Boot] [PATCH 02/16] sunxi (sun50i): Set CONFIG_SUNXI_USB_PHYS to 2 (the A64 has 2 PHYs)

Jagan Teki jagan at amarulasolutions.com
Tue Dec 12 06:58:17 UTC 2017


From: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>

The sun50i platform (e.g. the A64/sun50iw1p1) integrates 2 USB PHYs
which are connected as follows:
  PHY#0 is shared between the OTG controller (MUSB) [at 01C19000]
        and the USB-OTG-HCI [at 01C1A000]
  PHY#1 is dedicated to USB-HCI0 [at 01C1B000] and can be bypassed
        when connecting HCI0 to the HSIC interface

Note that all USB PHYs are controlled from within the OTG address
space at 01C19000.

X-AffectedPlatforms: A64-uQ7
Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
[jagan: rebased, fixed 80 line warning]
Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
Acked-by: Maxime Ripard <maxime.ripard at free-electrons.com>
---
 drivers/usb/musb-new/musb_regs.h | 3 ++-
 include/configs/sun50i.h         | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb-new/musb_regs.h b/drivers/usb/musb-new/musb_regs.h
index a3cc38e..89b5dbc 100644
--- a/drivers/usb/musb-new/musb_regs.h
+++ b/drivers/usb/musb-new/musb_regs.h
@@ -432,7 +432,8 @@ static inline u8 musb_read_ulpi_buscontrol(void __iomem *mbase)
 
 static inline u8 musb_read_configdata(void __iomem *mbase)
 {
-#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T
+#if defined CONFIG_MACH_SUN8I_A33 || defined CONFIG_MACH_SUN8I_A83T \
+	|| defined CONFIG_MACH_SUN50I
 	/* <Sigh> allwinner saves a reg, and we need to hardcode this */
 	return 0xde;
 #else
diff --git a/include/configs/sun50i.h b/include/configs/sun50i.h
index b7b67a1..9f3a8a6 100644
--- a/include/configs/sun50i.h
+++ b/include/configs/sun50i.h
@@ -16,7 +16,7 @@
 #define CONFIG_USB_MAX_CONTROLLER_COUNT 1
 #endif
 
-#define CONFIG_SUNXI_USB_PHYS	1
+#define CONFIG_SUNXI_USB_PHYS	2
 
 #define GICD_BASE		0x1c81000
 #define GICC_BASE		0x1c82000
-- 
2.7.4



More information about the U-Boot mailing list