ti-phy.txt
13.1 KB
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
TI PHY: DT DOCUMENTATION FOR PHYs in TI PLATFORMs
OMAP CONTROL PHY
Required properties:
- compatible: Should be one of
"ti,control-phy-otghs" - if it has otghs_control mailbox register as on OMAP4.
"ti,control-phy-usb2" - if it has Power down bit in control_dev_conf register
e.g. USB2_PHY on OMAP5.
"ti,control-phy-pipe3" - if it has DPLL and individual Rx & Tx power control
e.g. USB3 PHY and SATA PHY on OMAP5.
"ti,control-phy-pcie" - for pcie to support external clock for pcie and to
set PCS delay value.
e.g. PCIE PHY in DRA7x
"ti,control-phy-usb2-dra7" - if it has power down register like USB2 PHY on
DRA7 platform.
"ti,control-phy-usb2-am437" - if it has power down register like USB2 PHY on
AM437 platform.
- reg : register ranges as listed in the reg-names property
- reg-names: "otghs_control" for control-phy-otghs
"power", "pcie_pcs" and "control_sma" for control-phy-pcie
"power" for all other types
omap_control_usb: omap-control-usb@4a002300 {
compatible = "ti,control-phy-otghs";
reg = <0x4a00233c 0x4>;
reg-names = "otghs_control";
};
OMAP USB2 PHY
Required properties:
- compatible: Should be "ti,omap-usb2"
Should be "ti,dra7x-usb2" for the 1st instance of USB2 PHY on
DRA7x
Should be "ti,dra7x-usb2-phy2" for the 2nd instance of USB2 PHY
in DRA7x
- reg : Address and length of the register set for the device.
- #phy-cells: determine the number of cells that should be given in the
phandle while referencing this phy.
- clocks: a list of phandles and clock-specifier pairs, one for each entry in
clock-names.
- clock-names: should include:
* "wkupclk" - wakeup clock.
* "refclk" - reference clock (optional).
Deprecated properties:
- ctrl-module : phandle of the control module used by PHY driver to power on
the PHY.
Recommended properies:
- syscon-phy-power : phandle/offset pair. Phandle to the system control
module and the register offset to power on/off the PHY.
This is usually a subnode of ocp2scp to which it is connected.
usb2phy@4a0ad080 {
compatible = "ti,omap-usb2";
reg = <0x4a0ad080 0x58>;
ctrl-module = <&omap_control_usb>;
#phy-cells = <0>;
clocks = <&usb_phy_cm_clk32k>, <&usb_otg_ss_refclk960m>;
clock-names = "wkupclk", "refclk";
};
TI PIPE3 PHY
Required properties:
- compatible: Should be "ti,phy-usb3", "ti,phy-pipe3-sata" or
"ti,phy-pipe3-pcie. "ti,omap-usb3" is deprecated.
- reg : Address and length of the register set for the device.
- reg-names: The names of the register addresses corresponding to the registers
filled in "reg".
- #phy-cells: determine the number of cells that should be given in the
phandle while referencing this phy.
- clocks: a list of phandles and clock-specifier pairs, one for each entry in
clock-names.
- clock-names: should include:
* "wkupclk" - wakeup clock.
* "sysclk" - system clock.
* "refclk" - reference clock.
* "dpll_ref" - external dpll ref clk
* "dpll_ref_m2" - external dpll ref clk
* "phy-div" - divider for apll
* "div-clk" - apll clock
Optional properties:
- id: If there are multiple instance of the same type, in order to
differentiate between each instance "id" can be used (e.g., multi-lane PCIe
PHY). If "id" is not provided, it is set to default value of '1'.
- syscon-pllreset: Handle to system control region that contains the
CTRL_CORE_SMA_SW_0 register and register offset to the CTRL_CORE_SMA_SW_0
register that contains the SATA_PLL_SOFT_RESET bit. Only valid for sata_phy.
- syscon-pcs : phandle/offset pair. Phandle to the system control module and the
register offset to write the PCS delay value.
Deprecated properties:
- ctrl-module : phandle of the control module used by PHY driver to power on
the PHY.
Recommended properies:
- syscon-phy-power : phandle/offset pair. Phandle to the system control
module and the register offset to power on/off the PHY.
This is usually a subnode of ocp2scp to which it is connected.
usb3phy@4a084400 {
compatible = "ti,phy-usb3";
reg = <0x4a084400 0x80>,
<0x4a084800 0x64>,
<0x4a084c00 0x40>;
reg-names = "phy_rx", "phy_tx", "pll_ctrl";
ctrl-module = <&omap_control_usb>;
#phy-cells = <0>;
clocks = <&usb_phy_cm_clk32k>,
<&sys_clkin>,
<&usb_otg_ss_refclk960m>;
clock-names = "wkupclk",
"sysclk",
"refclk";
};
sata_phy: phy@4A096000 {
compatible = "ti,phy-pipe3-sata";
reg = <0x4A096000 0x80>, /* phy_rx */
<0x4A096400 0x64>, /* phy_tx */
<0x4A096800 0x40>; /* pll_ctrl */
reg-names = "phy_rx", "phy_tx", "pll_ctrl";
ctrl-module = <&omap_control_sata>;
clocks = <&sys_clkin1>, <&sata_ref_clk>;
clock-names = "sysclk", "refclk";
syscon-pllreset = <&scm_conf 0x3fc>;
#phy-cells = <0>;
TI Keystone SerDes PHY
======================
Required properties:
- compatible: should be one of
* "ti,keystone-serdes-gbe"
* "ti,keystone-serdes-xgbe"
* "ti,keystone-serdes-pcie"
- reg:
* base address and length of the SerDes register set
- num-lanes:
* Number of lanes in SerDes.
Optional properties:
- syscon-peripheral:
* Handle to the subsystem register region of the peripheral
inside which the SerDes exists. Required for 10gbe.
- syscon-link:
* Handle to the Link register region of the peripheral inside
which the SerDes exists. Example: it is the PCSR register
region in the case of 10gbe. Required for 10gbe.
- rx-force-enable:
* Include this property if receiver attenuation and boost are
to be configured with specific values defined in rx-force.
- link-rate-kbps:
* SerDes link rate to be configured, in kbps.
For gbe and 10gbe SerDes, it is optional to represent each lane as
a sub-node, which can be enabled or disabled individually using
the "status" property. If a lane is not represented by a node, the
lane is disabled.
Required properties (lane sub-node):
- #phy-cells:
* From the generic phy bindings, must be 0;
- reg:
* lane number
Optional properties (lane sub-node):
- control-rate:
* Lane control rate
0: full rate
1: half rate
2: quarter rate
- rx-start:
* Initial lane rx equalizer attenuation and boost configurations.
* Must be array of 2 integers.
- rx-force:
* Forced lane rx equalizer attenuation and boost configurations.
* Must be array of 2 integers.
- tx-coeff:
* Lane c1, c2, cm, attenuation and regulator output voltage
configurations.
* Must be array of 5 integers.
- loopback:
* Include this property to enable loopback at the SerDes
lane level.
Example for Keystone K2E GBE:
-----------------------------
gbe_serdes0: phy@232a000 {
compatible = "ti,keystone-serdes-gbe";
reg = <0x0232a000 0x2000>;
link-rate-kbps = <1250000>;
num-lanes = <4>;
#address-cells = <1>;
#size-cells = <0>;
serdes0_lane0: lane@0 {
status = "ok";
/*loopback;*/
#phy-cells = <0>;
reg = <0>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
serdes0_lane1: lane@1 {
status = "ok";
/*loopback;*/
#phy-cells = <0>;
reg = <1>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
serdes0_lane2: lane@2 {
status = "disabled";
/*loopback;*/
#phy-cells = <0>;
reg = <2>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
serdes0_lane3: lane@3 {
status = "disabled";
/*loopback;*/
#phy-cells = <0>;
reg = <3>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
};
gbe_serdes1: phy@2324000 {
compatible = "ti,keystone-serdes-gbe";
reg = <0x02324000 0x2000>;
link-rate-kbps = <1250000>;
num-lanes = <4>;
#address-cells = <1>;
#size-cells = <0>;
serdes1_lane0: lane@0 {
status = "disabled";
/*loopback;*/
#phy-cells = <0>;
reg = <0>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
serdes1_lane1: lane@1 {
status = "disabled";
/*loopback;*/
#phy-cells = <0>;
reg = <1>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
serdes1_lane2: lane@2 {
status = "disabled";
/*loopback;*/
#phy-cells = <0>;
reg = <2>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
serdes1_lane3: lane@3 {
status = "disabled";
/*loopback;*/
#phy-cells = <0>;
reg = <3>;
control-rate = <2>; /* quart */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <0 0 0 12 4>; /* c1 c2 cm att vreg */
};
};
netcp: netcp@24000000 {
...
netcp-devices {
...
gbe@200000 { /* ETHSS */
...
gbe0: interface-0 {
phys = <&serdes0_lane0>;
...
};
gbe1: interface-1 {
phys = <&serdes0_lane1>;
...
};
...
};
...
};
};
Example for Keystone PCIE:
--------------------------
pcie0_phy: phy@2320000 {
compatible = "ti,keystone-serdes-pcie";
reg = <0x02320000 0x4000>;
link-rate-kbps = <5000000>;
num-lanes = <2>;
};
No SerDes phy handle needed in PCIe controller node
since the SerDes PHY provider driver performs all
the configurations needed for PCIe.
Example for K2E 10GBE:
----------------------
Define the syscon regmaps for 10gbe subsystem:
xgbe_subsys: subsys@2f00000 {
status = "ok";
compatible = "syscon";
reg = <0x02f00000 0x100>;
};
Define the syscon regmaps for 10gbe pcsr:
xgbe_pcsr: pcsr@2f00000 {
status = "ok";
compatible = "syscon";
reg = <0x02f00600 0x100>;
};
Define the 10gbe SerDes node:
xgbe_serdes: phy@231e000 {
status = "ok";
compatible = "ti,keystone-serdes-xgbe";
reg = <0x0231e000 0x2000>;
link-rate-kbps = <10312500>;
num-lanes = <2>;
syscon-peripheral = <&xgbe_subsys>;
syscon-link = <&xgbe_pcsr>;
#address-cells = <1>;
#size-cells = <0>;
xserdes_lane0: lane@0 {
status = "ok";
#phy-cells = <0>;
reg = <0>;
control-rate = <0>; /* full */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <2 0 0 12 4>; /* c1 c2 cm att vreg */
};
xserdes_lane1: lane@1 {
status = "ok";
#phy-cells = <0>;
reg = <1>;
control-rate = <0>; /* full */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <2 0 0 12 4>; /* c1 c2 cm att vreg */
};
};
Then the 10gbe SerDes PHY can be used in the 10gbe switch node:
netcpx: netcpx@2f00000 {
...
netcp-devices {
...
xgbe@2f00000 {
...
xgbe0: interface-0 {
phys = <&xserdes_lane0>;
...
};
xgbe1: interface-1 {
phys = <&xserdes_lane1>;
...
};
...
};
};
...
};
TI Keystone 10gbe SerDes PHY
============================
For 10gbe, there is an option of using an 10gbe MCU firmware.
When the firmware is enabled, the individual lanes can be configured
with the following in a mcu-firmware sub-node under the 10gbe SerDes
node:
lane: Lane number.
- 0 -> Lane 0 (default)
- 1 -> Lane 1
rate: Link rate:
- 0 -> 1G/10G (default)
- 1 -> Force 1G
- 2 -> Force 10G
autonegotiate: Set to enable link rate autonegotiation when rate == 1G/10G.
- 0 -> disabled (default)
- 1 -> enabled
tx_pause: Enable TX pause frame generation.
- 0 -> disabled (default)
- 1 -> enabled
rx_pause: Enable RX pause frame generation.
- 0 -> disabled (default)
- 1 -> enabled
10g_train: Enable 10G link training.
- 0 -> disabled (default)
- 1 -> enabled
fec: Enable Forward Error Correction.
- 0 -> disabled (default)
- 1 -> enabled
When 10gbe MCU firmware is used, the regular SerDes lane
bindings should be disabled. 10gbe MCU firmware and regular
SerDes lane bindings are mutually exclusive. See "Example:
for Enabling K2E 10-GBE MCU Firmware" below.
Example for Keystone K2E 10-GBE MCU Firmware Bindings:
------------------------------------------------------
xgbe_serdes: phy@231e000 {
status = "disabled";
...
xserdes_lane0: lane@0 {
status = "disabled";
#phy-cells = <0>;
reg = <0>;
control-rate = <0>; /* full */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <2 0 0 12 4>; /* c1 c2 cm att vreg */
};
xserdes_lane1: lane@1 {
status = "disabled";
#phy-cells = <0>;
reg = <1>;
control-rate = <0>; /* full */
rx-start = <7 5>;
rx-force = <1 1>;
tx-coeff = <2 0 0 12 4>; /* c1 c2 cm att vreg */
};
mcu-firmware {
status = "disabled";
#address-cells = <1>;
#size-cells = <0>;
lane@0 {
status = "disabled";
reg = <0>;
rate = <0>; /* 0 = default
1 = 1g
2 = 10g */
autonegotiate;
/*tx_pause;*/
/*rx_pause;*/
10g_train;
/*fec;*/
};
lane@1 {
status = "disabled";
reg = <1>;
rate = <0>; /* 0 = default
1 = 1g
2 = 10g */
autonegotiate;
/*tx_pause;*/
/*rx_pause;*/
10g_train;
/*fec;*/
};
};
};
Example for Enabling K2E 10-GBE MCU Firmware:
---------------------------------------------
&xgbe_serdes {
status = "ok";
xserdes_lane0: lane@0 {
status = "disabled";
};
xserdes_lane1: lane@1 {
status = "disabled";
};
mcu-firmware {
status = "ok";
lane@0 {
status = "ok";
};
lane@1 {
status = "ok";
};
};
};