From 89bd410ea5e1af0a609db59c1468f71c7ecb0dd1 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 23 Nov 2018 19:45:11 +0000 Subject: [PATCH] a10_ehci: Always set the phy to host mode MFC after: 1 month --- sys/arm/allwinner/a10_ehci.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/arm/allwinner/a10_ehci.c b/sys/arm/allwinner/a10_ehci.c index ea092cdc8fa5..d191e230cc27 100644 --- a/sys/arm/allwinner/a10_ehci.c +++ b/sys/arm/allwinner/a10_ehci.c @@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #define EHCI_HC_DEVSTR "Allwinner Integrated USB 2.0 controller" @@ -242,6 +242,11 @@ a10_ehci_attach(device_t self) /* Enable USB PHY */ if (phy_get_by_ofw_name(self, 0, "usb", &aw_sc->phy) == 0) { + err = phy_usb_set_mode(aw_sc->phy, PHY_USB_MODE_HOST); + if (err != 0) { + device_printf(self, "Could not set phy to host mode\n"); + goto error; + } err = phy_enable(aw_sc->phy); if (err != 0) { device_printf(self, "Could not enable phy\n");