* [PATCH net-next v2 0/2] net: stmmac: add SL2610 ethernet support
@ 2026-11-30 16:56 Jisheng Zhang
2026-11-30 16:56 ` [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
2026-11-30 16:56 ` [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
0 siblings, 2 replies; 8+ messages in thread
From: Jisheng Zhang @ 2026-11-30 16:56 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Sebastian Hesselbarth,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue
Cc: netdev, devicetree, linux-kernel, linux-arm-kernel
This series add SL2610 ethernet support.
since v1:
- switch to one MDIO bus solution instead of MDIO demultiplexer
- remove patches to add eth nodes to dtsi and enable eth for rdk. They
will be send separately
- add constraints for interrupts, clocks, resets and so on
- update dt-bindings example
- use .set_phy_intf_sel()
- use PHY_INTF_SEL_RGMII and PHY_INTF_SEL_RMII
A consolidated MAINTAINERS update will follow once the subsystem series
have merged, avoiding overlapping changes to the Synaptics entry.
Jisheng Zhang (2):
dt-bindings: net: Add Synaptics SL2610 DWMAC
net: stmmac: Add glue layer for Synaptics SL2610 SoC
.../devicetree/bindings/net/snps,dwmac.yaml | 1 +
.../bindings/net/syna,sl2610-dwmac.yaml | 128 ++++++++++++++++
drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 ++
drivers/net/ethernet/stmicro/stmmac/Makefile | 1 +
.../net/ethernet/stmicro/stmmac/dwmac-syna.c | 141 ++++++++++++++++++
5 files changed, 282 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
--
2.55.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC
2026-11-30 16:56 [PATCH net-next v2 0/2] net: stmmac: add SL2610 ethernet support Jisheng Zhang
@ 2026-11-30 16:56 ` Jisheng Zhang
2026-11-30 20:11 ` Rob Herring (Arm)
2026-12-01 18:07 ` netdev-bot+sashiko
2026-11-30 16:56 ` [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
1 sibling, 2 replies; 8+ messages in thread
From: Jisheng Zhang @ 2026-11-30 16:56 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Sebastian Hesselbarth,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue
Cc: netdev, devicetree, linux-kernel, linux-arm-kernel
Describe the Synaptics SL2610 integration of DWMAC 5.20. The PHY
interface mode and the routing of the shared MDC/MDIO signals are
controlled through system-controller registers.
Add the compatible to the common DWMAC schema and show a PHY connected
to MAC1's MDIO bus in the example.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
.../devicetree/bindings/net/snps,dwmac.yaml | 1 +
.../bindings/net/syna,sl2610-dwmac.yaml | 128 ++++++++++++++++++
2 files changed, 129 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 2c4842404bf6..267340a5f45c 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -119,6 +119,7 @@ properties:
- sophgo,sg2044-dwmac
- starfive,jh7100-dwmac
- starfive,jh7110-dwmac
+ - syna,sl2610-dwmac
- tesla,fsd-ethqos
- thead,th1520-gmac
- ultrarisc,dp1000-gmac
diff --git a/Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml b/Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
new file mode 100644
index 000000000000..eaa8b86dd358
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
@@ -0,0 +1,128 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/syna,sl2610-dwmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Synaptics SL2610 DesignWare Ethernet MAC
+
+maintainers:
+ - Jisheng Zhang <jszhang@kernel.org>
+
+description: |
+ The Ethernet controllers share one external MDC/MDIO interface. Only
+ one controller may contain an enabled MDIO child node, describing all
+ devices on the shared bus. Other controllers reference those devices
+ through phy-handle and omit or disable their MDIO child nodes.
+
+select:
+ properties:
+ compatible:
+ contains:
+ const: syna,sl2610-dwmac
+ required:
+ - compatible
+
+allOf:
+ - $ref: snps,dwmac.yaml#
+
+properties:
+ compatible:
+ items:
+ - const: syna,sl2610-dwmac
+ - const: snps,dwmac-5.20
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ interrupt-names:
+ const: macirq
+
+ clocks:
+ items:
+ - description: MAC clock
+ - description: Peripheral register interface clock
+ - description: PTP reference clock
+
+ clock-names:
+ items:
+ - const: stmmaceth
+ - const: pclk
+ - const: ptp_ref
+
+ resets:
+ maxItems: 1
+
+ reset-names:
+ const: stmmaceth
+
+ power-domains:
+ maxItems: 1
+
+ syna,syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: Phandle to the SL2610 system controller.
+ - description: Offset of the Ethernet interface control register.
+ enum: [0xa18, 0xa3c]
+ description:
+ Phandle and register offset used to configure the Ethernet PHY
+ interface mode.
+
+ phy-mode:
+ enum:
+ - rmii
+ - rgmii
+ - rgmii-id
+ - rgmii-rxid
+ - rgmii-txid
+
+required:
+ - compatible
+ - clocks
+ - clock-names
+ - syna,syscon
+ - phy-mode
+
+dependencies:
+ resets: [reset-names]
+ reset-names: [resets]
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/syna,sl2610.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/reset/syna,sl2610-reset.h>
+
+ ethernet@f7a06000 {
+ compatible = "syna,sl2610-dwmac", "snps,dwmac-5.20";
+ reg = <0xf7a06000 0x2000>;
+ interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq";
+ clocks = <&clk CLK_GETHRGMII1>, <&clk CLK_GETHRGMII1SYS>,
+ <&clk CLK_GE1_PTP_REF>;
+ clock-names = "stmmaceth", "pclk", "ptp_ref";
+ resets = <&rst RST_SOC_GETH1>;
+ reset-names = "stmmaceth";
+ phy-mode = "rgmii-id";
+ syna,syscon = <&chip 0xa3c>;
+ phy-handle = <&phy1>;
+
+ mdio {
+ compatible = "snps,dwmac-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ phy1: ethernet-phy@2 {
+ reg = <2>;
+ };
+ };
+ };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 84cb98ef4c49..0b3f0d63216f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3807,6 +3807,7 @@ M: Jisheng Zhang <jszhang@kernel.org>
M: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
S: Maintained
+F: Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
F: arch/arm/boot/dts/synaptics/
F: arch/arm/mach-berlin/
F: arch/arm64/boot/dts/synaptics/
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
2026-11-30 16:56 [PATCH net-next v2 0/2] net: stmmac: add SL2610 ethernet support Jisheng Zhang
2026-11-30 16:56 ` [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
@ 2026-11-30 16:56 ` Jisheng Zhang
2026-11-30 19:52 ` Andrew Lunn
2026-12-01 18:07 ` netdev-bot+sashiko
1 sibling, 2 replies; 8+ messages in thread
From: Jisheng Zhang @ 2026-11-30 16:56 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit, Russell King, David S . Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Sebastian Hesselbarth,
Maxime Chevallier, Maxime Coquelin, Alexandre Torgue
Cc: netdev, devicetree, linux-kernel, linux-arm-kernel
Add dwmac glue driver to support the DesignWare-based GMAC controllers
in the Synaptics SL2610 SoC.
Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
---
drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 ++
drivers/net/ethernet/stmicro/stmmac/Makefile | 1 +
.../net/ethernet/stmicro/stmmac/dwmac-syna.c | 141 ++++++++++++++++++
3 files changed, 153 insertions(+)
create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
diff --git a/MAINTAINERS b/MAINTAINERS
index 0b3f0d63216f..0c7988546e57 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3811,6 +3811,7 @@ F: Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
F: arch/arm/boot/dts/synaptics/
F: arch/arm/mach-berlin/
F: arch/arm64/boot/dts/synaptics/
+F: drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
ARM/TEGRA HDMI CEC SUBSYSTEM SUPPORT
M: Hans Verkuil <hverkuil@kernel.org>
diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
index c6559e749c0c..79ffebcaba0e 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
+++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
@@ -310,6 +310,17 @@ config DWMAC_SUN55I
stmmac device driver. This driver is used for A523/T527
GMAC200 ethernet controller.
+config DWMAC_SYNA
+ tristate "Synaptics SL2610 DWMAC support"
+ depends on OF && HAS_DMA && (ARCH_BERLIN || COMPILE_TEST)
+ select MFD_SYSCON
+ help
+ Support for the Synaptics SL2610 DesignWare Ethernet MAC glue.
+ This configures the PHY interface through the system controller.
+
+ To compile this driver as a module, choose M here. The module
+ will be called dwmac-syna.
+
config DWMAC_THEAD
tristate "T-HEAD dwmac support"
depends on OF && (ARCH_THEAD || COMPILE_TEST)
diff --git a/drivers/net/ethernet/stmicro/stmmac/Makefile b/drivers/net/ethernet/stmicro/stmmac/Makefile
index b16a456b730e..d132353e9403 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Makefile
+++ b/drivers/net/ethernet/stmicro/stmmac/Makefile
@@ -35,6 +35,7 @@ obj-$(CONFIG_DWMAC_STM32) += dwmac-stm32.o
obj-$(CONFIG_DWMAC_SUNXI) += dwmac-sunxi.o
obj-$(CONFIG_DWMAC_SUN8I) += dwmac-sun8i.o
obj-$(CONFIG_DWMAC_SUN55I) += dwmac-sun55i.o
+obj-$(CONFIG_DWMAC_SYNA) += dwmac-syna.o
obj-$(CONFIG_DWMAC_THEAD) += dwmac-thead.o
obj-$(CONFIG_DWMAC_ULTRARISC) += dwmac-ultrarisc.o
obj-$(CONFIG_DWMAC_DWC_QOS_ETH) += dwmac-dwc-qos-eth.o
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
new file mode 100644
index 000000000000..0bc440606584
--- /dev/null
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
@@ -0,0 +1,141 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Synaptics DWMAC platform driver
+ *
+ * Copyright (C) 2026 Synaptics Incorporated
+ * Author: Jisheng Zhang <jszhang@kernel.org>
+ *
+ */
+
+#include <linux/bitfield.h>
+#include <linux/module.h>
+#include <linux/mfd/syscon.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/of_net.h>
+#include <linux/platform_device.h>
+#include <linux/regmap.h>
+
+#include "stmmac_platform.h"
+
+#define CTL_PHY_INTF_SEL GENMASK(4, 1)
+#define CTL_PHY_INTF_RGMII FIELD_PREP(CTL_PHY_INTF_SEL, PHY_INTF_SEL_RGMII)
+#define CTL_PHY_INTF_RMII FIELD_PREP(CTL_PHY_INTF_SEL, PHY_INTF_SEL_RMII)
+
+#define SYNA_RGMII0_CTRL 0xa18
+#define SYNA_RGMII1_CTRL 0xa3c
+#define SYNA_TW_PORT_CTRL 0xa04
+#define SYNA_MDIO_MASTER_SEL BIT(4)
+
+struct syna_dwmac {
+ struct plat_stmmacenet_data *plat;
+ struct regmap *regmap;
+ u32 rgmii_ctl;
+ struct device *dev;
+};
+
+static int syna_dwmac_set_phy_intf_sel(void *bsp_priv, u8 phy_intf_sel)
+{
+ struct syna_dwmac *dwmac = bsp_priv;
+ u32 phyif;
+
+ switch (phy_intf_sel) {
+ case PHY_INTF_SEL_RMII:
+ phyif = CTL_PHY_INTF_RMII;
+ break;
+ case PHY_INTF_SEL_RGMII:
+ phyif = CTL_PHY_INTF_RGMII;
+ break;
+ default:
+ dev_err(dwmac->dev, "unsupported phy interface %s\n",
+ phy_modes(phy_intf_sel));
+ return -EINVAL;
+ }
+
+ return regmap_update_bits(dwmac->regmap, dwmac->rgmii_ctl, CTL_PHY_INTF_SEL, phyif);
+}
+
+static int syna_dwmac_init(struct device *dev, void *priv)
+{
+ struct syna_dwmac *dwmac = priv;
+ u32 mdio_sel;
+
+ /* Only the MAC providing the shared MDIO bus selects its master. */
+ if (!dwmac->plat->mdio_node ||
+ !of_device_is_available(dwmac->plat->mdio_node))
+ return 0;
+
+ /* Interface-control offsets identify the hardware MAC, unlike aliases. */
+ switch (dwmac->rgmii_ctl) {
+ case SYNA_RGMII0_CTRL:
+ mdio_sel = 0;
+ break;
+ case SYNA_RGMII1_CTRL:
+ mdio_sel = SYNA_MDIO_MASTER_SEL;
+ break;
+ default:
+ return dev_err_probe(dev, -EINVAL,
+ "Unknown Ethernet interface register %#x\n",
+ dwmac->rgmii_ctl);
+ }
+
+ return regmap_update_bits(dwmac->regmap, SYNA_TW_PORT_CTRL,
+ SYNA_MDIO_MASTER_SEL, mdio_sel);
+}
+
+static int syna_dwmac_probe(struct platform_device *pdev)
+{
+ struct stmmac_resources stmmac_res;
+ struct plat_stmmacenet_data *plat;
+ struct syna_dwmac *dwmac;
+ int ret;
+
+ ret = stmmac_get_platform_resources(pdev, &stmmac_res);
+ if (ret)
+ return dev_err_probe(&pdev->dev, ret,
+ "failed to get resources\n");
+
+ plat = devm_stmmac_probe_config_dt(pdev, stmmac_res.mac);
+ if (IS_ERR(plat))
+ return dev_err_probe(&pdev->dev, PTR_ERR(plat),
+ "dt configuration failed\n");
+
+ dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL);
+ if (!dwmac)
+ return -ENOMEM;
+
+ dwmac->regmap = syscon_regmap_lookup_by_phandle_args(pdev->dev.of_node,
+ "syna,syscon", 1,
+ &dwmac->rgmii_ctl);
+ if (IS_ERR(dwmac->regmap))
+ return dev_err_probe(&pdev->dev, PTR_ERR(dwmac->regmap),
+ "Failed to get syscon regmap\n");
+
+ dwmac->dev = &pdev->dev;
+ dwmac->plat = plat;
+ plat->bsp_priv = dwmac;
+ plat->init = syna_dwmac_init;
+ plat->set_phy_intf_sel = syna_dwmac_set_phy_intf_sel;
+
+ return devm_stmmac_pltfr_probe(pdev, plat, &stmmac_res);
+}
+
+static const struct of_device_id syna_dwmac_match[] = {
+ { .compatible = "syna,sl2610-dwmac" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, syna_dwmac_match);
+
+static struct platform_driver syna_dwmac_driver = {
+ .probe = syna_dwmac_probe,
+ .driver = {
+ .name = "syna-dwmac",
+ .pm = &stmmac_pltfr_pm_ops,
+ .of_match_table = syna_dwmac_match,
+ },
+};
+module_platform_driver(syna_dwmac_driver);
+
+MODULE_AUTHOR("Jisheng Zhang <jszhang@kernel.org>");
+MODULE_DESCRIPTION("Synaptics DWMAC platform driver");
+MODULE_LICENSE("GPL");
--
2.55.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
2026-11-30 16:56 ` [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
@ 2026-11-30 19:52 ` Andrew Lunn
2026-12-01 18:07 ` netdev-bot+sashiko
1 sibling, 0 replies; 8+ messages in thread
From: Andrew Lunn @ 2026-11-30 19:52 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Heiner Kallweit, Russell King, David S . Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Sebastian Hesselbarth, Maxime Chevallier,
Maxime Coquelin, Alexandre Torgue, netdev, devicetree,
linux-kernel, linux-arm-kernel
> +static int syna_dwmac_init(struct device *dev, void *priv)
> +{
> + struct syna_dwmac *dwmac = priv;
> + u32 mdio_sel;
> +
> + /* Only the MAC providing the shared MDIO bus selects its master. */
> + if (!dwmac->plat->mdio_node ||
> + !of_device_is_available(dwmac->plat->mdio_node))
> + return 0;
I think it would be good to have some sort of validation here, that if
both MACs have an available mdio node, the probe of the second one
fails with EINVAL and an error messages.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC
2026-11-30 16:56 ` [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
@ 2026-11-30 20:11 ` Rob Herring (Arm)
2026-12-01 0:17 ` Jisheng Zhang
2026-12-01 18:07 ` netdev-bot+sashiko
1 sibling, 1 reply; 8+ messages in thread
From: Rob Herring (Arm) @ 2026-11-30 20:11 UTC (permalink / raw)
To: Jisheng Zhang
Cc: Andrew Lunn, Eric Dumazet, Alexandre Torgue, netdev, Russell King,
Conor Dooley, Krzysztof Kozlowski, Maxime Coquelin, devicetree,
linux-arm-kernel, Heiner Kallweit, linux-kernel, Jakub Kicinski,
Maxime Chevallier, David S . Miller, Sebastian Hesselbarth,
Paolo Abeni
On Tue, 01 Dec 2026 00:56:38 +0800, Jisheng Zhang wrote:
> Describe the Synaptics SL2610 integration of DWMAC 5.20. The PHY
> interface mode and the routing of the shared MDC/MDIO signals are
> controlled through system-controller registers.
>
> Add the compatible to the common DWMAC schema and show a PHY connected
> to MAC1's MDIO bus in the example.
>
> Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> ---
> .../devicetree/bindings/net/snps,dwmac.yaml | 1 +
> .../bindings/net/syna,sl2610-dwmac.yaml | 128 ++++++++++++++++++
> 2 files changed, 129 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/net/syna,sl2610-dwmac.example.dts:24:18: fatal error: dt-bindings/clock/syna,sl2610.h: No such file or directory
24 | #include <dt-bindings/clock/syna,sl2610.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [scripts/Makefile.dtbs:140: Documentation/devicetree/bindings/net/syna,sl2610-dwmac.example.dtb] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [/builds/robherring/linux-dt-review/Makefile:1726: dt_binding_check] Error 2
make: *** [Makefile:248: __sub-make] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20261130165639.12839-2-jszhang@kernel.org
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC
2026-11-30 20:11 ` Rob Herring (Arm)
@ 2026-12-01 0:17 ` Jisheng Zhang
0 siblings, 0 replies; 8+ messages in thread
From: Jisheng Zhang @ 2026-12-01 0:17 UTC (permalink / raw)
To: Rob Herring (Arm)
Cc: Andrew Lunn, Eric Dumazet, Alexandre Torgue, netdev, Russell King,
Conor Dooley, Krzysztof Kozlowski, Maxime Coquelin, devicetree,
linux-arm-kernel, Heiner Kallweit, linux-kernel, Jakub Kicinski,
Maxime Chevallier, David S . Miller, Sebastian Hesselbarth,
Paolo Abeni
On Mon, Nov 30, 2026 at 02:11:02PM -0600, Rob Herring (Arm) wrote:
>
> On Tue, 01 Dec 2026 00:56:38 +0800, Jisheng Zhang wrote:
> > Describe the Synaptics SL2610 integration of DWMAC 5.20. The PHY
> > interface mode and the routing of the shared MDC/MDIO signals are
> > controlled through system-controller registers.
> >
> > Add the compatible to the common DWMAC schema and show a PHY connected
> > to MAC1's MDIO bus in the example.
> >
> > Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
> > ---
> > .../devicetree/bindings/net/snps,dwmac.yaml | 1 +
> > .../bindings/net/syna,sl2610-dwmac.yaml | 128 ++++++++++++++++++
> > 2 files changed, 129 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
> >
>
> My bot found errors running 'make dt_binding_check' on your patch:
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> Documentation/devicetree/bindings/net/syna,sl2610-dwmac.example.dts:24:18: fatal error: dt-bindings/clock/syna,sl2610.h: No such file or directory
> 24 | #include <dt-bindings/clock/syna,sl2610.h>
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
this depends on the SL2610 initial support series. I could remove
this dependency in v3
> compilation terminated.
> make[2]: *** [scripts/Makefile.dtbs:140: Documentation/devicetree/bindings/net/syna,sl2610-dwmac.example.dtb] Error 1
> make[2]: *** Waiting for unfinished jobs....
> make[1]: *** [/builds/robherring/linux-dt-review/Makefile:1726: dt_binding_check] Error 2
> make: *** [Makefile:248: __sub-make] Error 2
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.kernel.org/project/devicetree/patch/20261130165639.12839-2-jszhang@kernel.org
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC
2026-11-30 16:56 ` [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
2026-11-30 20:11 ` Rob Herring (Arm)
@ 2026-12-01 18:07 ` netdev-bot+sashiko
1 sibling, 0 replies; 8+ messages in thread
From: netdev-bot+sashiko @ 2026-12-01 18:07 UTC (permalink / raw)
To: jszhang
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, robh,
krzk+dt, conor+dt, sebastian.hesselbarth, maxime.chevallier,
mcoquelin.stm32, alexandre.torgue, netdev, devicetree,
linux-kernel, linux-arm-kernel
Thank you for your contribution! Sashiko AI review found 4 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 1 · Low: 3
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The binding does not say how the RGMII/RMII transmit clock
follows link speed.
- [Low] The example in
Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml cannot be…
- [Low] The 'syna,syscon' property does more than its description says.
- [Low] The binding defines 'resets'/'reset-names' (lines 56-60), and the
example wires a dedicated SoC reset line (RST_SOC_GETH1), but neither…
--
dt-bindings: net: Add Synaptics SL2610 DWMAC
This adds a DT binding for the Synaptics SL2610 integration of DWMAC 5.20.
On this SoC the PHY interface mode and the shared MDC/MDIO routing are
controlled through system-controller registers. The patch also adds the
compatible to the common snps,dwmac.yaml schema and adds a MAINTAINERS
entry.
> diff --git a/Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml b/Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
> new file mode 100644
> index 0000000000000..eaa8b86dd358e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
[ ... ]
> + clocks:
> + items:
> + - description: MAC clock
> + - description: Peripheral register interface clock
> + - description: PTP reference clock
> +
> + clock-names:
> + items:
> + - const: stmmaceth
> + - const: pclk
> + - const: ptp_ref
[Severity: Medium]
How is the RGMII/RMII transmit clock expected to follow the link speed on
this SoC?
The binding lists only stmmaceth, pclk and ptp_ref. The example maps
stmmaceth to CLK_GETHRGMII1.
In the later patch "net: stmmac: Add glue layer for Synaptics SL2610 SoC",
syna_dwmac_probe() sets only these two hooks:
plat->init = syna_dwmac_init;
plat->set_phy_intf_sel = syna_dwmac_set_phy_intf_sel;
The glue sets no plat->set_clk_tx_rate and no clk_tx_i. Because of that,
stmmac_mac_link_up() never adjusts a TX clock:
if (priv->plat->set_clk_tx_rate) {
Some integrations, such as Rockchip, i.MX or T-HEAD, need software to
switch the TX clock between 125, 25 and 2.5 MHz. If SL2610 does too, would
RGMII links at 10/100 Mbps fail to pass traffic? Adding the clock later
would also change the binding ABI.
If the hardware derives the TX clock from the MAC speed signals on its
own, could the binding say so?
A separate point: stmmac uses the stmmaceth clock rate as the CSR clock
when it computes the MDC divider. CLK_GETHRGMII1 may be the RGMII
interface clock and not the CSR clock. In that case, could the MDC divider
for the shared MDIO bus be computed from the wrong rate?
[ ... ]
> + syna,syscon:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + items:
> + - items:
> + - description: Phandle to the SL2610 system controller.
> + - description: Offset of the Ethernet interface control register.
> + enum: [0xa18, 0xa3c]
> + description:
> + Phandle and register offset used to configure the Ethernet PHY
> + interface mode.
[Severity: Low]
Does this description cover everything the property is used for?
The commit message says "the routing of the shared MDC/MDIO signals are
controlled through system-controller registers". This description only
mentions the PHY interface mode.
In the later patch "net: stmmac: Add glue layer for Synaptics SL2610 SoC",
syna_dwmac_init() also uses the same offset (0xa18 or 0xa3c) as a MAC
instance ID. It then sets the MDIO master-select bit in a separate,
hardcoded syscon register, SYNA_TW_PORT_CTRL (0xa04). It does this only
for the MAC whose mdio child is present and available:
return regmap_update_bits(dwmac->regmap, SYNA_TW_PORT_CTRL,
SYNA_MDIO_MASTER_SEL, mdio_sel);
This works at runtime, because the driver programs the mux before
stmmac_dvr_probe() registers the MDIO bus.
Could the binding document that the offset also selects the MDIO master?
It could also say that the controller with the enabled mdio child takes
over the shared pins through the syscon. This could go here or in the
top-level description of the shared bus.
[ ... ]
> +required:
> + - compatible
> + - clocks
> + - clock-names
> + - syna,syscon
> + - phy-mode
> +
> +dependencies:
> + resets: [reset-names]
> + reset-names: [resets]
[Severity: Low]
Should resets and reset-names be required here?
The example wires a dedicated SoC reset line (RST_SOC_GETH1) for the MAC.
The dependencies block only makes the two properties appear together, so a
node with no reset still passes validation.
stmmac gets the stmmaceth reset as optional in
devm_stmmac_probe_config_dt():
plat->stmmac_rst = devm_reset_control_get_optional(&pdev->dev,
STMMAC_RESOURCE_NAME);
The SL2610 glue driver does no reset handling of its own.
Suppose such a DT is used and firmware left the GETH block in reset, for
example on a second MAC the bootloader never touched. Would stmmac then
access the DWMAC registers while the block is held in reset, and fail to
probe or fault on the bus?
[ ... ]
> +examples:
> + - |
> + #include <dt-bindings/clock/syna,sl2610.h>
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> + #include <dt-bindings/reset/syna,sl2610-reset.h>
> +
> + ethernet@f7a06000 {
> + compatible = "syna,sl2610-dwmac", "snps,dwmac-5.20";
> + reg = <0xf7a06000 0x2000>;
> + interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
> + interrupt-names = "macirq";
> + clocks = <&clk CLK_GETHRGMII1>, <&clk CLK_GETHRGMII1SYS>,
> + <&clk CLK_GE1_PTP_REF>;
> + clock-names = "stmmaceth", "pclk", "ptp_ref";
> + resets = <&rst RST_SOC_GETH1>;
[Severity: Low]
Do these clock and reset headers exist yet?
Neither include/dt-bindings/clock/syna,sl2610.h nor
include/dt-bindings/reset/syna,sl2610-reset.h exists at this commit, and
no later patch in the series adds them. CLK_GETHRGMII1, CLK_GETHRGMII1SYS,
CLK_GE1_PTP_REF and RST_SOC_GETH1 are not defined anywhere in the tree.
dt_binding_check runs each example through cpp. Won't it stop with a "No
such file or directory" error on this binding?
If this depends on a pending SL2610 clock/reset binding series, could the
commit message say so? Another option is to use plain numbers in the
example in place of the macros.
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130165639.12839-1-jszhang%40kernel.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC
2026-11-30 16:56 ` [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
2026-11-30 19:52 ` Andrew Lunn
@ 2026-12-01 18:07 ` netdev-bot+sashiko
1 sibling, 0 replies; 8+ messages in thread
From: netdev-bot+sashiko @ 2026-12-01 18:07 UTC (permalink / raw)
To: jszhang
Cc: andrew, hkallweit1, linux, davem, edumazet, kuba, pabeni, robh,
krzk+dt, conor+dt, sebastian.hesselbarth, maxime.chevallier,
mcoquelin.stm32, alexandre.torgue, netdev, devicetree,
linux-kernel, linux-arm-kernel
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] In drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c, the default
branch of syna_dwmac_set_phy_intf_sel() calls phy_modes(phy_intf_sel).
--
net: stmmac: Add glue layer for Synaptics SL2610 SoC
This adds a dwmac glue driver for the DesignWare-based GMAC controllers
in the Synaptics SL2610 SoC. It sets the PHY interface mode and the
MDIO master select bit through a syscon regmap.
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
> new file mode 100644
> index 0000000000000..0bc4406065847
> --- /dev/null
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c
[ ... ]
> +static int syna_dwmac_set_phy_intf_sel(void *bsp_priv, u8 phy_intf_sel)
> +{
> + struct syna_dwmac *dwmac = bsp_priv;
> + u32 phyif;
> +
> + switch (phy_intf_sel) {
> + case PHY_INTF_SEL_RMII:
> + phyif = CTL_PHY_INTF_RMII;
> + break;
> + case PHY_INTF_SEL_RGMII:
> + phyif = CTL_PHY_INTF_RGMII;
> + break;
> + default:
> + dev_err(dwmac->dev, "unsupported phy interface %s\n",
> + phy_modes(phy_intf_sel));
[Severity: Low]
Does this print the wrong interface name?
phy_intf_sel holds a DWMAC hardware code from common.h, not a
phy_interface_t. phy_modes() expects a phy_interface_t, and the two
numberings differ:
common.h: GMII_MII=0, RGMII=1, SGMII=2, TBI=3, RMII=4, RTBI=5,
SMII=6, REVMII=7
phy_interface_t: NA=0, INTERNAL=1, MII=2, GMII=3, SGMII=4, TBI=5,
REVMII=6, RMII=7
With phy-mode = "rev-mii", stmmac_get_phy_intf_sel() returns
PHY_INTF_SEL_REVMII (7). phy_modes(7) returns "rmii", so the log says
"unsupported phy interface rmii", even though RMII is one of the two
modes this function supports.
For "mii" or "gmii" the code is 0, phy_modes(0) returns "", and no mode
is named in the message.
The caller already logs a correct message for -EINVAL:
stmmac_main.c:stmmac_prereset_configure() {
...
ret = plat_dat->set_phy_intf_sel(plat_dat->bsp_priv, phy_intf_sel);
if (ret == -EINVAL)
netdev_err(priv->dev, "platform does not support %s\n",
phy_modes(interface));
...
}
Could this dev_err() be dropped, or changed to print the raw
phy_intf_sel value?
> + return -EINVAL;
> + }
> +
> + return regmap_update_bits(dwmac->regmap, dwmac->rgmii_ctl, CTL_PHY_INTF_SEL, phyif);
> +}
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261130165639.12839-1-jszhang%40kernel.org
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-12-01 18:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 16:56 [PATCH net-next v2 0/2] net: stmmac: add SL2610 ethernet support Jisheng Zhang
2026-11-30 16:56 ` [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC Jisheng Zhang
2026-11-30 20:11 ` Rob Herring (Arm)
2026-12-01 0:17 ` Jisheng Zhang
2026-12-01 18:07 ` netdev-bot+sashiko
2026-11-30 16:56 ` [PATCH net-next v2 2/2] net: stmmac: Add glue layer for Synaptics SL2610 SoC Jisheng Zhang
2026-11-30 19:52 ` Andrew Lunn
2026-12-01 18:07 ` netdev-bot+sashiko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox