From e2cf5b6596f18ac239f9d69e74c6ede3aa9df5cc Mon Sep 17 00:00:00 2001 From: dlg Date: Mon, 3 Apr 2023 01:57:41 +0000 Subject: [PATCH] try using a standard phy drivers registered with ofw/fdt first. this allows ehci to enable rkusbphy(4), which in means the port and port gets turned onto the port. tested on a radxa e25 and nanopi r5s without any usb or usb phy support in the boot loader. ok kettenis@ --- sys/dev/fdt/ehci_fdt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/fdt/ehci_fdt.c b/sys/dev/fdt/ehci_fdt.c index 60d433c3dbf..21bf20a9e25 100644 --- a/sys/dev/fdt/ehci_fdt.c +++ b/sys/dev/fdt/ehci_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci_fdt.c,v 1.9 2022/05/23 11:37:22 dlg Exp $ */ +/* $OpenBSD: ehci_fdt.c,v 1.10 2023/04/03 01:57:41 dlg Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -253,6 +254,9 @@ ehci_init_phys(struct ehci_fdt_softc *sc) uint32_t *phy; int len; + if (phy_enable(sc->sc_node, "usb") == 0) + return; + len = OF_getproplen(sc->sc_node, "phys"); if (len <= 0) return; -- 2.20.1