The driver currently defaults to RGMII when the "phy-mode" property is missing from the device tree. This default is no longer valid for AST2700, which also supports RMII via FTGMAC100_QUIRK_RMII_ENABLE. Make "phy-mode" a required property for AST2700 and fail probe with an error message if it is not specified, instead of silently defaulting to RGMII. Reviewed-by: Andrew Lunn Signed-off-by: Jacky Chou --- drivers/net/ethernet/faraday/ftgmac100.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 9b7becb01726..5a578a62df67 100644 --- a/drivers/net/ethernet/faraday/ftgmac100.c +++ b/drivers/net/ethernet/faraday/ftgmac100.c @@ -1526,8 +1526,13 @@ static int ftgmac100_mii_probe(struct net_device *netdev) /* Default to RGMII. It's a gigabit part after all */ err = of_get_phy_mode(np, &phy_intf); - if (err) + if (err) { + if (priv->mac_id == FTGMAC100_AST2700) { + dev_err(priv->dev, "phy-mode is required for this SoC\n"); + return -EINVAL; + } phy_intf = PHY_INTERFACE_MODE_RGMII; + } /* Aspeed only supports these. I don't know about other IP * block vendors so I'm going to just let them through for -- 2.34.1