arm64: imx8mp: Auto-detect PHY on i.MX8MP DHCOM
authorMarek Vasut <marex@denx.de>
Sat, 11 Feb 2023 22:10:50 +0000 (23:10 +0100)
committerStefano Babic <sbabic@denx.de>
Thu, 30 Mar 2023 06:40:27 +0000 (08:40 +0200)
commitef7ceb3ec7bd133b0ea5ba36ef66c8f201dffb4d
treeb43fea50c820e7df1db9e044243e5226f11727d1
parentf8e413208fcf972d546f9f27ae756e1430279862
arm64: imx8mp: Auto-detect PHY on i.MX8MP DHCOM

The i.MX8MP DHCOM SoM may be populated with either KSZ9131RNXI RGMII PHY
or LAN8740Ai RMII PHY attached to EQoS MAC, and either external RGMII PHY
or LAN8740Ai RMII PHY attached to FEC MAC. The SoM configuration can be
detected for each MAC by reading RX_CTL pull resistor state early on boot.
Make use of this, detect the exact PHY configuration, and patch control DT
accordingly so that the ethernet is configured correctly in U-Boot.

Signed-off-by: Marek Vasut <marex@denx.de>
board/dhelectronics/dh_imx8mp/imx8mp_dhcom_pdk2.c