Re: [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC
From: netdev-bot+sashiko
Date: Tue Dec 01 2026 - 13:07:31 EST
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