* [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx
@ 2025-08-26 0:11 Daniel Golle
2025-08-26 0:12 ` [PATCH net-next 1/6] MAINTAINERS: lantiq_gswip: broaden file pattern Daniel Golle
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Daniel Golle @ 2025-08-26 0:11 UTC (permalink / raw)
To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
linux-kernel, netdev
Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
Continue to prepare for supporting the newer standalone MaxLinear GSW1xx
switch family by extending the existing lantiq_gswip driver to allow it
to support MII interfaces and MDIO bus of the GSW1xx.
This series has been preceded by an RFC series which covers everything
needed to support the MaxLinear GSW1xx family of switches. Andrew Lunn
had suggested to split it into a couple of smaller series and start
with the changes which don't yet make actual functional changes or
support new features.
Everything has been compile and runtime tested on AVM Fritz!Box 7490
(GSWIP version 2.1, VR9 v1.2)
Link: https://lore.kernel.org/netdev/aKDhFCNwjDDwRKsI@pidgin.makrotopia.org/
Daniel Golle (6):
MAINTAINERS: lantiq_gswip: broaden file pattern
net: dsa: lantiq_gswip: support model-specific mac_select_pcs()
net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config()
net: dsa: lantiq_gswip: support offset of MII registers
net: dsa: lantiq_gswip: support standard MDIO node name
net: dsa: lantiq_gswip: move MDIO bus registration to .setup()
MAINTAINERS | 2 +-
drivers/net/dsa/lantiq_gswip.c | 54 ++++++++++++++++++++++++++--------
drivers/net/dsa/lantiq_gswip.h | 4 +++
3 files changed, 46 insertions(+), 14 deletions(-)
--
2.50.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH net-next 1/6] MAINTAINERS: lantiq_gswip: broaden file pattern
2025-08-26 0:11 [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
@ 2025-08-26 0:12 ` Daniel Golle
2025-08-26 1:36 ` Andrew Lunn
2025-08-26 0:12 ` [PATCH net-next 3/6] net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config() Daniel Golle
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Daniel Golle @ 2025-08-26 0:12 UTC (permalink / raw)
To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
linux-kernel, netdev
Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
Match all drivers/net/dsa/lantiq_gswip* instead of only lantiq_gswip.c.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index bce96dd254b8..aae3a261d7f1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -13801,7 +13801,7 @@ M: Hauke Mehrtens <hauke@hauke-m.de>
L: netdev@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
-F: drivers/net/dsa/lantiq_gswip.c
+F: drivers/net/dsa/lantiq_gswip*
F: drivers/net/dsa/lantiq_pce.h
F: drivers/net/ethernet/lantiq_xrx200.c
F: net/dsa/tag_gswip.c
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net-next 3/6] net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config()
2025-08-26 0:11 [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
2025-08-26 0:12 ` [PATCH net-next 1/6] MAINTAINERS: lantiq_gswip: broaden file pattern Daniel Golle
@ 2025-08-26 0:12 ` Daniel Golle
2025-08-26 0:12 ` [PATCH net-next 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs() Daniel Golle
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Daniel Golle @ 2025-08-26 0:12 UTC (permalink / raw)
To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
linux-kernel, netdev
Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
We can safely ignore SerDes interface modes 1000Base-X, 2500Base-X and
SGMII in phylink_mac_config() as they are being taken care of by the
PCS.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/dsa/lantiq_gswip.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 4822812bba27..7ffaa6481271 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -1444,6 +1444,10 @@ static void gswip_phylink_mac_config(struct phylink_config *config,
miicfg |= GSWIP_MII_CFG_LDCLKDIS;
switch (state->interface) {
+ case PHY_INTERFACE_MODE_SGMII:
+ case PHY_INTERFACE_MODE_1000BASEX:
+ case PHY_INTERFACE_MODE_2500BASEX:
+ return;
case PHY_INTERFACE_MODE_MII:
case PHY_INTERFACE_MODE_INTERNAL:
miicfg |= GSWIP_MII_CFG_MODE_MIIM;
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net-next 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs()
2025-08-26 0:11 [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
2025-08-26 0:12 ` [PATCH net-next 1/6] MAINTAINERS: lantiq_gswip: broaden file pattern Daniel Golle
2025-08-26 0:12 ` [PATCH net-next 3/6] net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config() Daniel Golle
@ 2025-08-26 0:12 ` Daniel Golle
2025-08-26 19:43 ` kernel test robot
2025-08-26 0:14 ` [PATCH net-next 4/6] net: dsa: lantiq_gswip: support offset of MII registers Daniel Golle
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Daniel Golle @ 2025-08-26 0:12 UTC (permalink / raw)
To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
linux-kernel, netdev
Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
Call mac_select_pcs() function if provided in struct gswip_hwinfo.
The MaxLinear GSW1xx series got one port wired to a SerDes PCS and
PHY which can do 1000Base-X, 2500Base-X and SGMII. Support for the
SerDes port will be provided using phylink_pcs, so provide a
convenient way for mac_select_pcs() to differ based on the hardware
model.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/dsa/lantiq_gswip.c | 21 +++++++++++++++++----
drivers/net/dsa/lantiq_gswip.h | 3 +++
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 67919c3935e4..4822812bba27 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -1592,10 +1592,23 @@ static int gswip_get_sset_count(struct dsa_switch *ds, int port, int sset)
return ARRAY_SIZE(gswip_rmon_cnt);
}
-static const struct phylink_mac_ops gswip_phylink_mac_ops = {
- .mac_config = gswip_phylink_mac_config,
- .mac_link_down = gswip_phylink_mac_link_down,
- .mac_link_up = gswip_phylink_mac_link_up,
+static struct phylink_pcs *gswip_phylink_mac_select_pcs(struct phylink_config *config,
+ phy_interface_t interface)
+{
+ struct dsa_port *dp = dsa_phylink_to_port(config);
+ struct gswip_priv *priv = dp->ds->priv;
+
+ if (priv->hw_info->mac_select_pcs)
+ return priv->hw_info->mac_select_pcs(config, interface);
+
+ return NULL;
+}
+
+const struct phylink_mac_ops gswip_phylink_mac_ops = {
+ .mac_config = gswip_phylink_mac_config,
+ .mac_link_down = gswip_phylink_mac_link_down,
+ .mac_link_up = gswip_phylink_mac_link_up,
+ .mac_select_pcs = gswip_phylink_mac_select_pcs,
};
static const struct dsa_switch_ops gswip_switch_ops = {
diff --git a/drivers/net/dsa/lantiq_gswip.h b/drivers/net/dsa/lantiq_gswip.h
index 620c2d560cbe..19bbe6fddf04 100644
--- a/drivers/net/dsa/lantiq_gswip.h
+++ b/drivers/net/dsa/lantiq_gswip.h
@@ -4,6 +4,7 @@
#include <linux/clk.h>
#include <linux/mutex.h>
+#include <linux/phylink.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/reset.h>
@@ -237,6 +238,8 @@ struct gswip_hw_info {
enum dsa_tag_protocol tag_protocol;
void (*phylink_get_caps)(struct dsa_switch *ds, int port,
struct phylink_config *config);
+ struct phylink_pcs *(*mac_select_pcs)(struct phylink_config *config,
+ phy_interface_t interface);
};
struct gswip_gphy_fw {
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net-next 4/6] net: dsa: lantiq_gswip: support offset of MII registers
2025-08-26 0:11 [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
` (2 preceding siblings ...)
2025-08-26 0:12 ` [PATCH net-next 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs() Daniel Golle
@ 2025-08-26 0:14 ` Daniel Golle
2025-08-26 0:14 ` [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name Daniel Golle
2025-08-26 0:14 ` [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup() Daniel Golle
5 siblings, 0 replies; 13+ messages in thread
From: Daniel Golle @ 2025-08-26 0:14 UTC (permalink / raw)
To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
linux-kernel, netdev
Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
The MaxLinear GSW1xx family got a single (R)(G)MII port at index 5 but
the registers MII_PCDU and MII_CFG are those of port 0.
Allow applying an offset for the port index to access those registers.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/dsa/lantiq_gswip.c | 12 ++++++++++--
drivers/net/dsa/lantiq_gswip.h | 1 +
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 7ffaa6481271..f9b03fb5f57b 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -183,21 +183,29 @@ static void gswip_mii_mask(struct gswip_priv *priv, u32 clear, u32 set,
static void gswip_mii_mask_cfg(struct gswip_priv *priv, u32 clear, u32 set,
int port)
{
+ int reg_port;
+
/* MII_CFG register only exists for MII ports */
if (!(priv->hw_info->mii_ports & BIT(port)))
return;
- gswip_mii_mask(priv, clear, set, GSWIP_MII_CFGp(port));
+ reg_port = port + priv->hw_info->mii_port_reg_offset;
+
+ gswip_mii_mask(priv, clear, set, GSWIP_MII_CFGp(reg_port));
}
static void gswip_mii_mask_pcdu(struct gswip_priv *priv, u32 clear, u32 set,
int port)
{
+ int reg_port;
+
/* MII_PCDU register only exists for MII ports */
if (!(priv->hw_info->mii_ports & BIT(port)))
return;
- switch (port) {
+ reg_port = port + priv->hw_info->mii_port_reg_offset;
+
+ switch (reg_port) {
case 0:
gswip_mii_mask(priv, clear, set, GSWIP_MII_PCDU0);
break;
diff --git a/drivers/net/dsa/lantiq_gswip.h b/drivers/net/dsa/lantiq_gswip.h
index 19bbe6fddf04..2df9c8e8cfd0 100644
--- a/drivers/net/dsa/lantiq_gswip.h
+++ b/drivers/net/dsa/lantiq_gswip.h
@@ -233,6 +233,7 @@ struct gswip_hw_info {
int max_ports;
unsigned int allowed_cpu_ports;
unsigned int mii_ports;
+ int mii_port_reg_offset;
const struct gswip_pce_microcode (*pce_microcode)[];
size_t pce_microcode_size;
enum dsa_tag_protocol tag_protocol;
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name
2025-08-26 0:11 [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
` (3 preceding siblings ...)
2025-08-26 0:14 ` [PATCH net-next 4/6] net: dsa: lantiq_gswip: support offset of MII registers Daniel Golle
@ 2025-08-26 0:14 ` Daniel Golle
2025-08-26 1:38 ` Andrew Lunn
2025-08-26 7:23 ` Sverdlin, Alexander
2025-08-26 0:14 ` [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup() Daniel Golle
5 siblings, 2 replies; 13+ messages in thread
From: Daniel Golle @ 2025-08-26 0:14 UTC (permalink / raw)
To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
linux-kernel, netdev
Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
Instead of matching against the child node's compatible string also
support locating the node of the device tree node of the MDIO bus
in the standard way by referencing the node name ("mdio").
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/dsa/lantiq_gswip.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index f9b03fb5f57b..23b68047f3c4 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -286,6 +286,9 @@ static int gswip_mdio(struct gswip_priv *priv)
int err = 0;
mdio_np = of_get_compatible_child(switch_np, "lantiq,xrx200-mdio");
+ if (!mdio_np)
+ mdio_np = of_get_child_by_name(switch_np, "mdio");
+
if (!of_device_is_available(mdio_np))
goto out_put_node;
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup()
2025-08-26 0:11 [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
` (4 preceding siblings ...)
2025-08-26 0:14 ` [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name Daniel Golle
@ 2025-08-26 0:14 ` Daniel Golle
2025-08-26 1:40 ` Andrew Lunn
2025-08-26 7:30 ` Sverdlin, Alexander
5 siblings, 2 replies; 13+ messages in thread
From: Daniel Golle @ 2025-08-26 0:14 UTC (permalink / raw)
To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Russell King,
linux-kernel, netdev
Cc: Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
Instead of registering the switch MDIO bus in the probe() function, move
the call to gswip_mdio() into the .setup() DSA switch op, so it can be
reused independently of the probe() function.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/dsa/lantiq_gswip.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
index 23b68047f3c4..9ec262ec3a11 100644
--- a/drivers/net/dsa/lantiq_gswip.c
+++ b/drivers/net/dsa/lantiq_gswip.c
@@ -627,6 +627,13 @@ static int gswip_setup(struct dsa_switch *ds)
/* Configure the MDIO Clock 2.5 MHz */
gswip_mdio_mask(priv, 0xff, 0x09, GSWIP_MDIO_MDC_CFG1);
+ /* bring up the mdio bus */
+ err = gswip_mdio(priv);
+ if (err) {
+ dev_err(priv->dev, "mdio bus setup failed\n");
+ return err;
+ }
+
/* Disable the xMII interface and clear it's isolation bit */
for (i = 0; i < priv->hw_info->max_ports; i++)
gswip_mii_mask_cfg(priv,
@@ -1973,13 +1980,6 @@ static int gswip_probe(struct platform_device *pdev)
"gphy fw probe failed\n");
}
- /* bring up the mdio bus */
- err = gswip_mdio(priv);
- if (err) {
- dev_err_probe(dev, err, "mdio probe failed\n");
- goto gphy_fw_remove;
- }
-
err = dsa_register_switch(priv->ds);
if (err) {
dev_err_probe(dev, err, "dsa switch registration failed\n");
--
2.50.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH net-next 1/6] MAINTAINERS: lantiq_gswip: broaden file pattern
2025-08-26 0:12 ` [PATCH net-next 1/6] MAINTAINERS: lantiq_gswip: broaden file pattern Daniel Golle
@ 2025-08-26 1:36 ` Andrew Lunn
0 siblings, 0 replies; 13+ messages in thread
From: Andrew Lunn @ 2025-08-26 1:36 UTC (permalink / raw)
To: Daniel Golle
Cc: Hauke Mehrtens, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Russell King, linux-kernel, netdev,
Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
On Tue, Aug 26, 2025 at 01:12:08AM +0100, Daniel Golle wrote:
> Match all drivers/net/dsa/lantiq_gswip* instead of only lantiq_gswip.c.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> MAINTAINERS | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index bce96dd254b8..aae3a261d7f1 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -13801,7 +13801,7 @@ M: Hauke Mehrtens <hauke@hauke-m.de>
> L: netdev@vger.kernel.org
> S: Maintained
> F: Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
> -F: drivers/net/dsa/lantiq_gswip.c
> +F: drivers/net/dsa/lantiq_gswip*
> F: drivers/net/dsa/lantiq_pce.h
I know there is another firmware blob coming soon. Does it make sense
to use just drivers/net/dsa/lantiq*
Or maybe even move the code into a subdirectory?
Andrew
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name
2025-08-26 0:14 ` [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name Daniel Golle
@ 2025-08-26 1:38 ` Andrew Lunn
2025-08-26 7:23 ` Sverdlin, Alexander
1 sibling, 0 replies; 13+ messages in thread
From: Andrew Lunn @ 2025-08-26 1:38 UTC (permalink / raw)
To: Daniel Golle
Cc: Hauke Mehrtens, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Russell King, linux-kernel, netdev,
Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
On Tue, Aug 26, 2025 at 01:14:30AM +0100, Daniel Golle wrote:
> Instead of matching against the child node's compatible string also
> support locating the node of the device tree node of the MDIO bus
> in the standard way by referencing the node name ("mdio").
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup()
2025-08-26 0:14 ` [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup() Daniel Golle
@ 2025-08-26 1:40 ` Andrew Lunn
2025-08-26 7:30 ` Sverdlin, Alexander
1 sibling, 0 replies; 13+ messages in thread
From: Andrew Lunn @ 2025-08-26 1:40 UTC (permalink / raw)
To: Daniel Golle
Cc: Hauke Mehrtens, Vladimir Oltean, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Russell King, linux-kernel, netdev,
Andreas Schirm, Lukas Stockmann, Alexander Sverdlin,
Peter Christen, Avinash Jayaraman, Bing tao Xu, Liang Xu,
Juraj Povazanec, Fanni (Fang-Yi) Chan, Benny (Ying-Tsan) Weng,
Livia M. Rosu, John Crispin
On Tue, Aug 26, 2025 at 01:14:41AM +0100, Daniel Golle wrote:
> Instead of registering the switch MDIO bus in the probe() function, move
> the call to gswip_mdio() into the .setup() DSA switch op, so it can be
> reused independently of the probe() function.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name
2025-08-26 0:14 ` [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name Daniel Golle
2025-08-26 1:38 ` Andrew Lunn
@ 2025-08-26 7:23 ` Sverdlin, Alexander
1 sibling, 0 replies; 13+ messages in thread
From: Sverdlin, Alexander @ 2025-08-26 7:23 UTC (permalink / raw)
To: hauke@hauke-m.de, olteanv@gmail.com, davem@davemloft.net,
andrew@lunn.ch, linux@armlinux.org.uk,
linux-kernel@vger.kernel.org, daniel@makrotopia.org,
kuba@kernel.org, pabeni@redhat.com, edumazet@google.com,
netdev@vger.kernel.org
Cc: john@phrozen.org, Stockmann, Lukas, yweng@maxlinear.com,
fchan@maxlinear.com, lxu@maxlinear.com, jpovazanec@maxlinear.com,
Schirm, Andreas, Christen, Peter, ajayaraman@maxlinear.com,
bxu@maxlinear.com, lrosu@maxlinear.com
Hi!
On Tue, 2025-08-26 at 01:14 +0100, Daniel Golle wrote:
> Instead of matching against the child node's compatible string also
> support locating the node of the device tree node of the MDIO bus
> in the standard way by referencing the node name ("mdio").
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@siemens.com>
> ---
> drivers/net/dsa/lantiq_gswip.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
> index f9b03fb5f57b..23b68047f3c4 100644
> --- a/drivers/net/dsa/lantiq_gswip.c
> +++ b/drivers/net/dsa/lantiq_gswip.c
> @@ -286,6 +286,9 @@ static int gswip_mdio(struct gswip_priv *priv)
> int err = 0;
>
> mdio_np = of_get_compatible_child(switch_np, "lantiq,xrx200-mdio");
> + if (!mdio_np)
> + mdio_np = of_get_child_by_name(switch_np, "mdio");
> +
> if (!of_device_is_available(mdio_np))
> goto out_put_node;
--
Alexander Sverdlin
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup()
2025-08-26 0:14 ` [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup() Daniel Golle
2025-08-26 1:40 ` Andrew Lunn
@ 2025-08-26 7:30 ` Sverdlin, Alexander
1 sibling, 0 replies; 13+ messages in thread
From: Sverdlin, Alexander @ 2025-08-26 7:30 UTC (permalink / raw)
To: hauke@hauke-m.de, olteanv@gmail.com, davem@davemloft.net,
andrew@lunn.ch, linux@armlinux.org.uk,
linux-kernel@vger.kernel.org, daniel@makrotopia.org,
kuba@kernel.org, pabeni@redhat.com, edumazet@google.com,
netdev@vger.kernel.org
Cc: john@phrozen.org, Stockmann, Lukas, yweng@maxlinear.com,
fchan@maxlinear.com, lxu@maxlinear.com, jpovazanec@maxlinear.com,
Schirm, Andreas, Christen, Peter, ajayaraman@maxlinear.com,
bxu@maxlinear.com, lrosu@maxlinear.com
Hi!
On Tue, 2025-08-26 at 01:14 +0100, Daniel Golle wrote:
> Instead of registering the switch MDIO bus in the probe() function, move
> the call to gswip_mdio() into the .setup() DSA switch op, so it can be
> reused independently of the probe() function.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
> drivers/net/dsa/lantiq_gswip.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/dsa/lantiq_gswip.c b/drivers/net/dsa/lantiq_gswip.c
> index 23b68047f3c4..9ec262ec3a11 100644
> --- a/drivers/net/dsa/lantiq_gswip.c
> +++ b/drivers/net/dsa/lantiq_gswip.c
> @@ -627,6 +627,13 @@ static int gswip_setup(struct dsa_switch *ds)
> /* Configure the MDIO Clock 2.5 MHz */
> gswip_mdio_mask(priv, 0xff, 0x09, GSWIP_MDIO_MDC_CFG1);
>
> + /* bring up the mdio bus */
> + err = gswip_mdio(priv);
> + if (err) {
> + dev_err(priv->dev, "mdio bus setup failed\n");
> + return err;
> + }
> +
> /* Disable the xMII interface and clear it's isolation bit */
> for (i = 0; i < priv->hw_info->max_ports; i++)
> gswip_mii_mask_cfg(priv,
> @@ -1973,13 +1980,6 @@ static int gswip_probe(struct platform_device *pdev)
> "gphy fw probe failed\n");
> }
>
> - /* bring up the mdio bus */
> - err = gswip_mdio(priv);
> - if (err) {
> - dev_err_probe(dev, err, "mdio probe failed\n");
> - goto gphy_fw_remove;
> - }
> -
> err = dsa_register_switch(priv->ds);
> if (err) {
> dev_err_probe(dev, err, "dsa switch registration failed\n");
Moving to .setup callback makes sense to me in general, but isn't a
.teardown callback necessary as well to de-register the bus?
Maybe the resource-managed devm_mdiobus_alloc() and devm_of_mdiobus_register()
have to be downgraded to their corresponding non-managed variants?
--
Alexander Sverdlin
Siemens AG
www.siemens.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH net-next 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs()
2025-08-26 0:12 ` [PATCH net-next 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs() Daniel Golle
@ 2025-08-26 19:43 ` kernel test robot
0 siblings, 0 replies; 13+ messages in thread
From: kernel test robot @ 2025-08-26 19:43 UTC (permalink / raw)
To: Daniel Golle, Hauke Mehrtens, Andrew Lunn, Vladimir Oltean,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Russell King, linux-kernel
Cc: oe-kbuild-all, netdev, Andreas Schirm, Lukas Stockmann,
Alexander Sverdlin, Peter Christen, Avinash Jayaraman,
Bing tao Xu, Liang Xu, Juraj Povazanec, Fanni (Fang-Yi) Chan,
Benny (Ying-Tsan) Weng, Livia M. Rosu, John Crispin
Hi Daniel,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Daniel-Golle/MAINTAINERS-lantiq_gswip-broaden-file-pattern/20250826-081728
base: net-next/main
patch link: https://lore.kernel.org/r/7576c237814016ee5e18572b2788f955071a922c.1756163848.git.daniel%40makrotopia.org
patch subject: [PATCH net-next 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs()
config: alpha-randconfig-r133-20250826 (https://download.01.org/0day-ci/archive/20250827/202508270335.PG3eJBYD-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 8.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250827/202508270335.PG3eJBYD-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202508270335.PG3eJBYD-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/dsa/lantiq_gswip.c:1607:30: sparse: sparse: symbol 'gswip_phylink_mac_ops' was not declared. Should it be static?
vim +/gswip_phylink_mac_ops +1607 drivers/net/dsa/lantiq_gswip.c
1606
> 1607 const struct phylink_mac_ops gswip_phylink_mac_ops = {
1608 .mac_config = gswip_phylink_mac_config,
1609 .mac_link_down = gswip_phylink_mac_link_down,
1610 .mac_link_up = gswip_phylink_mac_link_up,
1611 .mac_select_pcs = gswip_phylink_mac_select_pcs,
1612 };
1613
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2025-08-26 19:45 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26 0:11 [PATCH net-next 0/6] net: dsa: lantiq_gswip: prepare for supporting MaxLinear GSW1xx Daniel Golle
2025-08-26 0:12 ` [PATCH net-next 1/6] MAINTAINERS: lantiq_gswip: broaden file pattern Daniel Golle
2025-08-26 1:36 ` Andrew Lunn
2025-08-26 0:12 ` [PATCH net-next 3/6] net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config() Daniel Golle
2025-08-26 0:12 ` [PATCH net-next 2/6] net: dsa: lantiq_gswip: support model-specific mac_select_pcs() Daniel Golle
2025-08-26 19:43 ` kernel test robot
2025-08-26 0:14 ` [PATCH net-next 4/6] net: dsa: lantiq_gswip: support offset of MII registers Daniel Golle
2025-08-26 0:14 ` [PATCH net-next 5/6] net: dsa: lantiq_gswip: support standard MDIO node name Daniel Golle
2025-08-26 1:38 ` Andrew Lunn
2025-08-26 7:23 ` Sverdlin, Alexander
2025-08-26 0:14 ` [PATCH net-next 6/6] net: dsa: lantiq_gswip: move MDIO bus registration to .setup() Daniel Golle
2025-08-26 1:40 ` Andrew Lunn
2025-08-26 7:30 ` Sverdlin, Alexander
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).