Add bindings for MT7628 SoC's Embedded Switch. Signed-off-by: Joris Vaisvila --- .../bindings/net/dsa/mediatek,mt7628-esw.yaml | 101 ++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/dsa/mediatek,mt7628-esw.yaml diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7628-esw.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7628-esw.yaml new file mode 100644 index 000000000000..d3c9df30ed5a --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7628-esw.yaml @@ -0,0 +1,101 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/dsa/mediatek,mt7628-esw.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Mediatek MT7628 Embedded Ethernet Switch + +maintainers: + - Joris Vaisvila + +description: + The MT7628 SoC's built-in Ethernet Switch is a five port switch with + integrated 10/100 PHYs. The switch registers are directly mapped in the SoC's + memory. The switch has an internally connected 1G CPU port and 5 user ports + connected to the built-in Fast Ethernet PHYs. + +unevaluatedProperties: false + +allOf: + - $ref: dsa.yaml#/$defs/ethernet-ports + +properties: + compatible: + const: mediatek,mt7628-esw + + reg: + maxItems: 1 + description: MMIO address of the switch + + resets: + items: + - description: Phandle of system reset controller with ESW reset index + - description: Phandle of system reset controller with EPHY reset index + + reset-names: + items: + - const: esw + - const: ephy + + mdio: + $ref: /schemas/net/mdio.yaml# + unevaluatedProperties: false + +required: + - compatible + - reg + - resets + - reset-names + +examples: + - | + switch0: switch@10110000 { + reg = <0x10110000 0x8000>; + + resets = <&sysc 23>, <&sysc 24>; + reset-names = "esw", "ephy"; + + compatible = "mediatek,mt7628-esw"; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + phy-mode = "internal"; + }; + + port@1 { + reg = <1>; + phy-mode = "internal"; + }; + + port@2 { + reg = <2>; + phy-mode = "internal"; + }; + + port@3 { + reg = <3>; + phy-mode = "internal"; + }; + + port@4 { + reg = <4>; + phy-mode = "internal"; + }; + + port@6 { + reg = <6>; + ethernet = <ðernet>; + phy-mode = "rgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; -- 2.53.0