a10_ehci: Always set the phy to host mode

MFC after:	1 month
This commit is contained in:
Emmanuel Vadot 2018-11-23 19:45:11 +00:00
parent 84ebe16ac6
commit 8e9e4ec6b6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=340847

View File

@ -63,7 +63,7 @@ __FBSDID("$FreeBSD$");
#include <arm/allwinner/aw_machdep.h>
#include <dev/extres/clk/clk.h>
#include <dev/extres/hwreset/hwreset.h>
#include <dev/extres/phy/phy.h>
#include <dev/extres/phy/phy_usb.h>
#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");