xref: /linux/Documentation/devicetree/bindings/net/dsa/nxp,netc-switch.yaml (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/dsa/nxp,netc-switch.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NETC Switch family
8
9description: >
10  The NETC presents itself as a multi-function PCIe Root Complex Integrated
11  Endpoint (RCiEP) and provides full 802.1Q Ethernet switch functionality,
12  advanced QoS with 8 traffic classes and 4 drop resilience levels, and a
13  full range of TSN standards capabilities.
14
15  The CPU port of the switch connects to an internal ENETC. The switch and
16  the internal ENETC are fully integrated into the NETC IP, a back-to-back
17  MAC is not required. Instead, a light-weight "pseudo MAC" provides the
18  delineation between the switch and ENETC. This translates to lower power
19  (less logic and memory) and lower delay (as there is no serialization
20  delay across this link).
21
22maintainers:
23  - Wei Fang <wei.fang@nxp.com>
24
25properties:
26  compatible:
27    enum:
28      - pci1131,eef2
29
30  reg:
31    maxItems: 1
32
33  dsa,member:
34    description: >
35      The property indicates DSA cluster and switch index. For NETC switch,
36      the valid range of the switch index is 1 ~ 7, the index is reflected
37      in the switch tag as an indication of the switch ID where the frame
38      originated. The value 0 is reserved for ENETC VEPA switch, whose ID
39      is hardwired to zero.
40    items:
41      - true
42      - minimum: 1
43        maximum: 7
44
45  ethernet-ports:
46    type: object
47    patternProperties:
48      "^ethernet-port@[0-9a-f]$":
49        type: object
50        $ref: dsa-port.yaml#
51
52        properties:
53          clocks:
54            items:
55              - description: MAC transmit/receive reference clock.
56
57          clock-names:
58            items:
59              - const: ref
60
61          mdio:
62            $ref: /schemas/net/mdio.yaml#
63            unevaluatedProperties: false
64            description:
65              Optional child node for switch port, otherwise use NETC EMDIO.
66
67        unevaluatedProperties: false
68
69required:
70  - compatible
71  - reg
72  - dsa,member
73  - ethernet-ports
74
75allOf:
76  - $ref: /schemas/pci/pci-device.yaml
77  - $ref: dsa.yaml#
78
79unevaluatedProperties: false
80
81examples:
82  - |
83    pcie {
84        #address-cells = <3>;
85        #size-cells = <2>;
86
87        ethernet-switch@0,2 {
88            compatible = "pci1131,eef2";
89            reg = <0x200 0 0 0 0>;
90            dsa,member = <0 1>;
91            pinctrl-names = "default";
92            pinctrl-0 = <&pinctrl_switch>;
93
94            ethernet-ports {
95                #address-cells = <1>;
96                #size-cells = <0>;
97
98                ethernet-port@0 {
99                    reg = <0>;
100                    phy-handle = <&ethphy0>;
101                    phy-mode = "mii";
102                };
103
104                ethernet-port@1 {
105                    reg = <1>;
106                    phy-handle = <&ethphy1>;
107                    phy-mode = "mii";
108                };
109
110                ethernet-port@2 {
111                    reg = <2>;
112                    clocks = <&scmi_clk 103>;
113                    clock-names = "ref";
114                    phy-handle = <&ethphy2>;
115                    phy-mode = "rgmii-id";
116                };
117
118                ethernet-port@3 {
119                    reg = <3>;
120                    ethernet = <&enetc3>;
121                    phy-mode = "internal";
122
123                    fixed-link {
124                        speed = <2500>;
125                        full-duplex;
126                        pause;
127                    };
128                };
129            };
130        };
131    };
132