fsl-fman.txt 15 KB

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