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