net: stmmac: socfpga: add RMII phy mode
authorDinh Nguyen <dinguyen@kernel.org>
Mon, 3 Jun 2019 14:44:18 +0000 (09:44 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Jun 2019 18:57:20 +0000 (11:57 -0700)
Add option for enabling RMII phy mode.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Wei Liang Lim <wei.liang.lim@intel.com>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c

index d466e33635b0cadf19fe1e4bc56dc4ac152fe01b..75a6471db76ce742f926f0a9428e76e6808a914f 100644 (file)
@@ -251,6 +251,9 @@ static int socfpga_dwmac_set_phy_mode(struct socfpga_dwmac *dwmac)
        case PHY_INTERFACE_MODE_SGMII:
                val = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII;
                break;
+       case PHY_INTERFACE_MODE_RMII:
+               val = SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII;
+               break;
        default:
                dev_err(dwmac->dev, "bad phy mode %d\n", phymode);
                return -EINVAL;