Exemplo n.º 1
0
void usb20otg_hw_init(void)
{
#ifndef CONFIG_USB20_HOST
    // close USB 2.0 HOST phy and clock
    unsigned int * otg_phy_con1 = (unsigned int*)(USBGRF_UOC1_CON5);
    *otg_phy_con1 = 0x1D5 |(0x1ff<<16);   // enter suspend.
#endif
    // usb phy config init
    *(unsigned int *)(USBGRF_UOC0_CON0) = 0xe7e7a350;

    // other hardware init
#ifdef CONFIG_RK_CONFIG
    otg_drv_init(0);
#else
    #if defined(CONFIG_MACH_RK2926_V86)
    #else
    rk30_mux_api_set(GPIO3C1_OTG_DRVVBUS_NAME, GPIO3C_OTG_DRVVBUS);  
    #endif  
#endif
}
Exemplo n.º 2
0
void usb20otg_hw_init(void)
{
#ifndef CONFIG_USB20_HOST
    // close USB 2.0 HOST phy and clock
    unsigned int * otg_phy_con1 = (unsigned int*)(USBGRF_UOC1_CON1);
    *otg_phy_con1 = 0x1D5 |(0x1ff<<16);   // enter suspend.
#endif

    // usb phy config init
    pGRF_USBPHY_REG GRF_USBPHY0 = (pGRF_USBPHY_REG)GRF_USBPHY0_CON_BASE;
    GRF_USBPHY0->CON0 = 0x00070007;//open pre-emphasize for otg

    // other hardware init
#ifdef CONFIG_RK_CONFIG
    otg_drv_init(0);
#else
#if(defined (CONFIG_MACH_RK3026_86V) ||defined (CONFIG_MACH_RK3026_86V_FAC))

#else
    iomux_set(OTG_DRV_VBUS);
#endif
#endif
}