aboutsummaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/net/renesas,ethertsn.yaml
blob: ea35d19be829a37a657f6a3fb45153981ea16fb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/renesas,ethertsn.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas Ethernet TSN End-station

maintainers:
  - Niklas Söderlund <niklas.soderlund@ragnatech.se>

description:
  The RTSN device provides Ethernet network using a 10 Mbps, 100 Mbps, or 1
  Gbps full-duplex link via MII/GMII/RMII/RGMII. Depending on the connected PHY.

allOf:
  - $ref: ethernet-controller.yaml#

properties:
  compatible:
    items:
      - enum:
          - renesas,r8a779g0-ethertsn       # R-Car V4H
      - const: renesas,rcar-gen4-ethertsn

  reg:
    items:
      - description: TSN End Station target
      - description: generalized Precision Time Protocol target

  reg-names:
    items:
      - const: tsnes
      - const: gptp

  interrupts:
    items:
      - description: TX data interrupt
      - description: RX data interrupt

  interrupt-names:
    items:
      - const: tx
      - const: rx

  clocks:
    maxItems: 1

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  phy-mode:
    contains:
      enum:
        - mii
        - rgmii

  phy-handle:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      Specifies a reference to a node representing a PHY device.

  rx-internal-delay-ps:
    enum: [0, 1800]
    default: 0

  tx-internal-delay-ps:
    enum: [0, 2000]
    default: 0

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

patternProperties:
  "^ethernet-phy@[0-9a-f]$":
    type: object
    $ref: ethernet-phy.yaml#
    unevaluatedProperties: false

required:
  - compatible
  - reg
  - reg-names
  - interrupts
  - interrupt-names
  - clocks
  - power-domains
  - resets
  - phy-mode
  - phy-handle
  - '#address-cells'
  - '#size-cells'

additionalProperties: false

examples:
  - |
    #include <dt-bindings/clock/r8a779g0-cpg-mssr.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a779g0-sysc.h>
    #include <dt-bindings/gpio/gpio.h>

    tsn0: ethernet@e6460000 {
        compatible = "renesas,r8a779g0-ethertsn", "renesas,rcar-gen4-ethertsn";
        reg = <0xe6460000 0x7000>,
              <0xe6449000 0x500>;
        reg-names = "tsnes", "gptp";
        interrupts = <GIC_SPI 429 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 430 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "tx", "rx";
        clocks = <&cpg CPG_MOD 2723>;
        power-domains = <&sysc R8A779G0_PD_ALWAYS_ON>;
        resets = <&cpg 2723>;

        phy-mode = "rgmii";
        tx-internal-delay-ps = <2000>;
        phy-handle = <&phy3>;

        #address-cells = <1>;
        #size-cells = <0>;

        phy3: ethernet-phy@3 {
            compatible = "ethernet-phy-ieee802.3-c45";
            reg = <0>;
            interrupt-parent = <&gpio4>;
            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
            reset-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
        };
    };