* [PATCH net-next 0/2] dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration
@ 2025-12-12 20:45 A. Sverdlin
2025-12-12 20:45 ` [PATCH net-next 1/2] dt-bindings: net: dsa: lantiq,gswip: add MaxLinear R(G)MII slew rate A. Sverdlin
2025-12-12 20:45 ` [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
0 siblings, 2 replies; 5+ messages in thread
From: A. Sverdlin @ 2025-12-12 20:45 UTC (permalink / raw)
To: netdev
Cc: Alexander Sverdlin, Hauke Mehrtens, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-kernel, Daniel Golle
From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
Maxlinear GSW1xx switches offer slew rate configuration bits for R(G)MII
interface. The default state of the configuration bits is "normal", while
"slow" can be used to reduce the radiated emissions. Add the support for
the latter option into the driver as well as the new DT bindings.
Alexander Sverdlin (2):
dt-bindings: net: dsa: lantiq,gswip: add MaxLinear R(G)MII slew rate
net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration
Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml | 5 +++++
drivers/net/dsa/lantiq/mxl-gsw1xx.c | 6 ++++++
drivers/net/dsa/lantiq/mxl-gsw1xx.h | 2 ++
3 files changed, 13 insertions(+)
--
2.52.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/2] dt-bindings: net: dsa: lantiq,gswip: add MaxLinear R(G)MII slew rate
2025-12-12 20:45 [PATCH net-next 0/2] dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
@ 2025-12-12 20:45 ` A. Sverdlin
2025-12-12 20:45 ` [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
1 sibling, 0 replies; 5+ messages in thread
From: A. Sverdlin @ 2025-12-12 20:45 UTC (permalink / raw)
To: netdev
Cc: Alexander Sverdlin, Hauke Mehrtens, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-kernel, Daniel Golle
From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
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 <alexander.sverdlin@siemens.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration
2025-12-12 20:45 [PATCH net-next 0/2] dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
2025-12-12 20:45 ` [PATCH net-next 1/2] dt-bindings: net: dsa: lantiq,gswip: add MaxLinear R(G)MII slew rate A. Sverdlin
@ 2025-12-12 20:45 ` A. Sverdlin
2025-12-12 20:53 ` Andrew Lunn
2025-12-15 15:50 ` Daniel Golle
1 sibling, 2 replies; 5+ messages in thread
From: A. Sverdlin @ 2025-12-12 20:45 UTC (permalink / raw)
To: netdev
Cc: Alexander Sverdlin, Hauke Mehrtens, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-kernel, Daniel Golle
From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
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 <alexander.sverdlin@siemens.com>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration
2025-12-12 20:45 ` [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
@ 2025-12-12 20:53 ` Andrew Lunn
2025-12-15 15:50 ` Daniel Golle
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2025-12-12 20:53 UTC (permalink / raw)
To: A. Sverdlin
Cc: netdev, Hauke Mehrtens, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, devicetree, linux-kernel,
Daniel Golle
> + 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);
The binding says:
+ Configure R(G)MII TXD/TXC pads' slew rate to "slow" instead
+ of "normal" to reduce radiated emissions.
So you really should set the slew to normal if the property does not
exist.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration
2025-12-12 20:45 ` [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
2025-12-12 20:53 ` Andrew Lunn
@ 2025-12-15 15:50 ` Daniel Golle
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Golle @ 2025-12-15 15:50 UTC (permalink / raw)
To: A. Sverdlin
Cc: netdev, Hauke Mehrtens, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
linux-kernel
Hi Alexander,
On Fri, Dec 12, 2025 at 09:45:53PM +0100, A. Sverdlin wrote:
> From: Alexander Sverdlin <alexander.sverdlin@siemens.com>
>
> 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 <alexander.sverdlin@siemens.com>
> ---
> 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;
Please apply this setting once in the probe function before calling
gswip_probe_common(). You will have to traverse the device tree to
the node of the port, but imho this is still better because there is
no need to apply it every time mac_select_pcs() is called. And while
it is not strictly speaking wrong to do it there, in my understanding
the purpose of .mac_select_pcs is to return the PCS and maybe setup
muxes, but not to apply low-level settings.
Apart from that, please program the register also in the 'else' case.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-12-15 15:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-12 20:45 [PATCH net-next 0/2] dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
2025-12-12 20:45 ` [PATCH net-next 1/2] dt-bindings: net: dsa: lantiq,gswip: add MaxLinear R(G)MII slew rate A. Sverdlin
2025-12-12 20:45 ` [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew rate configuration A. Sverdlin
2025-12-12 20:53 ` Andrew Lunn
2025-12-15 15:50 ` Daniel Golle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.