xref: /freebsd/sys/contrib/device-tree/Bindings/net/marvell,pp2.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
1*8bab661aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*8bab661aSEmmanuel Vadot%YAML 1.2
3*8bab661aSEmmanuel Vadot---
4*8bab661aSEmmanuel Vadot$id: http://devicetree.org/schemas/net/marvell,pp2.yaml#
5*8bab661aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*8bab661aSEmmanuel Vadot
7*8bab661aSEmmanuel Vadottitle: Marvell CN913X / Marvell Armada 375, 7K, 8K Ethernet Controller
8*8bab661aSEmmanuel Vadot
9*8bab661aSEmmanuel Vadotmaintainers:
10*8bab661aSEmmanuel Vadot  - Marcin Wojtas <mw@semihalf.com>
11*8bab661aSEmmanuel Vadot  - Russell King <linux@armlinux.org>
12*8bab661aSEmmanuel Vadot
13*8bab661aSEmmanuel Vadotdescription: |
14*8bab661aSEmmanuel Vadot  Marvell Armada 375 Ethernet Controller (PPv2.1)
15*8bab661aSEmmanuel Vadot  Marvell Armada 7K/8K Ethernet Controller (PPv2.2)
16*8bab661aSEmmanuel Vadot  Marvell CN913X Ethernet Controller (PPv2.3)
17*8bab661aSEmmanuel Vadot
18*8bab661aSEmmanuel Vadotproperties:
19*8bab661aSEmmanuel Vadot  compatible:
20*8bab661aSEmmanuel Vadot    enum:
21*8bab661aSEmmanuel Vadot      - marvell,armada-375-pp2
22*8bab661aSEmmanuel Vadot      - marvell,armada-7k-pp22
23*8bab661aSEmmanuel Vadot
24*8bab661aSEmmanuel Vadot  reg:
25*8bab661aSEmmanuel Vadot    minItems: 3
26*8bab661aSEmmanuel Vadot    maxItems: 4
27*8bab661aSEmmanuel Vadot
28*8bab661aSEmmanuel Vadot  "#address-cells":
29*8bab661aSEmmanuel Vadot    const: 1
30*8bab661aSEmmanuel Vadot
31*8bab661aSEmmanuel Vadot  "#size-cells":
32*8bab661aSEmmanuel Vadot    const: 0
33*8bab661aSEmmanuel Vadot
34*8bab661aSEmmanuel Vadot  clocks:
35*8bab661aSEmmanuel Vadot    minItems: 2
36*8bab661aSEmmanuel Vadot    items:
37*8bab661aSEmmanuel Vadot      - description: main controller clock
38*8bab661aSEmmanuel Vadot      - description: GOP clock
39*8bab661aSEmmanuel Vadot      - description: MG clock
40*8bab661aSEmmanuel Vadot      - description: MG Core clock
41*8bab661aSEmmanuel Vadot      - description: AXI clock
42*8bab661aSEmmanuel Vadot
43*8bab661aSEmmanuel Vadot  clock-names:
44*8bab661aSEmmanuel Vadot    minItems: 2
45*8bab661aSEmmanuel Vadot    items:
46*8bab661aSEmmanuel Vadot      - const: pp_clk
47*8bab661aSEmmanuel Vadot      - const: gop_clk
48*8bab661aSEmmanuel Vadot      - const: mg_clk
49*8bab661aSEmmanuel Vadot      - const: mg_core_clk
50*8bab661aSEmmanuel Vadot      - const: axi_clk
51*8bab661aSEmmanuel Vadot
52*8bab661aSEmmanuel Vadot  dma-coherent: true
53*8bab661aSEmmanuel Vadot
54*8bab661aSEmmanuel Vadot  marvell,system-controller:
55*8bab661aSEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
56*8bab661aSEmmanuel Vadot    description: a phandle to the system controller.
57*8bab661aSEmmanuel Vadot
58*8bab661aSEmmanuel VadotpatternProperties:
59*8bab661aSEmmanuel Vadot  '^(ethernet-)?port@[0-2]$':
60*8bab661aSEmmanuel Vadot    type: object
61*8bab661aSEmmanuel Vadot    description: subnode for each ethernet port.
62*8bab661aSEmmanuel Vadot    $ref: ethernet-controller.yaml#
63*8bab661aSEmmanuel Vadot    unevaluatedProperties: false
64*8bab661aSEmmanuel Vadot
65*8bab661aSEmmanuel Vadot    properties:
66*8bab661aSEmmanuel Vadot      reg:
67*8bab661aSEmmanuel Vadot        description: ID of the port from the MAC point of view.
68*8bab661aSEmmanuel Vadot        maximum: 2
69*8bab661aSEmmanuel Vadot
70*8bab661aSEmmanuel Vadot      interrupts:
71*8bab661aSEmmanuel Vadot        minItems: 1
72*8bab661aSEmmanuel Vadot        maxItems: 10
73*8bab661aSEmmanuel Vadot        description: interrupt(s) for the port
74*8bab661aSEmmanuel Vadot
75*8bab661aSEmmanuel Vadot      interrupt-names:
76*8bab661aSEmmanuel Vadot        minItems: 1
77*8bab661aSEmmanuel Vadot        items:
78*8bab661aSEmmanuel Vadot          - const: hif0
79*8bab661aSEmmanuel Vadot          - const: hif1
80*8bab661aSEmmanuel Vadot          - const: hif2
81*8bab661aSEmmanuel Vadot          - const: hif3
82*8bab661aSEmmanuel Vadot          - const: hif4
83*8bab661aSEmmanuel Vadot          - const: hif5
84*8bab661aSEmmanuel Vadot          - const: hif6
85*8bab661aSEmmanuel Vadot          - const: hif7
86*8bab661aSEmmanuel Vadot          - const: hif8
87*8bab661aSEmmanuel Vadot          - const: link
88*8bab661aSEmmanuel Vadot
89*8bab661aSEmmanuel Vadot        description: >
90*8bab661aSEmmanuel Vadot          if more than a single interrupt for is given, must be the
91*8bab661aSEmmanuel Vadot          name associated to the interrupts listed. Valid names are:
92*8bab661aSEmmanuel Vadot          "hifX", with X in [0..8], and "link". The names "tx-cpu0",
93*8bab661aSEmmanuel Vadot          "tx-cpu1", "tx-cpu2", "tx-cpu3" and "rx-shared" are supported
94*8bab661aSEmmanuel Vadot          for backward compatibility but shouldn't be used for new
95*8bab661aSEmmanuel Vadot          additions.
96*8bab661aSEmmanuel Vadot
97*8bab661aSEmmanuel Vadot      phys:
98*8bab661aSEmmanuel Vadot        minItems: 1
99*8bab661aSEmmanuel Vadot        maxItems: 2
100*8bab661aSEmmanuel Vadot        description: >
101*8bab661aSEmmanuel Vadot          Generic PHY, providing SerDes connectivity. For most modes,
102*8bab661aSEmmanuel Vadot          one lane is sufficient, but some (e.g. RXAUI) may require two.
103*8bab661aSEmmanuel Vadot
104*8bab661aSEmmanuel Vadot      phy-mode:
105*8bab661aSEmmanuel Vadot        enum:
106*8bab661aSEmmanuel Vadot          - gmii
107*8bab661aSEmmanuel Vadot          - sgmii
108*8bab661aSEmmanuel Vadot          - rgmii-id
109*8bab661aSEmmanuel Vadot          - 1000base-x
110*8bab661aSEmmanuel Vadot          - 2500base-x
111*8bab661aSEmmanuel Vadot          - 5gbase-r
112*8bab661aSEmmanuel Vadot          - rxaui
113*8bab661aSEmmanuel Vadot          - 10gbase-r
114*8bab661aSEmmanuel Vadot
115*8bab661aSEmmanuel Vadot      port-id:
116*8bab661aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
117*8bab661aSEmmanuel Vadot        deprecated: true
118*8bab661aSEmmanuel Vadot        description: >
119*8bab661aSEmmanuel Vadot          ID of the port from the MAC point of view.
120*8bab661aSEmmanuel Vadot          Legacy binding for backward compatibility.
121*8bab661aSEmmanuel Vadot
122*8bab661aSEmmanuel Vadot      marvell,loopback:
123*8bab661aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/flag
124*8bab661aSEmmanuel Vadot        description: port is loopback mode.
125*8bab661aSEmmanuel Vadot
126*8bab661aSEmmanuel Vadot      gop-port-id:
127*8bab661aSEmmanuel Vadot        $ref: /schemas/types.yaml#/definitions/uint32
128*8bab661aSEmmanuel Vadot        description: >
129*8bab661aSEmmanuel Vadot          only for marvell,armada-7k-pp22, ID of the port from the
130*8bab661aSEmmanuel Vadot          GOP (Group Of Ports) point of view. This ID is used to index the
131*8bab661aSEmmanuel Vadot          per-port registers in the second register area.
132*8bab661aSEmmanuel Vadot
133*8bab661aSEmmanuel Vadot    required:
134*8bab661aSEmmanuel Vadot      - reg
135*8bab661aSEmmanuel Vadot      - interrupts
136*8bab661aSEmmanuel Vadot      - phy-mode
137*8bab661aSEmmanuel Vadot      - port-id
138*8bab661aSEmmanuel Vadot
139*8bab661aSEmmanuel Vadotrequired:
140*8bab661aSEmmanuel Vadot  - compatible
141*8bab661aSEmmanuel Vadot  - reg
142*8bab661aSEmmanuel Vadot  - clocks
143*8bab661aSEmmanuel Vadot  - clock-names
144*8bab661aSEmmanuel Vadot
145*8bab661aSEmmanuel VadotallOf:
146*8bab661aSEmmanuel Vadot  - if:
147*8bab661aSEmmanuel Vadot      properties:
148*8bab661aSEmmanuel Vadot        compatible:
149*8bab661aSEmmanuel Vadot          const: marvell,armada-7k-pp22
150*8bab661aSEmmanuel Vadot    then:
151*8bab661aSEmmanuel Vadot      properties:
152*8bab661aSEmmanuel Vadot        reg:
153*8bab661aSEmmanuel Vadot          items:
154*8bab661aSEmmanuel Vadot            - description: Packet Processor registers
155*8bab661aSEmmanuel Vadot            - description: Networking interfaces registers
156*8bab661aSEmmanuel Vadot            - description: CM3 address space used for TX Flow Control
157*8bab661aSEmmanuel Vadot
158*8bab661aSEmmanuel Vadot        clocks:
159*8bab661aSEmmanuel Vadot          minItems: 5
160*8bab661aSEmmanuel Vadot
161*8bab661aSEmmanuel Vadot        clock-names:
162*8bab661aSEmmanuel Vadot          minItems: 5
163*8bab661aSEmmanuel Vadot
164*8bab661aSEmmanuel Vadot      patternProperties:
165*8bab661aSEmmanuel Vadot        '^(ethernet-)?port@[0-2]$':
166*8bab661aSEmmanuel Vadot          required:
167*8bab661aSEmmanuel Vadot            - gop-port-id
168*8bab661aSEmmanuel Vadot
169*8bab661aSEmmanuel Vadot      required:
170*8bab661aSEmmanuel Vadot        - marvell,system-controller
171*8bab661aSEmmanuel Vadot    else:
172*8bab661aSEmmanuel Vadot      properties:
173*8bab661aSEmmanuel Vadot        reg:
174*8bab661aSEmmanuel Vadot          items:
175*8bab661aSEmmanuel Vadot            - description: Packet Processor registers
176*8bab661aSEmmanuel Vadot            - description: LMS registers
177*8bab661aSEmmanuel Vadot            - description: Register area per eth0
178*8bab661aSEmmanuel Vadot            - description: Register area per eth1
179*8bab661aSEmmanuel Vadot
180*8bab661aSEmmanuel Vadot        clocks:
181*8bab661aSEmmanuel Vadot          maxItems: 2
182*8bab661aSEmmanuel Vadot
183*8bab661aSEmmanuel Vadot        clock-names:
184*8bab661aSEmmanuel Vadot          maxItems: 2
185*8bab661aSEmmanuel Vadot
186*8bab661aSEmmanuel Vadot      patternProperties:
187*8bab661aSEmmanuel Vadot        '^(ethernet-)?port@[0-1]$':
188*8bab661aSEmmanuel Vadot          properties:
189*8bab661aSEmmanuel Vadot            reg:
190*8bab661aSEmmanuel Vadot              maximum: 1
191*8bab661aSEmmanuel Vadot
192*8bab661aSEmmanuel Vadot            gop-port-id: false
193*8bab661aSEmmanuel Vadot
194*8bab661aSEmmanuel VadotadditionalProperties: false
195*8bab661aSEmmanuel Vadot
196*8bab661aSEmmanuel Vadotexamples:
197*8bab661aSEmmanuel Vadot  - |
198*8bab661aSEmmanuel Vadot    // For Armada 375 variant
199*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/mvebu-icu.h>
200*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
201*8bab661aSEmmanuel Vadot
202*8bab661aSEmmanuel Vadot    ethernet@f0000 {
203*8bab661aSEmmanuel Vadot        #address-cells = <1>;
204*8bab661aSEmmanuel Vadot        #size-cells = <0>;
205*8bab661aSEmmanuel Vadot        compatible = "marvell,armada-375-pp2";
206*8bab661aSEmmanuel Vadot        reg = <0xf0000 0xa000>,
207*8bab661aSEmmanuel Vadot              <0xc0000 0x3060>,
208*8bab661aSEmmanuel Vadot              <0xc4000 0x100>,
209*8bab661aSEmmanuel Vadot              <0xc5000 0x100>;
210*8bab661aSEmmanuel Vadot        clocks = <&gateclk 3>, <&gateclk 19>;
211*8bab661aSEmmanuel Vadot        clock-names = "pp_clk", "gop_clk";
212*8bab661aSEmmanuel Vadot
213*8bab661aSEmmanuel Vadot        ethernet-port@0 {
214*8bab661aSEmmanuel Vadot            interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
215*8bab661aSEmmanuel Vadot            reg = <0>;
216*8bab661aSEmmanuel Vadot            port-id = <0>; /* For backward compatibility. */
217*8bab661aSEmmanuel Vadot            phy = <&phy0>;
218*8bab661aSEmmanuel Vadot            phy-mode = "rgmii-id";
219*8bab661aSEmmanuel Vadot        };
220*8bab661aSEmmanuel Vadot
221*8bab661aSEmmanuel Vadot        ethernet-port@1 {
222*8bab661aSEmmanuel Vadot            interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
223*8bab661aSEmmanuel Vadot            reg = <1>;
224*8bab661aSEmmanuel Vadot            port-id = <1>; /* For backward compatibility. */
225*8bab661aSEmmanuel Vadot            phy = <&phy3>;
226*8bab661aSEmmanuel Vadot            phy-mode = "gmii";
227*8bab661aSEmmanuel Vadot        };
228*8bab661aSEmmanuel Vadot    };
229*8bab661aSEmmanuel Vadot
230*8bab661aSEmmanuel Vadot  - |
231*8bab661aSEmmanuel Vadot    // For Armada 7k/8k and Cn913x variants
232*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/mvebu-icu.h>
233*8bab661aSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
234*8bab661aSEmmanuel Vadot
235*8bab661aSEmmanuel Vadot    ethernet@0 {
236*8bab661aSEmmanuel Vadot        #address-cells = <1>;
237*8bab661aSEmmanuel Vadot        #size-cells = <0>;
238*8bab661aSEmmanuel Vadot        compatible = "marvell,armada-7k-pp22";
239*8bab661aSEmmanuel Vadot        reg = <0x0 0x100000>, <0x129000 0xb000>, <0x220000 0x800>;
240*8bab661aSEmmanuel Vadot        clocks = <&cp0_clk 1 3>, <&cp0_clk 1 9>,
241*8bab661aSEmmanuel Vadot                 <&cp0_clk 1 5>, <&cp0_clk 1 6>, <&cp0_clk 1 18>;
242*8bab661aSEmmanuel Vadot        clock-names = "pp_clk", "gop_clk", "mg_clk", "mg_core_clk", "axi_clk";
243*8bab661aSEmmanuel Vadot        marvell,system-controller = <&cp0_syscon0>;
244*8bab661aSEmmanuel Vadot
245*8bab661aSEmmanuel Vadot        ethernet-port@0 {
246*8bab661aSEmmanuel Vadot            interrupts = <ICU_GRP_NSR 39 IRQ_TYPE_LEVEL_HIGH>,
247*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 43 IRQ_TYPE_LEVEL_HIGH>,
248*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 47 IRQ_TYPE_LEVEL_HIGH>,
249*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 51 IRQ_TYPE_LEVEL_HIGH>,
250*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 55 IRQ_TYPE_LEVEL_HIGH>,
251*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 59 IRQ_TYPE_LEVEL_HIGH>,
252*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 63 IRQ_TYPE_LEVEL_HIGH>,
253*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 67 IRQ_TYPE_LEVEL_HIGH>,
254*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 71 IRQ_TYPE_LEVEL_HIGH>,
255*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 129 IRQ_TYPE_LEVEL_HIGH>;
256*8bab661aSEmmanuel Vadot            interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
257*8bab661aSEmmanuel Vadot                              "hif5", "hif6", "hif7", "hif8", "link";
258*8bab661aSEmmanuel Vadot            phy-mode = "10gbase-r";
259*8bab661aSEmmanuel Vadot            phys = <&cp0_comphy4 0>;
260*8bab661aSEmmanuel Vadot            reg = <0>;
261*8bab661aSEmmanuel Vadot            port-id = <0>; /* For backward compatibility. */
262*8bab661aSEmmanuel Vadot            gop-port-id = <0>;
263*8bab661aSEmmanuel Vadot        };
264*8bab661aSEmmanuel Vadot
265*8bab661aSEmmanuel Vadot        ethernet-port@1 {
266*8bab661aSEmmanuel Vadot            interrupts = <ICU_GRP_NSR 40 IRQ_TYPE_LEVEL_HIGH>,
267*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 44 IRQ_TYPE_LEVEL_HIGH>,
268*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 48 IRQ_TYPE_LEVEL_HIGH>,
269*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 52 IRQ_TYPE_LEVEL_HIGH>,
270*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 56 IRQ_TYPE_LEVEL_HIGH>,
271*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 60 IRQ_TYPE_LEVEL_HIGH>,
272*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 64 IRQ_TYPE_LEVEL_HIGH>,
273*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 68 IRQ_TYPE_LEVEL_HIGH>,
274*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 72 IRQ_TYPE_LEVEL_HIGH>,
275*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 128 IRQ_TYPE_LEVEL_HIGH>;
276*8bab661aSEmmanuel Vadot            interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
277*8bab661aSEmmanuel Vadot                              "hif5", "hif6", "hif7", "hif8", "link";
278*8bab661aSEmmanuel Vadot            phy-mode = "rgmii-id";
279*8bab661aSEmmanuel Vadot            reg = <1>;
280*8bab661aSEmmanuel Vadot            port-id = <1>; /* For backward compatibility. */
281*8bab661aSEmmanuel Vadot            gop-port-id = <2>;
282*8bab661aSEmmanuel Vadot        };
283*8bab661aSEmmanuel Vadot
284*8bab661aSEmmanuel Vadot        ethernet-port@2 {
285*8bab661aSEmmanuel Vadot            interrupts = <ICU_GRP_NSR 41 IRQ_TYPE_LEVEL_HIGH>,
286*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 45 IRQ_TYPE_LEVEL_HIGH>,
287*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 49 IRQ_TYPE_LEVEL_HIGH>,
288*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 53 IRQ_TYPE_LEVEL_HIGH>,
289*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 57 IRQ_TYPE_LEVEL_HIGH>,
290*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 61 IRQ_TYPE_LEVEL_HIGH>,
291*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 65 IRQ_TYPE_LEVEL_HIGH>,
292*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 69 IRQ_TYPE_LEVEL_HIGH>,
293*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 73 IRQ_TYPE_LEVEL_HIGH>,
294*8bab661aSEmmanuel Vadot                         <ICU_GRP_NSR 127 IRQ_TYPE_LEVEL_HIGH>;
295*8bab661aSEmmanuel Vadot            interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
296*8bab661aSEmmanuel Vadot                              "hif5", "hif6", "hif7", "hif8", "link";
297*8bab661aSEmmanuel Vadot            phy-mode = "2500base-x";
298*8bab661aSEmmanuel Vadot            managed = "in-band-status";
299*8bab661aSEmmanuel Vadot            phys = <&cp0_comphy5 2>;
300*8bab661aSEmmanuel Vadot            sfp = <&sfp_eth3>;
301*8bab661aSEmmanuel Vadot            reg = <2>;
302*8bab661aSEmmanuel Vadot            port-id = <2>; /* For backward compatibility. */
303*8bab661aSEmmanuel Vadot            gop-port-id = <3>;
304*8bab661aSEmmanuel Vadot        };
305*8bab661aSEmmanuel Vadot    };
306