usb: dwc3: Look up reference clock DT phandle in both controller DT nodes
authorMarek Vasut <marex@denx.de>
Mon, 20 Feb 2023 05:50:25 +0000 (14:50 +0900)
committerMarek Vasut <marex@denx.de>
Wed, 22 Feb 2023 18:40:11 +0000 (19:40 +0100)
commitc6583354b7c1aaa9608b2f92221608e42c21f1dd
tree890c12faab76d74234ba3fb6e9245ab0a924fedb
parent2bfd217a16978794b43f0a30111b7472fba232b6
usb: dwc3: Look up reference clock DT phandle in both controller DT nodes

There are currently four disparate placement possibilities of DWC3
reference clock phandle in SoC DTs:
- in top level glue node, with generic subnode without clock (ZynqMP)
- in top level generic node, with no subnode (i.MX8MQ)
- in generic subnode, with other clock in top level node (i.MX8MP)
- in both top level node and generic subnode (Rockchip)

Cover all the possibilities here by looking into both nodes, start
with the top level node as that seems to be used in majority of DTs
to reference the clock.

Signed-off-by: Marek Vasut <marex@denx.de>
Acked-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
drivers/usb/dwc3/dwc3-generic.c