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    items:
70      - items:
71          - description: phandle to syscon that configures phy mode
72          - description: ID of MAC instance
73    description:
74      A phandle to syscon with one argument that configures phy mode.
75      The argument is the ID of MAC instance.
76
77  mdio:
78    $ref: mdio.yaml#
79    unevaluatedProperties: false
80
81required:
82  - compatible
83  - reg
84  - interrupts
85  - phy-mode
86  - phy-handle
87  - clocks
88  - clock-names
89  - resets
90  - reset-names
91  - mdio
92
93additionalProperties: false
94
95examples:
96  - |
97    ether: ethernet@65000000 {
98        compatible = "socionext,uniphier-ld20-ave4";
99                reg = <0x65000000 0x8500>;
100                interrupts = <0 66 4>;
101                phy-mode = "rgmii";
102                phy-handle = <&ethphy>;
103                clock-names = "ether";
104                clocks = <&sys_clk 6>;
105                reset-names = "ether";
106                resets = <&sys_rst 6>;
107                socionext,syscon-phy-mode = <&soc_glue 0>;
108
109                mdio {
110                        #address-cells = <1>;
111                        #size-cells = <0>;
112
113                        ethphy: ethernet-phy@1 {
114                                reg = <1>;
115                        };
116                };
117        };
118