[U-Boot] [PATCH 5/6] usb: am437x: Add support for am437x xhci USB host
Marek Vasut
marex at denx.de
Thu Oct 10 02:33:15 CEST 2013
Dear Dan Murphy,
> Add the support for the am437x xhci usb host.
>
> The xHCI host on AM437 is connected to a usb2 phy so need to
> add support to enable those clocks.
>
> Signed-off-by: Dan Murphy <dmurphy at ti.com>
> ---
> arch/arm/include/asm/arch-am33xx/hardware_am43xx.h | 10 +++++++++
> drivers/usb/phy/omap_usb_phy.c | 23
> ++++++++++++++++++++ include/configs/am43xx_evm.h |
> 11 ++++++++++ include/linux/usb/xhci-omap.h | 4
> ++++
> 4 files changed, 48 insertions(+)
>
> diff --git a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
> b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h index
> 303c594..3b665e6 100644
> --- a/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
> +++ b/arch/arm/include/asm/arch-am33xx/hardware_am43xx.h
> @@ -51,4 +51,14 @@
> /* RTC base address */
> #define RTC_BASE 0x44E3E000
>
> +/* USB Clock Control */
> +#define PRM_PER_USB_OTG_SS0_CLKCTRL (CM_PER + 0x260)
> +#define PRM_PER_USB_OTG_SS1_CLKCTRL (CM_PER + 0x268)
> +#define USBOTGSSX_CLKCTRL_MODULE_EN (1 << 2)
> +#define USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960 (1 << 8)
> +
> +#define PRM_PER_USBPHYOCP2SCP0_CLKCTRL (CM_PER + 0x5b8)
> +#define PRM_PER_USBPHYOCP2SCP1_CLKCTRL (CM_PER + 0x5c0)
> +#define USBPHYOCPSCP_MODULE_EN (1 << 2)
> +
> #endif /* __AM43XX_HARDWARE_AM43XX_H */
> diff --git a/drivers/usb/phy/omap_usb_phy.c
> b/drivers/usb/phy/omap_usb_phy.c index f1da73d..20c4805 100644
> --- a/drivers/usb/phy/omap_usb_phy.c
> +++ b/drivers/usb/phy/omap_usb_phy.c
> @@ -207,6 +207,25 @@ void usb_phy_power(int on)
> }
> #endif /* CONFIG_OMAP_USB2PHY2_HOST */
>
> +#ifdef CONFIG_AM437X_USB2PHY2_HOST
> +static void am437x_enable_usb2_phy2(struct omap_xhci *omap)
> +{
> + int usb_otg_ss_clk_val = (USBOTGSSX_CLKCTRL_MODULE_EN |
> + USBOTGSSX_CLKCTRL_OPTFCLKEN_REFCLK960);
Other than that it should be "const", it should also be at least unsigned. And
prefferably u32 .
Best regards,
Marek Vasut
More information about the U-Boot
mailing list