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@
-/* $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 <dlg@openbsd.org>
#include <dev/ofw/ofw_clock.h>
#include <dev/ofw/ofw_pinctrl.h>
#include <dev/ofw/ofw_regulator.h>
+#include <dev/ofw/ofw_misc.h>
#include <dev/ofw/fdt.h>
#include <dev/usb/usb.h>
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;