Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Nov 2018 19:45:12 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340847 - head/sys/arm/allwinner
Message-ID:  <201811231945.wANJjCnh028558@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Fri Nov 23 19:45:11 2018
New Revision: 340847
URL: https://svnweb.freebsd.org/changeset/base/340847

Log:
  a10_ehci: Always set the phy to host mode
  
  MFC after:	1 month

Modified:
  head/sys/arm/allwinner/a10_ehci.c

Modified: head/sys/arm/allwinner/a10_ehci.c
==============================================================================
--- head/sys/arm/allwinner/a10_ehci.c	Fri Nov 23 19:44:26 2018	(r340846)
+++ head/sys/arm/allwinner/a10_ehci.c	Fri Nov 23 19:45:11 2018	(r340847)
@@ -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");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811231945.wANJjCnh028558>