1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/socionext,uniphier-ave4.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Socionext AVE ethernet controller
8
9maintainers:
10  - Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
11
12description: |
13  This describes the devicetree bindings for AVE ethernet controller
14  implemented on Socionext UniPhier SoCs.
15
16allOf:
17  - $ref: ethernet-controller.yaml#
18
19properties:
20  compatible:
21    enum:
22      - socionext,uniphier-pro4-ave4
23      - socionext,uniphier-pxs2-ave4
24      - socionext,uniphier-ld11-ave4
25      - socionext,uniphier-ld20-ave4
26      - socionext,uniphier-pxs3-ave4
27
28  reg:
29    maxItems: 1
30
31  interrupts:
32    maxItems: 1
33
34  phy-mode: true
35
36  phy-handle: true
37
38  mac-address: true
39
40  local-mac-address: true
41
42  clocks:
43    minItems: 1
44    maxItems: 4
45
46  clock-names:
47    oneOf:
48      - items:          # for Pro4
49          - const: gio
50          - const: ether
51          - const: ether-gb
52          - const: ether-phy
53      - const: ether    # for others
54
55  resets:
56    minItems: 1
57    maxItems: 2
58
59  reset-names:
60    oneOf:
61      - items:          # for Pro4
62          - const: gio
63          - const: ether
64      - const: ether    # for others
65
66  socionext,syscon-phy-mode:
67    $ref: /schemas/types.yaml#definitions/phandle-array
68    description:
69      A phandle to syscon with one argument that configures phy mode.
70      The argument is the ID of MAC instance.
71
72  mdio:
73    $ref: mdio.yaml#
74
75required:
76  - compatible
77  - reg
78  - interrupts
79  - phy-mode
80  - phy-handle
81  - clocks
82  - clock-names
83  - resets
84  - reset-names
85  - mdio
86
87additionalProperties: false
88
89examples:
90  - |
91    ether: ethernet@65000000 {
92        compatible = "socionext,uniphier-ld20-ave4";
93                reg = <0x65000000 0x8500>;
94                interrupts = <0 66 4>;
95                phy-mode = "rgmii";
96                phy-handle = <&ethphy>;
97                clock-names = "ether";
98                clocks = <&sys_clk 6>;
99                reset-names = "ether";
100                resets = <&sys_rst 6>;
101                socionext,syscon-phy-mode = <&soc_glue 0>;
102
103                mdio {
104                        #address-cells = <1>;
105                        #size-cells = <0>;
106
107                        ethphy: ethernet-phy@1 {
108                                reg = <1>;
109                        };
110                };
111        };
112