From 16424d9ad62bd577182e28192dbb4cf637d1244f Mon Sep 17 00:00:00 2001 From: Ruslan Bukin Date: Tue, 28 Feb 2017 14:42:57 +0000 Subject: [PATCH] Add compatible string. This restores USB attaching on SOCKIT board after reusing standard DTS files. Sponsored by: DARPA, AFRL --- sys/dev/usb/controller/dwc_otg_fdt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sys/dev/usb/controller/dwc_otg_fdt.c b/sys/dev/usb/controller/dwc_otg_fdt.c index 8cc8e754fab..3fc81969421 100644 --- a/sys/dev/usb/controller/dwc_otg_fdt.c +++ b/sys/dev/usb/controller/dwc_otg_fdt.c @@ -57,6 +57,12 @@ __FBSDID("$FreeBSD$"); static device_probe_t dwc_otg_probe; +static struct ofw_compat_data compat_data[] = { + { "synopsys,designware-hs-otg2", 1 }, + { "snps,dwc2", 1 }, + { NULL, 0 } +}; + static int dwc_otg_probe(device_t dev) { @@ -64,7 +70,7 @@ dwc_otg_probe(device_t dev) if (!ofw_bus_status_okay(dev)) return (ENXIO); - if (!ofw_bus_is_compatible(dev, "synopsys,designware-hs-otg2")) + if (!ofw_bus_search_compatible(dev, compat_data)->ocd_data) return (ENXIO); device_set_desc(dev, "DWC OTG 2.0 integrated USB controller");