From 953b63135b62637cfd0b2d30fdcc0cb750699406 Mon Sep 17 00:00:00 2001 From: patrick Date: Tue, 29 Jun 2021 12:46:36 +0000 Subject: [PATCH] When configuring the USB3 phy, try the OFW PHY API first, and if there's no matching device, fall back to xhci(4)'s PHY configuration code. ok kettenis@ --- sys/dev/fdt/xhci_fdt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/fdt/xhci_fdt.c b/sys/dev/fdt/xhci_fdt.c index 38c976a6b24..fdf76b31439 100644 --- a/sys/dev/fdt/xhci_fdt.c +++ b/sys/dev/fdt/xhci_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xhci_fdt.c,v 1.16 2020/12/18 18:13:17 patrick Exp $ */ +/* $OpenBSD: xhci_fdt.c,v 1.17 2021/06/29 12:46:36 patrick Exp $ */ /* * Copyright (c) 2017 Mark Kettenis * @@ -265,6 +265,9 @@ xhci_init_phys(struct xhci_fdt_softc *sc) if (idx < 0) return; + if (phy_enable_idx(sc->sc_node, idx) != ENXIO) + return; + len = OF_getproplen(sc->sc_node, "phys"); if (len <= 0) return; -- 2.20.1