Devicetree
 help / color / mirror / Atom feed
From: netdev-bot+sashiko@kernel.org
To: oskari@lemmela.net
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, hkallweit1@gmail.com,
	daniel@makrotopia.org, javen_xu@realsil.com.cn,
	vladimir.oltean@nxp.com, olek2@wp.pl, o.rempel@pengutronix.de,
	ih@simonwunderlich.de, amadeus@jmu.edu.cn, jan@3e8.eu,
	f.fainelli@gmail.com, linux@armlinux.org.uk, andrew@lunn.ch,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, mensi@mensi.ch
Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: realtek,rtl82xx: document RTL8224 packages
Date: Thu, 08 Oct 2026 08:18:33 +0000	[thread overview]
Message-ID: <179144751377.434549.17815693541329607238@kernel.org> (raw)
In-Reply-To: <20261005201540.913977-2-oskari@lemmela.net>

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] Not a bug in the final series state; dismissed after
  verification.
- [Low] In Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml,
  the new RTL8224 example gives each PHY node only compatible =…

--

dt-bindings: net: realtek,rtl82xx: document RTL8224 packages

This patch documents how RTL8224 parts are described with the existing
ethernet-phy-package binding. Each part has four PHYs at consecutive MDIO
addresses, and the package base need not be a multiple of four. It also
adds an example with a package that starts at MDIO address 1.

> diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> index 07b39ef1fc624..ca52c3ae19f7a 100644
> --- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> +++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
> @@ -12,7 +12,17 @@ maintainers:

[ ... ]

> +  The RTL8224 contains four PHYs at consecutive MDIO addresses. Its PHY
> +  nodes may be grouped under an ethernet-phy-package node as described
> +  in ethernet-phy-package.yaml. The package reg must identify the first
> +  PHY's MDIO address, even if that PHY has no child node. This address
> +  need not be a multiple of four. Each child PHY reg is its absolute
> +  MDIO address, not an offset from the package base.

[Severity: Low]
At this commit, can the driver handle a package whose base is not a
multiple of four? rtl8224_probe() in drivers/net/phy/realtek/realtek_main.c
ignores the package reg and works out the base itself:

    devm_phy_package_join(dev, phydev, phydev->mdio.addr & ~3, 0)

Also, rtl8224_mdi_config_order() and rtl8224_mdi_config_polarity() pick
the port lane with addr & 3.

The example below has a package at 1 with PHYs 1-4. With that layout:

- PHYs 1-3 would join a package at base 0.
- PHY 4 would join a separate package at base 4.
- The VEND1 0xa90/0xa94 read-modify-writes would go to MDIO address 0.
- The lane bits would be wrong.

The next patch in the series, "net: phy: realtek: support unaligned RTL8224
PHY packages", fixes this:

- It reads the package reg into base_addr.
- It joins through devm_of_phy_package_join().
- It sets priv->port_offset = phydev->mdio.addr - base_addr for the MDI
  helpers.

With the full series applied, this layout is handled correctly. Merging the
binding before the driver change is also the usual order.

[ ... ]

> @@ -90,9 +100,45 @@ examples:

[ ... ]

> +  - |
> +    mdio {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        ethernet-phy-package@1 {
> +            reg = <1>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            ethernet-phy@1 {
> +                compatible = "ethernet-phy-ieee802.3-c45";

[Severity: Low]
Are these nodes ever checked against this schema? Their only compatible
is "ethernet-phy-ieee802.3-c45", and that string is not in this binding's
compatible enum.

realtek,rtl82xx.yaml has no explicit select, so dtschema builds one from
that enum. As a result, the four ethernet-phy@N nodes never match this
schema during dt_binding_check.

Only two schemas check these nodes:

- ethernet-phy.yaml, which selects on $nodename.
- ethernet-phy-package.yaml, which has additionalProperties: true.

That means this schema's own constraints never run on the new example.
This includes unevaluatedProperties: false, the leds conditional and the
realtek,* properties. The example also has nothing that marks the device
as an RTL8224.

Would a compatible like this work instead?

    compatible = "ethernet-phy-id001c.cad0", "ethernet-phy-ieee802.3-c45";

> +                reg = <1>;
> +                enet-phy-pair-order = <0>;
> +            };

[ ... ]

-- 
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261005201540.913977-1-oskari%40lemmela.net

  parent reply	other threads:[~2026-10-08  8:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-05 20:15 [PATCH net-next v2 0/2] Support unaligned RTL8224 PHY packages Oskari Lemmela
2026-10-05 20:15 ` [PATCH net-next v2 1/2] dt-bindings: net: realtek,rtl82xx: document RTL8224 packages Oskari Lemmela
2026-10-06 20:23   ` sashiko-bot
2026-10-08  8:18   ` netdev-bot+sashiko [this message]
2026-10-05 20:15 ` [PATCH net-next v2 2/2] net: phy: realtek: support unaligned RTL8224 PHY packages Oskari Lemmela
2026-10-08  8:18   ` netdev-bot+sashiko
2026-10-08 17:12     ` Oskari Lemmelä
2026-10-08 18:02       ` Andrew Lunn

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=179144751377.434549.17815693541329607238@kernel.org \
    --to=netdev-bot+sashiko@kernel.org \
    --cc=amadeus@jmu.edu.cn \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=daniel@makrotopia.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=ih@simonwunderlich.de \
    --cc=jan@3e8.eu \
    --cc=javen_xu@realsil.com.cn \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mensi@mensi.ch \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=olek2@wp.pl \
    --cc=oskari@lemmela.net \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=vladimir.oltean@nxp.com \
    /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