xref: /freebsd/sys/contrib/device-tree/Bindings/net/allwinner,sun8i-a83t-emac.yaml (revision 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd)
1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0
2c66ec88fSEmmanuel Vadot%YAML 1.2
3c66ec88fSEmmanuel Vadot---
4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/net/allwinner,sun8i-a83t-emac.yaml#
5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel Vadottitle: Allwinner A83t EMAC Device Tree Bindings
8c66ec88fSEmmanuel Vadot
9c66ec88fSEmmanuel Vadotmaintainers:
10c66ec88fSEmmanuel Vadot  - Chen-Yu Tsai <wens@csie.org>
11c66ec88fSEmmanuel Vadot  - Maxime Ripard <mripard@kernel.org>
12c66ec88fSEmmanuel Vadot
13c66ec88fSEmmanuel Vadotproperties:
14c66ec88fSEmmanuel Vadot  compatible:
15c66ec88fSEmmanuel Vadot    oneOf:
16c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-a83t-emac
17c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-h3-emac
18c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-r40-emac
19c66ec88fSEmmanuel Vadot      - const: allwinner,sun8i-v3s-emac
20c66ec88fSEmmanuel Vadot      - const: allwinner,sun50i-a64-emac
21c66ec88fSEmmanuel Vadot      - items:
22c66ec88fSEmmanuel Vadot          - const: allwinner,sun50i-h6-emac
23c66ec88fSEmmanuel Vadot          - const: allwinner,sun50i-a64-emac
24c66ec88fSEmmanuel Vadot
25c66ec88fSEmmanuel Vadot  reg:
26c66ec88fSEmmanuel Vadot    maxItems: 1
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel Vadot  interrupts:
29c66ec88fSEmmanuel Vadot    maxItems: 1
30c66ec88fSEmmanuel Vadot
31c66ec88fSEmmanuel Vadot  interrupt-names:
32c66ec88fSEmmanuel Vadot    const: macirq
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel Vadot  clocks:
35c66ec88fSEmmanuel Vadot    maxItems: 1
36c66ec88fSEmmanuel Vadot
37c66ec88fSEmmanuel Vadot  clock-names:
38c66ec88fSEmmanuel Vadot    const: stmmaceth
39c66ec88fSEmmanuel Vadot
40c66ec88fSEmmanuel Vadot  syscon:
41*5def4c47SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/phandle
42c66ec88fSEmmanuel Vadot    description:
43c66ec88fSEmmanuel Vadot      Phandle to the device containing the EMAC or GMAC clock
44c66ec88fSEmmanuel Vadot      register
45c66ec88fSEmmanuel Vadot
46c66ec88fSEmmanuel Vadotrequired:
47c66ec88fSEmmanuel Vadot  - compatible
48c66ec88fSEmmanuel Vadot  - reg
49c66ec88fSEmmanuel Vadot  - interrupts
50c66ec88fSEmmanuel Vadot  - interrupt-names
51c66ec88fSEmmanuel Vadot  - clocks
52c66ec88fSEmmanuel Vadot  - clock-names
53c66ec88fSEmmanuel Vadot  - resets
54c66ec88fSEmmanuel Vadot  - reset-names
55c66ec88fSEmmanuel Vadot  - phy-handle
56c66ec88fSEmmanuel Vadot  - phy-mode
57c66ec88fSEmmanuel Vadot  - syscon
58c66ec88fSEmmanuel Vadot
59c66ec88fSEmmanuel VadotallOf:
60c66ec88fSEmmanuel Vadot  - $ref: "snps,dwmac.yaml#"
61c66ec88fSEmmanuel Vadot  - if:
62c66ec88fSEmmanuel Vadot      properties:
63c66ec88fSEmmanuel Vadot        compatible:
64c66ec88fSEmmanuel Vadot          contains:
65c66ec88fSEmmanuel Vadot            enum:
66c66ec88fSEmmanuel Vadot              - allwinner,sun8i-a83t-emac
67c66ec88fSEmmanuel Vadot              - allwinner,sun8i-h3-emac
68c66ec88fSEmmanuel Vadot              - allwinner,sun8i-v3s-emac
69c66ec88fSEmmanuel Vadot              - allwinner,sun50i-a64-emac
70c66ec88fSEmmanuel Vadot
71c66ec88fSEmmanuel Vadot    then:
72c66ec88fSEmmanuel Vadot      properties:
73c66ec88fSEmmanuel Vadot        allwinner,tx-delay-ps:
74c66ec88fSEmmanuel Vadot          default: 0
75c66ec88fSEmmanuel Vadot          minimum: 0
76c66ec88fSEmmanuel Vadot          maximum: 700
77c66ec88fSEmmanuel Vadot          multipleOf: 100
78c66ec88fSEmmanuel Vadot          description:
79c66ec88fSEmmanuel Vadot            External RGMII PHY TX clock delay chain value in ps.
80c66ec88fSEmmanuel Vadot
81c66ec88fSEmmanuel Vadot        allwinner,rx-delay-ps:
82c66ec88fSEmmanuel Vadot          default: 0
83c66ec88fSEmmanuel Vadot          minimum: 0
84c66ec88fSEmmanuel Vadot          maximum: 3100
85c66ec88fSEmmanuel Vadot          multipleOf: 100
86c66ec88fSEmmanuel Vadot          description:
87c66ec88fSEmmanuel Vadot            External RGMII PHY TX clock delay chain value in ps.
88c66ec88fSEmmanuel Vadot
89c66ec88fSEmmanuel Vadot  - if:
90c66ec88fSEmmanuel Vadot      properties:
91c66ec88fSEmmanuel Vadot        compatible:
92c66ec88fSEmmanuel Vadot          contains:
93c66ec88fSEmmanuel Vadot            enum:
94c66ec88fSEmmanuel Vadot              - allwinner,sun8i-r40-emac
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot    then:
97c66ec88fSEmmanuel Vadot      properties:
98c66ec88fSEmmanuel Vadot        allwinner,rx-delay-ps:
99c66ec88fSEmmanuel Vadot          default: 0
100c66ec88fSEmmanuel Vadot          minimum: 0
101c66ec88fSEmmanuel Vadot          maximum: 700
102c66ec88fSEmmanuel Vadot          multipleOf: 100
103c66ec88fSEmmanuel Vadot          description:
104c66ec88fSEmmanuel Vadot            External RGMII PHY TX clock delay chain value in ps.
105c66ec88fSEmmanuel Vadot
106c66ec88fSEmmanuel Vadot  - if:
107c66ec88fSEmmanuel Vadot      properties:
108c66ec88fSEmmanuel Vadot        compatible:
109c66ec88fSEmmanuel Vadot          contains:
110c66ec88fSEmmanuel Vadot            enum:
111c66ec88fSEmmanuel Vadot              - allwinner,sun8i-h3-emac
112c66ec88fSEmmanuel Vadot              - allwinner,sun8i-v3s-emac
113c66ec88fSEmmanuel Vadot
114c66ec88fSEmmanuel Vadot    then:
115c66ec88fSEmmanuel Vadot      properties:
116c66ec88fSEmmanuel Vadot        allwinner,leds-active-low:
117*5def4c47SEmmanuel Vadot          $ref: /schemas/types.yaml#/definitions/flag
118c66ec88fSEmmanuel Vadot          description:
119c66ec88fSEmmanuel Vadot            EPHY LEDs are active low.
120c66ec88fSEmmanuel Vadot
121c66ec88fSEmmanuel Vadot        mdio-mux:
122c66ec88fSEmmanuel Vadot          type: object
123c66ec88fSEmmanuel Vadot
124c66ec88fSEmmanuel Vadot          properties:
125c66ec88fSEmmanuel Vadot            compatible:
126c66ec88fSEmmanuel Vadot              const: allwinner,sun8i-h3-mdio-mux
127c66ec88fSEmmanuel Vadot
128c66ec88fSEmmanuel Vadot            mdio-parent-bus:
129*5def4c47SEmmanuel Vadot              $ref: /schemas/types.yaml#/definitions/phandle
130c66ec88fSEmmanuel Vadot              description:
131c66ec88fSEmmanuel Vadot                Phandle to EMAC MDIO.
132c66ec88fSEmmanuel Vadot
133c66ec88fSEmmanuel Vadot            mdio@1:
134c66ec88fSEmmanuel Vadot              type: object
135c66ec88fSEmmanuel Vadot              description: Internal MDIO Bus
136c66ec88fSEmmanuel Vadot
137c66ec88fSEmmanuel Vadot              properties:
138c66ec88fSEmmanuel Vadot                "#address-cells":
139c66ec88fSEmmanuel Vadot                  const: 1
140c66ec88fSEmmanuel Vadot
141c66ec88fSEmmanuel Vadot                "#size-cells":
142c66ec88fSEmmanuel Vadot                  const: 0
143c66ec88fSEmmanuel Vadot
144c66ec88fSEmmanuel Vadot                compatible:
145c66ec88fSEmmanuel Vadot                  const: allwinner,sun8i-h3-mdio-internal
146c66ec88fSEmmanuel Vadot
147c66ec88fSEmmanuel Vadot                reg:
148c66ec88fSEmmanuel Vadot                  const: 1
149c66ec88fSEmmanuel Vadot
150c66ec88fSEmmanuel Vadot              patternProperties:
151c66ec88fSEmmanuel Vadot                "^ethernet-phy@[0-9a-f]$":
152c66ec88fSEmmanuel Vadot                  type: object
153c66ec88fSEmmanuel Vadot                  description:
154c66ec88fSEmmanuel Vadot                    Integrated PHY node
155c66ec88fSEmmanuel Vadot
156c66ec88fSEmmanuel Vadot                  properties:
157c66ec88fSEmmanuel Vadot                    clocks:
158c66ec88fSEmmanuel Vadot                      maxItems: 1
159c66ec88fSEmmanuel Vadot
160c66ec88fSEmmanuel Vadot                    resets:
161c66ec88fSEmmanuel Vadot                      maxItems: 1
162c66ec88fSEmmanuel Vadot
163c66ec88fSEmmanuel Vadot                  required:
164c66ec88fSEmmanuel Vadot                    - clocks
165c66ec88fSEmmanuel Vadot                    - resets
166c66ec88fSEmmanuel Vadot
167c66ec88fSEmmanuel Vadot
168c66ec88fSEmmanuel Vadot            mdio@2:
169c66ec88fSEmmanuel Vadot              type: object
170c66ec88fSEmmanuel Vadot              description: External MDIO Bus (H3 only)
171c66ec88fSEmmanuel Vadot
172c66ec88fSEmmanuel Vadot              properties:
173c66ec88fSEmmanuel Vadot                "#address-cells":
174c66ec88fSEmmanuel Vadot                  const: 1
175c66ec88fSEmmanuel Vadot
176c66ec88fSEmmanuel Vadot                "#size-cells":
177c66ec88fSEmmanuel Vadot                  const: 0
178c66ec88fSEmmanuel Vadot
179c66ec88fSEmmanuel Vadot                reg:
180c66ec88fSEmmanuel Vadot                  const: 2
181c66ec88fSEmmanuel Vadot
182c66ec88fSEmmanuel Vadot          required:
183c66ec88fSEmmanuel Vadot            - compatible
184c66ec88fSEmmanuel Vadot            - mdio-parent-bus
185c66ec88fSEmmanuel Vadot            - mdio@1
186c66ec88fSEmmanuel Vadot
187c66ec88fSEmmanuel VadotunevaluatedProperties: false
188c66ec88fSEmmanuel Vadot
189c66ec88fSEmmanuel Vadotexamples:
190c66ec88fSEmmanuel Vadot  - |
191c66ec88fSEmmanuel Vadot    ethernet@1c0b000 {
192c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun8i-h3-emac";
193c66ec88fSEmmanuel Vadot        syscon = <&syscon>;
194c66ec88fSEmmanuel Vadot        reg = <0x01c0b000 0x104>;
195c66ec88fSEmmanuel Vadot        interrupts = <0 82 1>;
196c66ec88fSEmmanuel Vadot        interrupt-names = "macirq";
197c66ec88fSEmmanuel Vadot        resets = <&ccu 12>;
198c66ec88fSEmmanuel Vadot        reset-names = "stmmaceth";
199c66ec88fSEmmanuel Vadot        clocks = <&ccu 27>;
200c66ec88fSEmmanuel Vadot        clock-names = "stmmaceth";
201c66ec88fSEmmanuel Vadot
202c66ec88fSEmmanuel Vadot        phy-handle = <&int_mii_phy>;
203c66ec88fSEmmanuel Vadot        phy-mode = "mii";
204c66ec88fSEmmanuel Vadot        allwinner,leds-active-low;
205c66ec88fSEmmanuel Vadot
206c66ec88fSEmmanuel Vadot        mdio1: mdio {
207c66ec88fSEmmanuel Vadot            #address-cells = <1>;
208c66ec88fSEmmanuel Vadot            #size-cells = <0>;
209c66ec88fSEmmanuel Vadot            compatible = "snps,dwmac-mdio";
210c66ec88fSEmmanuel Vadot        };
211c66ec88fSEmmanuel Vadot
212c66ec88fSEmmanuel Vadot        mdio-mux {
213c66ec88fSEmmanuel Vadot            compatible = "allwinner,sun8i-h3-mdio-mux";
214c66ec88fSEmmanuel Vadot            #address-cells = <1>;
215c66ec88fSEmmanuel Vadot            #size-cells = <0>;
216c66ec88fSEmmanuel Vadot
217c66ec88fSEmmanuel Vadot            mdio-parent-bus = <&mdio1>;
218c66ec88fSEmmanuel Vadot
219c66ec88fSEmmanuel Vadot            int_mii_phy: mdio@1 {
220c66ec88fSEmmanuel Vadot                compatible = "allwinner,sun8i-h3-mdio-internal";
221c66ec88fSEmmanuel Vadot                reg = <1>;
222c66ec88fSEmmanuel Vadot                #address-cells = <1>;
223c66ec88fSEmmanuel Vadot                #size-cells = <0>;
224c66ec88fSEmmanuel Vadot
225c66ec88fSEmmanuel Vadot                ethernet-phy@1 {
226c66ec88fSEmmanuel Vadot                    reg = <1>;
227c66ec88fSEmmanuel Vadot                    clocks = <&ccu 67>;
228c66ec88fSEmmanuel Vadot                    resets = <&ccu 39>;
229c66ec88fSEmmanuel Vadot                    phy-is-integrated;
230c66ec88fSEmmanuel Vadot                };
231c66ec88fSEmmanuel Vadot            };
232c66ec88fSEmmanuel Vadot
233c66ec88fSEmmanuel Vadot            mdio@2 {
234c66ec88fSEmmanuel Vadot                reg = <2>;
235c66ec88fSEmmanuel Vadot                #address-cells = <1>;
236c66ec88fSEmmanuel Vadot                #size-cells = <0>;
237c66ec88fSEmmanuel Vadot            };
238c66ec88fSEmmanuel Vadot        };
239c66ec88fSEmmanuel Vadot    };
240c66ec88fSEmmanuel Vadot
241c66ec88fSEmmanuel Vadot  - |
242c66ec88fSEmmanuel Vadot    ethernet@1c0b000 {
243c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun8i-h3-emac";
244c66ec88fSEmmanuel Vadot        syscon = <&syscon>;
245c66ec88fSEmmanuel Vadot        reg = <0x01c0b000 0x104>;
246c66ec88fSEmmanuel Vadot        interrupts = <0 82 1>;
247c66ec88fSEmmanuel Vadot        interrupt-names = "macirq";
248c66ec88fSEmmanuel Vadot        resets = <&ccu 12>;
249c66ec88fSEmmanuel Vadot        reset-names = "stmmaceth";
250c66ec88fSEmmanuel Vadot        clocks = <&ccu 27>;
251c66ec88fSEmmanuel Vadot        clock-names = "stmmaceth";
252c66ec88fSEmmanuel Vadot
253c66ec88fSEmmanuel Vadot        phy-handle = <&ext_rgmii_phy>;
254c66ec88fSEmmanuel Vadot        phy-mode = "rgmii";
255c66ec88fSEmmanuel Vadot        allwinner,leds-active-low;
256c66ec88fSEmmanuel Vadot
257c66ec88fSEmmanuel Vadot        mdio2: mdio {
258c66ec88fSEmmanuel Vadot            #address-cells = <1>;
259c66ec88fSEmmanuel Vadot            #size-cells = <0>;
260c66ec88fSEmmanuel Vadot            compatible = "snps,dwmac-mdio";
261c66ec88fSEmmanuel Vadot        };
262c66ec88fSEmmanuel Vadot
263c66ec88fSEmmanuel Vadot        mdio-mux {
264c66ec88fSEmmanuel Vadot            compatible = "allwinner,sun8i-h3-mdio-mux";
265c66ec88fSEmmanuel Vadot            #address-cells = <1>;
266c66ec88fSEmmanuel Vadot            #size-cells = <0>;
267c66ec88fSEmmanuel Vadot            mdio-parent-bus = <&mdio2>;
268c66ec88fSEmmanuel Vadot
269c66ec88fSEmmanuel Vadot            mdio@1 {
270c66ec88fSEmmanuel Vadot                compatible = "allwinner,sun8i-h3-mdio-internal";
271c66ec88fSEmmanuel Vadot                reg = <1>;
272c66ec88fSEmmanuel Vadot                #address-cells = <1>;
273c66ec88fSEmmanuel Vadot                #size-cells = <0>;
274c66ec88fSEmmanuel Vadot
275c66ec88fSEmmanuel Vadot                ethernet-phy@1 {
276c66ec88fSEmmanuel Vadot                    reg = <1>;
277c66ec88fSEmmanuel Vadot                    clocks = <&ccu 67>;
278c66ec88fSEmmanuel Vadot                    resets = <&ccu 39>;
279c66ec88fSEmmanuel Vadot                };
280c66ec88fSEmmanuel Vadot            };
281c66ec88fSEmmanuel Vadot
282c66ec88fSEmmanuel Vadot            mdio@2 {
283c66ec88fSEmmanuel Vadot                reg = <2>;
284c66ec88fSEmmanuel Vadot                #address-cells = <1>;
285c66ec88fSEmmanuel Vadot                #size-cells = <0>;
286c66ec88fSEmmanuel Vadot
287c66ec88fSEmmanuel Vadot                ext_rgmii_phy: ethernet-phy@1 {
288c66ec88fSEmmanuel Vadot                    reg = <1>;
289c66ec88fSEmmanuel Vadot                };
290c66ec88fSEmmanuel Vadot            };
291c66ec88fSEmmanuel Vadot        };
292c66ec88fSEmmanuel Vadot    };
293c66ec88fSEmmanuel Vadot
294c66ec88fSEmmanuel Vadot  - |
295c66ec88fSEmmanuel Vadot    ethernet@1c0b000 {
296c66ec88fSEmmanuel Vadot        compatible = "allwinner,sun8i-a83t-emac";
297c66ec88fSEmmanuel Vadot        syscon = <&syscon>;
298c66ec88fSEmmanuel Vadot        reg = <0x01c0b000 0x104>;
299c66ec88fSEmmanuel Vadot        interrupts = <0 82 1>;
300c66ec88fSEmmanuel Vadot        interrupt-names = "macirq";
301c66ec88fSEmmanuel Vadot        resets = <&ccu 13>;
302c66ec88fSEmmanuel Vadot        reset-names = "stmmaceth";
303c66ec88fSEmmanuel Vadot        clocks = <&ccu 27>;
304c66ec88fSEmmanuel Vadot        clock-names = "stmmaceth";
305c66ec88fSEmmanuel Vadot        phy-handle = <&ext_rgmii_phy1>;
306c66ec88fSEmmanuel Vadot        phy-mode = "rgmii";
307c66ec88fSEmmanuel Vadot
308c66ec88fSEmmanuel Vadot        mdio {
309c66ec88fSEmmanuel Vadot            compatible = "snps,dwmac-mdio";
310c66ec88fSEmmanuel Vadot            #address-cells = <1>;
311c66ec88fSEmmanuel Vadot            #size-cells = <0>;
312c66ec88fSEmmanuel Vadot
313c66ec88fSEmmanuel Vadot            ext_rgmii_phy1: ethernet-phy@1 {
314c66ec88fSEmmanuel Vadot                reg = <1>;
315c66ec88fSEmmanuel Vadot            };
316c66ec88fSEmmanuel Vadot        };
317c66ec88fSEmmanuel Vadot    };
318c66ec88fSEmmanuel Vadot
319c66ec88fSEmmanuel Vadot...
320