summaryrefslogtreecommitdiffstats
path: root/dts/Bindings/phy/ti,phy-j721e-wiz.yaml
blob: dcd63908aeaefe6e5fe7db312f3453b75c8bedff (plain) (blame)
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com/
%YAML 1.2
---
$id: "http://devicetree.org/schemas/phy/ti,phy-j721e-wiz.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"

title: TI J721E WIZ (SERDES Wrapper)

maintainers:
  - Kishon Vijay Abraham I <kishon@ti.com>

properties:
  compatible:
    enum:
      - ti,j721e-wiz-16g
      - ti,j721e-wiz-10g
      - ti,am64-wiz-10g

  power-domains:
    maxItems: 1

  clocks:
    maxItems: 3
    description: clock-specifier to represent input to the WIZ

  clock-names:
    items:
      - const: fck
      - const: core_ref_clk
      - const: ext_ref_clk

  num-lanes:
    minimum: 1
    maximum: 4

  "#address-cells":
    const: 1

  "#size-cells":
    const: 1

  "#reset-cells":
    const: 1

  "#clock-cells":
    const: 1

  ranges: true

  assigned-clocks:
    minItems: 1
    maxItems: 2

  assigned-clock-parents:
    minItems: 1
    maxItems: 2

  assigned-clock-rates:
    minItems: 1
    maxItems: 2

  typec-dir-gpios:
    maxItems: 1
    description:
      GPIO to signal Type-C cable orientation for lane swap.
      If GPIO is active, lane 0 and lane 1 of SERDES will be swapped to
      achieve the funtionality of an external type-C plug flip mux.

  typec-dir-debounce-ms:
    minimum: 100
    maximum: 1000
    default: 100
    description:
      Number of milliseconds to wait before sampling typec-dir-gpio.
      If not specified, the default debounce of 100ms will be used.
      Type-C spec states minimum CC pin debounce of 100 ms and maximum
      of 200 ms. However, some solutions might need more than 200 ms.

  refclk-dig:
    type: object
    description: |
      WIZ node should have subnode for refclk_dig to select the reference
      clock source for the reference clock used in the PHY and PMA digital
      logic.
    properties:
      clocks:
        minItems: 2
        maxItems: 4
        description: Phandle to two (Torrent) or four (Sierra) clock nodes representing
          the inputs to refclk_dig

      "#clock-cells":
        const: 0

      assigned-clocks:
        maxItems: 1

      assigned-clock-parents:
        maxItems: 1

    required:
      - clocks
      - "#clock-cells"
      - assigned-clocks
      - assigned-clock-parents

patternProperties:
  "^pll[0|1]-refclk$":
    type: object
    description: |
      WIZ node should have subnodes for each of the PLLs present in
      the SERDES.
    properties:
      clocks:
        maxItems: 2
        description: Phandle to clock nodes representing the two inputs to PLL.

      "#clock-cells":
        const: 0

      assigned-clocks:
        maxItems: 1

      assigned-clock-parents:
        maxItems: 1

    required:
      - clocks
      - "#clock-cells"
      - assigned-clocks
      - assigned-clock-parents

  "^cmn-refclk1?-dig-div$":
    type: object
    description:
      WIZ node should have subnodes for each of the PMA common refclock
      provided by the SERDES.
    properties:
      clocks:
        maxItems: 1
        description: Phandle to the clock node representing the input to the
          divider clock.

      "#clock-cells":
        const: 0

    required:
      - clocks
      - "#clock-cells"

  "^serdes@[0-9a-f]+$":
    type: object
    description: |
      WIZ node should have '1' subnode for the SERDES. It could be either
      Sierra SERDES or Torrent SERDES. Sierra SERDES should follow the
      bindings specified in
      Documentation/devicetree/bindings/phy/phy-cadence-sierra.yaml
      Torrent SERDES should follow the bindings specified in
      Documentation/devicetree/bindings/phy/phy-cadence-torrent.yaml

required:
  - compatible
  - power-domains
  - clocks
  - clock-names
  - num-lanes
  - "#address-cells"
  - "#size-cells"
  - "#reset-cells"
  - ranges

additionalProperties: false

examples:
  - |
    #include <dt-bindings/soc/ti,sci_pm_domain.h>

    wiz@5000000 {
           compatible = "ti,j721e-wiz-16g";
           #address-cells = <1>;
           #size-cells = <1>;
           power-domains = <&k3_pds 292 TI_SCI_PD_EXCLUSIVE>;
           clocks = <&k3_clks 292 5>, <&k3_clks 292 11>, <&dummy_cmn_refclk>;
           clock-names = "fck", "core_ref_clk", "ext_ref_clk";
           assigned-clocks = <&k3_clks 292 11>, <&k3_clks 292 0>;
           assigned-clock-parents = <&k3_clks 292 15>, <&k3_clks 292 4>;
           num-lanes = <2>;
           #reset-cells = <1>;
           ranges = <0x5000000 0x5000000 0x10000>;

           pll0-refclk {
                  clocks = <&k3_clks 293 13>, <&dummy_cmn_refclk>;
                  #clock-cells = <0>;
                  assigned-clocks = <&wiz1_pll0_refclk>;
                  assigned-clock-parents = <&k3_clks 293 13>;
           };

           pll1-refclk {
                  clocks = <&k3_clks 293 0>, <&dummy_cmn_refclk1>;
                  #clock-cells = <0>;
                  assigned-clocks = <&wiz1_pll1_refclk>;
                  assigned-clock-parents = <&k3_clks 293 0>;
           };

           cmn-refclk-dig-div {
                  clocks = <&wiz1_refclk_dig>;
                  #clock-cells = <0>;
           };

           cmn-refclk1-dig-div {
                  clocks = <&wiz1_pll1_refclk>;
                  #clock-cells = <0>;
           };

           refclk-dig {
                  clocks = <&k3_clks 292 11>, <&k3_clks 292 0>,
                          <&dummy_cmn_refclk>, <&dummy_cmn_refclk1>;
                  #clock-cells = <0>;
                  assigned-clocks = <&wiz0_refclk_dig>;
                  assigned-clock-parents = <&k3_clks 292 11>;
           };

           serdes@5000000 {
                  compatible = "ti,sierra-phy-t0";
                  reg-names = "serdes";
                  reg = <0x5000000 0x10000>;
                  #address-cells = <1>;
                  #size-cells = <0>;
                  resets = <&serdes_wiz0 0>;
                  reset-names = "sierra_reset";
                  clocks = <&wiz0_cmn_refclk_dig_div>, <&wiz0_cmn_refclk1_dig_div>;
                  clock-names = "cmn_refclk_dig_div", "cmn_refclk1_dig_div";
           };
    };