From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796148440; b=gW3bN7BKpRKHh3kV60OempfjKI016ZzAgXEIwzLy8NnzQ9zS6a23S/erJCuj51Ry4sxz m2xHw0WGS4UCmT9qvxOKyAyrlthsDJ2aVXFBHGTk2xP36pj7ool3cKoY845NWv146Z1nj PH+VSdbgnQ7au8aqH9o5YzJC505H8/qtPF3c8/6Uqe43n2/U+VLDz6m/vq/FZM1U1UNA/ 2aqXj4vyapFgA6D7VPkHz7rdJfzVdaOk8S6EA7aVhsKJXpNejAoD8MGzAh34WFzfzc8zR zOWGkAaXqhM1+NuoT/vrHXzZ/ioE6IJfj3N97ImII2OQWWfLKcESSa3BS+AyUaCf1OA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796148440; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=zoPVagDJEqg93RjUZpzvXNArsBMk9ucF/ejlJBcFgFo=; b=XIh3D5os4N/NOkS05v8MBKdZie5XUPY4sqi70KN+lTwhs4gSTL0Oi31k6L5Ri9zb1QMi IEWrpBbotwhQuq6l8E0ZoD1Ey4v/2It3xUgdgh+24UY7MmLl+/SF91BYabSRVJhULoLfv lizJWUdx+IQqbSN1h4cxnNGSPTN8byzpLSulbpZB3C0zWMZu5yFIKBK7hB9bAQzL007uQ BOwoCEE930EMWtVYa/rfQp3CFPDD0ymnQA7dU0OQkRB9P+puSE7xfdGz8SP9ivaUOf5aB rYBBrqCMnoqhcBYvRGQQ6YRn7CW8p62rgT8Ce/5xdJ7vNuQpnIcyeRDXXj1RZyvvaIw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CDs9zlz0; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 777F0606A320; Tue, 1 Dec 2026 18:07:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CDs9zlz0 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 257551F000C1; Tue, 1 Dec 2026 18:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796148440; bh=zoPVagDJEqg93RjUZpzvXNArsBMk9ucF/ejlJBcFgFo=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=CDs9zlz07s7mMzAR8n7lAiituyM5pl8YVxWgXE+A813hM+/ujL5qDZS/BM0+kyH5v jiu+97731+7UjsFarxBijxrZJVj82FpnAP7bq6Ox1s8MZVV3iWIXLFsupFtM/EbhxF 887/PVmocwWWctbpnCikMteGbPNTF5Cvy1VMaz+bQI7zxSOV234t8KZ/aQv9vucv1Y ogZv+H9O2frg2BdNfM8xwlzd02uvR0gW0NTgVtH5jcIgK/cg/PX4wsFjMoTeRMgpTt 6vqqCQKE9MRjyTYJFMi4+ehm+2mSTO4LOFNw2N+zge0QglPpDf9aZCDoakEX3FFVDs cxju440+XMZGg== Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: Add Synaptics SL2610 DWMAC From: netdev-bot+sashiko@kernel.org To: jszhang@kernel.org Cc: andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, sebastian.hesselbarth@gmail.com, maxime.chevallier@bootlin.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Tue, 01 Dec 2026 18:07:18 +0000 Message-ID: <179614843869.3146.7643212432340611203@kernel.org> In-Reply-To: <20261130165639.12839-2-jszhang@kernel.org> References: <20261130165639.12839-2-jszhang@kernel.org> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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 > + #include > + #include > + #include > + > + ethernet@f7a06000 { > + compatible = "syna,sl2610-dwmac", "snps,dwmac-5.20"; > + reg = <0xf7a06000 0x2000>; > + interrupts = ; > + 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