fman.txt 16 KB

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