Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/usb/controller/dwc3.c
Show First 20 Lines • Show All 452 Lines • ▼ Show 20 Lines | #ifdef FDT | ||||
/* Get the phys */ | /* Get the phys */ | ||||
usb2_phy = usb3_phy = NULL; | usb2_phy = usb3_phy = NULL; | ||||
error = phy_get_by_ofw_name(dev, node, "usb2-phy", &usb2_phy); | error = phy_get_by_ofw_name(dev, node, "usb2-phy", &usb2_phy); | ||||
if (error == 0 && usb2_phy != NULL) | if (error == 0 && usb2_phy != NULL) | ||||
phy_enable(usb2_phy); | phy_enable(usb2_phy); | ||||
error = phy_get_by_ofw_name(dev, node, "usb3-phy", &usb3_phy); | error = phy_get_by_ofw_name(dev, node, "usb3-phy", &usb3_phy); | ||||
if (error == 0 && usb3_phy != NULL) | if (error == 0 && usb3_phy != NULL) | ||||
phy_enable(usb3_phy); | phy_enable(usb3_phy); | ||||
else { | if (sc->snpsversion == DWC3_IP_ID) { | ||||
if (sc->snpsrevision >= 0x290A) { | |||||
andrew: What revision is `0x290a`? | |||||
Done Inline ActionsIt's 0x290a :) manu: It's 0x290a :)
There is no other info that the revision field in the ID register. | |||||
uint32_t hwparams3; | |||||
hwparams3 = DWC3_READ(sc, DWC3_GHWPARAMS3); | |||||
if (DWC3_HWPARAMS3_SSPHY(hwparams3) == DWC3_HWPARAMS3_SSPHY_DISABLE) { | |||||
reg = DWC3_READ(sc, DWC3_GUCTL1); | reg = DWC3_READ(sc, DWC3_GUCTL1); | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(dev, "Forcing USB2 clock only\n"); | device_printf(dev, "Forcing USB2 clock only\n"); | ||||
reg |= DWC3_GUCTL1_DEV_FORCE_20_CLK_FOR_30_CLK; | reg |= DWC3_GUCTL1_DEV_FORCE_20_CLK_FOR_30_CLK; | ||||
DWC3_WRITE(sc, DWC3_GUCTL1, reg); | DWC3_WRITE(sc, DWC3_GUCTL1, reg); | ||||
} | |||||
} | |||||
} | } | ||||
snps_dwc3_configure_phy(sc, node); | snps_dwc3_configure_phy(sc, node); | ||||
skip_phys: | skip_phys: | ||||
#endif | #endif | ||||
snps_dwc3_reset(sc); | snps_dwc3_reset(sc); | ||||
snps_dwc3_configure_host(sc); | snps_dwc3_configure_host(sc); | ||||
snps_dwc3_do_quirks(sc); | snps_dwc3_do_quirks(sc); | ||||
▲ Show 20 Lines • Show All 120 Lines • Show Last 20 Lines |
What revision is 0x290a?