860-v6.6-06-ASoC-dt-bindings-mediatek-mt7986-afe-add-audio-afe-d.patch 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  1. From d16202eb38585adbc16e32d11188dbc2127015de Mon Sep 17 00:00:00 2001
  2. From: Maso Huang <[email protected]>
  3. Date: Thu, 17 Aug 2023 18:13:38 +0800
  4. Subject: [PATCH 6/9] ASoC: dt-bindings: mediatek,mt7986-afe: add audio afe
  5. document
  6. Add mt7986 audio afe document.
  7. Signed-off-by: Maso Huang <[email protected]>
  8. Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
  9. Link: https://lore.kernel.org/r/[email protected]
  10. Signed-off-by: Mark Brown <[email protected]>
  11. ---
  12. .../bindings/sound/mediatek,mt7986-afe.yaml | 160 ++++++++++++++++++
  13. 1 file changed, 160 insertions(+)
  14. create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml
  15. --- /dev/null
  16. +++ b/Documentation/devicetree/bindings/sound/mediatek,mt7986-afe.yaml
  17. @@ -0,0 +1,160 @@
  18. +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  19. +%YAML 1.2
  20. +---
  21. +$id: http://devicetree.org/schemas/sound/mediatek,mt7986-afe.yaml#
  22. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  23. +
  24. +title: MediaTek AFE PCM controller for MT7986
  25. +
  26. +maintainers:
  27. + - Maso Huang <[email protected]>
  28. +
  29. +properties:
  30. + compatible:
  31. + oneOf:
  32. + - const: mediatek,mt7986-afe
  33. + - items:
  34. + - enum:
  35. + - mediatek,mt7981-afe
  36. + - mediatek,mt7988-afe
  37. + - const: mediatek,mt7986-afe
  38. +
  39. + reg:
  40. + maxItems: 1
  41. +
  42. + interrupts:
  43. + maxItems: 1
  44. +
  45. + clocks:
  46. + minItems: 5
  47. + items:
  48. + - description: audio bus clock
  49. + - description: audio 26M clock
  50. + - description: audio intbus clock
  51. + - description: audio hopping clock
  52. + - description: audio pll clock
  53. + - description: mux for pcm_mck
  54. + - description: audio i2s/pcm mck
  55. +
  56. + clock-names:
  57. + minItems: 5
  58. + items:
  59. + - const: bus_ck
  60. + - const: 26m_ck
  61. + - const: l_ck
  62. + - const: aud_ck
  63. + - const: eg2_ck
  64. + - const: sel
  65. + - const: i2s_m
  66. +
  67. +required:
  68. + - compatible
  69. + - reg
  70. + - interrupts
  71. + - clocks
  72. + - clock-names
  73. +
  74. +allOf:
  75. + - if:
  76. + properties:
  77. + compatible:
  78. + contains:
  79. + const: mediatek,mt7986-afe
  80. + then:
  81. + properties:
  82. + clocks:
  83. + items:
  84. + - description: audio bus clock
  85. + - description: audio 26M clock
  86. + - description: audio intbus clock
  87. + - description: audio hopping clock
  88. + - description: audio pll clock
  89. + clock-names:
  90. + items:
  91. + - const: bus_ck
  92. + - const: 26m_ck
  93. + - const: l_ck
  94. + - const: aud_ck
  95. + - const: eg2_ck
  96. +
  97. + - if:
  98. + properties:
  99. + compatible:
  100. + contains:
  101. + const: mediatek,mt7981-afe
  102. + then:
  103. + properties:
  104. + clocks:
  105. + items:
  106. + - description: audio bus clock
  107. + - description: audio 26M clock
  108. + - description: audio intbus clock
  109. + - description: audio hopping clock
  110. + - description: audio pll clock
  111. + - description: mux for pcm_mck
  112. + clock-names:
  113. + items:
  114. + - const: bus_ck
  115. + - const: 26m_ck
  116. + - const: l_ck
  117. + - const: aud_ck
  118. + - const: eg2_ck
  119. + - const: sel
  120. +
  121. + - if:
  122. + properties:
  123. + compatible:
  124. + contains:
  125. + const: mediatek,mt7988-afe
  126. + then:
  127. + properties:
  128. + clocks:
  129. + items:
  130. + - description: audio bus clock
  131. + - description: audio 26M clock
  132. + - description: audio intbus clock
  133. + - description: audio hopping clock
  134. + - description: audio pll clock
  135. + - description: mux for pcm_mck
  136. + - description: audio i2s/pcm mck
  137. + clock-names:
  138. + items:
  139. + - const: bus_ck
  140. + - const: 26m_ck
  141. + - const: l_ck
  142. + - const: aud_ck
  143. + - const: eg2_ck
  144. + - const: sel
  145. + - const: i2s_m
  146. +
  147. +additionalProperties: false
  148. +
  149. +examples:
  150. + - |
  151. + #include <dt-bindings/interrupt-controller/arm-gic.h>
  152. + #include <dt-bindings/interrupt-controller/irq.h>
  153. + #include <dt-bindings/clock/mt7986-clk.h>
  154. +
  155. + afe@11210000 {
  156. + compatible = "mediatek,mt7986-afe";
  157. + reg = <0x11210000 0x9000>;
  158. + interrupts = <GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>;
  159. + clocks = <&infracfg_ao CLK_INFRA_AUD_BUS_CK>,
  160. + <&infracfg_ao CLK_INFRA_AUD_26M_CK>,
  161. + <&infracfg_ao CLK_INFRA_AUD_L_CK>,
  162. + <&infracfg_ao CLK_INFRA_AUD_AUD_CK>,
  163. + <&infracfg_ao CLK_INFRA_AUD_EG2_CK>;
  164. + clock-names = "bus_ck",
  165. + "26m_ck",
  166. + "l_ck",
  167. + "aud_ck",
  168. + "eg2_ck";
  169. + assigned-clocks = <&topckgen CLK_TOP_A1SYS_SEL>,
  170. + <&topckgen CLK_TOP_AUD_L_SEL>,
  171. + <&topckgen CLK_TOP_A_TUNER_SEL>;
  172. + assigned-clock-parents = <&topckgen CLK_TOP_APLL2_D4>,
  173. + <&apmixedsys CLK_APMIXED_APLL2>,
  174. + <&topckgen CLK_TOP_APLL2_D4>;
  175. + };
  176. +
  177. +...