[PATCH net-next v18 4/6] dt-bindings: net: dsa: add Motorcomm YT9224

From: Kyle Switch

Date: Wed Dec 02 2026 - 03:40:50 EST


Add a device tree binding for the Motorcomm YT9224, a member of the
YT922x Ethernet switch family. It has 4 internal GbE PHYs on ports 4-7
and 2 SerDes ports on ports 0 and 8. Any port can be used as the CPU
port.

The YT9224 port layout differs from the YT921x family described by
motorcomm,yt921x.yaml (internal PHYs on ports 0-7, SerDes on 8-9), so
give it its own binding instead of extending the existing one. This
also avoids the dt_binding_check failure caused by yt921x.yaml
declaring compatible as a const for motorcomm,yt9215.

Also add the new binding file to the Motorcomm YT921x switch driver
MAINTAINERS entry so that it is covered by get_maintainer.pl.

Signed-off-by: Kyle Switch <kyle.switch@xxxxxxxxxxxxxx>
---
.../bindings/net/dsa/motorcomm,yt9224.yaml | 142 ++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 143 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml

diff --git a/Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml b/Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml
new file mode 100644
index 000000000000..01b61b47d372
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml
@@ -0,0 +1,142 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/dsa/motorcomm,yt9224.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Motorcomm YT9224 Ethernet switch
+
+maintainers:
+ - Kyle Switch <kyle.switch@xxxxxxxxxxxxxx>
+
+description: |
+ The Motorcomm YT9224 is a member of the YT922x Ethernet switch family,
+ with 4 internal GbE PHYs (Port 4-7) and 2 SerDes ports (Port 0 and 8).
+
+ Any port can be used as the CPU port.
+
+properties:
+ compatible:
+ const: motorcomm,yt9224
+
+ reg:
+ enum: [0x0, 0x1d]
+
+ mdio:
+ $ref: /schemas/net/mdio.yaml#
+ unevaluatedProperties: false
+ description:
+ Internal MDIO bus for the internal GbE PHYs. PHY 4-7 are used for
+ Port 4-7 respectively.
+
+ mdio-external:
+ $ref: /schemas/net/mdio.yaml#
+ unevaluatedProperties: false
+ description:
+ External MDIO bus to access external components. External PHYs for
+ the SerDes ports (Port 0 and 8) are expected to be connected to the
+ external MDIO bus, but that is not a hard limitation from the chip.
+
+required:
+ - compatible
+ - reg
+
+allOf:
+ - $ref: dsa.yaml#/$defs/ethernet-ports
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/leds/common.h>
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch@1d {
+ compatible = "motorcomm,yt9224";
+ /* default 0x1d, alternate 0x0 */
+ reg = <0x1d>;
+
+ mdio {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ sw_phy4: phy@4 {
+ reg = <0x4>;
+ };
+
+ sw_phy5: phy@5 {
+ reg = <0x5>;
+ };
+
+ sw_phy6: phy@6 {
+ reg = <0x6>;
+ };
+
+ sw_phy7: phy@7 {
+ reg = <0x7>;
+ };
+ };
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ /* SerDes port 0 */
+ ethernet-port@0 {
+ reg = <0>;
+ label = "wan";
+ phy-mode = "2500base-x";
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ };
+ };
+
+ /* Internal PHY ports 4-7 */
+ ethernet-port@4 {
+ reg = <4>;
+ label = "lan1";
+ phy-mode = "internal";
+ phy-handle = <&sw_phy4>;
+ };
+
+ ethernet-port@5 {
+ reg = <5>;
+ label = "lan2";
+ phy-mode = "internal";
+ phy-handle = <&sw_phy5>;
+ };
+
+ ethernet-port@6 {
+ reg = <6>;
+ label = "lan3";
+ phy-mode = "internal";
+ phy-handle = <&sw_phy6>;
+ };
+
+ ethernet-port@7 {
+ reg = <7>;
+ label = "lan4";
+ phy-mode = "internal";
+ phy-handle = <&sw_phy7>;
+ };
+
+ /* SerDes port 8, CPU port */
+ ethernet-port@8 {
+ reg = <8>;
+ phy-mode = "usxgmii";
+ ethernet = <&eth0>;
+
+ fixed-link {
+ speed = <5000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 9336fa93ce38..864777388be6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18937,6 +18937,7 @@ M: David Yang <mmyangfl@xxxxxxxxx>
L: netdev@xxxxxxxxxxxxxxx
S: Maintained
F: Documentation/devicetree/bindings/net/dsa/motorcomm,yt921x.yaml
+F: Documentation/devicetree/bindings/net/dsa/motorcomm,yt9224.yaml
F: Documentation/networking/devlink/yt921x.rst
F: drivers/net/dsa/motorcomm/
F: net/dsa/tag_yt921x.c
--
2.25.1