1*682fe370SBharat Gooty /* 2*682fe370SBharat Gooty * Copyright (c) 2019 - 2021, Broadcom 3*682fe370SBharat Gooty * 4*682fe370SBharat Gooty * SPDX-License-Identifier: BSD-3-Clause 5*682fe370SBharat Gooty */ 6*682fe370SBharat Gooty 7*682fe370SBharat Gooty #include <stdint.h> 8*682fe370SBharat Gooty 9*682fe370SBharat Gooty #include <common/debug.h> 10*682fe370SBharat Gooty #include <drivers/delay_timer.h> 11*682fe370SBharat Gooty #include <lib/mmio.h> 12*682fe370SBharat Gooty 13*682fe370SBharat Gooty #include <mdio.h> 14*682fe370SBharat Gooty #include <platform_usb.h> 15*682fe370SBharat Gooty #include <sr_utils.h> 16*682fe370SBharat Gooty #include "sr_usb.h" 17*682fe370SBharat Gooty #include <usbh_xhci_regs.h> 18*682fe370SBharat Gooty 19*682fe370SBharat Gooty static uint32_t usb_func = USB3_DRD | USB3H_USB2DRD; 20*682fe370SBharat Gooty 21*682fe370SBharat Gooty static void usb_pm_rescal_init(void) 22*682fe370SBharat Gooty { 23*682fe370SBharat Gooty uint32_t data; 24*682fe370SBharat Gooty uint32_t try; 25*682fe370SBharat Gooty 26*682fe370SBharat Gooty mmio_setbits_32(CDRU_MISC_RESET_CONTROL, CDRU_PM_RESET_N_R); 27*682fe370SBharat Gooty /* release reset */ 28*682fe370SBharat Gooty mmio_setbits_32(CDRU_CHIP_TOP_SPARE_REG0, RESCAL_I_RSTB); 29*682fe370SBharat Gooty udelay(10U); 30*682fe370SBharat Gooty /* power up */ 31*682fe370SBharat Gooty mmio_setbits_32(CDRU_CHIP_TOP_SPARE_REG0, 32*682fe370SBharat Gooty RESCAL_I_RSTB | RESCAL_I_PWRDNB); 33*682fe370SBharat Gooty try = 1000U; 34*682fe370SBharat Gooty do { 35*682fe370SBharat Gooty udelay(1U); 36*682fe370SBharat Gooty data = mmio_read_32(CDRU_CHIP_TOP_SPARE_REG1); 37*682fe370SBharat Gooty try--; 38*682fe370SBharat Gooty } while ((data & RESCAL_I_PWRDNB) == 0x0U && (try != 0U)); 39*682fe370SBharat Gooty 40*682fe370SBharat Gooty if (try == 0U) { 41*682fe370SBharat Gooty ERROR("CDRU_CHIP_TOP_SPARE_REG1: 0x%x\n", data); 42*682fe370SBharat Gooty } 43*682fe370SBharat Gooty 44*682fe370SBharat Gooty INFO("USB and PM Rescal Init done..\n"); 45*682fe370SBharat Gooty } 46*682fe370SBharat Gooty 47*682fe370SBharat Gooty const unsigned int xhc_portsc_reg_offset[MAX_USB_PORTS] = { 48*682fe370SBharat Gooty XHC_PORTSC1_OFFSET, 49*682fe370SBharat Gooty XHC_PORTSC2_OFFSET, 50*682fe370SBharat Gooty XHC_PORTSC3_OFFSET, 51*682fe370SBharat Gooty }; 52*682fe370SBharat Gooty 53*682fe370SBharat Gooty static void usb3h_usb2drd_init(void) 54*682fe370SBharat Gooty { 55*682fe370SBharat Gooty uint32_t val; 56*682fe370SBharat Gooty 57*682fe370SBharat Gooty INFO("USB3H + USB 2DRD init\n"); 58*682fe370SBharat Gooty mmio_clrbits_32(USB3H_U3PHY_CTRL, POR_RESET); 59*682fe370SBharat Gooty val = mmio_read_32(USB3H_PWR_CTRL); 60*682fe370SBharat Gooty val &= ~(0x3U << POWER_CTRL_OVRD); 61*682fe370SBharat Gooty val |= (1U << POWER_CTRL_OVRD); 62*682fe370SBharat Gooty mmio_write_32(USB3H_PWR_CTRL, val); 63*682fe370SBharat Gooty mmio_setbits_32(USB3H_U3PHY_CTRL, PHY_RESET); 64*682fe370SBharat Gooty /* Phy to come out of reset */ 65*682fe370SBharat Gooty udelay(2U); 66*682fe370SBharat Gooty mmio_clrbits_32(USB3H_U3PHY_CTRL, MDIO_RESET); 67*682fe370SBharat Gooty 68*682fe370SBharat Gooty /* MDIO in reset */ 69*682fe370SBharat Gooty udelay(2U); 70*682fe370SBharat Gooty mmio_setbits_32(USB3H_U3PHY_CTRL, MDIO_RESET); 71*682fe370SBharat Gooty 72*682fe370SBharat Gooty /* After MDIO reset release */ 73*682fe370SBharat Gooty udelay(2U); 74*682fe370SBharat Gooty 75*682fe370SBharat Gooty /* USB 3.0 phy Analog Block Initialization */ 76*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 77*682fe370SBharat Gooty USB3_PHY_ANA_BLOCK_BASE); 78*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_ANA_REG0, 0x4646U); 79*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_ANA_REG1, 0x80c9U); 80*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_ANA_REG2, 0x88a6U); 81*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_ANA_REG5, 0x7c12U); 82*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_ANA_REG8, 0x1d07U); 83*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_ANA_REG11, 0x25cU); 84*682fe370SBharat Gooty 85*682fe370SBharat Gooty /* USB 3.0 phy RXPMD Block initialization*/ 86*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 87*682fe370SBharat Gooty USB3_PHY_RXPMD_BLOCK_BASE); 88*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_RXPMD_REG1, 0x4052U); 89*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_RXPMD_REG2, 0x4cU); 90*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_RXPMD_REG5, 0x7U); 91*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_RXPMD_REG7, 0x173U); 92*682fe370SBharat Gooty 93*682fe370SBharat Gooty /* USB 3.0 phy AEQ Block initialization*/ 94*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 95*682fe370SBharat Gooty USB3_PHY_AEQ_BLOCK_BASE); 96*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_AEQ_REG1, 0x3000U); 97*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_AEQ_REG3, 0x2c70U); 98*682fe370SBharat Gooty 99*682fe370SBharat Gooty /* USB 3.0 phy TXPMD Block initialization*/ 100*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 101*682fe370SBharat Gooty USB3_PHY_TXPMD_BLOCK_BASE); 102*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_TXPMD_REG1, 0x100fU); 103*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3H_PHY_ID, USB3_PHY_TXPMD_REG2, 0x238cU); 104*682fe370SBharat Gooty } 105*682fe370SBharat Gooty 106*682fe370SBharat Gooty static void usb3drd_init(void) 107*682fe370SBharat Gooty { 108*682fe370SBharat Gooty uint32_t val; 109*682fe370SBharat Gooty 110*682fe370SBharat Gooty INFO("USB3DRD init\n"); 111*682fe370SBharat Gooty mmio_clrbits_32(DRDU3_U3PHY_CTRL, POR_RESET); 112*682fe370SBharat Gooty val = mmio_read_32(DRDU3_PWR_CTRL); 113*682fe370SBharat Gooty val &= ~(0x3U << POWER_CTRL_OVRD); 114*682fe370SBharat Gooty val |= (1U << POWER_CTRL_OVRD); 115*682fe370SBharat Gooty mmio_write_32(DRDU3_PWR_CTRL, val); 116*682fe370SBharat Gooty mmio_setbits_32(DRDU3_U3PHY_CTRL, PHY_RESET); 117*682fe370SBharat Gooty /* Phy to come out of reset */ 118*682fe370SBharat Gooty udelay(2U); 119*682fe370SBharat Gooty mmio_clrbits_32(DRDU3_U3PHY_CTRL, MDIO_RESET); 120*682fe370SBharat Gooty 121*682fe370SBharat Gooty /* MDIO in reset */ 122*682fe370SBharat Gooty udelay(2U); 123*682fe370SBharat Gooty mmio_setbits_32(DRDU3_U3PHY_CTRL, MDIO_RESET); 124*682fe370SBharat Gooty 125*682fe370SBharat Gooty /* After MDIO reset release */ 126*682fe370SBharat Gooty udelay(2U); 127*682fe370SBharat Gooty 128*682fe370SBharat Gooty /* USB 3.0 DRD phy Analog Block Initialization */ 129*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 130*682fe370SBharat Gooty USB3_PHY_ANA_BLOCK_BASE); 131*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_ANA_REG0, 0x4646U); 132*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_ANA_REG1, 0x80c9U); 133*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_ANA_REG2, 0x88a6U); 134*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_ANA_REG5, 0x7c12U); 135*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_ANA_REG8, 0x1d07U); 136*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_ANA_REG11, 0x25cU); 137*682fe370SBharat Gooty 138*682fe370SBharat Gooty /* USB 3.0 DRD phy RXPMD Block initialization*/ 139*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 140*682fe370SBharat Gooty USB3_PHY_RXPMD_BLOCK_BASE); 141*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_RXPMD_REG1, 0x4052U); 142*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_RXPMD_REG2, 0x4cU); 143*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_RXPMD_REG5, 0x7U); 144*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_RXPMD_REG7, 0x173U); 145*682fe370SBharat Gooty 146*682fe370SBharat Gooty /* USB 3.0 DRD phy AEQ Block initialization*/ 147*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 148*682fe370SBharat Gooty USB3_PHY_AEQ_BLOCK_BASE); 149*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_AEQ_REG1, 0x3000U); 150*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_AEQ_REG3, 0x2c70U); 151*682fe370SBharat Gooty 152*682fe370SBharat Gooty /* USB 3.0 DRD phy TXPMD Block initialization*/ 153*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_MDIO_BLOCK_BASE_REG, 154*682fe370SBharat Gooty USB3_PHY_TXPMD_BLOCK_BASE); 155*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_TXPMD_REG1, 0x100fU); 156*682fe370SBharat Gooty mdio_write(MDIO_BUS_ID, USB3DRD_PHY_ID, USB3_PHY_TXPMD_REG2, 0x238cU); 157*682fe370SBharat Gooty } 158*682fe370SBharat Gooty 159*682fe370SBharat Gooty static void usb3_phy_init(void) 160*682fe370SBharat Gooty { 161*682fe370SBharat Gooty usb_pm_rescal_init(); 162*682fe370SBharat Gooty 163*682fe370SBharat Gooty if ((usb_func & USB3H_USB2DRD) != 0U) { 164*682fe370SBharat Gooty usb3h_usb2drd_init(); 165*682fe370SBharat Gooty } 166*682fe370SBharat Gooty 167*682fe370SBharat Gooty if ((usb_func & USB3_DRD) != 0U) { 168*682fe370SBharat Gooty usb3drd_init(); 169*682fe370SBharat Gooty } 170*682fe370SBharat Gooty } 171*682fe370SBharat Gooty 172*682fe370SBharat Gooty #ifdef USB_DMA_COHERENT 173*682fe370SBharat Gooty void usb_enable_coherence(void) 174*682fe370SBharat Gooty { 175*682fe370SBharat Gooty if (usb_func & USB3H_USB2DRD) { 176*682fe370SBharat Gooty mmio_setbits_32(USB3H_SOFT_RESET_CTRL, 177*682fe370SBharat Gooty USB3H_XHC_AXI_SOFT_RST_N); 178*682fe370SBharat Gooty mmio_setbits_32(DRDU2_SOFT_RESET_CTRL, 179*682fe370SBharat Gooty DRDU2_BDC_AXI_SOFT_RST_N); 180*682fe370SBharat Gooty mmio_setbits_32(USB3H_U3PHY_CTRL, USB3H_U3SOFT_RST_N); 181*682fe370SBharat Gooty mmio_setbits_32(DRDU2_PHY_CTRL, DRDU2_U2SOFT_RST_N); 182*682fe370SBharat Gooty 183*682fe370SBharat Gooty mmio_clrsetbits_32(DRD2U3H_XHC_REGS_AXIWRA, 184*682fe370SBharat Gooty (USBAXIWR_UA_MASK | USBAXIWR_SA_MASK), 185*682fe370SBharat Gooty (USBAXIWR_UA_VAL | USBAXIWR_SA_VAL)); 186*682fe370SBharat Gooty 187*682fe370SBharat Gooty mmio_clrsetbits_32(DRD2U3H_XHC_REGS_AXIRDA, 188*682fe370SBharat Gooty (USBAXIRD_UA_MASK | USBAXIRD_SA_MASK), 189*682fe370SBharat Gooty (USBAXIRD_UA_VAL | USBAXIRD_SA_VAL)); 190*682fe370SBharat Gooty 191*682fe370SBharat Gooty mmio_clrsetbits_32(DRDU2D_BDC_REGS_AXIWRA, 192*682fe370SBharat Gooty (USBAXIWR_UA_MASK | USBAXIWR_SA_MASK), 193*682fe370SBharat Gooty (USBAXIWR_UA_VAL | USBAXIWR_SA_VAL)); 194*682fe370SBharat Gooty 195*682fe370SBharat Gooty mmio_clrsetbits_32(DRDU2D_BDC_REGS_AXIRDA, 196*682fe370SBharat Gooty (USBAXIRD_UA_MASK | USBAXIRD_SA_MASK), 197*682fe370SBharat Gooty (USBAXIRD_UA_VAL | USBAXIRD_SA_VAL)); 198*682fe370SBharat Gooty 199*682fe370SBharat Gooty } 200*682fe370SBharat Gooty 201*682fe370SBharat Gooty if (usb_func & USB3_DRD) { 202*682fe370SBharat Gooty mmio_setbits_32(DRDU3_SOFT_RESET_CTRL, 203*682fe370SBharat Gooty (DRDU3_XHC_AXI_SOFT_RST_N | 204*682fe370SBharat Gooty DRDU3_BDC_AXI_SOFT_RST_N)); 205*682fe370SBharat Gooty mmio_setbits_32(DRDU3_U3PHY_CTRL, 206*682fe370SBharat Gooty (DRDU3_U3XHC_SOFT_RST_N | 207*682fe370SBharat Gooty DRDU3_U3BDC_SOFT_RST_N)); 208*682fe370SBharat Gooty 209*682fe370SBharat Gooty mmio_clrsetbits_32(DRDU3H_XHC_REGS_AXIWRA, 210*682fe370SBharat Gooty (USBAXIWR_UA_MASK | USBAXIWR_SA_MASK), 211*682fe370SBharat Gooty (USBAXIWR_UA_VAL | USBAXIWR_SA_VAL)); 212*682fe370SBharat Gooty 213*682fe370SBharat Gooty mmio_clrsetbits_32(DRDU3H_XHC_REGS_AXIRDA, 214*682fe370SBharat Gooty (USBAXIRD_UA_MASK | USBAXIRD_SA_MASK), 215*682fe370SBharat Gooty (USBAXIRD_UA_VAL | USBAXIRD_SA_VAL)); 216*682fe370SBharat Gooty 217*682fe370SBharat Gooty mmio_clrsetbits_32(DRDU3D_BDC_REGS_AXIWRA, 218*682fe370SBharat Gooty (USBAXIWR_UA_MASK | USBAXIWR_SA_MASK), 219*682fe370SBharat Gooty (USBAXIWR_UA_VAL | USBAXIWR_SA_VAL)); 220*682fe370SBharat Gooty 221*682fe370SBharat Gooty mmio_clrsetbits_32(DRDU3D_BDC_REGS_AXIRDA, 222*682fe370SBharat Gooty (USBAXIRD_UA_MASK | USBAXIRD_SA_MASK), 223*682fe370SBharat Gooty (USBAXIRD_UA_VAL | USBAXIRD_SA_VAL)); 224*682fe370SBharat Gooty } 225*682fe370SBharat Gooty } 226*682fe370SBharat Gooty #endif 227*682fe370SBharat Gooty 228*682fe370SBharat Gooty void xhci_phy_init(void) 229*682fe370SBharat Gooty { 230*682fe370SBharat Gooty uint32_t val; 231*682fe370SBharat Gooty 232*682fe370SBharat Gooty INFO("usb init start\n"); 233*682fe370SBharat Gooty mmio_setbits_32(CDRU_MISC_CLK_ENABLE_CONTROL, 234*682fe370SBharat Gooty CDRU_MISC_CLK_USBSS); 235*682fe370SBharat Gooty 236*682fe370SBharat Gooty mmio_setbits_32(CDRU_MISC_RESET_CONTROL, CDRU_USBSS_RESET_N); 237*682fe370SBharat Gooty 238*682fe370SBharat Gooty if (usb_func & USB3_DRD) { 239*682fe370SBharat Gooty VERBOSE(" - configure stream_id = 0x6800 for DRDU3\n"); 240*682fe370SBharat Gooty val = SR_SID_VAL(0x3U, 0x1U, 0x0U) << ICFG_USB_SID_SHIFT; 241*682fe370SBharat Gooty mmio_write_32(ICFG_DRDU3_SID_CTRL + ICFG_USB_SID_AWADDR_OFFSET, 242*682fe370SBharat Gooty val); 243*682fe370SBharat Gooty mmio_write_32(ICFG_DRDU3_SID_CTRL + ICFG_USB_SID_ARADDR_OFFSET, 244*682fe370SBharat Gooty val); 245*682fe370SBharat Gooty 246*682fe370SBharat Gooty /* 247*682fe370SBharat Gooty * DRDU3 Device USB Space, DRDU3 Host USB Space, 248*682fe370SBharat Gooty * DRDU3 SS Config 249*682fe370SBharat Gooty */ 250*682fe370SBharat Gooty mmio_setbits_32(USBIC_GPV_SECURITY10, 251*682fe370SBharat Gooty USBIC_GPV_SECURITY10_FIELD); 252*682fe370SBharat Gooty } 253*682fe370SBharat Gooty 254*682fe370SBharat Gooty if (usb_func & USB3H_USB2DRD) { 255*682fe370SBharat Gooty VERBOSE(" - configure stream_id = 0x6801 for USB3H\n"); 256*682fe370SBharat Gooty val = SR_SID_VAL(0x3U, 0x1U, 0x1U) << ICFG_USB_SID_SHIFT; 257*682fe370SBharat Gooty mmio_write_32(ICFG_USB3H_SID_CTRL + ICFG_USB_SID_AWADDR_OFFSET, 258*682fe370SBharat Gooty val); 259*682fe370SBharat Gooty mmio_write_32(ICFG_USB3H_SID_CTRL + ICFG_USB_SID_ARADDR_OFFSET, 260*682fe370SBharat Gooty val); 261*682fe370SBharat Gooty 262*682fe370SBharat Gooty VERBOSE(" - configure stream_id = 0x6802 for DRDU2\n"); 263*682fe370SBharat Gooty val = SR_SID_VAL(0x3U, 0x1U, 0x2U) << ICFG_USB_SID_SHIFT; 264*682fe370SBharat Gooty mmio_write_32(ICFG_DRDU2_SID_CTRL + ICFG_USB_SID_AWADDR_OFFSET, 265*682fe370SBharat Gooty val); 266*682fe370SBharat Gooty mmio_write_32(ICFG_DRDU2_SID_CTRL + ICFG_USB_SID_ARADDR_OFFSET, 267*682fe370SBharat Gooty val); 268*682fe370SBharat Gooty 269*682fe370SBharat Gooty /* DRDU2 APB Bridge:DRDU2 USB Device, USB3H SS Config */ 270*682fe370SBharat Gooty mmio_setbits_32(USBIC_GPV_SECURITY1, USBIC_GPV_SECURITY1_FIELD); 271*682fe370SBharat Gooty 272*682fe370SBharat Gooty /* 273*682fe370SBharat Gooty * USB3H APB Bridge:DRDU2 Host + USB3 Host USB Space, 274*682fe370SBharat Gooty * USB3H SS Config 275*682fe370SBharat Gooty */ 276*682fe370SBharat Gooty mmio_setbits_32(USBIC_GPV_SECURITY2, USBIC_GPV_SECURITY2_FIELD); 277*682fe370SBharat Gooty } 278*682fe370SBharat Gooty 279*682fe370SBharat Gooty /* Configure Host masters as non-Secure */ 280*682fe370SBharat Gooty mmio_setbits_32(USBSS_TZPCDECPROT0set, USBSS_TZPCDECPROT0); 281*682fe370SBharat Gooty 282*682fe370SBharat Gooty /* CCN Slave on USBIC */ 283*682fe370SBharat Gooty mmio_setbits_32(USBIC_GPV_SECURITY0, USBIC_GPV_SECURITY0_FIELD); 284*682fe370SBharat Gooty 285*682fe370SBharat Gooty /* SLAVE_8:IDM Register Space */ 286*682fe370SBharat Gooty mmio_setbits_32(USBIC_GPV_SECURITY4, USBIC_GPV_SECURITY4_FIELD); 287*682fe370SBharat Gooty 288*682fe370SBharat Gooty usb3_phy_init(); 289*682fe370SBharat Gooty #ifdef USB_DMA_COHERENT 290*682fe370SBharat Gooty usb_enable_coherence(); 291*682fe370SBharat Gooty #endif 292*682fe370SBharat Gooty 293*682fe370SBharat Gooty usb_device_init(usb_func); 294*682fe370SBharat Gooty 295*682fe370SBharat Gooty INFO("PLAT USB: init done.\n"); 296*682fe370SBharat Gooty } 297