renesas,etheravb.yaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/renesas,etheravb.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Renesas Ethernet AVB
  7. maintainers:
  8. - Sergei Shtylyov <sergei.shtylyov@gmail.com>
  9. properties:
  10. compatible:
  11. oneOf:
  12. - items:
  13. - enum:
  14. - renesas,etheravb-r8a7742 # RZ/G1H
  15. - renesas,etheravb-r8a7743 # RZ/G1M
  16. - renesas,etheravb-r8a7744 # RZ/G1N
  17. - renesas,etheravb-r8a7745 # RZ/G1E
  18. - renesas,etheravb-r8a77470 # RZ/G1C
  19. - renesas,etheravb-r8a7790 # R-Car H2
  20. - renesas,etheravb-r8a7791 # R-Car M2-W
  21. - renesas,etheravb-r8a7792 # R-Car V2H
  22. - renesas,etheravb-r8a7793 # R-Car M2-N
  23. - renesas,etheravb-r8a7794 # R-Car E2
  24. - const: renesas,etheravb-rcar-gen2 # R-Car Gen2 and RZ/G1
  25. - items:
  26. - enum:
  27. - renesas,etheravb-r8a774a1 # RZ/G2M
  28. - renesas,etheravb-r8a774b1 # RZ/G2N
  29. - renesas,etheravb-r8a774c0 # RZ/G2E
  30. - renesas,etheravb-r8a774e1 # RZ/G2H
  31. - renesas,etheravb-r8a7795 # R-Car H3
  32. - renesas,etheravb-r8a7796 # R-Car M3-W
  33. - renesas,etheravb-r8a77961 # R-Car M3-W+
  34. - renesas,etheravb-r8a77965 # R-Car M3-N
  35. - renesas,etheravb-r8a77970 # R-Car V3M
  36. - renesas,etheravb-r8a77980 # R-Car V3H
  37. - renesas,etheravb-r8a77990 # R-Car E3
  38. - renesas,etheravb-r8a77995 # R-Car D3
  39. - const: renesas,etheravb-rcar-gen3 # R-Car Gen3 and RZ/G2
  40. - items:
  41. - enum:
  42. - renesas,etheravb-r8a779a0 # R-Car V3U
  43. - renesas,etheravb-r8a779g0 # R-Car V4H
  44. - renesas,etheravb-r8a779h0 # R-Car V4M
  45. - const: renesas,etheravb-rcar-gen4 # R-Car Gen4
  46. - items:
  47. - enum:
  48. - renesas,etheravb-r9a09g011 # RZ/V2M
  49. - const: renesas,etheravb-rzv2m # RZ/V2M compatible
  50. - items:
  51. - enum:
  52. - renesas,r9a07g043-gbeth # RZ/G2UL and RZ/Five
  53. - renesas,r9a07g044-gbeth # RZ/G2{L,LC}
  54. - renesas,r9a07g054-gbeth # RZ/V2L
  55. - renesas,r9a08g045-gbeth # RZ/G3S
  56. - const: renesas,rzg2l-gbeth # RZ/{G2L,G2UL,V2L} family
  57. reg:
  58. minItems: 1
  59. items:
  60. - description: MAC register block
  61. - description: Stream buffer
  62. interrupts:
  63. minItems: 1
  64. maxItems: 29
  65. interrupt-names:
  66. minItems: 1
  67. maxItems: 29
  68. clocks:
  69. minItems: 1
  70. maxItems: 3
  71. clock-names:
  72. minItems: 1
  73. maxItems: 3
  74. iommus:
  75. maxItems: 1
  76. power-domains:
  77. maxItems: 1
  78. resets:
  79. maxItems: 1
  80. phy-mode: true
  81. phy-handle: true
  82. '#address-cells':
  83. description: Number of address cells for the MDIO bus.
  84. const: 1
  85. deprecated: true
  86. '#size-cells':
  87. description: Number of size cells on the MDIO bus.
  88. const: 0
  89. deprecated: true
  90. mdio:
  91. $ref: /schemas/net/mdio.yaml#
  92. unevaluatedProperties: false
  93. renesas,no-ether-link:
  94. type: boolean
  95. description:
  96. Specify when a board does not provide a proper AVB_LINK signal.
  97. renesas,ether-link-active-low:
  98. type: boolean
  99. description:
  100. Specify when the AVB_LINK signal is active-low instead of normal
  101. active-high.
  102. rx-internal-delay-ps:
  103. enum: [0, 1800]
  104. tx-internal-delay-ps:
  105. enum: [0, 2000]
  106. # In older bindings there where no mdio child-node to describe the MDIO bus
  107. # and the PHY. To not fail older bindings accept any node with an address. New
  108. # users should describe the PHY inside the mdio child-node.
  109. patternProperties:
  110. "@[0-9a-f]$":
  111. type: object
  112. deprecated: true
  113. required:
  114. - compatible
  115. - reg
  116. - interrupts
  117. - clocks
  118. - power-domains
  119. - resets
  120. - phy-mode
  121. - phy-handle
  122. allOf:
  123. - $ref: ethernet-controller.yaml#
  124. - if:
  125. properties:
  126. compatible:
  127. contains:
  128. enum:
  129. - renesas,etheravb-rcar-gen2
  130. - renesas,etheravb-r8a7795
  131. - renesas,etheravb-r8a7796
  132. - renesas,etheravb-r8a77961
  133. - renesas,etheravb-r8a77965
  134. then:
  135. properties:
  136. reg:
  137. minItems: 2
  138. else:
  139. properties:
  140. reg:
  141. maxItems: 1
  142. - if:
  143. properties:
  144. compatible:
  145. contains:
  146. enum:
  147. - renesas,etheravb-rcar-gen2
  148. - renesas,rzg2l-gbeth
  149. then:
  150. properties:
  151. interrupts:
  152. minItems: 1
  153. maxItems: 3
  154. interrupt-names:
  155. minItems: 1
  156. items:
  157. - const: mux
  158. - const: fil
  159. - const: arp_ns
  160. rx-internal-delay-ps: false
  161. else:
  162. if:
  163. properties:
  164. compatible:
  165. contains:
  166. const: renesas,etheravb-rzv2m
  167. then:
  168. properties:
  169. interrupts:
  170. minItems: 29
  171. maxItems: 29
  172. interrupt-names:
  173. items:
  174. pattern: '^(ch(1?)[0-9])|ch20|ch21|dia|dib|err_a|err_b|mgmt_a|mgmt_b|line3$'
  175. rx-internal-delay-ps: false
  176. required:
  177. - interrupt-names
  178. else:
  179. properties:
  180. interrupts:
  181. minItems: 25
  182. maxItems: 25
  183. interrupt-names:
  184. items:
  185. pattern: '^ch[0-9]+$'
  186. required:
  187. - interrupt-names
  188. - rx-internal-delay-ps
  189. - if:
  190. properties:
  191. compatible:
  192. contains:
  193. enum:
  194. - renesas,etheravb-r8a774a1
  195. - renesas,etheravb-r8a774b1
  196. - renesas,etheravb-r8a774e1
  197. - renesas,etheravb-r8a7795
  198. - renesas,etheravb-r8a7796
  199. - renesas,etheravb-r8a77961
  200. - renesas,etheravb-r8a77965
  201. - renesas,etheravb-r8a77970
  202. - renesas,etheravb-r8a77980
  203. - renesas,etheravb-rcar-gen4
  204. then:
  205. required:
  206. - tx-internal-delay-ps
  207. else:
  208. properties:
  209. tx-internal-delay-ps: false
  210. - if:
  211. properties:
  212. compatible:
  213. contains:
  214. const: renesas,etheravb-r8a77995
  215. then:
  216. properties:
  217. rx-internal-delay-ps:
  218. const: 1800
  219. - if:
  220. properties:
  221. compatible:
  222. contains:
  223. const: renesas,etheravb-r8a77980
  224. then:
  225. properties:
  226. tx-internal-delay-ps:
  227. const: 2000
  228. - if:
  229. properties:
  230. compatible:
  231. contains:
  232. const: renesas,rzg2l-gbeth
  233. then:
  234. properties:
  235. clocks:
  236. items:
  237. - description: Main clock
  238. - description: Register access clock
  239. - description: Reference clock for RGMII
  240. clock-names:
  241. items:
  242. - const: axi
  243. - const: chi
  244. - const: refclk
  245. else:
  246. if:
  247. properties:
  248. compatible:
  249. contains:
  250. const: renesas,etheravb-rzv2m
  251. then:
  252. properties:
  253. clocks:
  254. items:
  255. - description: Main clock
  256. - description: Coherent Hub Interface clock
  257. - description: gPTP reference clock
  258. clock-names:
  259. items:
  260. - const: axi
  261. - const: chi
  262. - const: gptp
  263. else:
  264. properties:
  265. clocks:
  266. minItems: 1
  267. items:
  268. - description: AVB functional clock
  269. - description: Optional TXC reference clock
  270. clock-names:
  271. minItems: 1
  272. items:
  273. - const: fck
  274. - const: refclk
  275. additionalProperties: false
  276. examples:
  277. - |
  278. #include <dt-bindings/clock/r8a7795-cpg-mssr.h>
  279. #include <dt-bindings/interrupt-controller/arm-gic.h>
  280. #include <dt-bindings/power/r8a7795-sysc.h>
  281. #include <dt-bindings/gpio/gpio.h>
  282. aliases {
  283. ethernet0 = &avb;
  284. };
  285. avb: ethernet@e6800000 {
  286. compatible = "renesas,etheravb-r8a7795",
  287. "renesas,etheravb-rcar-gen3";
  288. reg = <0xe6800000 0x800>, <0xe6a00000 0x10000>;
  289. interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
  290. <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
  291. <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
  292. <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
  293. <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
  294. <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
  295. <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
  296. <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
  297. <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
  298. <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
  299. <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
  300. <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
  301. <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
  302. <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
  303. <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
  304. <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
  305. <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
  306. <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
  307. <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
  308. <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
  309. <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
  310. <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
  311. <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
  312. <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
  313. <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
  314. interrupt-names = "ch0", "ch1", "ch2", "ch3", "ch4", "ch5", "ch6",
  315. "ch7", "ch8", "ch9", "ch10", "ch11", "ch12",
  316. "ch13", "ch14", "ch15", "ch16", "ch17", "ch18",
  317. "ch19", "ch20", "ch21", "ch22", "ch23", "ch24";
  318. clocks = <&cpg CPG_MOD 812>;
  319. clock-names = "fck";
  320. iommus = <&ipmmu_ds0 16>;
  321. power-domains = <&sysc R8A7795_PD_ALWAYS_ON>;
  322. resets = <&cpg 812>;
  323. phy-mode = "rgmii";
  324. phy-handle = <&phy0>;
  325. rx-internal-delay-ps = <0>;
  326. tx-internal-delay-ps = <2000>;
  327. #address-cells = <1>;
  328. #size-cells = <0>;
  329. phy0: ethernet-phy@0 {
  330. compatible = "ethernet-phy-id0022.1622",
  331. "ethernet-phy-ieee802.3-c22";
  332. rxc-skew-ps = <1500>;
  333. reg = <0>;
  334. interrupt-parent = <&gpio2>;
  335. interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
  336. reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
  337. };
  338. };