diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-11-05 09:36:31 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2021-11-05 09:36:31 +0000 |
commit | 614fbe2d22b8dcd02a1fda7b7a7cdc1081be190c (patch) | |
tree | 9f6350b7396031a0eb7015a4e1cd7c7dffec058d /sys/dev/fdt | |
parent | f68f7011041145b0f143c8ea454e76595c4242f3 (diff) |
Newer i.MX device trees retriee the USB phy using the more generic property
name "phys". To handle those, make sure that we look it up and in case it's
not there fall back to "fsl,usbphy".
ok kettenis@
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r-- | sys/dev/fdt/imxehci.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/fdt/imxehci.c b/sys/dev/fdt/imxehci.c index 81e149a54b6..9328fb9a671 100644 --- a/sys/dev/fdt/imxehci.c +++ b/sys/dev/fdt/imxehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxehci.c,v 1.4 2020/04/27 20:15:41 patrick Exp $ */ +/* $OpenBSD: imxehci.c,v 1.5 2021/11/05 09:36:30 patrick Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt <patrick@blueri.se> * @@ -130,9 +130,12 @@ imxehci_attach(struct device *parent, struct device *self, void *aux) if (faa->fa_nreg < 1) return; - if (OF_getpropintarray(faa->fa_node, "fsl,usbphy", - phy, sizeof(phy)) != sizeof(phy)) - return; + if (OF_getpropintarray(faa->fa_node, "phys", + phy, sizeof(phy)) != sizeof(phy)) { + if (OF_getpropintarray(faa->fa_node, "fsl,usbphy", + phy, sizeof(phy)) != sizeof(phy)) + return; + } if (OF_getpropintarray(faa->fa_node, "fsl,usbmisc", misc, sizeof(misc)) != sizeof(misc)) |