Re: [PATCH net-next v5 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC

From: netdev-bot+sashiko

Date: Sat Dec 05 2026 - 11:03:49 EST


Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.

Critical: 0 · High: 0 · Medium: 1 · Low: 1

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 commit message says two hardware settings are controlled
through system-controller registers: the PHY interface mode and the…
- [Low] The new binding
Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml lists…

--

dt-bindings: net: Add Synaptics SL2610 DWMAC

This adds a DT binding for the Synaptics SL2610 integration of DWMAC 5.20.
It also adds the new compatible to the common snps,dwmac.yaml schema. The
commit message says the PHY interface mode and the shared MDC/MDIO routing
are controlled through system-controller registers.

> 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..226d07101e90b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/syna,sl2610-dwmac.yaml
> @@ -0,0 +1,122 @@
> +# 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@xxxxxxxxxx>

[Severity: Low]
Should this new file get a MAINTAINERS entry too?

The "ARM/Synaptics SoC support" entry only has these patterns:

F: arch/arm/boot/dts/synaptics/
F: arch/arm/mach-berlin/
F: arch/arm64/boot/dts/synaptics/

So the only entry that matches this binding is the generic networking
pattern F: Documentation/devicetree/bindings/net/. As a result,
get_maintainer.pl won't pick up the maintainer listed here.

The later patch in the series, "net: stmmac: Add glue layer for Synaptics
SL2610 SoC", also adds dwmac-syna.c without updating MAINTAINERS. Other
dwmac glue drivers, such as spacemit, starfive and thead, list the binding
and the driver in one MAINTAINERS entry.

[ ... ]

> + 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.
> + description:
> + Phandle and register offset used to configure the Ethernet PHY
> + interface mode.

[Severity: Medium]
Does this property cover everything the syscon is used for? The commit
message says:

The PHY interface mode and the routing of the shared MDC/MDIO signals
are controlled through system-controller registers.

Only the PHY interface mode register is described here. The top-level
description covers the shared MDIO topology, but it says nothing about the
routing control.

The glue driver added later in the series uses the offset cell to identify
the MAC instance. It then writes a separate, hard-coded syscon register to
set the MDIO routing:

drivers/net/ethernet/stmicro/stmmac/dwmac-syna.c:syna_dwmac_init() {
...
/* 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, ...);
}
return regmap_update_bits(dwmac->regmap, SYNA_TW_PORT_CTRL, SYNA_MDIO_MASTER_SEL, mdio_sel);
}

Should the binding say that the offset also identifies the MAC instance?
Should it also document the MDIO master select, which is BIT(4) of
SYNA_TW_PORT_CTRL at 0xa04?

The second cell has a description but no enum, so dt_binding_check accepts
any offset, not just 0xa18 or 0xa3c. With a wrong offset, the MAC with the
enabled mdio child fails probe with "Unknown Ethernet interface register".

A MAC without the mdio child skips that check. Then
syna_dwmac_set_phy_intf_sel() does a read-modify-write of CTL_PHY_INTF_SEL
(GENMASK(4, 1)) at whatever offset the DT gave.

Could the second cell be limited to an enum of the two valid offsets
before this two-cell ABI is fixed?

[ ... ]

--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204152836.31432-1-jszhang%40kernel.org