2
0

247-v6.8-dt-bindings-clock-mediatek-add-clock-controllers-of-.patch 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. From afd36e9d91b0a840983b829a9e95407d8151f7e7 Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  3. Date: Sun, 17 Dec 2023 21:49:55 +0000
  4. Subject: [PATCH 2/4] dt-bindings: clock: mediatek: add clock controllers of
  5. MT7988
  6. Add various clock controllers found in the MT7988 SoC to existing
  7. bindings (if applicable) and add files for the new ethwarp, mcusys
  8. and xfi-pll clock controllers not previously present in any SoC.
  9. Signed-off-by: Daniel Golle <[email protected]>
  10. Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
  11. Link: https://lore.kernel.org/r/07e76a544ce4392bcb88e34d5480e99bb7994618.1702849494.git.daniel@makrotopia.org
  12. Reviewed-by: Krzysztof Kozlowski <[email protected]>
  13. Signed-off-by: Stephen Boyd <[email protected]>
  14. ---
  15. .../arm/mediatek/mediatek,infracfg.yaml | 1 +
  16. .../bindings/clock/mediatek,apmixedsys.yaml | 1 +
  17. .../bindings/clock/mediatek,ethsys.yaml | 1 +
  18. .../clock/mediatek,mt7988-ethwarp.yaml | 52 +++++++++++++++
  19. .../clock/mediatek,mt7988-xfi-pll.yaml | 48 ++++++++++++++
  20. .../bindings/clock/mediatek,topckgen.yaml | 2 +
  21. .../bindings/net/pcs/mediatek,sgmiisys.yaml | 65 ++++++++++++++++---
  22. 7 files changed, 161 insertions(+), 9 deletions(-)
  23. create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt7988-ethwarp.yaml
  24. create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mt7988-xfi-pll.yaml
  25. --- a/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml
  26. +++ b/Documentation/devicetree/bindings/arm/mediatek/mediatek,infracfg.yaml
  27. @@ -30,6 +30,7 @@ properties:
  28. - mediatek,mt7629-infracfg
  29. - mediatek,mt7981-infracfg
  30. - mediatek,mt7986-infracfg
  31. + - mediatek,mt7988-infracfg
  32. - mediatek,mt8135-infracfg
  33. - mediatek,mt8167-infracfg
  34. - mediatek,mt8173-infracfg
  35. --- a/Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml
  36. +++ b/Documentation/devicetree/bindings/clock/mediatek,apmixedsys.yaml
  37. @@ -22,6 +22,7 @@ properties:
  38. - mediatek,mt7622-apmixedsys
  39. - mediatek,mt7981-apmixedsys
  40. - mediatek,mt7986-apmixedsys
  41. + - mediatek,mt7988-apmixedsys
  42. - mediatek,mt8135-apmixedsys
  43. - mediatek,mt8173-apmixedsys
  44. - mediatek,mt8516-apmixedsys
  45. --- a/Documentation/devicetree/bindings/clock/mediatek,ethsys.yaml
  46. +++ b/Documentation/devicetree/bindings/clock/mediatek,ethsys.yaml
  47. @@ -22,6 +22,7 @@ properties:
  48. - mediatek,mt7629-ethsys
  49. - mediatek,mt7981-ethsys
  50. - mediatek,mt7986-ethsys
  51. + - mediatek,mt7988-ethsys
  52. - const: syscon
  53. - items:
  54. - const: mediatek,mt7623-ethsys
  55. --- /dev/null
  56. +++ b/Documentation/devicetree/bindings/clock/mediatek,mt7988-ethwarp.yaml
  57. @@ -0,0 +1,52 @@
  58. +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  59. +%YAML 1.2
  60. +---
  61. +$id: http://devicetree.org/schemas/clock/mediatek,mt7988-ethwarp.yaml#
  62. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  63. +
  64. +title: MediaTek MT7988 ethwarp Controller
  65. +
  66. +maintainers:
  67. + - Daniel Golle <[email protected]>
  68. +
  69. +description:
  70. + The Mediatek MT7988 ethwarp controller provides clocks and resets for the
  71. + Ethernet related subsystems found the MT7988 SoC.
  72. + The clock values can be found in <dt-bindings/clock/mt*-clk.h>.
  73. +
  74. +properties:
  75. + compatible:
  76. + items:
  77. + - const: mediatek,mt7988-ethwarp
  78. +
  79. + reg:
  80. + maxItems: 1
  81. +
  82. + '#clock-cells':
  83. + const: 1
  84. +
  85. + '#reset-cells':
  86. + const: 1
  87. +
  88. +required:
  89. + - compatible
  90. + - reg
  91. + - '#clock-cells'
  92. + - '#reset-cells'
  93. +
  94. +additionalProperties: false
  95. +
  96. +examples:
  97. + - |
  98. + #include <dt-bindings/reset/ti-syscon.h>
  99. + soc {
  100. + #address-cells = <2>;
  101. + #size-cells = <2>;
  102. +
  103. + clock-controller@15031000 {
  104. + compatible = "mediatek,mt7988-ethwarp";
  105. + reg = <0 0x15031000 0 0x1000>;
  106. + #clock-cells = <1>;
  107. + #reset-cells = <1>;
  108. + };
  109. + };
  110. --- /dev/null
  111. +++ b/Documentation/devicetree/bindings/clock/mediatek,mt7988-xfi-pll.yaml
  112. @@ -0,0 +1,48 @@
  113. +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
  114. +%YAML 1.2
  115. +---
  116. +$id: http://devicetree.org/schemas/clock/mediatek,mt7988-xfi-pll.yaml#
  117. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  118. +
  119. +title: MediaTek MT7988 XFI PLL Clock Controller
  120. +
  121. +maintainers:
  122. + - Daniel Golle <[email protected]>
  123. +
  124. +description:
  125. + The MediaTek XFI PLL controller provides the 156.25MHz clock for the
  126. + Ethernet SerDes PHY from the 40MHz top_xtal clock.
  127. +
  128. +properties:
  129. + compatible:
  130. + const: mediatek,mt7988-xfi-pll
  131. +
  132. + reg:
  133. + maxItems: 1
  134. +
  135. + resets:
  136. + maxItems: 1
  137. +
  138. + '#clock-cells':
  139. + const: 1
  140. +
  141. +required:
  142. + - compatible
  143. + - reg
  144. + - resets
  145. + - '#clock-cells'
  146. +
  147. +additionalProperties: false
  148. +
  149. +examples:
  150. + - |
  151. + soc {
  152. + #address-cells = <2>;
  153. + #size-cells = <2>;
  154. + clock-controller@11f40000 {
  155. + compatible = "mediatek,mt7988-xfi-pll";
  156. + reg = <0 0x11f40000 0 0x1000>;
  157. + resets = <&watchdog 16>;
  158. + #clock-cells = <1>;
  159. + };
  160. + };
  161. --- a/Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml
  162. +++ b/Documentation/devicetree/bindings/clock/mediatek,topckgen.yaml
  163. @@ -37,6 +37,8 @@ properties:
  164. - mediatek,mt7629-topckgen
  165. - mediatek,mt7981-topckgen
  166. - mediatek,mt7986-topckgen
  167. + - mediatek,mt7988-mcusys
  168. + - mediatek,mt7988-topckgen
  169. - mediatek,mt8167-topckgen
  170. - mediatek,mt8183-topckgen
  171. - const: syscon
  172. --- a/Documentation/devicetree/bindings/net/pcs/mediatek,sgmiisys.yaml
  173. +++ b/Documentation/devicetree/bindings/net/pcs/mediatek,sgmiisys.yaml
  174. @@ -15,15 +15,22 @@ description:
  175. properties:
  176. compatible:
  177. - items:
  178. - - enum:
  179. - - mediatek,mt7622-sgmiisys
  180. - - mediatek,mt7629-sgmiisys
  181. - - mediatek,mt7981-sgmiisys_0
  182. - - mediatek,mt7981-sgmiisys_1
  183. - - mediatek,mt7986-sgmiisys_0
  184. - - mediatek,mt7986-sgmiisys_1
  185. - - const: syscon
  186. + oneOf:
  187. + - items:
  188. + - enum:
  189. + - mediatek,mt7622-sgmiisys
  190. + - mediatek,mt7629-sgmiisys
  191. + - mediatek,mt7981-sgmiisys_0
  192. + - mediatek,mt7981-sgmiisys_1
  193. + - mediatek,mt7986-sgmiisys_0
  194. + - mediatek,mt7986-sgmiisys_1
  195. + - const: syscon
  196. + - items:
  197. + - enum:
  198. + - mediatek,mt7988-sgmiisys0
  199. + - mediatek,mt7988-sgmiisys1
  200. + - const: simple-mfd
  201. + - const: syscon
  202. reg:
  203. maxItems: 1
  204. @@ -35,11 +42,51 @@ properties:
  205. description: Invert polarity of the SGMII data lanes
  206. type: boolean
  207. + pcs:
  208. + type: object
  209. + description: MediaTek LynxI HSGMII PCS
  210. + properties:
  211. + compatible:
  212. + const: mediatek,mt7988-sgmii
  213. +
  214. + clocks:
  215. + maxItems: 3
  216. +
  217. + clock-names:
  218. + items:
  219. + - const: sgmii_sel
  220. + - const: sgmii_tx
  221. + - const: sgmii_rx
  222. +
  223. + required:
  224. + - compatible
  225. + - clocks
  226. + - clock-names
  227. +
  228. + additionalProperties: false
  229. +
  230. required:
  231. - compatible
  232. - reg
  233. - '#clock-cells'
  234. +allOf:
  235. + - if:
  236. + properties:
  237. + compatible:
  238. + contains:
  239. + enum:
  240. + - mediatek,mt7988-sgmiisys0
  241. + - mediatek,mt7988-sgmiisys1
  242. +
  243. + then:
  244. + required:
  245. + - pcs
  246. +
  247. + else:
  248. + properties:
  249. + pcs: false
  250. +
  251. additionalProperties: false
  252. examples: