xref: /freebsd/sys/contrib/device-tree/Bindings/net/dsa/qca,ar9331.yaml (revision 01950c46b8155250f64374fb72fc11faa44bf099)
1*01950c46SEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*01950c46SEmmanuel Vadot%YAML 1.2
3*01950c46SEmmanuel Vadot---
4*01950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/net/dsa/qca,ar9331.yaml#
5*01950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*01950c46SEmmanuel Vadot
7*01950c46SEmmanuel Vadottitle: Qualcomm Atheros AR9331 built-in switch
8*01950c46SEmmanuel Vadot
9*01950c46SEmmanuel Vadotmaintainers:
10*01950c46SEmmanuel Vadot  - Oleksij Rempel <o.rempel@pengutronix.de>
11*01950c46SEmmanuel Vadot
12*01950c46SEmmanuel Vadotdescription:
13*01950c46SEmmanuel Vadot  Qualcomm Atheros AR9331 is a switch built-in to Atheros AR9331 WiSoC and
14*01950c46SEmmanuel Vadot  addressable over internal MDIO bus. All PHYs are built-in as well.
15*01950c46SEmmanuel Vadot
16*01950c46SEmmanuel Vadotproperties:
17*01950c46SEmmanuel Vadot  compatible:
18*01950c46SEmmanuel Vadot    const: qca,ar9331-switch
19*01950c46SEmmanuel Vadot
20*01950c46SEmmanuel Vadot  reg:
21*01950c46SEmmanuel Vadot    maxItems: 1
22*01950c46SEmmanuel Vadot
23*01950c46SEmmanuel Vadot  interrupts:
24*01950c46SEmmanuel Vadot    maxItems: 1
25*01950c46SEmmanuel Vadot
26*01950c46SEmmanuel Vadot  interrupt-controller: true
27*01950c46SEmmanuel Vadot
28*01950c46SEmmanuel Vadot  '#interrupt-cells':
29*01950c46SEmmanuel Vadot    const: 1
30*01950c46SEmmanuel Vadot
31*01950c46SEmmanuel Vadot  mdio:
32*01950c46SEmmanuel Vadot    $ref: /schemas/net/mdio.yaml#
33*01950c46SEmmanuel Vadot    unevaluatedProperties: false
34*01950c46SEmmanuel Vadot    properties:
35*01950c46SEmmanuel Vadot      interrupt-parent: true
36*01950c46SEmmanuel Vadot
37*01950c46SEmmanuel Vadot    patternProperties:
38*01950c46SEmmanuel Vadot      '(ethernet-)?phy@[0-4]+$':
39*01950c46SEmmanuel Vadot        type: object
40*01950c46SEmmanuel Vadot        unevaluatedProperties: false
41*01950c46SEmmanuel Vadot
42*01950c46SEmmanuel Vadot        properties:
43*01950c46SEmmanuel Vadot          reg: true
44*01950c46SEmmanuel Vadot          interrupts:
45*01950c46SEmmanuel Vadot            maxItems: 1
46*01950c46SEmmanuel Vadot
47*01950c46SEmmanuel Vadot  resets:
48*01950c46SEmmanuel Vadot    maxItems: 1
49*01950c46SEmmanuel Vadot
50*01950c46SEmmanuel Vadot  reset-names:
51*01950c46SEmmanuel Vadot    items:
52*01950c46SEmmanuel Vadot      - const: switch
53*01950c46SEmmanuel Vadot
54*01950c46SEmmanuel Vadotrequired:
55*01950c46SEmmanuel Vadot  - compatible
56*01950c46SEmmanuel Vadot  - reg
57*01950c46SEmmanuel Vadot  - interrupts
58*01950c46SEmmanuel Vadot  - interrupt-controller
59*01950c46SEmmanuel Vadot  - '#interrupt-cells'
60*01950c46SEmmanuel Vadot  - mdio
61*01950c46SEmmanuel Vadot  - ports
62*01950c46SEmmanuel Vadot  - resets
63*01950c46SEmmanuel Vadot  - reset-names
64*01950c46SEmmanuel Vadot
65*01950c46SEmmanuel VadotallOf:
66*01950c46SEmmanuel Vadot  - $ref: dsa.yaml#/$defs/ethernet-ports
67*01950c46SEmmanuel Vadot
68*01950c46SEmmanuel VadotunevaluatedProperties: false
69*01950c46SEmmanuel Vadot
70*01950c46SEmmanuel Vadotexamples:
71*01950c46SEmmanuel Vadot  - |
72*01950c46SEmmanuel Vadot    mdio {
73*01950c46SEmmanuel Vadot        #address-cells = <1>;
74*01950c46SEmmanuel Vadot        #size-cells = <0>;
75*01950c46SEmmanuel Vadot
76*01950c46SEmmanuel Vadot        switch10: switch@10 {
77*01950c46SEmmanuel Vadot            compatible = "qca,ar9331-switch";
78*01950c46SEmmanuel Vadot            reg = <0x10>;
79*01950c46SEmmanuel Vadot
80*01950c46SEmmanuel Vadot            interrupt-parent = <&miscintc>;
81*01950c46SEmmanuel Vadot            interrupts = <12>;
82*01950c46SEmmanuel Vadot            interrupt-controller;
83*01950c46SEmmanuel Vadot            #interrupt-cells = <1>;
84*01950c46SEmmanuel Vadot
85*01950c46SEmmanuel Vadot            resets = <&rst 8>;
86*01950c46SEmmanuel Vadot            reset-names = "switch";
87*01950c46SEmmanuel Vadot
88*01950c46SEmmanuel Vadot            ports {
89*01950c46SEmmanuel Vadot                #address-cells = <1>;
90*01950c46SEmmanuel Vadot                #size-cells = <0>;
91*01950c46SEmmanuel Vadot
92*01950c46SEmmanuel Vadot                port@0 {
93*01950c46SEmmanuel Vadot                    reg = <0x0>;
94*01950c46SEmmanuel Vadot                    ethernet = <&eth1>;
95*01950c46SEmmanuel Vadot
96*01950c46SEmmanuel Vadot                    phy-mode = "gmii";
97*01950c46SEmmanuel Vadot
98*01950c46SEmmanuel Vadot                    fixed-link {
99*01950c46SEmmanuel Vadot                        speed = <1000>;
100*01950c46SEmmanuel Vadot                        full-duplex;
101*01950c46SEmmanuel Vadot                    };
102*01950c46SEmmanuel Vadot                };
103*01950c46SEmmanuel Vadot
104*01950c46SEmmanuel Vadot                port@1 {
105*01950c46SEmmanuel Vadot                    reg = <0x1>;
106*01950c46SEmmanuel Vadot                    phy-handle = <&phy_port0>;
107*01950c46SEmmanuel Vadot                    phy-mode = "internal";
108*01950c46SEmmanuel Vadot                };
109*01950c46SEmmanuel Vadot
110*01950c46SEmmanuel Vadot                port@2 {
111*01950c46SEmmanuel Vadot                    reg = <0x2>;
112*01950c46SEmmanuel Vadot                    phy-handle = <&phy_port1>;
113*01950c46SEmmanuel Vadot                    phy-mode = "internal";
114*01950c46SEmmanuel Vadot                };
115*01950c46SEmmanuel Vadot
116*01950c46SEmmanuel Vadot                port@3 {
117*01950c46SEmmanuel Vadot                    reg = <0x3>;
118*01950c46SEmmanuel Vadot                    phy-handle = <&phy_port2>;
119*01950c46SEmmanuel Vadot                    phy-mode = "internal";
120*01950c46SEmmanuel Vadot                };
121*01950c46SEmmanuel Vadot
122*01950c46SEmmanuel Vadot                port@4 {
123*01950c46SEmmanuel Vadot                    reg = <0x4>;
124*01950c46SEmmanuel Vadot                    phy-handle = <&phy_port3>;
125*01950c46SEmmanuel Vadot                    phy-mode = "internal";
126*01950c46SEmmanuel Vadot                };
127*01950c46SEmmanuel Vadot            };
128*01950c46SEmmanuel Vadot
129*01950c46SEmmanuel Vadot            mdio {
130*01950c46SEmmanuel Vadot                #address-cells = <1>;
131*01950c46SEmmanuel Vadot                #size-cells = <0>;
132*01950c46SEmmanuel Vadot
133*01950c46SEmmanuel Vadot                interrupt-parent = <&switch10>;
134*01950c46SEmmanuel Vadot
135*01950c46SEmmanuel Vadot                phy_port0: ethernet-phy@0 {
136*01950c46SEmmanuel Vadot                    reg = <0x0>;
137*01950c46SEmmanuel Vadot                    interrupts = <0>;
138*01950c46SEmmanuel Vadot                };
139*01950c46SEmmanuel Vadot
140*01950c46SEmmanuel Vadot                phy_port1: ethernet-phy@1 {
141*01950c46SEmmanuel Vadot                    reg = <0x1>;
142*01950c46SEmmanuel Vadot                    interrupts = <0>;
143*01950c46SEmmanuel Vadot                };
144*01950c46SEmmanuel Vadot
145*01950c46SEmmanuel Vadot                phy_port2: ethernet-phy@2 {
146*01950c46SEmmanuel Vadot                    reg = <0x2>;
147*01950c46SEmmanuel Vadot                    interrupts = <0>;
148*01950c46SEmmanuel Vadot                };
149*01950c46SEmmanuel Vadot
150*01950c46SEmmanuel Vadot                phy_port3: ethernet-phy@3 {
151*01950c46SEmmanuel Vadot                    reg = <0x3>;
152*01950c46SEmmanuel Vadot                    interrupts = <0>;
153*01950c46SEmmanuel Vadot                };
154*01950c46SEmmanuel Vadot
155*01950c46SEmmanuel Vadot                phy_port4: ethernet-phy@4 {
156*01950c46SEmmanuel Vadot                    reg = <0x4>;
157*01950c46SEmmanuel Vadot                    interrupts = <0>;
158*01950c46SEmmanuel Vadot                };
159*01950c46SEmmanuel Vadot            };
160*01950c46SEmmanuel Vadot        };
161*01950c46SEmmanuel Vadot    };
162