cirrus,madera.yaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/mfd/cirrus,madera.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Cirrus Logic Madera class audio CODECs Multi-Functional Device
  7. maintainers:
  8. - patches@opensource.cirrus.com
  9. description: |
  10. These devices are audio SoCs with extensive digital capabilities and a range
  11. of analogue I/O.
  12. See also the child driver bindings in:
  13. bindings/pinctrl/cirrus,madera.yaml
  14. bindings/regulator/wlf,arizona.yaml
  15. bindings/sound/cirrus,madera.yaml
  16. allOf:
  17. - $ref: /schemas/pinctrl/cirrus,madera.yaml#
  18. - $ref: /schemas/regulator/wlf,arizona.yaml#
  19. - $ref: /schemas/sound/cirrus,madera.yaml#
  20. - if:
  21. properties:
  22. compatible:
  23. contains:
  24. enum:
  25. - cirrus,cs47l85
  26. - wlf,wm1840
  27. then:
  28. properties:
  29. SPKVDDL-supply:
  30. description:
  31. Left speaker driver power supply.
  32. SPKVDDR-supply:
  33. description:
  34. Right speaker driver power supply.
  35. required:
  36. - SPKVDDL-supply
  37. - SPKVDDR-supply
  38. else:
  39. required:
  40. - DCVDD-supply
  41. - if:
  42. properties:
  43. compatible:
  44. contains:
  45. enum:
  46. - cirrus,cs47l15
  47. - cirrus,cs47l35
  48. then:
  49. properties:
  50. SPKVDD-supply:
  51. description:
  52. Mono speaker driver power supply.
  53. required:
  54. - SPKVDD-supply
  55. - if:
  56. properties:
  57. compatible:
  58. contains:
  59. enum:
  60. - cirrus,cs47l35
  61. - cirrus,cs47l85
  62. - cirrus,cs47l90
  63. - cirrus,cs47l91
  64. - wlf,wm1840
  65. then:
  66. properties:
  67. DBVDD2-supply:
  68. description:
  69. Databus power supply.
  70. required:
  71. - DBVDD2-supply
  72. - if:
  73. properties:
  74. compatible:
  75. contains:
  76. enum:
  77. - cirrus,cs47l85
  78. - cirrus,cs47l90
  79. - cirrus,cs47l91
  80. - wlf,wm1840
  81. then:
  82. properties:
  83. DBVDD3-supply:
  84. description:
  85. Databus power supply.
  86. DBVDD4-supply:
  87. description:
  88. Databus power supply.
  89. - if:
  90. properties:
  91. compatible:
  92. contains:
  93. enum:
  94. - cirrus,cs47l15
  95. then:
  96. required:
  97. - MICVDD-supply
  98. else:
  99. properties:
  100. CPVDD2-supply:
  101. description:
  102. Secondary charge pump power supply.
  103. required:
  104. - CPVDD2-supply
  105. properties:
  106. compatible:
  107. enum:
  108. - cirrus,cs47l15
  109. - cirrus,cs47l35
  110. - cirrus,cs47l85
  111. - cirrus,cs47l90
  112. - cirrus,cs47l91
  113. - cirrus,cs42l92
  114. - cirrus,cs47l92
  115. - cirrus,cs47l93
  116. - cirrus,wm1840
  117. reg:
  118. maxItems: 1
  119. gpio-controller: true
  120. '#gpio-cells':
  121. description:
  122. The first cell is the pin number. The second cell is reserved for
  123. future use and must be zero
  124. const: 2
  125. interrupt-controller: true
  126. '#interrupt-cells':
  127. description:
  128. The first cell is the IRQ number.
  129. The second cell is the flags, encoded as the trigger masks from
  130. bindings/interrupt-controller/interrupts.txt
  131. const: 2
  132. interrupts:
  133. maxItems: 1
  134. reset-gpios:
  135. description:
  136. One entry specifying the GPIO controlling /RESET. As defined in
  137. bindings/gpio.txt. Although optional, it is strongly recommended
  138. to use a hardware reset.
  139. maxItems: 1
  140. clocks:
  141. description:
  142. Should reference the clocks supplied on MCLK1, MCLK2 and MCLK3.
  143. minItems: 1
  144. maxItems: 3
  145. clock-names:
  146. description: |
  147. May contain up to three strings:
  148. "mclk1" For the clock supplied on MCLK1, recommended to be a
  149. high quality audio reference clock.
  150. "mclk2" For the clock supplied on MCLK2, required to be an
  151. always on 32k clock.
  152. "mclk3" For the clock supplied on MCLK3.
  153. oneOf:
  154. - items:
  155. - const: mclk1
  156. - items:
  157. - const: mclk2
  158. - items:
  159. - const: mclk3
  160. - items:
  161. - const: mclk1
  162. - const: mclk2
  163. - items:
  164. - const: mclk1
  165. - const: mclk3
  166. - items:
  167. - const: mclk2
  168. - const: mclk3
  169. - items:
  170. - const: mclk1
  171. - const: mclk2
  172. - const: mclk3
  173. AVDD-supply:
  174. description:
  175. Analogue power supply.
  176. DBVDD1-supply:
  177. description:
  178. Databus power supply.
  179. CPVDD1-supply:
  180. description:
  181. Charge pump power supply.
  182. DCVDD-supply:
  183. description:
  184. Digital power supply, optional on CS47L85, WM1840 where it can
  185. be supplied internally.
  186. MICVDD-supply:
  187. description:
  188. Microphone power supply, normally supplied internally except on
  189. cs47l24, wm1831 where it is mandatory.
  190. required:
  191. - compatible
  192. - gpio-controller
  193. - '#gpio-cells'
  194. - interrupt-controller
  195. - '#interrupt-cells'
  196. - interrupts
  197. - AVDD-supply
  198. - DBVDD1-supply
  199. - CPVDD1-supply
  200. unevaluatedProperties: false
  201. examples:
  202. - |
  203. #include <dt-bindings/sound/madera.h>
  204. i2c@e0004000 {
  205. #address-cells = <1>;
  206. #size-cells = <0>;
  207. reg = <0xe0004000 0x1000>;
  208. cs47l85: codec@1a {
  209. compatible = "cirrus,cs47l85";
  210. reg = <0x1a>;
  211. reset-gpios = <&gpio 0>;
  212. wlf,ldoena = <&gpio 1>;
  213. interrupt-controller;
  214. #interrupt-cells = <2>;
  215. interrupts = <4 1 0>;
  216. gpio-controller;
  217. #gpio-cells = <2>;
  218. AVDD-supply = <&vdd1v8>;
  219. DBVDD1-supply = <&vdd1v8>;
  220. DBVDD2-supply = <&vdd1v8>;
  221. DBVDD3-supply = <&vdd1v8>;
  222. DBVDD4-supply = <&vdd1v8>;
  223. CPVDD1-supply = <&vdd1v8>;
  224. CPVDD2-supply = <&vdd1v2>;
  225. SPKVDDL-supply = <&vdd5v>;
  226. SPKVDDR-supply = <&vdd5v>;
  227. clocks = <&clks 0>, <&clks 1>, <&clks 2>;
  228. clock-names = "mclk1", "mclk2", "mclk3";
  229. cirrus,dmic-ref = <0 0 MADERA_DMIC_REF_MICBIAS1>;
  230. cirrus,inmode = <
  231. MADERA_INMODE_SE MADERA_INMODE_SE
  232. MADERA_INMODE_SE MADERA_INMODE_SE
  233. MADERA_INMODE_DIFF MADERA_INMODE_DIFF
  234. >;
  235. cirrus,max-channels-clocked = <2 0 0>;
  236. pinctrl-names = "default";
  237. pinctrl-0 = <&pinsettings>;
  238. pinsettings: pin-settings {
  239. aif1-pins {
  240. groups = "aif1";
  241. function = "aif1";
  242. bias-bus-hold;
  243. };
  244. aif2-pins {
  245. groups = "aif2";
  246. function = "aif2";
  247. bias-bus-hold;
  248. };
  249. aif3-pins {
  250. groups = "aif3";
  251. function = "aif3";
  252. bias-bus-hold;
  253. };
  254. };
  255. };
  256. };