From ba2028d19ca0d57dcbc42315adf2759cc0e0d80b Mon Sep 17 00:00:00 2001 From: Yangbo Lu Date: Thu, 6 Mar 2025 13:42:46 +0800 Subject: [PATCH] dts: bindings: dsa: add common bindings file Added common bindings file for dsa, and adapted NETC to it. Signed-off-by: Yangbo Lu --- dts/bindings/dsa/dsa.yaml | 27 +++++++++++++++++++++++++++ dts/bindings/dsa/nxp,netc-switch.yaml | 19 +------------------ 2 files changed, 28 insertions(+), 18 deletions(-) create mode 100644 dts/bindings/dsa/dsa.yaml diff --git a/dts/bindings/dsa/dsa.yaml b/dts/bindings/dsa/dsa.yaml new file mode 100644 index 00000000000..eca0b1d6d2c --- /dev/null +++ b/dts/bindings/dsa/dsa.yaml @@ -0,0 +1,27 @@ +# Copyright 2025 NXP +# SPDX-License-Identifier: Apache-2.0 + +description: DSA Device + +child-binding: + description: Properties of slave port + + include: + - name: pinctrl-device.yaml + - name: ethernet-controller.yaml + property-allowlist: + - zephyr,random-mac-address + - local-mac-address + - phy-handle + - phy-connection-type + + properties: + reg: + type: array + required: true + description: Port number + ethernet: + type: phandle + description: + A phandle to a valid Ethernet device node. This host + device is what the switch port is connected to. diff --git a/dts/bindings/dsa/nxp,netc-switch.yaml b/dts/bindings/dsa/nxp,netc-switch.yaml index 11dab38a8f9..33842d60761 100644 --- a/dts/bindings/dsa/nxp,netc-switch.yaml +++ b/dts/bindings/dsa/nxp,netc-switch.yaml @@ -5,21 +5,4 @@ description: NXP NETC ethernet switch compatible: "nxp,netc-switch" -child-binding: - description: Properties of slave port - - include: - - name: pinctrl-device.yaml - - name: ethernet-controller.yaml - property-allowlist: - - reg - - local-mac-address - - phy-handle - - phy-connection-type - - properties: - ethernet: - type: phandle - description: - A phandle to a valid Ethernet device node. This host - device is what the switch port is connected to. +include: [dsa.yaml]