]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dra7xx: Enable USB_PHY3 32KHz clock
authorRoger Quadros <rogerq@ti.com>
Mon, 23 May 2016 14:37:49 +0000 (17:37 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 3 Jun 2016 01:42:15 +0000 (21:42 -0400)
DRA7xx has a 32KHz PHY clock for USB_PHY3 that must be enabled
for USB1 instance in Super-Speed.

Signed-off-by: Roger Quadros <rogerq@ti.com>
arch/arm/cpu/armv7/omap5/hw_data.c
arch/arm/cpu/armv7/omap5/prcm-regs.c
arch/arm/include/asm/omap_common.h

index 8734815a67ddceb8a5aefb1901f911e83dd684ad..fe59c25935da39f9c9c29231bada9865ccd81606 100644 (file)
@@ -614,9 +614,14 @@ void enable_usb_clocks(int index)
                setbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl,
                             OPTFCLKEN_REFCLK960M);
 
-               /* Enable 32 KHz clock for dwc3 */
+               /* Enable 32 KHz clock for USB_PHY1 */
                setbits_le32((*prcm)->cm_coreaon_usb_phy1_core_clkctrl,
                             USBPHY_CORE_CLKCTRL_OPTFCLKEN_CLK32K);
+
+               /* Enable 32 KHz clock for USB_PHY3 */
+               if (is_dra7xx())
+                       setbits_le32((*prcm)->cm_coreaon_usb_phy3_core_clkctrl,
+                                    USBPHY_CORE_CLKCTRL_OPTFCLKEN_CLK32K);
        } else if (index == 1) {
                cm_l3init_usb_otg_ss_clkctrl =
                        (*prcm)->cm_l3init_usb_otg_ss2_clkctrl;
@@ -664,9 +669,14 @@ void disable_usb_clocks(int index)
                clrbits_le32((*prcm)->cm_l3init_usb_otg_ss1_clkctrl,
                             OPTFCLKEN_REFCLK960M);
 
-               /* Disable 32 KHz clock for dwc3 */
+               /* Disable 32 KHz clock for USB_PHY1 */
                clrbits_le32((*prcm)->cm_coreaon_usb_phy1_core_clkctrl,
                             USBPHY_CORE_CLKCTRL_OPTFCLKEN_CLK32K);
+
+               /* Disable 32 KHz clock for USB_PHY3 */
+               if (is_dra7xx())
+                       clrbits_le32((*prcm)->cm_coreaon_usb_phy3_core_clkctrl,
+                                    USBPHY_CORE_CLKCTRL_OPTFCLKEN_CLK32K);
        } else if (index == 1) {
                cm_l3init_usb_otg_ss_clkctrl =
                        (*prcm)->cm_l3init_usb_otg_ss2_clkctrl;
index 655e92ba276575e2c8dbc85f3a3ca7f10c35b467..b5f1d700fd8e74edd6fe05b6ca291afc5f64954c 100644 (file)
@@ -820,6 +820,7 @@ struct prcm_regs const dra7xx_prcm = {
        .cm_clkmode_dpll_gmac                   = 0x4a0052a8,
        .cm_coreaon_usb_phy1_core_clkctrl       = 0x4a008640,
        .cm_coreaon_usb_phy2_core_clkctrl       = 0x4a008688,
+       .cm_coreaon_usb_phy3_core_clkctrl       = 0x4a008698,
        .cm_coreaon_l3init_60m_gfclk_clkctrl    = 0x4a0086c0,
 
        /* cm1.mpu */
index ac34b0e72ff83cc60470188e9fc0d13256b9f5e0..07f384867eb03d43e75eefe8b001a7202033ad1c 100644 (file)
@@ -145,6 +145,7 @@ struct prcm_regs {
        u32 cm_ssc_modfreqdiv_dpll_unipro;
        u32 cm_coreaon_usb_phy1_core_clkctrl;
        u32 cm_coreaon_usb_phy2_core_clkctrl;
+       u32 cm_coreaon_usb_phy3_core_clkctrl;
        u32 cm_coreaon_l3init_60m_gfclk_clkctrl;
 
        /* cm2.core */