Read boolean Device Tree property "maxlinear,rmii-refclk-out" and switch the RMII reference clock to be a clock output rather than an input if it is set. Reviewed-by: Alexander Sverdlin Tested-by: Alexander Sverdlin Signed-off-by: Daniel Golle --- v4: set GSWIP_MII_CFG_RMII_CLK bit in RMII case inside the switch statement instead of a (wrong) if-clause just below drivers/net/dsa/lantiq/lantiq_gswip_common.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/dsa/lantiq/lantiq_gswip_common.c b/drivers/net/dsa/lantiq/lantiq_gswip_common.c index f6846060fa18..6a4a09ebdd33 100644 --- a/drivers/net/dsa/lantiq/lantiq_gswip_common.c +++ b/drivers/net/dsa/lantiq/lantiq_gswip_common.c @@ -1433,6 +1433,8 @@ static void gswip_phylink_mac_config(struct phylink_config *config, break; case PHY_INTERFACE_MODE_RMII: miicfg |= GSWIP_MII_CFG_MODE_RMIIM; + if (of_property_read_bool(dp->dn, "maxlinear,rmii-refclk-out")) + miicfg |= GSWIP_MII_CFG_RMII_CLK; break; case PHY_INTERFACE_MODE_RGMII: case PHY_INTERFACE_MODE_RGMII_ID: -- 2.51.1