[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aUAuObAoaNVOTYdR@makrotopia.org>
Date: Mon, 15 Dec 2025 15:50:17 +0000
From: Daniel Golle <daniel@...rotopia.org>
To: "A. Sverdlin" <alexander.sverdlin@...mens.com>
Cc: netdev@...r.kernel.org, Hauke Mehrtens <hauke@...ke-m.de>,
Andrew Lunn <andrew@...n.ch>, Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: Support R(G)MII slew
rate configuration
Hi Alexander,
On Fri, Dec 12, 2025 at 09:45:53PM +0100, A. Sverdlin wrote:
> From: Alexander Sverdlin <alexander.sverdlin@...mens.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@...mens.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.
Powered by blists - more mailing lists