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=1796466764; b=TvY4Y06gr0TjQAJX+3azuP/M/7ZEDThMe1DYdZsSBongTJ1CAXd9Kd5sWifvD/RTLesL UHrrA4VlWDByjf4lWFbmjyVMMhxdtFRP4dx/0glqjjOVyc7NZaxdVLGfiq7PFHwWi/aFR SALjGPv4pkP8Polj5uY7G5uOovlKpBJAg4x9sCIXrNxgQ5zV2QvPOuiJd26cw3t+ylJ+p FT5lfNcuhkU7DpHpXQ+hFiQ0mBlQ1Vf0pOcu5T9IJaTJp1iyot8nvT7+2VmUKWjCgXJkK rg/IbLctk13zmunbNbRgoYJICjwfxpdQ4+vU34+Tl7F2+Im8ydiY/15RWsghlTk9MXA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796466764; 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=+iG4uP5xvOwM6FKqKXqdsOI0W5NGb9aZP+3xEIHFWO4=; b=XWEvhqdzPlxwQysjfTbE91fpW0SCLqqJ2E21zz8Y+TJtdipp3oeDcPllNBXwCNXm25Gb UjE60s0kqeKKe5WwdO+Og3udcwVVyWrVTI+J3l3ktDp6LNIyDQqi8dNslSEAhSN313UyL Neot0O/y3zuk6FL7gnpUJw4XhWs8BO+tIPmc69lcx8zrkOdCXqVokXeigbVINIqkMY0lY 5nZBkxMelGl63wK2c1Hv2Npq3hkwyP1QSaX+UzC2LoK+7PzcFwGIV5KbPZdSnjsS5TTlb m4W/+jIRyOg/80UemS5Qo9DyGJ/6WvuVNdcJhowifIoF0uHt444qdouc5pmMIGpCCRQ== 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=V9vXuCTG; 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 13CE7606A335; Sat, 5 Dec 2026 10:32:43 +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=V9vXuCTG Received: by smtp.kernel.org (Postfix) with ESMTPSA id D77101F0092B; Sat, 5 Dec 2026 10:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796466763; bh=+iG4uP5xvOwM6FKqKXqdsOI0W5NGb9aZP+3xEIHFWO4=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=V9vXuCTGwlEa6csv2YtQzCjpJJOxAz+MTzrYmJOCvCL4PJX+waTeXOBaRvKTOFriL iPl/1Yx7ydrui6L9zLLREUI8PM7JWI1l5MTpPtxJkNITEepnVAftWPlKH/4WwnzLsx YWlYbn23sDVk7ieT9aDeViviaNCEKKnWwvtY/Oy4fkGgMnBs6vNChAzZGrdVtsnPE6 dXFm4AXgX5ubRG0ZeE0LKvPce4E2YCGtNUPzxm7jQ6M+v0SVzazpU67a11jC9TRVB3 pa5JRieoddmR3na+MW6E1t/kwslNbV9kqL8OwTqcRYvYu6kbwYRnyGvpzBEWijpZkL suq8qX8WK8LHA== Subject: Re: [PATCH net-next 1/2] dt-bindings: net: Add Realtek STB SoC r8169soc Ethernet controller From: netdev-bot+sashiko@kernel.org To: ericwang@realtek.com Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, p.zabel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, eleanor.lin@realtek.com Date: Sat, 05 Dec 2026 10:32:42 +0000 Message-ID: <179646676243.3146.7456413555852069395@kernel.org> In-Reply-To: <20261204100746.1165612-2-ericwang@realtek.com> References: <20261204100746.1165612-2-ericwang@realtek.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: devicetree@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 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] Two required properties in the new binding, `realtek,iso` and `realtek,m2tmx` (realtek,r8169soc.yaml lines 59-69 and 80-81), are… - [Low] The binding file is named realtek,r8169soc.yaml, but its only compatible is "realtek,rtd1625-r8169soc" (line 24), and `$id` (line 4)… - [Low] The description (lines 12-17) says the MAC is wired directly to an internal PHY and that external phy-mode/phy-handle are not needed. - [Low] dt-bindings: net: pinctrl-names precedes pinctrl-0 in example DTS -- dt-bindings: net: Add Realtek STB SoC r8169soc Ethernet controller This adds a devicetree binding for the embedded r8169soc Ethernet controller found on Realtek STB SoCs, starting with the RTD1625 ("realtek,rtd1625-r8169soc"). It also adds a MAINTAINERS entry for the new binding file. > diff --git a/Documentation/devicetree/bindings/net/realtek,r8169soc.yaml b/Documentation/devicetree/bindings/net/realtek,r8169soc.yaml > new file mode 100644 > index 0000000000000..604ff1ddfb0af > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/realtek,r8169soc.yaml > @@ -0,0 +1,102 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/realtek,r8169soc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# [ ... ] > +description: > + The embedded Realtek STB SoC r8169soc Ethernet controller integrates a > + Fast Ethernet MAC with an internal Fast Ethernet PHY, using ISO and > + MAIN2 system controller regmaps for SoC-specific PHY and bus control. > + Since the controller connects directly to the internal PHY, external > + phy-mode and phy-handle properties are not required. > + > +allOf: > + - $ref: ethernet-controller.yaml# [Severity: Low] The description says the MAC is wired only to the internal PHY. Should the schema enforce that? The $ref to ethernet-controller.yaml has no restrictions, and unevaluatedProperties is false, so phy-mode, phy-connection-type, phy-handle, fixed-link and managed are all accepted. A board DT that describes an external RGMII PHY through phy-handle, or that uses a fixed-link, would pass dt_binding_check and dtbs_check. The driver in the next patch ignores these properties. It hard-codes the interface mode in its PHY connect path in rtl8169soc.c: phy_mode = tp->chip->features & RTL_FEATURE_GMII ? PHY_INTERFACE_MODE_GMII : PHY_INTERFACE_MODE_MII; That means an incorrect DT is silently ignored instead of being rejected. Could the binding constrain these properties? For example, it could use phy-mode: const: internal, and set phy-handle and fixed-link to false. The binding also doesn't describe an mdio subnode or a PHY node for the internal PHY. > + > +properties: > + compatible: > + const: realtek,rtd1625-r8169soc [Severity: Low] Should the file be named realtek,rtd1625-r8169soc.yaml, with the $id updated to match? writing-bindings.rst says: Bindings files should be named like compatible: vendor,device.yaml. In case of multiple compatibles in the binding, use one of the fallbacks or a more generic name, yet still matching compatible style. The commit message says: The schema is named realtek,r8169soc.yaml so additional Realtek STB SoC variants sharing this controller architecture can be documented in the same binding. There is only one compatible here, though. The other RTD1625 bindings follow the compatible-based pattern (realtek,rtd1625-gpio.yaml, realtek,rtd1625-pinctrl.yaml, realtek,rtd1625-nor.yaml, realtek,rtd1625-systimer.yaml). Later variants can still go into a file named after the first compatible. Also, r8169 is the name of the Linux PCIe driver, not of a hardware block (the chips are RTL8169/RTL8168). writing-bindings.rst advises against referring to Linux or "device driver" in bindings. Compatible strings become ABI once merged. Would a name based on the hardware work better than the -r8169soc suffix? [ ... ] > + realtek,iso: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to the ISO system controller syscon node used for Ethernet > + PHY interrupt clearing, bypass mode control, and autoload status. > + > + realtek,m2tmx: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to the MAIN2 misc syscon node used for Ethernet DBUS clock > + gating and power-cut configuration. [Severity: Low] Where are the ISO and MAIN2 syscon nodes that these phandles point to documented? Both properties are required, but neither block has a binding in the tree, even at the end of the series. Searching Documentation/devicetree/bindings for rtd1625, realtek,iso and m2tmx finds only the gpio, pinctrl, spi-nor and timer bindings, plus this file. The RTD1625 SoC dtsi (arch/arm64/boot/dts/realtek/kent.dtsi) has no ISO or MAIN2 syscon node either. It also has no clock or reset controller node for the required clocks and resets. Older Realtek dtsi files (rtd16xx.dtsi, rtd139x.dtsi, rtd129x.dtsi) use this pattern: iso: syscon@7000 { compatible = "syscon", "simple-mfd"; writing-bindings.rst asks that a syscon block not use "syscon" alone. It should have a compatible specific enough to infer the register layout. The binding doesn't constrain the phandle targets, so dtschema can't check that &iso and &m2tmx point at the right blocks. The driver in the series reaches registers through these regmaps: RTD1625_M2TMX_ETN_DBUS_CTRL, RTD1625_M2TMX_PWRCUT_ETN, and the ISO PHY interrupt, bypass and autoload registers. That layout is hard-coded in rtl8169soc.c and isn't described anywhere in DT. Could bindings with specific compatibles be added for these syscon blocks? [ ... ] > @@ -0,0 +1,102 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/realtek,r8169soc.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Realtek STB SoC r8169soc Ethernet Controller > + > +maintainers: > + - Eric Wang > + > +description: > + The embedded Realtek STB SoC r8169soc Ethernet controller integrates a > + Fast Ethernet MAC with an internal Fast Ethernet PHY, using ISO and > + MAIN2 system controller regmaps for SoC-specific PHY and bus control. > + Since the controller connects directly to the internal PHY, external > + phy-mode and phy-handle properties are not required. > + > +allOf: > + - $ref: ethernet-controller.yaml# > + > +properties: > + compatible: > + const: realtek,rtd1625-r8169soc > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + clocks: > + items: > + - description: 250MHz reference clock > + - description: Ethernet system clock > + - description: ISO misc clock > + > + clock-names: > + items: > + - const: etn_250m > + - const: etn_sys > + - const: misc > + > + resets: > + items: > + - description: GMAC reset > + - description: GPHY reset > + - description: Misc reset > + > + reset-names: > + items: > + - const: gmac > + - const: gphy > + - const: misc > + > + power-domains: > + maxItems: 1 > + > + realtek,iso: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to the ISO system controller syscon node used for Ethernet > + PHY interrupt clearing, bypass mode control, and autoload status. > + > + realtek,m2tmx: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to the MAIN2 misc syscon node used for Ethernet DBUS clock > + gating and power-cut configuration. > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks > + - clock-names > + - resets > + - reset-names > + - realtek,iso > + - realtek,m2tmx > + > +unevaluatedProperties: false > + > +examples: > + - | > + #include > + > + ethernet@16000 { > + compatible = "realtek,rtd1625-r8169soc"; > + reg = <0x16000 0x1000>; > + interrupts = ; > + clocks = <&ic 11>, <&ic 12>, <&cc 5>; > + clock-names = "etn_250m", "etn_sys", "misc"; > + resets = <&ic 7>, <&ic 8>, <&cc 0>; > + reset-names = "gmac", "gphy", "misc"; > + pinctrl-names = "default"; > + pinctrl-0 = <&etn_led_loc0_pins>; > + power-domains = <&pd>; > + local-mac-address = [00 10 20 30 40 50]; > + realtek,iso = <&iso>; > + realtek,m2tmx = <&m2tmx>; > + }; [Severity: Low] In the example node, pinctrl-names is placed before pinctrl-0. Will this example pass scripts/dtc/dt-check-style in strict mode? submitting-patches.rst asks that examples in new bindings pass scripts/dtc/dt-check-style in strict mode without warnings. The strict property-order rule (check_property_order(), through _pair_pinctrl_names()) requires pinctrl-names to follow the highest-numbered pinctrl-N property in the same node. With the current order, the example will warn: property 'pinctrl-names' must be placed after 'pinctrl-0' The second patch in the series doesn't touch the example, so the warning remains at the end of the series. There is no runtime impact. Could you swap the two lines so that pinctrl-0 comes first and pinctrl-names follows it? -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261204100746.1165612-1-ericwang%40realtek.com