From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37DB5606A325 for ; Tue, 1 Dec 2026 18:07:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=pOAGi+fc; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CDs9zlz0 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Message-ID:Date :Cc:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=zoPVagDJEqg93RjUZpzvXNArsBMk9ucF/ejlJBcFgFo=; b=pOAGi+fcSMODOd5fM4ikLBkbid 4lTIO898oXS789fvLhY7GNU4UWv5citlluI1FEQQZzZCQTWNQLB84kOdFnm5L7s56OS7+6TYR0Sjk GL64dgWZcNq2zQmH+DtKNPa4eHZ9CShU4nqeRn7DH29YE3vA7FXxFFUD2l38LRcdzelDSSjMX3+6p UhVDuD+ed8gAyNXD18OtgU9K4ze5CrVDyQWixBuBSxei7wChTVnkJHBbLAPoakaRT8+tPC1l5BqBf Lp9+aRqmRxkSROYwXKo/0vk+SrcvBhS9TK+FSmxeXP9KTDN/HW6SSz8oDwmKHmXDYD0deNEzCDqYF uKpzKcyg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYSGD-000000091i1-0M6h; Tue, 01 Dec 2026 18:07:25 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYSG8-000000091hD-1nXP for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2026 18:07:20 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 3325744DB6; Tue, 1 Dec 2026 18:07:20 +0000 (UTC) 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-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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