renesas,rsnd.txt 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684
  1. Renesas R-Car sound
  2. =============================================
  3. * Modules
  4. =============================================
  5. Renesas R-Car and RZ/G sound is constructed from below modules
  6. (for Gen2 or later)
  7. SCU : Sampling Rate Converter Unit
  8. - SRC : Sampling Rate Converter
  9. - CMD
  10. - CTU : Channel Transfer Unit
  11. - MIX : Mixer
  12. - DVC : Digital Volume and Mute Function
  13. SSIU : Serial Sound Interface Unit
  14. SSI : Serial Sound Interface
  15. See detail of each module's channels, connection, limitation on datasheet
  16. =============================================
  17. * Multi channel
  18. =============================================
  19. Multi channel is supported by Multi-SSI, or TDM-SSI.
  20. Multi-SSI : 6ch case, you can use stereo x 3 SSI
  21. TDM-SSI : 6ch case, you can use TDM
  22. =============================================
  23. * Enable/Disable each modules
  24. =============================================
  25. See datasheet to check SRC/CTU/MIX/DVC connect-limitation.
  26. DT controls enabling/disabling module.
  27. ${LINUX}/arch/arm/boot/dts/r8a7790-lager.dts can be good example.
  28. This is example of
  29. Playback: [MEM] -> [SRC2] -> [DVC0] -> [SSIU0/SSI0] -> [codec]
  30. Capture: [MEM] <- [DVC1] <- [SRC3] <- [SSIU1/SSI1] <- [codec]
  31. &rcar_sound {
  32. ...
  33. rcar_sound,dai {
  34. dai0 {
  35. playback = <&ssi0 &src2 &dvc0>;
  36. capture = <&ssi1 &src3 &dvc1>;
  37. };
  38. };
  39. };
  40. You can use below.
  41. ${LINUX}/arch/arm/boot/dts/r8a7790.dts can be good example.
  42. &src0 &ctu00 &mix0 &dvc0 &ssi0
  43. &src1 &ctu01 &mix1 &dvc1 &ssi1
  44. &src2 &ctu02 &ssi2
  45. &src3 &ctu03 &ssi3
  46. &src4 &ssi4
  47. &src5 &ctu10 &ssi5
  48. &src6 &ctu11 &ssi6
  49. &src7 &ctu12 &ssi7
  50. &src8 &ctu13 &ssi8
  51. &src9 &ssi9
  52. =============================================
  53. * SRC (Sampling Rate Converter)
  54. =============================================
  55. [xx]Hz [yy]Hz
  56. ------> [SRC] ------>
  57. SRC can convert [xx]Hz to [yy]Hz. Then, it has below 2 modes
  58. Asynchronous mode: input data / output data are based on different clocks.
  59. you can use this mode on Playback / Capture
  60. Synchronous mode: input data / output data are based on same clocks.
  61. This mode will be used if system doesn't have its input clock,
  62. for example digital TV case.
  63. you can use this mode on Playback
  64. ------------------
  65. ** Asynchronous mode
  66. ------------------
  67. You need to use "simple-scu-audio-card" sound card for it.
  68. example)
  69. sound {
  70. compatible = "simple-scu-audio-card";
  71. ...
  72. /*
  73. * SRC Asynchronous mode setting
  74. * Playback:
  75. * All input data will be converted to 48kHz
  76. * Capture:
  77. * Inputed 48kHz data will be converted to
  78. * system specified Hz
  79. */
  80. simple-audio-card,convert-rate = <48000>;
  81. ...
  82. simple-audio-card,cpu {
  83. sound-dai = <&rcar_sound>;
  84. };
  85. simple-audio-card,codec {
  86. ...
  87. };
  88. };
  89. ------------------
  90. ** Synchronous mode
  91. ------------------
  92. > amixer set "SRC Out Rate" on
  93. > aplay xxxx.wav
  94. > amixer set "SRC Out Rate" 48000
  95. > amixer set "SRC Out Rate" 44100
  96. =============================================
  97. * CTU (Channel Transfer Unit)
  98. =============================================
  99. [xx]ch [yy]ch
  100. ------> [CTU] -------->
  101. CTU can convert [xx]ch to [yy]ch, or exchange outputed channel.
  102. CTU conversion needs matrix settings.
  103. For more detail information, see below
  104. Renesas R-Car datasheet
  105. - Sampling Rate Converter Unit (SCU)
  106. - SCU Operation
  107. - CMD Block
  108. - Functional Blocks in CMD
  109. Renesas R-Car datasheet
  110. - Sampling Rate Converter Unit (SCU)
  111. - Register Description
  112. - CTUn Scale Value exx Register (CTUn_SVxxR)
  113. ${LINUX}/sound/soc/sh/rcar/ctu.c
  114. - comment of header
  115. You need to use "simple-scu-audio-card" sound card for it.
  116. example)
  117. sound {
  118. compatible = "simple-scu-audio-card";
  119. ...
  120. /*
  121. * CTU setting
  122. * All input data will be converted to 2ch
  123. * as output data
  124. */
  125. simple-audio-card,convert-channels = <2>;
  126. ...
  127. simple-audio-card,cpu {
  128. sound-dai = <&rcar_sound>;
  129. };
  130. simple-audio-card,codec {
  131. ...
  132. };
  133. };
  134. Ex) Exchange output channel
  135. Input -> Output
  136. 1ch -> 0ch
  137. 0ch -> 1ch
  138. example of using matrix
  139. output 0ch = (input 0ch x 0) + (input 1ch x 1)
  140. output 1ch = (input 0ch x 1) + (input 1ch x 0)
  141. amixer set "CTU Reset" on
  142. amixer set "CTU Pass" 9,10
  143. amixer set "CTU SV0" 0,4194304
  144. amixer set "CTU SV1" 4194304,0
  145. example of changing connection
  146. amixer set "CTU Reset" on
  147. amixer set "CTU Pass" 2,1
  148. =============================================
  149. * MIX (Mixer)
  150. =============================================
  151. MIX merges 2 sounds path. You can see 2 sound interface on system,
  152. and these sounds will be merged by MIX.
  153. aplay -D plughw:0,0 xxxx.wav &
  154. aplay -D plughw:0,1 yyyy.wav
  155. You need to use "simple-scu-audio-card" sound card for it.
  156. Ex)
  157. [MEM] -> [SRC1] -> [CTU02] -+-> [MIX0] -> [DVC0] -> [SSI0]
  158. |
  159. [MEM] -> [SRC2] -> [CTU03] -+
  160. sound {
  161. #address-cells = <1>;
  162. #size-cells = <0>;
  163. compatible = "simple-scu-audio-card";
  164. ...
  165. simple-audio-card,cpu@0 {
  166. reg = <0>;
  167. sound-dai = <&rcar_sound 0>;
  168. };
  169. simple-audio-card,cpu@1 {
  170. reg = <1>;
  171. sound-dai = <&rcar_sound 1>;
  172. };
  173. simple-audio-card,codec {
  174. ...
  175. };
  176. };
  177. &rcar_sound {
  178. ...
  179. rcar_sound,dai {
  180. dai0 {
  181. playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>;
  182. };
  183. dai1 {
  184. playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>;
  185. };
  186. };
  187. };
  188. =============================================
  189. * DVC (Digital Volume and Mute Function)
  190. =============================================
  191. DVC controls Playback/Capture volume.
  192. Playback Volume
  193. amixer set "DVC Out" 100%
  194. Capture Volume
  195. amixer set "DVC In" 100%
  196. Playback Mute
  197. amixer set "DVC Out Mute" on
  198. Capture Mute
  199. amixer set "DVC In Mute" on
  200. Volume Ramp
  201. amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps"
  202. amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps"
  203. amixer set "DVC Out Ramp" on
  204. aplay xxx.wav &
  205. amixer set "DVC Out" 80% // Volume Down
  206. amixer set "DVC Out" 100% // Volume Up
  207. =============================================
  208. * SSIU (Serial Sound Interface Unit)
  209. =============================================
  210. There is no DT settings for SSIU, because SSIU will be automatically
  211. selected via SSI.
  212. SSIU can avoid some under/over run error, because it has some buffer.
  213. But you can't use it if SSI was PIO mode.
  214. In DMA mode, you can select not to use SSIU by using "no-busif" on DT.
  215. &ssi0 {
  216. no-busif;
  217. };
  218. =============================================
  219. * SSI (Serial Sound Interface)
  220. =============================================
  221. ** PIO mode
  222. You can use PIO mode which is for connection check by using.
  223. Note: The system will drop non-SSI modules in PIO mode
  224. even though if DT is selecting other modules.
  225. &ssi0 {
  226. pio-transfer
  227. };
  228. ** DMA mode without SSIU
  229. You can use DMA without SSIU.
  230. Note: under/over run, or noise are likely to occur
  231. &ssi0 {
  232. no-busif;
  233. };
  234. ** PIN sharing
  235. Each SSI can share WS pin. It is based on platform.
  236. This is example if SSI1 want to share WS pin with SSI0
  237. &ssi1 {
  238. shared-pin;
  239. };
  240. ** Multi-SSI
  241. You can use Multi-SSI.
  242. This is example of SSI0/SSI1/SSI2 (= for 6ch)
  243. &rcar_sound {
  244. ...
  245. rcar_sound,dai {
  246. dai0 {
  247. playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>;
  248. };
  249. };
  250. };
  251. ** TDM-SSI
  252. You can use TDM with SSI.
  253. This is example of TDM 6ch.
  254. Driver can automatically switches TDM <-> stereo mode in this case.
  255. rsnd_tdm: sound {
  256. compatible = "simple-audio-card";
  257. ...
  258. simple-audio-card,cpu {
  259. /* system can use TDM 6ch */
  260. dai-tdm-slot-num = <6>;
  261. sound-dai = <&rcar_sound>;
  262. };
  263. simple-audio-card,codec {
  264. ...
  265. };
  266. };
  267. =============================================
  268. Required properties:
  269. =============================================
  270. - compatible : "renesas,rcar_sound-<soctype>", fallbacks
  271. "renesas,rcar_sound-gen1" if generation1, and
  272. "renesas,rcar_sound-gen2" if generation2 (or RZ/G1)
  273. "renesas,rcar_sound-gen3" if generation3
  274. Examples with soctypes are:
  275. - "renesas,rcar_sound-r8a7743" (RZ/G1M)
  276. - "renesas,rcar_sound-r8a7745" (RZ/G1E)
  277. - "renesas,rcar_sound-r8a7778" (R-Car M1A)
  278. - "renesas,rcar_sound-r8a7779" (R-Car H1)
  279. - "renesas,rcar_sound-r8a7790" (R-Car H2)
  280. - "renesas,rcar_sound-r8a7791" (R-Car M2-W)
  281. - "renesas,rcar_sound-r8a7793" (R-Car M2-N)
  282. - "renesas,rcar_sound-r8a7794" (R-Car E2)
  283. - "renesas,rcar_sound-r8a7795" (R-Car H3)
  284. - "renesas,rcar_sound-r8a7796" (R-Car M3-W)
  285. - "renesas,rcar_sound-r8a77965" (R-Car M3-N)
  286. - reg : Should contain the register physical address.
  287. required register is
  288. SRU/ADG/SSI if generation1
  289. SRU/ADG/SSIU/SSI if generation2
  290. - rcar_sound,ssi : Should contain SSI feature.
  291. The number of SSI subnode should be same as HW.
  292. see below for detail.
  293. - rcar_sound,src : Should contain SRC feature.
  294. The number of SRC subnode should be same as HW.
  295. see below for detail.
  296. - rcar_sound,ctu : Should contain CTU feature.
  297. The number of CTU subnode should be same as HW.
  298. see below for detail.
  299. - rcar_sound,mix : Should contain MIX feature.
  300. The number of MIX subnode should be same as HW.
  301. see below for detail.
  302. - rcar_sound,dvc : Should contain DVC feature.
  303. The number of DVC subnode should be same as HW.
  304. see below for detail.
  305. - rcar_sound,dai : DAI contents.
  306. The number of DAI subnode should be same as HW.
  307. see below for detail.
  308. - #sound-dai-cells : it must be 0 if your system is using single DAI
  309. it must be 1 if your system is using multi DAI
  310. - clocks : References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks.
  311. - clock-names : List of necessary clock names.
  312. "ssi-all", "ssi.X", "src.X", "mix.X", "ctu.X",
  313. "dvc.X", "clk_a", "clk_b", "clk_c", "clk_i"
  314. Optional properties:
  315. - #clock-cells : it must be 0 if your system has audio_clkout
  316. it must be 1 if your system has audio_clkout0/1/2/3
  317. - clock-frequency : for all audio_clkout0/1/2/3
  318. - clkout-lr-asynchronous : boolean property. it indicates that audio_clkoutn
  319. is asynchronizes with lr-clock.
  320. - resets : References to SSI resets.
  321. - reset-names : List of valid reset names.
  322. "ssi-all", "ssi.X"
  323. SSI subnode properties:
  324. - interrupts : Should contain SSI interrupt for PIO transfer
  325. - shared-pin : if shared clock pin
  326. - pio-transfer : use PIO transfer mode
  327. - no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case
  328. - dma : Should contain Audio DMAC entry
  329. - dma-names : SSI case "rx" (=playback), "tx" (=capture)
  330. SSIU case "rxu" (=playback), "txu" (=capture)
  331. SRC subnode properties:
  332. - dma : Should contain Audio DMAC entry
  333. - dma-names : "rx" (=playback), "tx" (=capture)
  334. DVC subnode properties:
  335. - dma : Should contain Audio DMAC entry
  336. - dma-names : "tx" (=playback/capture)
  337. DAI subnode properties:
  338. - playback : list of playback modules
  339. - capture : list of capture modules
  340. =============================================
  341. Example:
  342. =============================================
  343. rcar_sound: sound@ec500000 {
  344. #sound-dai-cells = <1>;
  345. compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2";
  346. reg = <0 0xec500000 0 0x1000>, /* SCU */
  347. <0 0xec5a0000 0 0x100>, /* ADG */
  348. <0 0xec540000 0 0x1000>, /* SSIU */
  349. <0 0xec541000 0 0x1280>, /* SSI */
  350. <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/
  351. reg-names = "scu", "adg", "ssiu", "ssi", "audmapp";
  352. clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>,
  353. <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>,
  354. <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>,
  355. <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>,
  356. <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>,
  357. <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>,
  358. <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>,
  359. <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>,
  360. <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>,
  361. <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>,
  362. <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>,
  363. <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>,
  364. <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
  365. clock-names = "ssi-all",
  366. "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
  367. "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
  368. "src.9", "src.8", "src.7", "src.6", "src.5",
  369. "src.4", "src.3", "src.2", "src.1", "src.0",
  370. "dvc.0", "dvc.1",
  371. "clk_a", "clk_b", "clk_c", "clk_i";
  372. rcar_sound,dvc {
  373. dvc0: dvc-0 {
  374. dmas = <&audma0 0xbc>;
  375. dma-names = "tx";
  376. };
  377. dvc1: dvc-1 {
  378. dmas = <&audma0 0xbe>;
  379. dma-names = "tx";
  380. };
  381. };
  382. rcar_sound,mix {
  383. mix0: mix-0 { };
  384. mix1: mix-1 { };
  385. };
  386. rcar_sound,ctu {
  387. ctu00: ctu-0 { };
  388. ctu01: ctu-1 { };
  389. ctu02: ctu-2 { };
  390. ctu03: ctu-3 { };
  391. ctu10: ctu-4 { };
  392. ctu11: ctu-5 { };
  393. ctu12: ctu-6 { };
  394. ctu13: ctu-7 { };
  395. };
  396. rcar_sound,src {
  397. src0: src-0 {
  398. interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>;
  399. dmas = <&audma0 0x85>, <&audma1 0x9a>;
  400. dma-names = "rx", "tx";
  401. };
  402. src1: src-1 {
  403. interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>;
  404. dmas = <&audma0 0x87>, <&audma1 0x9c>;
  405. dma-names = "rx", "tx";
  406. };
  407. src2: src-2 {
  408. interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>;
  409. dmas = <&audma0 0x89>, <&audma1 0x9e>;
  410. dma-names = "rx", "tx";
  411. };
  412. src3: src-3 {
  413. interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>;
  414. dmas = <&audma0 0x8b>, <&audma1 0xa0>;
  415. dma-names = "rx", "tx";
  416. };
  417. src4: src-4 {
  418. interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>;
  419. dmas = <&audma0 0x8d>, <&audma1 0xb0>;
  420. dma-names = "rx", "tx";
  421. };
  422. src5: src-5 {
  423. interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>;
  424. dmas = <&audma0 0x8f>, <&audma1 0xb2>;
  425. dma-names = "rx", "tx";
  426. };
  427. src6: src-6 {
  428. interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>;
  429. dmas = <&audma0 0x91>, <&audma1 0xb4>;
  430. dma-names = "rx", "tx";
  431. };
  432. src7: src-7 {
  433. interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>;
  434. dmas = <&audma0 0x93>, <&audma1 0xb6>;
  435. dma-names = "rx", "tx";
  436. };
  437. src8: src-8 {
  438. interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>;
  439. dmas = <&audma0 0x95>, <&audma1 0xb8>;
  440. dma-names = "rx", "tx";
  441. };
  442. src9: src-9 {
  443. interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>;
  444. dmas = <&audma0 0x97>, <&audma1 0xba>;
  445. dma-names = "rx", "tx";
  446. };
  447. };
  448. rcar_sound,ssi {
  449. ssi0: ssi-0 {
  450. interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
  451. dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
  452. dma-names = "rx", "tx", "rxu", "txu";
  453. };
  454. ssi1: ssi-1 {
  455. interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
  456. dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
  457. dma-names = "rx", "tx", "rxu", "txu";
  458. };
  459. ssi2: ssi-2 {
  460. interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
  461. dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
  462. dma-names = "rx", "tx", "rxu", "txu";
  463. };
  464. ssi3: ssi-3 {
  465. interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
  466. dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
  467. dma-names = "rx", "tx", "rxu", "txu";
  468. };
  469. ssi4: ssi-4 {
  470. interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
  471. dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
  472. dma-names = "rx", "tx", "rxu", "txu";
  473. };
  474. ssi5: ssi-5 {
  475. interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
  476. dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
  477. dma-names = "rx", "tx", "rxu", "txu";
  478. };
  479. ssi6: ssi-6 {
  480. interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
  481. dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
  482. dma-names = "rx", "tx", "rxu", "txu";
  483. };
  484. ssi7: ssi-7 {
  485. interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
  486. dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
  487. dma-names = "rx", "tx", "rxu", "txu";
  488. };
  489. ssi8: ssi-8 {
  490. interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
  491. dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
  492. dma-names = "rx", "tx", "rxu", "txu";
  493. };
  494. ssi9: ssi-9 {
  495. interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
  496. dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
  497. dma-names = "rx", "tx", "rxu", "txu";
  498. };
  499. };
  500. rcar_sound,dai {
  501. dai0 {
  502. playback = <&ssi5 &src5>;
  503. capture = <&ssi6>;
  504. };
  505. dai1 {
  506. playback = <&ssi3>;
  507. };
  508. dai2 {
  509. capture = <&ssi4>;
  510. };
  511. dai3 {
  512. playback = <&ssi7>;
  513. };
  514. dai4 {
  515. capture = <&ssi8>;
  516. };
  517. };
  518. };
  519. =============================================
  520. Example: simple sound card
  521. =============================================
  522. rsnd_ak4643: sound {
  523. compatible = "simple-audio-card";
  524. simple-audio-card,format = "left_j";
  525. simple-audio-card,bitclock-master = <&sndcodec>;
  526. simple-audio-card,frame-master = <&sndcodec>;
  527. sndcpu: simple-audio-card,cpu {
  528. sound-dai = <&rcar_sound>;
  529. };
  530. sndcodec: simple-audio-card,codec {
  531. sound-dai = <&ak4643>;
  532. clocks = <&audio_clock>;
  533. };
  534. };
  535. &rcar_sound {
  536. pinctrl-0 = <&sound_pins &sound_clk_pins>;
  537. pinctrl-names = "default";
  538. /* Single DAI */
  539. #sound-dai-cells = <0>;
  540. rcar_sound,dai {
  541. dai0 {
  542. playback = <&ssi0 &src2 &dvc0>;
  543. capture = <&ssi1 &src3 &dvc1>;
  544. };
  545. };
  546. };
  547. &ssi1 {
  548. shared-pin;
  549. };
  550. =============================================
  551. Example: simple sound card for TDM
  552. =============================================
  553. rsnd_tdm: sound {
  554. compatible = "simple-audio-card";
  555. simple-audio-card,format = "left_j";
  556. simple-audio-card,bitclock-master = <&sndcodec>;
  557. simple-audio-card,frame-master = <&sndcodec>;
  558. sndcpu: simple-audio-card,cpu {
  559. sound-dai = <&rcar_sound>;
  560. dai-tdm-slot-num = <6>;
  561. };
  562. sndcodec: simple-audio-card,codec {
  563. sound-dai = <&xxx>;
  564. };
  565. };
  566. =============================================
  567. Example: simple sound card for Multi channel
  568. =============================================
  569. &rcar_sound {
  570. pinctrl-0 = <&sound_pins &sound_clk_pins>;
  571. pinctrl-names = "default";
  572. /* Single DAI */
  573. #sound-dai-cells = <0>;
  574. rcar_sound,dai {
  575. dai0 {
  576. playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>;
  577. };
  578. };
  579. };