Article View: linux.kernel.netdev
Article #27334Re: [PATCH net-next 1/2] dt-bindings: net: Add Realtek STB SoC r8169soc Ethernet controller
From: netdev-bot+sashiko
Date: Sat, 05 Dec 2026 10:32
Date: Sat, 05 Dec 2026 10:32
279 lines
17828 bytes
17828 bytes
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 <ericwang@realtek.com>
> +
> +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 <dt-bindings/interrupt-controller/arm-gic.h>
> +
> + ethernet@16000 {
> + compatible = "realtek,rtd1625-r8169soc";
> + reg = <0x16000 0x1000>;
> + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
> + 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
Technical Details
Message-ID:
<179646676243.3146.7456413555852069395@kernel.org>Path:
mbox-mo1.pugleaf.net!news-sfo.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377936-linux-kernel-netdev=dewy.ruReferences:
<20261204100746.1165612-2-ericwang@realtek.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-sfo.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!peer03.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr3.eu1.usenetexpress.com!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377936-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 1/2] dt-bindings: net: Add Realtek STB SoC r8169soc Ethernet controller Date: Sat, 05 Dec 2026 10:32:42 +0000 Organization: Usenet Network Message-ID: <179646676243.3146.7456413555852069395@kernel.org> References: <20261204100746.1165612-2-ericwang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3007491"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:6UmTxKE31cYh99JI2abSs7inM/0= sha256:geJiboEyvtN3smIbfeSfRp0a/LORLQBqhuvlS/i2Xsk= sha1:0rSAf8J0/Ay66ahDUQZCezVqoUc= sha256:MzUawntp9bCl2RZLD9s47QOwirvjh7NfJ5sfq5evOpU= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 6EAF5117DE7; Sat, 5 Dec 2026 13:33:10 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.641 X-Spam-Status: No, score=-3.641 tagged_above=-9999 required=6.31 tests=[DKIMWL_WL_HIGH=-0.142, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ux0hiHANSj8f; Sat, 5 Dec 2026 13:33:06 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377936-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id A244E117DE3; Sat, 5 Dec 2026 13:32:58 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 90EDF2B62A; Sat, 5 Dec 2026 10:32:51 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796466770; b=ujqW9+eQxa60cji+zZQtHY3vky+c8tRGB7UYNw2xmslNHdM8G2Tdi49sH4yUdH7fUJjS LHV8dOANWWESR7taQKL/rSF5B+6wo4gG0jU/WR33XzCh294qpNT3cZQZsV7ObfGYjwjdI o3zG0+Xnl1qTXAZk8DvE1R8g5GEXpDAFIjje2u9blTPsvDSBswHksHQFDjKOnssX8ZRdy R/Xd7jnYYLphMcGZXGsrYTGPnzy6BUKSnB42PO+aGUFywdHZPWABkcWDcyhPoYXqm+J6F bftdDKy0jki5YmNsjWOZAfSEOrn0EnQKzuI8/i0DlL6Cz3JTzSryyHacxvfxSd1ihqg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796466770; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=+iG4uP5xvOwM6FKqKXqdsOI0W5NGb9aZP+3xEIHFWO4=; b=3b5ApXjQJuNCxpFzdbaLrMusJUQ+wLgZ/fElMK2YjwLESKttqpFgQFB3PIl9nFmGxHDC 1TZ5iexP5ldE90vwpJRyqwpWw1Wo9nIBx2w37GHL5KopbsGU//iS4rf7ZAXLR3OXk/zp1 H2q6tKVocgnXaPgtbDlYTmczF2TbJ0RD1ra63ausKEtN169sKaLQDsWeK9P1A0TC7N/oc /t+qpdvWOfLGNNjk99duSgoF3+2EXtZsk0fqvGD+DBcchZwbsqaEGnprIrMTUtpsxNsIr PRWiRBH2O2F/LYLSKGNIXYdY6jXw+DIAvauMQ/EzQEWxqZBslNWRl/6JZi2AtduIhMA== X-ARC-Authentication-Results: i=2; 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=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E8482606A33A; Sat, 5 Dec 2026 10:32:49 +0000 (UTC) X-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 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-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== X-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== X-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 X-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) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D77101F0092B; Sat, 5 Dec 2026 10:32:42 +0000 (UTC) X-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== X-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 X-In-Reply-To: <20261204100746.1165612-2-ericwang@realtek.com> X-sashiko-severity: Low X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-Received-Bytes: 17631