blob: 2aaae210317bbbe73b83b2413a371856a6da308c [file] [log] [blame]
Igal Liberman297d35f2014-09-17 14:08:30 +03001=============================================================================
2Freescale Frame Manager Device Bindings
3
4CONTENTS
5 - FMan Node
6 - FMan Port Node
7 - FMan MURAM Node
8 - FMan dTSEC/XGEC/mEMAC Node
9 - FMan IEEE 1588 Node
Shaohui Xie7f93c9d2015-01-28 19:54:24 +080010 - FMan MDIO Node
Igal Liberman297d35f2014-09-17 14:08:30 +030011 - Example
12
13=============================================================================
14FMan Node
15
16DESCRIPTION
17
18Due to the fact that the FMan is an aggregation of sub-engines (ports, MACs,
19etc.) the FMan node will have child nodes for each of them.
20
21PROPERTIES
22
23- compatible
24 Usage: required
25 Value type: <stringlist>
26 Definition: Must include "fsl,fman"
27 FMan version can be determined via FM_IP_REV_1 register in the
28 FMan block. The offset is 0xc4 from the beginning of the
29 Frame Processing Manager memory map (0xc3000 from the
30 beginning of the FMan node).
31
32- cell-index
33 Usage: required
34 Value type: <u32>
35 Definition: Specifies the index of the FMan unit.
36
37 The cell-index value may be used by the SoC, to identify the
Otto Kekäläinen7587eb12016-07-13 21:08:07 +030038 FMan unit in the SoC memory map. In the table below,
Igal Liberman297d35f2014-09-17 14:08:30 +030039 there's a description of the cell-index use in each SoC:
40
41 - P1023:
42 register[bit] FMan unit cell-index
43 ============================================================
44 DEVDISR[1] 1 0
45
46 - P2041, P3041, P4080 P5020, P5040:
47 register[bit] FMan unit cell-index
48 ============================================================
49 DCFG_DEVDISR2[6] 1 0
50 DCFG_DEVDISR2[14] 2 1
51 (Second FM available only in P4080 and P5040)
52
53 - B4860, T1040, T2080, T4240:
54 register[bit] FMan unit cell-index
55 ============================================================
56 DCFG_CCSR_DEVDISR2[24] 1 0
57 DCFG_CCSR_DEVDISR2[25] 2 1
58 (Second FM available only in T4240)
59
60 DEVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
61 the specific SoC "Device Configuration/Pin Control" Memory
62 Map.
63
64- reg
65 Usage: required
66 Value type: <prop-encoded-array>
67 Definition: A standard property. Specifies the offset of the
68 following configuration registers:
69 - BMI configuration registers.
70 - QMI configuration registers.
71 - DMA configuration registers.
72 - FPM configuration registers.
73 - FMan controller configuration registers.
74
75- ranges
76 Usage: required
77 Value type: <prop-encoded-array>
78 Definition: A standard property.
79
80- clocks
81 Usage: required
82 Value type: <prop-encoded-array>
Scott Woode327fff2014-11-06 20:56:07 -060083 Definition: phandle for the fman input clock.
Igal Liberman297d35f2014-09-17 14:08:30 +030084
85- clock-names
Scott Woode327fff2014-11-06 20:56:07 -060086 usage: required
Igal Liberman297d35f2014-09-17 14:08:30 +030087 Value type: <stringlist>
Scott Woode327fff2014-11-06 20:56:07 -060088 Definition: "fmanclk" for the fman input clock.
Igal Liberman297d35f2014-09-17 14:08:30 +030089
90- interrupts
91 Usage: required
92 Value type: <prop-encoded-array>
93 Definition: A pair of IRQs are specified in this property.
94 The first element is associated with the event interrupts and
95 the second element is associated with the error interrupts.
96
97- fsl,qman-channel-range
98 Usage: required
99 Value type: <prop-encoded-array>
100 Definition: Specifies the range of the available dedicated
101 channels in the FMan. The first cell specifies the beginning
102 of the range and the second cell specifies the number of
103 channels.
104 Further information available at:
105 "Work Queue (WQ) Channel Assignments in the QMan" section
106 in DPAA Reference Manual.
107
Scott Woode327fff2014-11-06 20:56:07 -0600108- fsl,qman
109- fsl,bman
110 Usage: required
111 Definition: See soc/fsl/qman.txt and soc/fsl/bman.txt
112
Madalin Bucur4fe8dc02020-03-04 18:04:25 +0200113- fsl,erratum-a050385
114 Usage: optional
115 Value type: boolean
116 Definition: A boolean property. Indicates the presence of the
117 erratum A050385 which indicates that DMA transactions that are
118 split can result in a FMan lock.
119
Igal Liberman297d35f2014-09-17 14:08:30 +0300120=============================================================================
121FMan MURAM Node
122
123DESCRIPTION
124
125FMan Internal memory - shared between all the FMan modules.
126It contains data structures that are common and written to or read by
127the modules.
128FMan internal memory is split into the following parts:
129 Packet buffering (Tx/Rx FIFOs)
130 Frames internal context
131
132PROPERTIES
133
134- compatible
135 Usage: required
136 Value type: <stringlist>
137 Definition: Must include "fsl,fman-muram"
138
139- ranges
140 Usage: required
141 Value type: <prop-encoded-array>
142 Definition: A standard property.
143 Specifies the multi-user memory offset and the size within
144 the FMan.
145
146EXAMPLE
147
148muram@0 {
149 compatible = "fsl,fman-muram";
150 ranges = <0 0x000000 0x28000>;
151};
152
153=============================================================================
154FMan Port Node
155
156DESCRIPTION
157
158The Frame Manager (FMan) supports several types of hardware ports:
159 Ethernet receiver (RX)
160 Ethernet transmitter (TX)
161 Offline/Host command (O/H)
162
163PROPERTIES
164
165- compatible
166 Usage: required
167 Value type: <stringlist>
168 Definition: A standard property.
169 Must include one of the following:
170 - "fsl,fman-v2-port-oh" for FManV2 OH ports
171 - "fsl,fman-v2-port-rx" for FManV2 RX ports
172 - "fsl,fman-v2-port-tx" for FManV2 TX ports
173 - "fsl,fman-v3-port-oh" for FManV3 OH ports
174 - "fsl,fman-v3-port-rx" for FManV3 RX ports
175 - "fsl,fman-v3-port-tx" for FManV3 TX ports
176
177- cell-index
178 Usage: required
179 Value type: <u32>
180 Definition: Specifies the hardware port id.
181 Each hardware port on the FMan has its own hardware PortID.
182 Super set of all hardware Port IDs available at FMan Reference
183 Manual under "FMan Hardware Ports in Freescale Devices" table.
184
185 Each hardware port is assigned a 4KB, port-specific page in
186 the FMan hardware port memory region (which is part of the
187 FMan memory map). The first 4 KB in the FMan hardware ports
188 memory region is used for what are called common registers.
189 The subsequent 63 4KB pages are allocated to the hardware
190 ports.
191 The page of a specific port is determined by the cell-index.
192
193- reg
194 Usage: required
195 Value type: <prop-encoded-array>
196 Definition: There is one reg region describing the port
197 configuration registers.
198
Igal Liberman52aeeb32015-06-01 15:06:51 +0300199- fsl,fman-10g-port
200 Usage: optional
201 Value type: boolean
202 Definition: The default port rate is 1G.
203 If this property exists, the port is s 10G port.
204
205- fsl,fman-best-effort-port
206 Usage: optional
207 Value type: boolean
208 Definition: Can be defined only if 10G-support is set.
209 This property marks a best-effort 10G port (10G port that
210 may not be capable of line rate).
211
Igal Liberman297d35f2014-09-17 14:08:30 +0300212EXAMPLE
213
214port@a8000 {
215 cell-index = <0x28>;
216 compatible = "fsl,fman-v2-port-tx";
217 reg = <0xa8000 0x1000>;
218};
219
220port@88000 {
221 cell-index = <0x8>;
222 compatible = "fsl,fman-v2-port-rx";
223 reg = <0x88000 0x1000>;
224};
225
226port@81000 {
227 cell-index = <0x1>;
228 compatible = "fsl,fman-v2-port-oh";
229 reg = <0x81000 0x1000>;
230};
231
232=============================================================================
233FMan dTSEC/XGEC/mEMAC Node
234
235DESCRIPTION
236
237mEMAC/dTSEC/XGEC are the Ethernet network interfaces
238
239PROPERTIES
240
241- compatible
242 Usage: required
243 Value type: <stringlist>
244 Definition: A standard property.
245 Must include one of the following:
246 - "fsl,fman-dtsec" for dTSEC MAC
247 - "fsl,fman-xgec" for XGEC MAC
248 - "fsl,fman-memac for mEMAC MAC
249
250- cell-index
251 Usage: required
252 Value type: <u32>
253 Definition: Specifies the MAC id.
254
255 The cell-index value may be used by the FMan or the SoC, to
256 identify the MAC unit in the FMan (or SoC) memory map.
Otto Kekäläinen7587eb12016-07-13 21:08:07 +0300257 In the tables below there's a description of the cell-index
Igal Liberman297d35f2014-09-17 14:08:30 +0300258 use, there are two tables, one describes the use of cell-index
259 by the FMan, the second describes the use by the SoC:
260
261 1. FMan Registers
262
263 FManV2:
264 register[bit] MAC cell-index
265 ============================================================
266 FM_EPI[16] XGEC 8
267 FM_EPI[16+n] dTSECn n-1
268 FM_NPI[11+n] dTSECn n-1
269 n = 1,..,5
270
271 FManV3:
272 register[bit] MAC cell-index
273 ============================================================
274 FM_EPI[16+n] mEMACn n-1
275 FM_EPI[25] mEMAC10 9
276
277 FM_NPI[11+n] mEMACn n-1
278 FM_NPI[10] mEMAC10 9
279 FM_NPI[11] mEMAC9 8
280 n = 1,..8
281
282 FM_EPI and FM_NPI are located in the FMan memory map.
283
284 2. SoC registers:
285
286 - P2041, P3041, P4080 P5020, P5040:
287 register[bit] FMan MAC cell
288 Unit index
289 ============================================================
290 DCFG_DEVDISR2[7] 1 XGEC 8
291 DCFG_DEVDISR2[7+n] 1 dTSECn n-1
292 DCFG_DEVDISR2[15] 2 XGEC 8
293 DCFG_DEVDISR2[15+n] 2 dTSECn n-1
294 n = 1,..5
295
296 - T1040, T2080, T4240, B4860:
297 register[bit] FMan MAC cell
298 Unit index
299 ============================================================
300 DCFG_CCSR_DEVDISR2[n-1] 1 mEMACn n-1
301 DCFG_CCSR_DEVDISR2[11+n] 2 mEMACn n-1
302 n = 1,..6,9,10
303
304 EVDISR, DCFG_DEVDISR2 and DCFG_CCSR_DEVDISR2 are located in
305 the specific SoC "Device Configuration/Pin Control" Memory
306 Map.
307
308- reg
309 Usage: required
310 Value type: <prop-encoded-array>
311 Definition: A standard property.
312
313- fsl,fman-ports
314 Usage: required
315 Value type: <prop-encoded-array>
316 Definition: An array of two phandles - the first references is
317 the FMan RX port and the second is the TX port used by this
318 MAC.
319
320- ptp-timer
321 Usage required
322 Value type: <phandle>
323 Definition: A phandle for 1EEE1588 timer.
324
Igal Libermanea6370d2015-12-24 03:42:11 +0200325- pcsphy-handle
326 Usage required for "fsl,fman-memac" MACs
327 Value type: <phandle>
328 Definition: A phandle for pcsphy.
329
330- tbi-handle
331 Usage required for "fsl,fman-dtsec" MACs
332 Value type: <phandle>
333 Definition: A phandle for tbiphy.
334
Igal Liberman297d35f2014-09-17 14:08:30 +0300335EXAMPLE
336
337fman1_tx28: port@a8000 {
338 cell-index = <0x28>;
339 compatible = "fsl,fman-v2-port-tx";
340 reg = <0xa8000 0x1000>;
341};
342
343fman1_rx8: port@88000 {
344 cell-index = <0x8>;
345 compatible = "fsl,fman-v2-port-rx";
346 reg = <0x88000 0x1000>;
347};
348
349ptp-timer: ptp_timer@fe000 {
350 compatible = "fsl,fman-ptp-timer";
351 reg = <0xfe000 0x1000>;
352};
353
354ethernet@e0000 {
355 compatible = "fsl,fman-dtsec";
356 cell-index = <0>;
357 reg = <0xe0000 0x1000>;
358 fsl,fman-ports = <&fman1_rx8 &fman1_tx28>;
359 ptp-timer = <&ptp-timer>;
Igal Libermanea6370d2015-12-24 03:42:11 +0200360 tbi-handle = <&tbi0>;
Igal Liberman297d35f2014-09-17 14:08:30 +0300361};
362
363============================================================================
364FMan IEEE 1588 Node
365
366DESCRIPTION
367
368The FMan interface to support IEEE 1588
369
370
371PROPERTIES
372
373- compatible
374 Usage: required
375 Value type: <stringlist>
376 Definition: A standard property.
377 Must include "fsl,fman-ptp-timer".
378
379- reg
380 Usage: required
381 Value type: <prop-encoded-array>
382 Definition: A standard property.
383
384EXAMPLE
385
386ptp-timer@fe000 {
387 compatible = "fsl,fman-ptp-timer";
388 reg = <0xfe000 0x1000>;
389};
390
391=============================================================================
Shaohui Xie7f93c9d2015-01-28 19:54:24 +0800392FMan MDIO Node
393
394DESCRIPTION
395
396The MDIO is a bus to which the PHY devices are connected.
397
398PROPERTIES
399
400- compatible
401 Usage: required
402 Value type: <stringlist>
403 Definition: A standard property.
404 Must include "fsl,fman-mdio" for 1 Gb/s MDIO from FMan v2.
405 Must include "fsl,fman-xmdio" for 10 Gb/s MDIO from FMan v2.
406 Must include "fsl,fman-memac-mdio" for 1/10 Gb/s MDIO from
407 FMan v3.
408
409- reg
410 Usage: required
411 Value type: <prop-encoded-array>
412 Definition: A standard property.
413
414- bus-frequency
415 Usage: optional
416 Value type: <u32>
417 Definition: Specifies the external MDIO bus clock speed to
418 be used, if different from the standard 2.5 MHz.
419 This may be due to the standard speed being unsupported (e.g.
420 due to a hardware problem), or to advertise that all relevant
421 components in the system support a faster speed.
422
423- interrupts
424 Usage: required for external MDIO
425 Value type: <prop-encoded-array>
426 Definition: Event interrupt of external MDIO controller.
427
428- fsl,fman-internal-mdio
429 Usage: required for internal MDIO
430 Value type: boolean
431 Definition: Fman has internal MDIO for internal PCS(Physical
432 Coding Sublayer) PHYs and external MDIO for external PHYs.
433 The settings and programming routines for internal/external
434 MDIO are different. Must be included for internal MDIO.
435
Igal Libermanea6370d2015-12-24 03:42:11 +0200436For internal PHY device on internal mdio bus, a PHY node should be created.
437See the definition of the PHY node in booting-without-of.txt for an
438example of how to define a PHY (Internal PHY has no interrupt line).
439- For "fsl,fman-mdio" compatible internal mdio bus, the PHY is TBI PHY.
440- For "fsl,fman-memac-mdio" compatible internal mdio bus, the PHY is PCS PHY,
441 PCS PHY addr must be '0'.
442
Shaohui Xie7f93c9d2015-01-28 19:54:24 +0800443EXAMPLE
444
445Example for FMan v2 external MDIO:
446
447mdio@f1000 {
448 compatible = "fsl,fman-xmdio";
449 reg = <0xf1000 0x1000>;
450 interrupts = <101 2 0 0>;
451};
452
Igal Libermanea6370d2015-12-24 03:42:11 +0200453Example for FMan v2 internal MDIO:
454
455mdio@e3120 {
456 compatible = "fsl,fman-mdio";
457 reg = <0xe3120 0xee0>;
458 fsl,fman-internal-mdio;
459
460 tbi1: tbi-phy@8 {
461 reg = <0x8>;
462 device_type = "tbi-phy";
463 };
464};
465
Shaohui Xie7f93c9d2015-01-28 19:54:24 +0800466Example for FMan v3 internal MDIO:
467
468mdio@f1000 {
469 compatible = "fsl,fman-memac-mdio";
470 reg = <0xf1000 0x1000>;
471 fsl,fman-internal-mdio;
Igal Libermanea6370d2015-12-24 03:42:11 +0200472
473 pcsphy6: ethernet-phy@0 {
474 reg = <0x0>;
475 };
Shaohui Xie7f93c9d2015-01-28 19:54:24 +0800476};
477
478=============================================================================
Igal Liberman297d35f2014-09-17 14:08:30 +0300479Example
480
481fman@400000 {
482 #address-cells = <1>;
483 #size-cells = <1>;
484 cell-index = <1>;
485 compatible = "fsl,fman"
486 ranges = <0 0x400000 0x100000>;
487 reg = <0x400000 0x100000>;
488 clocks = <&fman_clk>;
489 clock-names = "fmanclk";
490 interrupts = <
491 96 2 0 0
492 16 2 1 1>;
493 fsl,qman-channel-range = <0x40 0xc>;
494
495 muram@0 {
496 compatible = "fsl,fman-muram";
497 reg = <0x0 0x28000>;
498 };
499
500 port@81000 {
501 cell-index = <1>;
502 compatible = "fsl,fman-v2-port-oh";
503 reg = <0x81000 0x1000>;
504 };
505
506 port@82000 {
507 cell-index = <2>;
508 compatible = "fsl,fman-v2-port-oh";
509 reg = <0x82000 0x1000>;
510 };
511
512 port@83000 {
513 cell-index = <3>;
514 compatible = "fsl,fman-v2-port-oh";
515 reg = <0x83000 0x1000>;
516 };
517
518 port@84000 {
519 cell-index = <4>;
520 compatible = "fsl,fman-v2-port-oh";
521 reg = <0x84000 0x1000>;
522 };
523
524 port@85000 {
525 cell-index = <5>;
526 compatible = "fsl,fman-v2-port-oh";
527 reg = <0x85000 0x1000>;
528 };
529
530 port@86000 {
531 cell-index = <6>;
532 compatible = "fsl,fman-v2-port-oh";
533 reg = <0x86000 0x1000>;
534 };
535
536 fman1_rx_0x8: port@88000 {
537 cell-index = <0x8>;
538 compatible = "fsl,fman-v2-port-rx";
539 reg = <0x88000 0x1000>;
540 };
541
542 fman1_rx_0x9: port@89000 {
543 cell-index = <0x9>;
544 compatible = "fsl,fman-v2-port-rx";
545 reg = <0x89000 0x1000>;
546 };
547
548 fman1_rx_0xa: port@8a000 {
549 cell-index = <0xa>;
550 compatible = "fsl,fman-v2-port-rx";
551 reg = <0x8a000 0x1000>;
552 };
553
554 fman1_rx_0xb: port@8b000 {
555 cell-index = <0xb>;
556 compatible = "fsl,fman-v2-port-rx";
557 reg = <0x8b000 0x1000>;
558 };
559
560 fman1_rx_0xc: port@8c000 {
561 cell-index = <0xc>;
562 compatible = "fsl,fman-v2-port-rx";
563 reg = <0x8c000 0x1000>;
564 };
565
566 fman1_rx_0x10: port@90000 {
567 cell-index = <0x10>;
568 compatible = "fsl,fman-v2-port-rx";
569 reg = <0x90000 0x1000>;
570 };
571
572 fman1_tx_0x28: port@a8000 {
573 cell-index = <0x28>;
574 compatible = "fsl,fman-v2-port-tx";
575 reg = <0xa8000 0x1000>;
576 };
577
578 fman1_tx_0x29: port@a9000 {
579 cell-index = <0x29>;
580 compatible = "fsl,fman-v2-port-tx";
581 reg = <0xa9000 0x1000>;
582 };
583
584 fman1_tx_0x2a: port@aa000 {
585 cell-index = <0x2a>;
586 compatible = "fsl,fman-v2-port-tx";
587 reg = <0xaa000 0x1000>;
588 };
589
590 fman1_tx_0x2b: port@ab000 {
591 cell-index = <0x2b>;
592 compatible = "fsl,fman-v2-port-tx";
593 reg = <0xab000 0x1000>;
594 };
595
596 fman1_tx_0x2c: port@ac0000 {
597 cell-index = <0x2c>;
598 compatible = "fsl,fman-v2-port-tx";
599 reg = <0xac000 0x1000>;
600 };
601
602 fman1_tx_0x30: port@b0000 {
603 cell-index = <0x30>;
604 compatible = "fsl,fman-v2-port-tx";
605 reg = <0xb0000 0x1000>;
606 };
607
608 ethernet@e0000 {
609 compatible = "fsl,fman-dtsec";
610 cell-index = <0>;
611 reg = <0xe0000 0x1000>;
612 fsl,fman-ports = <&fman1_rx_0x8 &fman1_tx_0x28>;
Igal Libermanea6370d2015-12-24 03:42:11 +0200613 tbi-handle = <&tbi5>;
Igal Liberman297d35f2014-09-17 14:08:30 +0300614 };
615
616 ethernet@e2000 {
617 compatible = "fsl,fman-dtsec";
618 cell-index = <1>;
619 reg = <0xe2000 0x1000>;
620 fsl,fman-ports = <&fman1_rx_0x9 &fman1_tx_0x29>;
Igal Libermanea6370d2015-12-24 03:42:11 +0200621 tbi-handle = <&tbi6>;
Igal Liberman297d35f2014-09-17 14:08:30 +0300622 };
623
624 ethernet@e4000 {
625 compatible = "fsl,fman-dtsec";
626 cell-index = <2>;
627 reg = <0xe4000 0x1000>;
628 fsl,fman-ports = <&fman1_rx_0xa &fman1_tx_0x2a>;
Igal Libermanea6370d2015-12-24 03:42:11 +0200629 tbi-handle = <&tbi7>;
Igal Liberman297d35f2014-09-17 14:08:30 +0300630 };
631
632 ethernet@e6000 {
633 compatible = "fsl,fman-dtsec";
634 cell-index = <3>;
635 reg = <0xe6000 0x1000>;
636 fsl,fman-ports = <&fman1_rx_0xb &fman1_tx_0x2b>;
Igal Libermanea6370d2015-12-24 03:42:11 +0200637 tbi-handle = <&tbi8>;
Igal Liberman297d35f2014-09-17 14:08:30 +0300638 };
639
640 ethernet@e8000 {
641 compatible = "fsl,fman-dtsec";
642 cell-index = <4>;
643 reg = <0xf0000 0x1000>;
644 fsl,fman-ports = <&fman1_rx_0xc &fman1_tx_0x2c>;
Igal Libermanea6370d2015-12-24 03:42:11 +0200645 tbi-handle = <&tbi9>;
Igal Liberman297d35f2014-09-17 14:08:30 +0300646
647 ethernet@f0000 {
648 cell-index = <8>;
649 compatible = "fsl,fman-xgec";
650 reg = <0xf0000 0x1000>;
651 fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>;
652 };
653
654 ptp-timer@fe000 {
655 compatible = "fsl,fman-ptp-timer";
656 reg = <0xfe000 0x1000>;
657 };
Shaohui Xie7f93c9d2015-01-28 19:54:24 +0800658
659 mdio@f1000 {
660 compatible = "fsl,fman-xmdio";
661 reg = <0xf1000 0x1000>;
662 interrupts = <101 2 0 0>;
663 };
Igal Liberman297d35f2014-09-17 14:08:30 +0300664};