From: Alexander Sverdlin Add new maxlinear,mii-slew-rate-slow boolean property. This property is only applicable for ports in R(G)MII mode and allows for slew rate reduction in comparison to "normal" default configuration with the purpose to reduce radiated emissions. Signed-off-by: Alexander Sverdlin --- Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml index 205b683849a53..6cd5c6152c9e9 100644 --- a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml +++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml @@ -106,6 +106,11 @@ patternProperties: unevaluatedProperties: false properties: + maxlinear,mii-slew-rate-slow: + type: boolean + description: + Configure R(G)MII TXD/TXC pads' slew rate to "slow" instead + of "normal" to reduce radiated emissions. maxlinear,rmii-refclk-out: type: boolean description: -- 2.52.0 From: Alexander Sverdlin Support newly introduced maxlinear,mii-slew-rate-slow device tree property to configure R(G)MII interface pins slew rate into "slow" mode. It might be used to reduce the radiated emissions. Signed-off-by: Alexander Sverdlin --- drivers/net/dsa/lantiq/mxl-gsw1xx.c | 6 ++++++ drivers/net/dsa/lantiq/mxl-gsw1xx.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/net/dsa/lantiq/mxl-gsw1xx.c b/drivers/net/dsa/lantiq/mxl-gsw1xx.c index 0816c61a47f12..ec7b92f62dcb5 100644 --- a/drivers/net/dsa/lantiq/mxl-gsw1xx.c +++ b/drivers/net/dsa/lantiq/mxl-gsw1xx.c @@ -526,6 +526,12 @@ static struct phylink_pcs *gsw1xx_phylink_mac_select_pcs(struct phylink_config * switch (dp->index) { case GSW1XX_SGMII_PORT: return &gsw1xx_priv->pcs; + case GSW1XX_MII_PORT: + if (of_property_read_bool(dp->dn, "maxlinear,mii-slew-rate-slow")) + regmap_set_bits(gsw1xx_priv->shell, + RGMII_SLEW_CFG_DRV_TXD | RGMII_SLEW_CFG_DRV_TXC, + GSW1XX_SHELL_RGMII_SLEW_CFG); + return NULL; default: return NULL; } diff --git a/drivers/net/dsa/lantiq/mxl-gsw1xx.h b/drivers/net/dsa/lantiq/mxl-gsw1xx.h index 38e03c048a26c..8c0298b2b7663 100644 --- a/drivers/net/dsa/lantiq/mxl-gsw1xx.h +++ b/drivers/net/dsa/lantiq/mxl-gsw1xx.h @@ -110,6 +110,8 @@ #define GSW1XX_RST_REQ_SGMII_SHELL BIT(5) /* RGMII PAD Slew Control Register */ #define GSW1XX_SHELL_RGMII_SLEW_CFG 0x78 +#define RGMII_SLEW_CFG_DRV_TXC BIT(2) +#define RGMII_SLEW_CFG_DRV_TXD BIT(3) #define RGMII_SLEW_CFG_RX_2_5_V BIT(4) #define RGMII_SLEW_CFG_TX_2_5_V BIT(5) -- 2.52.0