[PATCH net-next v2 4/6] net: ftgmac100: Require phy-mode for AST2700

From: Jacky Chou

Date: Tue Oct 06 2026 - 03:24:15 EST


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.

Signed-off-by: Jacky Chou <jacky_chou@xxxxxxxxxxxxxx>
---
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 b835472da360..2d029d1262e6 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1521,8 +1521,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