xref: /freebsd/sys/contrib/device-tree/Bindings/net/airoha,en7581-eth.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
1*0e8011faSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*0e8011faSEmmanuel Vadot%YAML 1.2
3*0e8011faSEmmanuel Vadot---
4*0e8011faSEmmanuel Vadot$id: http://devicetree.org/schemas/net/airoha,en7581-eth.yaml#
5*0e8011faSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*0e8011faSEmmanuel Vadot
7*0e8011faSEmmanuel Vadottitle: Airoha EN7581 Frame Engine Ethernet controller
8*0e8011faSEmmanuel Vadot
9*0e8011faSEmmanuel Vadotmaintainers:
10*0e8011faSEmmanuel Vadot  - Lorenzo Bianconi <lorenzo@kernel.org>
11*0e8011faSEmmanuel Vadot
12*0e8011faSEmmanuel Vadotdescription:
13*0e8011faSEmmanuel Vadot  The frame engine ethernet controller can be found on Airoha SoCs.
14*0e8011faSEmmanuel Vadot  These SoCs have multi-GMAC ports.
15*0e8011faSEmmanuel Vadot
16*0e8011faSEmmanuel Vadotproperties:
17*0e8011faSEmmanuel Vadot  compatible:
18*0e8011faSEmmanuel Vadot    enum:
19*0e8011faSEmmanuel Vadot      - airoha,en7581-eth
20*0e8011faSEmmanuel Vadot
21*0e8011faSEmmanuel Vadot  reg:
22*0e8011faSEmmanuel Vadot    items:
23*0e8011faSEmmanuel Vadot      - description: Frame engine base address
24*0e8011faSEmmanuel Vadot      - description: QDMA0 base address
25*0e8011faSEmmanuel Vadot      - description: QDMA1 base address
26*0e8011faSEmmanuel Vadot
27*0e8011faSEmmanuel Vadot  reg-names:
28*0e8011faSEmmanuel Vadot    items:
29*0e8011faSEmmanuel Vadot      - const: fe
30*0e8011faSEmmanuel Vadot      - const: qdma0
31*0e8011faSEmmanuel Vadot      - const: qdma1
32*0e8011faSEmmanuel Vadot
33*0e8011faSEmmanuel Vadot  interrupts:
34*0e8011faSEmmanuel Vadot    items:
35*0e8011faSEmmanuel Vadot      - description: QDMA lan irq0
36*0e8011faSEmmanuel Vadot      - description: QDMA lan irq1
37*0e8011faSEmmanuel Vadot      - description: QDMA lan irq2
38*0e8011faSEmmanuel Vadot      - description: QDMA lan irq3
39*0e8011faSEmmanuel Vadot      - description: QDMA wan irq0
40*0e8011faSEmmanuel Vadot      - description: QDMA wan irq1
41*0e8011faSEmmanuel Vadot      - description: QDMA wan irq2
42*0e8011faSEmmanuel Vadot      - description: QDMA wan irq3
43*0e8011faSEmmanuel Vadot      - description: FE error irq
44*0e8011faSEmmanuel Vadot      - description: PDMA irq
45*0e8011faSEmmanuel Vadot
46*0e8011faSEmmanuel Vadot  resets:
47*0e8011faSEmmanuel Vadot    maxItems: 8
48*0e8011faSEmmanuel Vadot
49*0e8011faSEmmanuel Vadot  reset-names:
50*0e8011faSEmmanuel Vadot    items:
51*0e8011faSEmmanuel Vadot      - const: fe
52*0e8011faSEmmanuel Vadot      - const: pdma
53*0e8011faSEmmanuel Vadot      - const: qdma
54*0e8011faSEmmanuel Vadot      - const: xsi-mac
55*0e8011faSEmmanuel Vadot      - const: hsi0-mac
56*0e8011faSEmmanuel Vadot      - const: hsi1-mac
57*0e8011faSEmmanuel Vadot      - const: hsi-mac
58*0e8011faSEmmanuel Vadot      - const: xfp-mac
59*0e8011faSEmmanuel Vadot
60*0e8011faSEmmanuel Vadot  "#address-cells":
61*0e8011faSEmmanuel Vadot    const: 1
62*0e8011faSEmmanuel Vadot
63*0e8011faSEmmanuel Vadot  "#size-cells":
64*0e8011faSEmmanuel Vadot    const: 0
65*0e8011faSEmmanuel Vadot
66*0e8011faSEmmanuel VadotpatternProperties:
67*0e8011faSEmmanuel Vadot  "^ethernet@[1-4]$":
68*0e8011faSEmmanuel Vadot    type: object
69*0e8011faSEmmanuel Vadot    unevaluatedProperties: false
70*0e8011faSEmmanuel Vadot    $ref: ethernet-controller.yaml#
71*0e8011faSEmmanuel Vadot    description:
72*0e8011faSEmmanuel Vadot      Ethernet GMAC port associated to the MAC controller
73*0e8011faSEmmanuel Vadot    properties:
74*0e8011faSEmmanuel Vadot      compatible:
75*0e8011faSEmmanuel Vadot        const: airoha,eth-mac
76*0e8011faSEmmanuel Vadot
77*0e8011faSEmmanuel Vadot      reg:
78*0e8011faSEmmanuel Vadot        minimum: 1
79*0e8011faSEmmanuel Vadot        maximum: 4
80*0e8011faSEmmanuel Vadot        description: GMAC port identifier
81*0e8011faSEmmanuel Vadot
82*0e8011faSEmmanuel Vadot    required:
83*0e8011faSEmmanuel Vadot      - reg
84*0e8011faSEmmanuel Vadot      - compatible
85*0e8011faSEmmanuel Vadot
86*0e8011faSEmmanuel Vadotrequired:
87*0e8011faSEmmanuel Vadot  - compatible
88*0e8011faSEmmanuel Vadot  - reg
89*0e8011faSEmmanuel Vadot  - interrupts
90*0e8011faSEmmanuel Vadot  - resets
91*0e8011faSEmmanuel Vadot  - reset-names
92*0e8011faSEmmanuel Vadot
93*0e8011faSEmmanuel VadotunevaluatedProperties: false
94*0e8011faSEmmanuel Vadot
95*0e8011faSEmmanuel Vadotexamples:
96*0e8011faSEmmanuel Vadot  - |
97*0e8011faSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
98*0e8011faSEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
99*0e8011faSEmmanuel Vadot    #include <dt-bindings/clock/en7523-clk.h>
100*0e8011faSEmmanuel Vadot
101*0e8011faSEmmanuel Vadot    soc {
102*0e8011faSEmmanuel Vadot      #address-cells = <2>;
103*0e8011faSEmmanuel Vadot      #size-cells = <2>;
104*0e8011faSEmmanuel Vadot
105*0e8011faSEmmanuel Vadot      eth: ethernet@1fb50000 {
106*0e8011faSEmmanuel Vadot        compatible = "airoha,en7581-eth";
107*0e8011faSEmmanuel Vadot        reg = <0 0x1fb50000 0 0x2600>,
108*0e8011faSEmmanuel Vadot              <0 0x1fb54000 0 0x2000>,
109*0e8011faSEmmanuel Vadot              <0 0x1fb56000 0 0x2000>;
110*0e8011faSEmmanuel Vadot        reg-names = "fe", "qdma0", "qdma1";
111*0e8011faSEmmanuel Vadot
112*0e8011faSEmmanuel Vadot        resets = <&scuclk 44>,
113*0e8011faSEmmanuel Vadot                 <&scuclk 30>,
114*0e8011faSEmmanuel Vadot                 <&scuclk 31>,
115*0e8011faSEmmanuel Vadot                 <&scuclk 6>,
116*0e8011faSEmmanuel Vadot                 <&scuclk 15>,
117*0e8011faSEmmanuel Vadot                 <&scuclk 16>,
118*0e8011faSEmmanuel Vadot                 <&scuclk 17>,
119*0e8011faSEmmanuel Vadot                 <&scuclk 26>;
120*0e8011faSEmmanuel Vadot        reset-names = "fe", "pdma", "qdma", "xsi-mac",
121*0e8011faSEmmanuel Vadot                      "hsi0-mac", "hsi1-mac", "hsi-mac",
122*0e8011faSEmmanuel Vadot                      "xfp-mac";
123*0e8011faSEmmanuel Vadot
124*0e8011faSEmmanuel Vadot        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
125*0e8011faSEmmanuel Vadot                     <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
126*0e8011faSEmmanuel Vadot                     <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
127*0e8011faSEmmanuel Vadot                     <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
128*0e8011faSEmmanuel Vadot                     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
129*0e8011faSEmmanuel Vadot                     <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
130*0e8011faSEmmanuel Vadot                     <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
131*0e8011faSEmmanuel Vadot                     <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
132*0e8011faSEmmanuel Vadot                     <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
133*0e8011faSEmmanuel Vadot                     <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
134*0e8011faSEmmanuel Vadot
135*0e8011faSEmmanuel Vadot        #address-cells = <1>;
136*0e8011faSEmmanuel Vadot        #size-cells = <0>;
137*0e8011faSEmmanuel Vadot
138*0e8011faSEmmanuel Vadot        mac: ethernet@1 {
139*0e8011faSEmmanuel Vadot          compatible = "airoha,eth-mac";
140*0e8011faSEmmanuel Vadot          reg = <1>;
141*0e8011faSEmmanuel Vadot        };
142*0e8011faSEmmanuel Vadot      };
143*0e8011faSEmmanuel Vadot    };
144