xref: /linux/Documentation/devicetree/bindings/net/renesas,ethertsn.yaml (revision eed4edda910fe34dfae8c6bfbcf57f4593a54295)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/net/renesas,ethertsn.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Renesas Ethernet TSN End-station
8
9maintainers:
10  - Niklas Söderlund <niklas.soderlund@ragnatech.se>
11
12description:
13  The RTSN device provides Ethernet network using a 10 Mbps, 100 Mbps, or 1
14  Gbps full-duplex link via MII/GMII/RMII/RGMII. Depending on the connected PHY.
15
16allOf:
17  - $ref: ethernet-controller.yaml#
18
19properties:
20  compatible:
21    items:
22      - enum:
23          - renesas,r8a779g0-ethertsn       # R-Car V4H
24      - const: renesas,rcar-gen4-ethertsn
25
26  reg:
27    items:
28      - description: TSN End Station target
29      - description: generalized Precision Time Protocol target
30
31  reg-names:
32    items:
33      - const: tsnes
34      - const: gptp
35
36  interrupts:
37    items:
38      - description: TX data interrupt
39      - description: RX data interrupt
40
41  interrupt-names:
42    items:
43      - const: tx
44      - const: rx
45
46  clocks:
47    maxItems: 1
48
49  power-domains:
50    maxItems: 1
51
52  resets:
53    maxItems: 1
54
55  phy-mode:
56    contains:
57      enum:
58        - mii
59        - rgmii
60
61  phy-handle:
62    $ref: /schemas/types.yaml#/definitions/phandle
63    description:
64      Specifies a reference to a node representing a PHY device.
65
66  rx-internal-delay-ps:
67    enum: [0, 1800]
68
69  tx-internal-delay-ps:
70    enum: [0, 2000]
71
72  '#address-cells':
73    const: 1
74
75  '#size-cells':
76    const: 0
77
78patternProperties:
79  "^ethernet-phy@[0-9a-f]$":
80    type: object
81    $ref: ethernet-phy.yaml#
82    unevaluatedProperties: false
83
84required:
85  - compatible
86  - reg
87  - reg-names
88  - interrupts
89  - interrupt-names
90  - clocks
91  - power-domains
92  - resets
93  - phy-mode
94  - phy-handle
95  - '#address-cells'
96  - '#size-cells'
97
98additionalProperties: false
99
100examples:
101  - |
102    #include <dt-bindings/clock/r8a779g0-cpg-mssr.h>
103    #include <dt-bindings/interrupt-controller/arm-gic.h>
104    #include <dt-bindings/power/r8a779g0-sysc.h>
105    #include <dt-bindings/gpio/gpio.h>
106
107    tsn0: ethernet@e6460000 {
108        compatible = "renesas,r8a779g0-ethertsn", "renesas,rcar-gen4-ethertsn";
109        reg = <0xe6460000 0x7000>,
110              <0xe6449000 0x500>;
111        reg-names = "tsnes", "gptp";
112        interrupts = <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
113                     <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
114        interrupt-names = "tx", "rx";
115        clocks = <&cpg CPG_MOD 2723>;
116        power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
117        resets = <&cpg 2723>;
118
119        phy-mode = "rgmii";
120        tx-internal-delay-ps = <2000>;
121        phy-handle = <&phy3>;
122
123        #address-cells = <1>;
124        #size-cells = <0>;
125
126        phy3: ethernet-phy@3 {
127            compatible = "ethernet-phy-ieee802.3-c45";
128            reg = <0>;
129            interrupt-parent = <&gpio4>;
130            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
131            reset-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
132        };
133    };
134