marvell,pp2.yaml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/marvell,pp2.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Marvell CN913X / Marvell Armada 375, 7K, 8K Ethernet Controller
  7. maintainers:
  8. - Marcin Wojtas <mw@semihalf.com>
  9. - Russell King <linux@armlinux.org>
  10. description: |
  11. Marvell Armada 375 Ethernet Controller (PPv2.1)
  12. Marvell Armada 7K/8K Ethernet Controller (PPv2.2)
  13. Marvell CN913X Ethernet Controller (PPv2.3)
  14. properties:
  15. compatible:
  16. enum:
  17. - marvell,armada-375-pp2
  18. - marvell,armada-7k-pp22
  19. reg:
  20. minItems: 3
  21. maxItems: 4
  22. "#address-cells":
  23. const: 1
  24. "#size-cells":
  25. const: 0
  26. clocks:
  27. minItems: 2
  28. items:
  29. - description: main controller clock
  30. - description: GOP clock
  31. - description: MG clock
  32. - description: MG Core clock
  33. - description: AXI clock
  34. clock-names:
  35. minItems: 2
  36. items:
  37. - const: pp_clk
  38. - const: gop_clk
  39. - const: mg_clk
  40. - const: mg_core_clk
  41. - const: axi_clk
  42. dma-coherent: true
  43. marvell,system-controller:
  44. $ref: /schemas/types.yaml#/definitions/phandle
  45. description: a phandle to the system controller.
  46. patternProperties:
  47. '^(ethernet-)?port@[0-2]$':
  48. type: object
  49. description: subnode for each ethernet port.
  50. $ref: ethernet-controller.yaml#
  51. unevaluatedProperties: false
  52. properties:
  53. reg:
  54. description: ID of the port from the MAC point of view.
  55. maximum: 2
  56. interrupts:
  57. minItems: 1
  58. maxItems: 10
  59. description: interrupt(s) for the port
  60. interrupt-names:
  61. minItems: 1
  62. items:
  63. - const: hif0
  64. - const: hif1
  65. - const: hif2
  66. - const: hif3
  67. - const: hif4
  68. - const: hif5
  69. - const: hif6
  70. - const: hif7
  71. - const: hif8
  72. - const: link
  73. description: >
  74. if more than a single interrupt for is given, must be the
  75. name associated to the interrupts listed. Valid names are:
  76. "hifX", with X in [0..8], and "link". The names "tx-cpu0",
  77. "tx-cpu1", "tx-cpu2", "tx-cpu3" and "rx-shared" are supported
  78. for backward compatibility but shouldn't be used for new
  79. additions.
  80. phys:
  81. minItems: 1
  82. maxItems: 2
  83. description: >
  84. Generic PHY, providing SerDes connectivity. For most modes,
  85. one lane is sufficient, but some (e.g. RXAUI) may require two.
  86. phy-mode:
  87. enum:
  88. - gmii
  89. - sgmii
  90. - rgmii-id
  91. - 1000base-x
  92. - 2500base-x
  93. - 5gbase-r
  94. - rxaui
  95. - 10gbase-r
  96. port-id:
  97. $ref: /schemas/types.yaml#/definitions/uint32
  98. deprecated: true
  99. description: >
  100. ID of the port from the MAC point of view.
  101. Legacy binding for backward compatibility.
  102. marvell,loopback:
  103. $ref: /schemas/types.yaml#/definitions/flag
  104. description: port is loopback mode.
  105. gop-port-id:
  106. $ref: /schemas/types.yaml#/definitions/uint32
  107. description: >
  108. only for marvell,armada-7k-pp22, ID of the port from the
  109. GOP (Group Of Ports) point of view. This ID is used to index the
  110. per-port registers in the second register area.
  111. required:
  112. - reg
  113. - interrupts
  114. - phy-mode
  115. - port-id
  116. required:
  117. - compatible
  118. - reg
  119. - clocks
  120. - clock-names
  121. allOf:
  122. - if:
  123. properties:
  124. compatible:
  125. const: marvell,armada-7k-pp22
  126. then:
  127. properties:
  128. reg:
  129. items:
  130. - description: Packet Processor registers
  131. - description: Networking interfaces registers
  132. - description: CM3 address space used for TX Flow Control
  133. clocks:
  134. minItems: 5
  135. clock-names:
  136. minItems: 5
  137. patternProperties:
  138. '^(ethernet-)?port@[0-2]$':
  139. required:
  140. - gop-port-id
  141. required:
  142. - marvell,system-controller
  143. else:
  144. properties:
  145. reg:
  146. items:
  147. - description: Packet Processor registers
  148. - description: LMS registers
  149. - description: Register area per eth0
  150. - description: Register area per eth1
  151. clocks:
  152. maxItems: 2
  153. clock-names:
  154. maxItems: 2
  155. patternProperties:
  156. '^(ethernet-)?port@[0-1]$':
  157. properties:
  158. reg:
  159. maximum: 1
  160. gop-port-id: false
  161. additionalProperties: false
  162. examples:
  163. - |
  164. // For Armada 375 variant
  165. #include <dt-bindings/interrupt-controller/mvebu-icu.h>
  166. #include <dt-bindings/interrupt-controller/arm-gic.h>
  167. ethernet@f0000 {
  168. #address-cells = <1>;
  169. #size-cells = <0>;
  170. compatible = "marvell,armada-375-pp2";
  171. reg = <0xf0000 0xa000>,
  172. <0xc0000 0x3060>,
  173. <0xc4000 0x100>,
  174. <0xc5000 0x100>;
  175. clocks = <&gateclk 3>, <&gateclk 19>;
  176. clock-names = "pp_clk", "gop_clk";
  177. ethernet-port@0 {
  178. interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  179. reg = <0>;
  180. port-id = <0>; /* For backward compatibility. */
  181. phy = <&phy0>;
  182. phy-mode = "rgmii-id";
  183. };
  184. ethernet-port@1 {
  185. interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
  186. reg = <1>;
  187. port-id = <1>; /* For backward compatibility. */
  188. phy = <&phy3>;
  189. phy-mode = "gmii";
  190. };
  191. };
  192. - |
  193. // For Armada 7k/8k and Cn913x variants
  194. #include <dt-bindings/interrupt-controller/mvebu-icu.h>
  195. #include <dt-bindings/interrupt-controller/arm-gic.h>
  196. ethernet@0 {
  197. #address-cells = <1>;
  198. #size-cells = <0>;
  199. compatible = "marvell,armada-7k-pp22";
  200. reg = <0x0 0x100000>, <0x129000 0xb000>, <0x220000 0x800>;
  201. clocks = <&cp0_clk 1 3>, <&cp0_clk 1 9>,
  202. <&cp0_clk 1 5>, <&cp0_clk 1 6>, <&cp0_clk 1 18>;
  203. clock-names = "pp_clk", "gop_clk", "mg_clk", "mg_core_clk", "axi_clk";
  204. marvell,system-controller = <&cp0_syscon0>;
  205. ethernet-port@0 {
  206. interrupts = <ICU_GRP_NSR 39 IRQ_TYPE_LEVEL_HIGH>,
  207. <ICU_GRP_NSR 43 IRQ_TYPE_LEVEL_HIGH>,
  208. <ICU_GRP_NSR 47 IRQ_TYPE_LEVEL_HIGH>,
  209. <ICU_GRP_NSR 51 IRQ_TYPE_LEVEL_HIGH>,
  210. <ICU_GRP_NSR 55 IRQ_TYPE_LEVEL_HIGH>,
  211. <ICU_GRP_NSR 59 IRQ_TYPE_LEVEL_HIGH>,
  212. <ICU_GRP_NSR 63 IRQ_TYPE_LEVEL_HIGH>,
  213. <ICU_GRP_NSR 67 IRQ_TYPE_LEVEL_HIGH>,
  214. <ICU_GRP_NSR 71 IRQ_TYPE_LEVEL_HIGH>,
  215. <ICU_GRP_NSR 129 IRQ_TYPE_LEVEL_HIGH>;
  216. interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
  217. "hif5", "hif6", "hif7", "hif8", "link";
  218. phy-mode = "10gbase-r";
  219. phys = <&cp0_comphy4 0>;
  220. reg = <0>;
  221. port-id = <0>; /* For backward compatibility. */
  222. gop-port-id = <0>;
  223. };
  224. ethernet-port@1 {
  225. interrupts = <ICU_GRP_NSR 40 IRQ_TYPE_LEVEL_HIGH>,
  226. <ICU_GRP_NSR 44 IRQ_TYPE_LEVEL_HIGH>,
  227. <ICU_GRP_NSR 48 IRQ_TYPE_LEVEL_HIGH>,
  228. <ICU_GRP_NSR 52 IRQ_TYPE_LEVEL_HIGH>,
  229. <ICU_GRP_NSR 56 IRQ_TYPE_LEVEL_HIGH>,
  230. <ICU_GRP_NSR 60 IRQ_TYPE_LEVEL_HIGH>,
  231. <ICU_GRP_NSR 64 IRQ_TYPE_LEVEL_HIGH>,
  232. <ICU_GRP_NSR 68 IRQ_TYPE_LEVEL_HIGH>,
  233. <ICU_GRP_NSR 72 IRQ_TYPE_LEVEL_HIGH>,
  234. <ICU_GRP_NSR 128 IRQ_TYPE_LEVEL_HIGH>;
  235. interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
  236. "hif5", "hif6", "hif7", "hif8", "link";
  237. phy-mode = "rgmii-id";
  238. reg = <1>;
  239. port-id = <1>; /* For backward compatibility. */
  240. gop-port-id = <2>;
  241. };
  242. ethernet-port@2 {
  243. interrupts = <ICU_GRP_NSR 41 IRQ_TYPE_LEVEL_HIGH>,
  244. <ICU_GRP_NSR 45 IRQ_TYPE_LEVEL_HIGH>,
  245. <ICU_GRP_NSR 49 IRQ_TYPE_LEVEL_HIGH>,
  246. <ICU_GRP_NSR 53 IRQ_TYPE_LEVEL_HIGH>,
  247. <ICU_GRP_NSR 57 IRQ_TYPE_LEVEL_HIGH>,
  248. <ICU_GRP_NSR 61 IRQ_TYPE_LEVEL_HIGH>,
  249. <ICU_GRP_NSR 65 IRQ_TYPE_LEVEL_HIGH>,
  250. <ICU_GRP_NSR 69 IRQ_TYPE_LEVEL_HIGH>,
  251. <ICU_GRP_NSR 73 IRQ_TYPE_LEVEL_HIGH>,
  252. <ICU_GRP_NSR 127 IRQ_TYPE_LEVEL_HIGH>;
  253. interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
  254. "hif5", "hif6", "hif7", "hif8", "link";
  255. phy-mode = "2500base-x";
  256. managed = "in-band-status";
  257. phys = <&cp0_comphy5 2>;
  258. sfp = <&sfp_eth3>;
  259. reg = <2>;
  260. port-id = <2>; /* For backward compatibility. */
  261. gop-port-id = <3>;
  262. };
  263. };