summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2023-03-06 15:53:51 +0100
committerStefano Babic <[email protected]>2023-03-30 13:47:04 +0200
commit4bdc3524d76eb9bc6e30b74f3dfe4a0ae5e5b1b6 (patch)
tree4726fa1c5d051817d3ad833e284d2e8c76e191f5 /drivers
parent80a34e4008f022a78409657d2b0a5020a472db2e (diff)
net: fec_mxc: Add board_interface_eth_init() for i.MX8M Mini/Nano/Plus
Implement common board_interface_eth_init() and call it from the FEC driver to configure IOMUXC GPR[1] register according to the PHY mode obtained from DT. This supports all three interface modes supported by the i.MX8M Mini/Nano/Plus FEC and supersedes the current board-side configuration of the same IOMUX GPR[1] duplicated in the board files. Signed-off-by: Marek Vasut <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/fec_mxc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 7a8577158ae..ac937676f9c 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1232,6 +1232,10 @@ static int fecmxc_probe(struct udevice *dev)
uint32_t start;
int ret;
+ ret = board_interface_eth_init(dev, pdata->phy_interface);
+ if (ret)
+ return ret;
+
if (IS_ENABLED(CONFIG_IMX_MODULE_FUSE)) {
if (enet_fused((ulong)priv->eth)) {
printf("SoC fuse indicates Ethernet@0x%lx is unavailable.\n", (ulong)priv->eth);