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      - socionext,uniphier-nx1-ave4
28
29  reg:
30    maxItems: 1
31
32  interrupts:
33    maxItems: 1
34
35  phy-mode: true
36
37  phy-handle: true
38
39  mac-address: true
40
41  local-mac-address: true
42
43  clocks:
44    minItems: 1
45    maxItems: 4
46
47  clock-names:
48    oneOf:
49      - items:          # for Pro4
50          - const: gio
51          - const: ether
52          - const: ether-gb
53          - const: ether-phy
54      - const: ether    # for others
55
56  resets:
57    minItems: 1
58    maxItems: 2
59
60  reset-names:
61    oneOf:
62      - items:          # for Pro4
63          - const: gio
64          - const: ether
65      - const: ether    # for others
66
67  socionext,syscon-phy-mode:
68    $ref: /schemas/types.yaml#/definitions/phandle-array
69    description:
70      A phandle to syscon with one argument that configures phy mode.
71      The argument is the ID of MAC instance.
72
73  mdio:
74    $ref: mdio.yaml#
75    unevaluatedProperties: false
76
77required:
78  - compatible
79  - reg
80  - interrupts
81  - phy-mode
82  - phy-handle
83  - clocks
84  - clock-names
85  - resets
86  - reset-names
87  - mdio
88
89additionalProperties: false
90
91examples:
92  - |
93    ether: ethernet@65000000 {
94        compatible = "socionext,uniphier-ld20-ave4";
95                reg = <0x65000000 0x8500>;
96                interrupts = <0 66 4>;
97                phy-mode = "rgmii";
98                phy-handle = <&ethphy>;
99                clock-names = "ether";
100                clocks = <&sys_clk 6>;
101                reset-names = "ether";
102                resets = <&sys_rst 6>;
103                socionext,syscon-phy-mode = <&soc_glue 0>;
104
105                mdio {
106                        #address-cells = <1>;
107                        #size-cells = <0>;
108
109                        ethphy: ethernet-phy@1 {
110                                reg = <1>;
111                        };
112                };
113        };
114