From: Jagan Teki Date: Tue, 12 Dec 2017 12:28:17 +0530 Subject: [U-Boot] [PATCH 02/16] sunxi (sun50i): Set CONFIG_SUNXI_USB_PHYS to 2 (the A64 has 2 PHYs) In-Reply-To: <1513061911-30076-1-git-send-email-jagan@amarulasolutions.com> References: <1513061911-30076-1-git-send-email-jagan@amarulasolutions.com> Message-ID: <1513061911-30076-3-git-send-email-jagan@amarulasolutions.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Philipp Tomsich 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 [jagan: rebased, fixed 80 line warning] Signed-off-by: Jagan Teki Acked-by: Maxime Ripard --- 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 /* 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