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
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 [thread overview]
Message-ID: <179646676243.3146.7456413555852069395@kernel.org> (raw)
In-Reply-To: <20261204100746.1165612-2-ericwang@realtek.com>
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
next prev parent reply other threads:[~2026-12-05 10:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 10:07 [PATCH net-next 0/2] net: ethernet: realtek: Add r8169soc Ethernet driver for Realtek STB SoCs Eric Wang
2026-12-04 10:07 ` [PATCH net-next 1/2] dt-bindings: net: Add Realtek STB SoC r8169soc Ethernet controller Eric Wang
2026-12-05 10:08 ` sashiko-bot
2026-12-05 10:32 ` netdev-bot+sashiko [this message]
2026-12-04 10:07 ` [PATCH net-next 2/2] net: ethernet: realtek: Add r8169soc Ethernet driver for Realtek STB SoCs Eric Wang
2026-12-05 10:08 ` sashiko-bot
2026-12-05 10:32 ` netdev-bot+sashiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179646676243.3146.7456413555852069395@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=eleanor.lin@realtek.com \
--cc=ericwang@realtek.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox