Devicetree
 help / color / mirror / Atom feed
From: Oskari Lemmela <oskari@lemmela.net>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Daniel Golle <daniel@makrotopia.org>,
	Javen Xu <javen_xu@realsil.com.cn>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Aleksander Jan Bajkowski <olek2@wp.pl>,
	Oleksij Rempel <o.rempel@pengutronix.de>,
	Issam Hamdi <ih@simonwunderlich.de>,
	Chukun Pan <amadeus@jmu.edu.cn>, Jan Hoffmann <jan@3e8.eu>,
	Florian Fainelli <f.fainelli@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>,
	Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Manuel Stocker <mensi@mensi.ch>,
	Oskari Lemmela <oskari@lemmela.net>
Subject: [PATCH net-next v2 1/2] dt-bindings: net: realtek,rtl82xx: document RTL8224 packages
Date: Mon,  5 Oct 2026 23:15:39 +0300	[thread overview]
Message-ID: <20261005201540.913977-2-oskari@lemmela.net> (raw)
In-Reply-To: <20261005201540.913977-1-oskari@lemmela.net>

RTL8224 packages contain four PHYs at consecutive MDIO addresses,
but the first address need not be a multiple of four. Document how
to describe these packages using the existing ethernet-phy-package
binding so their base address is explicit.

Clarify that child PHY addresses are absolute and that MDI pair
order and polarity properties describe the individual ports. Add
an example with a package starting at address 1.

Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
---
 .../bindings/net/realtek,rtl82xx.yaml         | 52 +++++++++++++++++--
 1 file changed, 49 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
index 07b39ef1fc62..ca52c3ae19f7 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl82xx.yaml
@@ -12,7 +12,17 @@ maintainers:
   - Heiner Kallweit <hkallweit1@gmail.com>
 
 description:
-  Bindings for Realtek RTL82xx PHYs
+  Bindings for Realtek RTL82xx PHYs.
+
+  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.
+
+  The enet-phy-pair-order and enet-phy-pair-polarity properties belong
+  to the individual PHY nodes and describe each port's MDI wiring.
 
 properties:
   compatible:
@@ -90,9 +100,45 @@ examples:
         #address-cells = <1>;
         #size-cells = <0>;
 
-        ethphy1: ethernet-phy@1 {
+        ethernet-phy@1 {
             reg = <1>;
-            realtek,clkout-disable;
             realtek,aldps-enable;
+            realtek,clkout-disable;
+        };
+    };
+  - |
+    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";
+                reg = <1>;
+                enet-phy-pair-order = <0>;
+            };
+
+            ethernet-phy@2 {
+                compatible = "ethernet-phy-ieee802.3-c45";
+                reg = <2>;
+                enet-phy-pair-order = <0>;
+            };
+
+            ethernet-phy@3 {
+                compatible = "ethernet-phy-ieee802.3-c45";
+                reg = <3>;
+                enet-phy-pair-order = <1>;
+            };
+
+            ethernet-phy@4 {
+                compatible = "ethernet-phy-ieee802.3-c45";
+                reg = <4>;
+                enet-phy-pair-order = <1>;
+                enet-phy-pair-polarity = <0x1>;
+            };
         };
     };
-- 
2.55.0


  reply	other threads:[~2026-10-05 20:23 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 ` Oskari Lemmela [this message]
2026-10-06 20:23   ` [PATCH net-next v2 1/2] dt-bindings: net: realtek,rtl82xx: document RTL8224 packages sashiko-bot
2026-10-08  8:18   ` netdev-bot+sashiko
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=20261005201540.913977-2-oskari@lemmela.net \
    --to=oskari@lemmela.net \
    --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=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