qcom,soundwire.yaml 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/soundwire/qcom,soundwire.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Qualcomm SoundWire Controller
  7. maintainers:
  8. - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
  9. - Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
  10. description:
  11. The Qualcomm SoundWire controller along with its board specific bus parameters.
  12. properties:
  13. compatible:
  14. enum:
  15. - qcom,soundwire-v1.3.0
  16. - qcom,soundwire-v1.5.0
  17. - qcom,soundwire-v1.5.1
  18. - qcom,soundwire-v1.6.0
  19. - qcom,soundwire-v1.7.0
  20. - qcom,soundwire-v2.0.0
  21. reg:
  22. maxItems: 1
  23. interrupts:
  24. minItems: 1
  25. items:
  26. - description: specify the SoundWire controller core.
  27. - description: specify the Soundwire controller wake IRQ.
  28. interrupt-names:
  29. minItems: 1
  30. items:
  31. - const: core
  32. - const: wakeup
  33. clocks:
  34. items:
  35. - description: iface clock
  36. clock-names:
  37. items:
  38. - const: iface
  39. resets:
  40. items:
  41. - description: SWR_AUDIO_CGCR RESET
  42. reset-names:
  43. items:
  44. - const: swr_audio_cgcr
  45. '#sound-dai-cells':
  46. const: 1
  47. '#address-cells':
  48. const: 2
  49. '#size-cells':
  50. const: 0
  51. wakeup-source: true
  52. qcom,din-ports:
  53. $ref: /schemas/types.yaml#/definitions/uint32
  54. description: count of data in ports
  55. qcom,dout-ports:
  56. $ref: /schemas/types.yaml#/definitions/uint32
  57. description: count of data out ports
  58. qcom,ports-word-length:
  59. $ref: /schemas/types.yaml#/definitions/uint8-array
  60. description:
  61. Size of payload channel sample.
  62. Value of 0xff indicates that this option is not implemented
  63. or applicable for the respective data port.
  64. More info in MIPI Alliance SoundWire 1.0 Specifications.
  65. minItems: 3
  66. maxItems: 16
  67. qcom,ports-sinterval-low:
  68. $ref: /schemas/types.yaml#/definitions/uint8-array
  69. description:
  70. Sample interval (only lowest byte) of each data port.
  71. Out ports followed by In ports. Used for Sample Interval calculation.
  72. Value of 0xff indicates that this option is not implemented
  73. or applicable for the respective data port.
  74. More info in MIPI Alliance SoundWire 1.0 Specifications.
  75. minItems: 3
  76. maxItems: 16
  77. qcom,ports-sinterval:
  78. $ref: /schemas/types.yaml#/definitions/uint16-array
  79. description:
  80. Sample interval of each data port.
  81. Out ports followed by In ports. Used for Sample Interval calculation.
  82. Value of 0xffff indicates that this option is not implemented
  83. or applicable for the respective data port.
  84. More info in MIPI Alliance SoundWire 1.0 Specifications.
  85. minItems: 3
  86. maxItems: 16
  87. qcom,ports-offset1:
  88. $ref: /schemas/types.yaml#/definitions/uint8-array
  89. description:
  90. Payload transport window offset1 of each data port.
  91. Out ports followed by In ports.
  92. Value of 0xff indicates that this option is not implemented
  93. or applicable for the respective data port.
  94. More info in MIPI Alliance SoundWire 1.0 Specifications.
  95. minItems: 3
  96. maxItems: 16
  97. qcom,ports-offset2:
  98. $ref: /schemas/types.yaml#/definitions/uint8-array
  99. description:
  100. Payload transport window offset2 of each data port.
  101. Out ports followed by In ports.
  102. Value of 0xff indicates that this option is not implemented
  103. or applicable for the respective data port.
  104. More info in MIPI Alliance SoundWire 1.0 Specifications.
  105. minItems: 3
  106. maxItems: 16
  107. qcom,ports-lane-control:
  108. $ref: /schemas/types.yaml#/definitions/uint8-array
  109. description:
  110. Identify which data lane the data port uses.
  111. Out ports followed by In ports.
  112. Value of 0xff indicates that this option is not implemented
  113. or applicable for the respective data port.
  114. More info in MIPI Alliance SoundWire 1.0 Specifications.
  115. minItems: 3
  116. maxItems: 16
  117. qcom,ports-block-pack-mode:
  118. $ref: /schemas/types.yaml#/definitions/uint8-array
  119. description:
  120. Indicate the block packing mode.
  121. 0 to indicate Blocks are per Channel
  122. 1 to indicate Blocks are per Port.
  123. Out ports followed by In ports.
  124. Value of 0xff indicates that this option is not implemented
  125. or applicable for the respective data port.
  126. More info in MIPI Alliance SoundWire 1.0 Specifications.
  127. minItems: 3
  128. maxItems: 16
  129. items:
  130. oneOf:
  131. - minimum: 0
  132. maximum: 1
  133. - const: 0xff
  134. qcom,ports-hstart:
  135. $ref: /schemas/types.yaml#/definitions/uint8-array
  136. description:
  137. Identifying lowerst numbered column in SoundWire Frame,
  138. i.e. left edge of the Transport sub-frame for each port.
  139. Out ports followed by In ports.
  140. Value of 0xff indicates that this option is not implemented
  141. or applicable for the respective data port.
  142. More info in MIPI Alliance SoundWire 1.0 Specifications.
  143. minItems: 3
  144. maxItems: 16
  145. items:
  146. oneOf:
  147. - minimum: 0
  148. maximum: 15
  149. - const: 0xff
  150. qcom,ports-hstop:
  151. $ref: /schemas/types.yaml#/definitions/uint8-array
  152. description:
  153. Identifying highest numbered column in SoundWire Frame,
  154. i.e. the right edge of the Transport
  155. sub-frame for each port. Out ports followed by In ports.
  156. Value of 0xff indicates that this option is not implemented
  157. or applicable for the respective data port.
  158. More info in MIPI Alliance SoundWire 1.0 Specifications.
  159. minItems: 3
  160. maxItems: 16
  161. items:
  162. oneOf:
  163. - minimum: 0
  164. maximum: 15
  165. - const: 0xff
  166. qcom,ports-block-group-count:
  167. $ref: /schemas/types.yaml#/definitions/uint8-array
  168. description:
  169. In range 1 to 4 to indicate how many sample intervals are combined
  170. into a payload. Out ports followed by In ports.
  171. Value of 0xff indicates that this option is not implemented
  172. or applicable for the respective data port.
  173. More info in MIPI Alliance SoundWire 1.0 Specifications.
  174. minItems: 3
  175. maxItems: 16
  176. items:
  177. oneOf:
  178. - minimum: 0
  179. maximum: 4
  180. - const: 0xff
  181. label:
  182. maxItems: 1
  183. required:
  184. - compatible
  185. - reg
  186. - interrupts
  187. - clocks
  188. - clock-names
  189. - '#sound-dai-cells'
  190. - '#address-cells'
  191. - '#size-cells'
  192. - qcom,dout-ports
  193. - qcom,din-ports
  194. - qcom,ports-offset1
  195. - qcom,ports-offset2
  196. oneOf:
  197. - required:
  198. - qcom,ports-sinterval-low
  199. - required:
  200. - qcom,ports-sinterval
  201. allOf:
  202. - $ref: soundwire-controller.yaml#
  203. unevaluatedProperties: false
  204. examples:
  205. - |
  206. #include <dt-bindings/interrupt-controller/arm-gic.h>
  207. #include <dt-bindings/interrupt-controller/irq.h>
  208. #include <dt-bindings/clock/qcom,lpassaudiocc-sc7280.h>
  209. soundwire@3210000 {
  210. compatible = "qcom,soundwire-v1.6.0";
  211. reg = <0x03210000 0x2000>;
  212. interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH>,
  213. <&pdc 130 IRQ_TYPE_LEVEL_HIGH>;
  214. interrupt-names = "core", "wakeup";
  215. clocks = <&lpass_rx_macro>;
  216. clock-names = "iface";
  217. qcom,din-ports = <0>;
  218. qcom,dout-ports = <5>;
  219. resets = <&lpass_audiocc LPASS_AUDIO_SWR_RX_CGCR>;
  220. reset-names = "swr_audio_cgcr";
  221. qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xff 0xff>;
  222. qcom,ports-sinterval-low = /bits/ 8 <0x03 0x3f 0x1f 0x03 0x03>;
  223. qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0b 0x01 0x01>;
  224. qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0b 0x00 0x00>;
  225. qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>;
  226. qcom,ports-block-pack-mode = /bits/ 8 <0xff 0x00 0x01 0xff 0xff>;
  227. qcom,ports-hstart = /bits/ 8 <0xff 0x03 0xff 0xff 0xff>;
  228. qcom,ports-hstop = /bits/ 8 <0xff 0x06 0xff 0xff 0xff>;
  229. qcom,ports-block-group-count = /bits/ 8 <0xff 0xff 0xff 0xff 0x00>;
  230. #sound-dai-cells = <1>;
  231. #address-cells = <2>;
  232. #size-cells = <0>;
  233. codec@0,4 {
  234. compatible = "sdw20217010d00";
  235. reg = <0 4>;
  236. qcom,rx-port-mapping = <1 2 3 4 5>;
  237. };
  238. };