Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: renesas, rsnd: switch to yaml base Documentation

This patch switches from .txt base to .yaml base Document.
It is still keeping detail explanations at .txt

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/87blgcbaw4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
2d8fc973 97198614

+450 -520
-520
Documentation/devicetree/bindings/sound/renesas,rsnd.txt
··· 253 253 Driver can automatically switches TDM <-> stereo mode in this case. 254 254 255 255 see "Example: simple sound card for TDM" 256 - 257 - ============================================= 258 - Required properties: 259 - ============================================= 260 - 261 - - compatible : "renesas,rcar_sound-<soctype>", fallbacks 262 - "renesas,rcar_sound-gen1" if generation1, and 263 - "renesas,rcar_sound-gen2" if generation2 (or RZ/G1) 264 - "renesas,rcar_sound-gen3" if generation3 (or RZ/G2) 265 - Examples with soctypes are: 266 - - "renesas,rcar_sound-r8a7742" (RZ/G1H) 267 - - "renesas,rcar_sound-r8a7743" (RZ/G1M) 268 - - "renesas,rcar_sound-r8a7744" (RZ/G1N) 269 - - "renesas,rcar_sound-r8a7745" (RZ/G1E) 270 - - "renesas,rcar_sound-r8a77470" (RZ/G1C) 271 - - "renesas,rcar_sound-r8a774a1" (RZ/G2M) 272 - - "renesas,rcar_sound-r8a774b1" (RZ/G2N) 273 - - "renesas,rcar_sound-r8a774c0" (RZ/G2E) 274 - - "renesas,rcar_sound-r8a774e1" (RZ/G2H) 275 - - "renesas,rcar_sound-r8a7778" (R-Car M1A) 276 - - "renesas,rcar_sound-r8a7779" (R-Car H1) 277 - - "renesas,rcar_sound-r8a7790" (R-Car H2) 278 - - "renesas,rcar_sound-r8a7791" (R-Car M2-W) 279 - - "renesas,rcar_sound-r8a7793" (R-Car M2-N) 280 - - "renesas,rcar_sound-r8a7794" (R-Car E2) 281 - - "renesas,rcar_sound-r8a7795" (R-Car H3) 282 - - "renesas,rcar_sound-r8a7796" (R-Car M3-W) 283 - - "renesas,rcar_sound-r8a77965" (R-Car M3-N) 284 - - "renesas,rcar_sound-r8a77990" (R-Car E3) 285 - - "renesas,rcar_sound-r8a77995" (R-Car D3) 286 - - reg : Should contain the register physical address. 287 - required register is 288 - SRU/ADG/SSI if generation1 289 - SRU/ADG/SSIU/SSI/AUDIO-DMAC-periperi if generation2/generation3 290 - Select extended AUDIO-DMAC-periperi address if SoC has it, 291 - otherwise select normal AUDIO-DMAC-periperi address. 292 - - reg-names : Should contain the register names. 293 - scu/adg/ssi if generation1 294 - scu/adg/ssiu/ssi/audmapp if generation2/generation3 295 - - rcar_sound,ssi : Should contain SSI feature. 296 - The number of SSI subnode should be same as HW. 297 - see below for detail. 298 - - rcar_sound,ssiu : Should contain SSIU feature. 299 - The number of SSIU subnode should be same as HW. 300 - see below for detail. 301 - - rcar_sound,src : Should contain SRC feature. 302 - The number of SRC subnode should be same as HW. 303 - see below for detail. 304 - - rcar_sound,ctu : Should contain CTU feature. 305 - The number of CTU subnode should be same as HW. 306 - see below for detail. 307 - - rcar_sound,mix : Should contain MIX feature. 308 - The number of MIX subnode should be same as HW. 309 - see below for detail. 310 - - rcar_sound,dvc : Should contain DVC feature. 311 - The number of DVC subnode should be same as HW. 312 - see below for detail. 313 - - rcar_sound,dai : DAI contents. 314 - The number of DAI subnode should be same as HW. 315 - see below for detail. 316 - - #sound-dai-cells : it must be 0 if your system is using single DAI 317 - it must be 1 if your system is using multi DAI 318 - - clocks : References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks. 319 - - clock-names : List of necessary clock names. 320 - "ssi-all", "ssi.X", "src.X", "mix.X", "ctu.X", 321 - "dvc.X", "clk_a", "clk_b", "clk_c", "clk_i" 322 - 323 - Optional properties: 324 - - #clock-cells : it must be 0 if your system has audio_clkout 325 - it must be 1 if your system has audio_clkout0/1/2/3 326 - - clock-frequency : for all audio_clkout0/1/2/3 327 - - clkout-lr-asynchronous : boolean property. it indicates that audio_clkoutn 328 - is asynchronizes with lr-clock. 329 - - resets : References to SSI resets. 330 - - reset-names : List of valid reset names. 331 - "ssi-all", "ssi.X" 332 - 333 - SSI subnode properties: 334 - - interrupts : Should contain SSI interrupt for PIO transfer 335 - - shared-pin : if shared clock pin 336 - - pio-transfer : use PIO transfer mode 337 - - no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case 338 - - dma : Should contain Audio DMAC entry 339 - - dma-names : SSI case "rx" (=playback), "tx" (=capture) 340 - Deprecated: see SSIU subnode properties 341 - SSIU case "rxu" (=playback), "txu" (=capture) 342 - 343 - SSIU subnode properties: 344 - - dma : Should contain Audio DMAC entry 345 - - dma-names : "rx" (=playback), "tx" (=capture) 346 - 347 - SRC subnode properties: 348 - - dma : Should contain Audio DMAC entry 349 - - dma-names : "rx" (=playback), "tx" (=capture) 350 - 351 - DVC subnode properties: 352 - - dma : Should contain Audio DMAC entry 353 - - dma-names : "tx" (=playback/capture) 354 - 355 - DAI subnode properties: 356 - - playback : list of playback modules 357 - - capture : list of capture modules 358 - 359 - 360 - ============================================= 361 - Example: 362 - ============================================= 363 - 364 - rcar_sound: sound@ec500000 { 365 - #sound-dai-cells = <1>; 366 - compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2"; 367 - reg = <0 0xec500000 0 0x1000>, /* SCU */ 368 - <0 0xec5a0000 0 0x100>, /* ADG */ 369 - <0 0xec540000 0 0x1000>, /* SSIU */ 370 - <0 0xec541000 0 0x1280>, /* SSI */ 371 - <0 0xec740000 0 0x200>; /* Audio DMAC peri peri*/ 372 - reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; 373 - 374 - clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>, 375 - <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>, 376 - <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>, 377 - <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>, 378 - <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>, 379 - <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>, 380 - <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>, 381 - <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>, 382 - <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>, 383 - <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>, 384 - <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>, 385 - <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>, 386 - <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>; 387 - clock-names = "ssi-all", 388 - "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5", 389 - "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0", 390 - "src.9", "src.8", "src.7", "src.6", "src.5", 391 - "src.4", "src.3", "src.2", "src.1", "src.0", 392 - "dvc.0", "dvc.1", 393 - "clk_a", "clk_b", "clk_c", "clk_i"; 394 - 395 - rcar_sound,dvc { 396 - dvc0: dvc-0 { 397 - dmas = <&audma0 0xbc>; 398 - dma-names = "tx"; 399 - }; 400 - dvc1: dvc-1 { 401 - dmas = <&audma0 0xbe>; 402 - dma-names = "tx"; 403 - }; 404 - }; 405 - 406 - rcar_sound,mix { 407 - mix0: mix-0 { }; 408 - mix1: mix-1 { }; 409 - }; 410 - 411 - rcar_sound,ctu { 412 - ctu00: ctu-0 { }; 413 - ctu01: ctu-1 { }; 414 - ctu02: ctu-2 { }; 415 - ctu03: ctu-3 { }; 416 - ctu10: ctu-4 { }; 417 - ctu11: ctu-5 { }; 418 - ctu12: ctu-6 { }; 419 - ctu13: ctu-7 { }; 420 - }; 421 - 422 - rcar_sound,src { 423 - src0: src-0 { 424 - interrupts = <0 352 IRQ_TYPE_LEVEL_HIGH>; 425 - dmas = <&audma0 0x85>, <&audma1 0x9a>; 426 - dma-names = "rx", "tx"; 427 - }; 428 - src1: src-1 { 429 - interrupts = <0 353 IRQ_TYPE_LEVEL_HIGH>; 430 - dmas = <&audma0 0x87>, <&audma1 0x9c>; 431 - dma-names = "rx", "tx"; 432 - }; 433 - src2: src-2 { 434 - interrupts = <0 354 IRQ_TYPE_LEVEL_HIGH>; 435 - dmas = <&audma0 0x89>, <&audma1 0x9e>; 436 - dma-names = "rx", "tx"; 437 - }; 438 - src3: src-3 { 439 - interrupts = <0 355 IRQ_TYPE_LEVEL_HIGH>; 440 - dmas = <&audma0 0x8b>, <&audma1 0xa0>; 441 - dma-names = "rx", "tx"; 442 - }; 443 - src4: src-4 { 444 - interrupts = <0 356 IRQ_TYPE_LEVEL_HIGH>; 445 - dmas = <&audma0 0x8d>, <&audma1 0xb0>; 446 - dma-names = "rx", "tx"; 447 - }; 448 - src5: src-5 { 449 - interrupts = <0 357 IRQ_TYPE_LEVEL_HIGH>; 450 - dmas = <&audma0 0x8f>, <&audma1 0xb2>; 451 - dma-names = "rx", "tx"; 452 - }; 453 - src6: src-6 { 454 - interrupts = <0 358 IRQ_TYPE_LEVEL_HIGH>; 455 - dmas = <&audma0 0x91>, <&audma1 0xb4>; 456 - dma-names = "rx", "tx"; 457 - }; 458 - src7: src-7 { 459 - interrupts = <0 359 IRQ_TYPE_LEVEL_HIGH>; 460 - dmas = <&audma0 0x93>, <&audma1 0xb6>; 461 - dma-names = "rx", "tx"; 462 - }; 463 - src8: src-8 { 464 - interrupts = <0 360 IRQ_TYPE_LEVEL_HIGH>; 465 - dmas = <&audma0 0x95>, <&audma1 0xb8>; 466 - dma-names = "rx", "tx"; 467 - }; 468 - src9: src-9 { 469 - interrupts = <0 361 IRQ_TYPE_LEVEL_HIGH>; 470 - dmas = <&audma0 0x97>, <&audma1 0xba>; 471 - dma-names = "rx", "tx"; 472 - }; 473 - }; 474 - 475 - rcar_sound,ssiu { 476 - ssiu00: ssiu-0 { 477 - dmas = <&audma0 0x15>, <&audma1 0x16>; 478 - dma-names = "rx", "tx"; 479 - }; 480 - ssiu01: ssiu-1 { 481 - dmas = <&audma0 0x35>, <&audma1 0x36>; 482 - dma-names = "rx", "tx"; 483 - }; 484 - 485 - ... 486 - 487 - ssiu95: ssiu-49 { 488 - dmas = <&audma0 0xA5>, <&audma1 0xA6>; 489 - dma-names = "rx", "tx"; 490 - }; 491 - ssiu96: ssiu-50 { 492 - dmas = <&audma0 0xA7>, <&audma1 0xA8>; 493 - dma-names = "rx", "tx"; 494 - }; 495 - ssiu97: ssiu-51 { 496 - dmas = <&audma0 0xA9>, <&audma1 0xAA>; 497 - dma-names = "rx", "tx"; 498 - }; 499 - }; 500 - 501 - rcar_sound,ssi { 502 - ssi0: ssi-0 { 503 - interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; 504 - dmas = <&audma0 0x01>, <&audma1 0x02>; 505 - dma-names = "rx", "tx"; 506 - }; 507 - ssi1: ssi-1 { 508 - interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; 509 - dmas = <&audma0 0x03>, <&audma1 0x04>; 510 - dma-names = "rx", "tx"; 511 - }; 512 - 513 - ... 514 - 515 - ssi8: ssi-8 { 516 - interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; 517 - dmas = <&audma0 0x11>, <&audma1 0x12>; 518 - dma-names = "rx", "tx"; 519 - }; 520 - ssi9: ssi-9 { 521 - interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; 522 - dmas = <&audma0 0x13>, <&audma1 0x14>; 523 - dma-names = "rx", "tx"; 524 - }; 525 - }; 526 - 527 - rcar_sound,dai { 528 - dai0 { 529 - playback = <&ssi5 &src5>; 530 - capture = <&ssi6>; 531 - }; 532 - dai1 { 533 - playback = <&ssi3>; 534 - }; 535 - dai2 { 536 - capture = <&ssi4>; 537 - }; 538 - dai3 { 539 - playback = <&ssi7>; 540 - }; 541 - dai4 { 542 - capture = <&ssi8>; 543 - }; 544 - }; 545 - }; 546 - 547 - ============================================= 548 - Example: simple sound card 549 - ============================================= 550 - 551 - rsnd_ak4643: sound { 552 - compatible = "simple-audio-card"; 553 - 554 - simple-audio-card,format = "left_j"; 555 - simple-audio-card,bitclock-master = <&sndcodec>; 556 - simple-audio-card,frame-master = <&sndcodec>; 557 - 558 - sndcpu: simple-audio-card,cpu { 559 - sound-dai = <&rcar_sound>; 560 - }; 561 - 562 - sndcodec: simple-audio-card,codec { 563 - sound-dai = <&ak4643>; 564 - clocks = <&audio_clock>; 565 - }; 566 - }; 567 - 568 - &rcar_sound { 569 - pinctrl-0 = <&sound_pins &sound_clk_pins>; 570 - pinctrl-names = "default"; 571 - 572 - /* Single DAI */ 573 - #sound-dai-cells = <0>; 574 - 575 - 576 - rcar_sound,dai { 577 - dai0 { 578 - playback = <&ssi0 &src2 &dvc0>; 579 - capture = <&ssi1 &src3 &dvc1>; 580 - }; 581 - }; 582 - }; 583 - 584 - &ssi1 { 585 - shared-pin; 586 - }; 587 - 588 - ============================================= 589 - Example: simple sound card for Asynchronous mode 590 - ============================================= 591 - 592 - sound { 593 - compatible = "simple-scu-audio-card"; 594 - ... 595 - /* 596 - * SRC Asynchronous mode setting 597 - * Playback: 598 - * All input data will be converted to 48kHz 599 - * Capture: 600 - * Inputed 48kHz data will be converted to 601 - * system specified Hz 602 - */ 603 - simple-audio-card,convert-rate = <48000>; 604 - ... 605 - simple-audio-card,cpu { 606 - sound-dai = <&rcar_sound>; 607 - }; 608 - simple-audio-card,codec { 609 - ... 610 - }; 611 - }; 612 - 613 - ============================================= 614 - Example: simple sound card for channel convert 615 - ============================================= 616 - 617 - sound { 618 - compatible = "simple-scu-audio-card"; 619 - ... 620 - /* 621 - * CTU setting 622 - * All input data will be converted to 2ch 623 - * as output data 624 - */ 625 - simple-audio-card,convert-channels = <2>; 626 - ... 627 - simple-audio-card,cpu { 628 - sound-dai = <&rcar_sound>; 629 - }; 630 - simple-audio-card,codec { 631 - ... 632 - }; 633 - }; 634 - 635 - ============================================= 636 - Example: simple sound card for MIXer 637 - ============================================= 638 - 639 - sound { 640 - compatible = "simple-scu-audio-card"; 641 - ... 642 - simple-audio-card,cpu@0 { 643 - sound-dai = <&rcar_sound 0>; 644 - }; 645 - simple-audio-card,cpu@1 { 646 - sound-dai = <&rcar_sound 1>; 647 - }; 648 - simple-audio-card,codec { 649 - ... 650 - }; 651 - }; 652 - 653 - &rcar_sound { 654 - ... 655 - rcar_sound,dai { 656 - dai0 { 657 - playback = <&src1 &ctu02 &mix0 &dvc0 &ssi0>; 658 - }; 659 - dai1 { 660 - playback = <&src2 &ctu03 &mix0 &dvc0 &ssi0>; 661 - }; 662 - }; 663 - }; 664 - 665 - ============================================= 666 - Example: simple sound card for TDM 667 - ============================================= 668 - 669 - rsnd_tdm: sound { 670 - compatible = "simple-audio-card"; 671 - 672 - simple-audio-card,format = "left_j"; 673 - simple-audio-card,bitclock-master = <&sndcodec>; 674 - simple-audio-card,frame-master = <&sndcodec>; 675 - 676 - sndcpu: simple-audio-card,cpu { 677 - sound-dai = <&rcar_sound>; 678 - dai-tdm-slot-num = <6>; 679 - }; 680 - 681 - sndcodec: simple-audio-card,codec { 682 - sound-dai = <&xxx>; 683 - }; 684 - }; 685 - 686 - ============================================= 687 - Example: simple sound card for TDM Split 688 - ============================================= 689 - 690 - sound_card: sound { 691 - compatible = "audio-graph-scu-card"; 692 - prefix = "xxxx"; 693 - routing = "xxxx Playback", "DAI0 Playback", 694 - "xxxx Playback", "DAI1 Playback", 695 - "xxxx Playback", "DAI2 Playback", 696 - "xxxx Playback", "DAI3 Playback"; 697 - convert-channels = <8>; /* TDM Split */ 698 - 699 - dais = <&rsnd_port0 /* playback ch1/ch2 */ 700 - &rsnd_port1 /* playback ch3/ch4 */ 701 - &rsnd_port2 /* playback ch5/ch6 */ 702 - &rsnd_port3 /* playback ch7/ch8 */ 703 - >; 704 - }; 705 - 706 - audio-codec { 707 - ... 708 - port { 709 - codec_0: endpoint@1 { 710 - remote-endpoint = <&rsnd_ep0>; 711 - }; 712 - codec_1: endpoint@2 { 713 - remote-endpoint = <&rsnd_ep1>; 714 - }; 715 - codec_2: endpoint@3 { 716 - remote-endpoint = <&rsnd_ep2>; 717 - }; 718 - codec_3: endpoint@4 { 719 - remote-endpoint = <&rsnd_ep3>; 720 - }; 721 - }; 722 - }; 723 - 724 - &rcar_sound { 725 - ... 726 - ports { 727 - rsnd_port0: port@0 { 728 - rsnd_ep0: endpoint { 729 - remote-endpoint = <&codec_0>; 730 - ... 731 - playback = <&ssiu30 &ssi3>; 732 - }; 733 - }; 734 - rsnd_port1: port@1 { 735 - rsnd_ep1: endpoint { 736 - remote-endpoint = <&codec_1>; 737 - ... 738 - playback = <&ssiu31 &ssi3>; 739 - }; 740 - }; 741 - rsnd_port2: port@2 { 742 - rsnd_ep2: endpoint { 743 - remote-endpoint = <&codec_2>; 744 - ... 745 - playback = <&ssiu32 &ssi3>; 746 - }; 747 - }; 748 - rsnd_port3: port@3 { 749 - rsnd_ep3: endpoint { 750 - remote-endpoint = <&codec_3>; 751 - ... 752 - playback = <&ssiu33 &ssi3>; 753 - }; 754 - }; 755 - }; 756 - }; 757 - 758 - ============================================= 759 - Example: simple sound card for Multi channel 760 - ============================================= 761 - 762 - &rcar_sound { 763 - pinctrl-0 = <&sound_pins &sound_clk_pins>; 764 - pinctrl-names = "default"; 765 - 766 - /* Single DAI */ 767 - #sound-dai-cells = <0>; 768 - 769 - 770 - rcar_sound,dai { 771 - dai0 { 772 - playback = <&ssi0 &ssi1 &ssi2 &src0 &dvc0>; 773 - }; 774 - }; 775 - };
+450
Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/sound/renesas,rsnd.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Renesas R-Car Sound Driver Device Tree Bindings 8 + 9 + maintainers: 10 + - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 11 + 12 + properties: 13 + 14 + compatible: 15 + oneOf: 16 + # for Gen1 SoC 17 + - items: 18 + - enum: 19 + - renesas,rcar_sound-r8a7778 # R-Car M1A 20 + - renesas,rcar_sound-r8a7779 # R-Car H1 21 + - enum: 22 + - renesas,rcar_sound-gen1 23 + # for Gen2 SoC 24 + - items: 25 + - enum: 26 + - renesas,rcar_sound-r8a7742 # RZ/G1H 27 + - renesas,rcar_sound-r8a7743 # RZ/G1M 28 + - renesas,rcar_sound-r8a7744 # RZ/G1N 29 + - renesas,rcar_sound-r8a7745 # RZ/G1E 30 + - renesas,rcar_sound-r8a77470 # RZ/G1C 31 + - renesas,rcar_sound-r8a7790 # R-Car H2 32 + - renesas,rcar_sound-r8a7791 # R-Car M2-W 33 + - renesas,rcar_sound-r8a7793 # R-Car M2-N 34 + - renesas,rcar_sound-r8a7794 # R-Car E2 35 + - enum: 36 + - renesas,rcar_sound-gen2 37 + # for Gen3 SoC 38 + - items: 39 + - enum: 40 + - renesas,rcar_sound-r8a774a1 # RZ/G2M 41 + - renesas,rcar_sound-r8a774b1 # RZ/G2N 42 + - renesas,rcar_sound-r8a774c0 # RZ/G2E 43 + - renesas,rcar_sound-r8a774e1 # RZ/G2H 44 + - renesas,rcar_sound-r8a7795 # R-Car H3 45 + - renesas,rcar_sound-r8a7796 # R-Car M3-W 46 + - renesas,rcar_sound-r8a77965 # R-Car M3-N 47 + - renesas,rcar_sound-r8a77990 # R-Car E3 48 + - renesas,rcar_sound-r8a77995 # R-Car D3 49 + - enum: 50 + - renesas,rcar_sound-gen3 51 + # for Generic 52 + - items: 53 + - enum: 54 + - renesas,rcar_sound-gen1 55 + - renesas,rcar_sound-gen2 56 + - renesas,rcar_sound-gen3 57 + 58 + reg: 59 + minItems: 1 60 + maxItems: 5 61 + 62 + reg-names: 63 + minItems: 1 64 + maxItems: 5 65 + 66 + "#sound-dai-cells": 67 + description: | 68 + it must be 0 if your system is using single DAI 69 + it must be 1 if your system is using multi DAIs 70 + enum: [0, 1] 71 + 72 + "#clock-cells": 73 + description: | 74 + it must be 0 if your system has audio_clkout 75 + it must be 1 if your system has audio_clkout0/1/2/3 76 + enum: [0, 1] 77 + 78 + clock-frequency: 79 + description: for audio_clkout0/1/2/3 80 + $ref: /schemas/types.yaml#/definitions/uint32-array 81 + 82 + clkout-lr-asynchronous: 83 + description: audio_clkoutn is asynchronizes with lr-clock. 84 + $ref: /schemas/types.yaml#/definitions/flag 85 + 86 + power-domains: true 87 + 88 + resets: 89 + maxItems: 11 90 + 91 + reset-names: 92 + maxItems: 11 93 + 94 + clocks: 95 + description: References to SSI/SRC/MIX/CTU/DVC/AUDIO_CLK clocks. 96 + minItems: 1 97 + maxItems: 31 98 + 99 + clock-names: 100 + description: List of necessary clock names. 101 + minItems: 1 102 + maxItems: 31 103 + items: 104 + oneOf: 105 + - const: ssi-all 106 + - pattern: '^ssi\.[0-9]$' 107 + - pattern: '^src\.[0-9]$' 108 + - pattern: '^mix\.[0-1]$' 109 + - pattern: '^ctu\.[0-1]$' 110 + - pattern: '^dvc\.[0-1]$' 111 + - pattern: '^clk_(a|b|c|i)$' 112 + 113 + port: 114 + description: OF-Graph subnode 115 + $ref: "audio-graph-card.yaml#/properties/port" 116 + 117 + ports: 118 + description: multi OF-Graph subnode 119 + $ref: "audio-graph-card.yaml#/properties/ports" 120 + 121 + # use patternProperties to avoid naming "xxx,yyy" issue 122 + patternProperties: 123 + "^rcar_sound,dvc$": 124 + description: DVC subnode. 125 + type: object 126 + patternProperties: 127 + "^dvc-[0-1]$": 128 + type: object 129 + properties: 130 + dmas: 131 + maxItems: 1 132 + dma-names: 133 + const: "tx" 134 + required: 135 + - dmas 136 + - dma-names 137 + additionalProperties: false 138 + 139 + "^rcar_sound,mix$": 140 + description: MIX subnode. 141 + type: object 142 + patternProperties: 143 + "^mix-[0-1]$": 144 + type: object 145 + # no properties 146 + additionalProperties: false 147 + 148 + "^rcar_sound,ctu$": 149 + description: CTU subnode. 150 + type: object 151 + patternProperties: 152 + "^ctu-[0-7]$": 153 + type: object 154 + # no properties 155 + additionalProperties: false 156 + 157 + "^rcar_sound,src$": 158 + description: SRC subnode. 159 + type: object 160 + patternProperties: 161 + "^src-[0-9]$": 162 + type: object 163 + properties: 164 + interrupts: 165 + maxItems: 1 166 + dmas: 167 + maxItems: 2 168 + dma-names: 169 + allOf: 170 + - items: 171 + enum: 172 + - tx 173 + - rx 174 + required: 175 + - interrupts 176 + - dmas 177 + - dma-names 178 + additionalProperties: false 179 + 180 + "^rcar_sound,ssiu$": 181 + description: SSIU subnode. 182 + type: object 183 + patternProperties: 184 + "^ssiu-[0-9]+$": 185 + type: object 186 + properties: 187 + dmas: 188 + maxItems: 2 189 + dma-names: 190 + allOf: 191 + - items: 192 + enum: 193 + - tx 194 + - rx 195 + required: 196 + - dmas 197 + - dma-names 198 + additionalProperties: false 199 + 200 + "^rcar_sound,ssi$": 201 + description: SSI subnode. 202 + type: object 203 + patternProperties: 204 + "^ssi-[0-9]$": 205 + type: object 206 + properties: 207 + interrupts: 208 + maxItems: 1 209 + dmas: 210 + minItems: 2 211 + maxItems: 4 212 + dma-names: 213 + allOf: 214 + - items: 215 + enum: 216 + - tx 217 + - rx 218 + - txu # if no ssiu node 219 + - rxu # if no ssiu node 220 + 221 + shared-pin: 222 + description: shared clock pin 223 + $ref: /schemas/types.yaml#/definitions/flag 224 + pio-transfer: 225 + description: PIO transfer mode 226 + $ref: /schemas/types.yaml#/definitions/flag 227 + no-busif: 228 + description: BUSIF is not used when [mem -> SSI] via DMA case 229 + $ref: /schemas/types.yaml#/definitions/flag 230 + required: 231 + - interrupts 232 + - dmas 233 + - dma-names 234 + additionalProperties: false 235 + 236 + # For DAI base 237 + "^rcar_sound,dai$": 238 + description: DAI subnode. 239 + type: object 240 + patternProperties: 241 + "^dai([0-9]+)?$": 242 + type: object 243 + properties: 244 + playback: 245 + $ref: /schemas/types.yaml#/definitions/phandle-array 246 + capture: 247 + $ref: /schemas/types.yaml#/definitions/phandle-array 248 + anyOf: 249 + - required: 250 + - playback 251 + - required: 252 + - capture 253 + additionalProperties: false 254 + 255 + required: 256 + - compatible 257 + - reg 258 + - reg-names 259 + - clocks 260 + - clock-names 261 + - "#sound-dai-cells" 262 + 263 + allOf: 264 + - if: 265 + properties: 266 + compatible: 267 + contains: 268 + const: renesas,rcar_sound-gen1 269 + then: 270 + properties: 271 + reg: 272 + maxItems: 3 273 + reg-names: 274 + maxItems: 3 275 + items: 276 + enum: 277 + - scu 278 + - ssi 279 + - adg 280 + else: 281 + properties: 282 + reg: 283 + maxItems: 5 284 + reg-names: 285 + maxItems: 5 286 + items: 287 + enum: 288 + - scu 289 + - adg 290 + - ssiu 291 + - ssi 292 + - audmapp 293 + 294 + additionalProperties: false 295 + 296 + examples: 297 + - | 298 + rcar_sound: sound@ec500000 { 299 + #sound-dai-cells = <1>; 300 + compatible = "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-gen2"; 301 + reg = <0xec500000 0x1000>, /* SCU */ 302 + <0xec5a0000 0x100>, /* ADG */ 303 + <0xec540000 0x1000>, /* SSIU */ 304 + <0xec541000 0x1280>, /* SSI */ 305 + <0xec740000 0x200>; /* Audio DMAC peri peri*/ 306 + reg-names = "scu", "adg", "ssiu", "ssi", "audmapp"; 307 + 308 + clocks = <&mstp10_clks 1005>, /* SSI-ALL */ 309 + <&mstp10_clks 1006>, <&mstp10_clks 1007>, /* SSI9, SSI8 */ 310 + <&mstp10_clks 1008>, <&mstp10_clks 1009>, /* SSI7, SSI6 */ 311 + <&mstp10_clks 1010>, <&mstp10_clks 1011>, /* SSI5, SSI4 */ 312 + <&mstp10_clks 1012>, <&mstp10_clks 1013>, /* SSI3, SSI2 */ 313 + <&mstp10_clks 1014>, <&mstp10_clks 1015>, /* SSI1, SSI0 */ 314 + <&mstp10_clks 1022>, <&mstp10_clks 1023>, /* SRC9, SRC8 */ 315 + <&mstp10_clks 1024>, <&mstp10_clks 1025>, /* SRC7, SRC6 */ 316 + <&mstp10_clks 1026>, <&mstp10_clks 1027>, /* SRC5, SRC4 */ 317 + <&mstp10_clks 1028>, <&mstp10_clks 1029>, /* SRC3, SRC2 */ 318 + <&mstp10_clks 1030>, <&mstp10_clks 1031>, /* SRC1, SRC0 */ 319 + <&mstp10_clks 1020>, <&mstp10_clks 1021>, /* MIX1, MIX0 */ 320 + <&mstp10_clks 1020>, <&mstp10_clks 1021>, /* CTU1, CTU0 */ 321 + <&mstp10_clks 1019>, <&mstp10_clks 1018>, /* DVC0, DVC1 */ 322 + <&audio_clk_a>, <&audio_clk_b>, /* CLKA, CLKB */ 323 + <&audio_clk_c>, <&audio_clk_i>; /* CLKC, CLKI */ 324 + 325 + clock-names = "ssi-all", 326 + "ssi.9", "ssi.8", 327 + "ssi.7", "ssi.6", 328 + "ssi.5", "ssi.4", 329 + "ssi.3", "ssi.2", 330 + "ssi.1", "ssi.0", 331 + "src.9", "src.8", 332 + "src.7", "src.6", 333 + "src.5", "src.4", 334 + "src.3", "src.2", 335 + "src.1", "src.0", 336 + "mix.1", "mix.0", 337 + "ctu.1", "ctu.0", 338 + "dvc.0", "dvc.1", 339 + "clk_a", "clk_b", 340 + "clk_c", "clk_i"; 341 + 342 + rcar_sound,dvc { 343 + dvc0: dvc-0 { 344 + dmas = <&audma0 0xbc>; 345 + dma-names = "tx"; 346 + }; 347 + dvc1: dvc-1 { 348 + dmas = <&audma0 0xbe>; 349 + dma-names = "tx"; 350 + }; 351 + }; 352 + 353 + rcar_sound,mix { 354 + mix0: mix-0 { }; 355 + mix1: mix-1 { }; 356 + }; 357 + 358 + rcar_sound,ctu { 359 + ctu00: ctu-0 { }; 360 + ctu01: ctu-1 { }; 361 + ctu02: ctu-2 { }; 362 + ctu03: ctu-3 { }; 363 + ctu10: ctu-4 { }; 364 + ctu11: ctu-5 { }; 365 + ctu12: ctu-6 { }; 366 + ctu13: ctu-7 { }; 367 + }; 368 + 369 + rcar_sound,src { 370 + src0: src-0 { 371 + status = "disabled"; 372 + }; 373 + src1: src-1 { 374 + interrupts = <0 353 0>; 375 + dmas = <&audma0 0x87>, <&audma1 0x9c>; 376 + dma-names = "rx", "tx"; 377 + }; 378 + /* skip after src-2 */ 379 + }; 380 + 381 + rcar_sound,ssiu { 382 + ssiu00: ssiu-0 { 383 + dmas = <&audma0 0x15>, <&audma1 0x16>; 384 + dma-names = "rx", "tx"; 385 + }; 386 + ssiu01: ssiu-1 { 387 + dmas = <&audma0 0x35>, <&audma1 0x36>; 388 + dma-names = "rx", "tx"; 389 + }; 390 + /* skip after ssiu-2 */ 391 + }; 392 + 393 + rcar_sound,ssi { 394 + ssi0: ssi-0 { 395 + interrupts = <0 370 1>; 396 + dmas = <&audma0 0x01>, <&audma1 0x02>; 397 + dma-names = "rx", "tx"; 398 + }; 399 + ssi1: ssi-1 { 400 + interrupts = <0 371 1>; 401 + dmas = <&audma0 0x03>, <&audma1 0x04>; 402 + dma-names = "rx", "tx"; 403 + }; 404 + /* skip other ssi-2 */ 405 + }; 406 + 407 + /* DAI base */ 408 + rcar_sound,dai { 409 + dai0 { 410 + playback = <&ssi5 &src5>; 411 + capture = <&ssi6>; 412 + }; 413 + dai1 { 414 + playback = <&ssi3>; 415 + }; 416 + dai2 { 417 + capture = <&ssi4>; 418 + }; 419 + dai3 { 420 + playback = <&ssi7>; 421 + }; 422 + dai4 { 423 + capture = <&ssi8>; 424 + }; 425 + }; 426 + 427 + /* assume audio-graph */ 428 + port { 429 + rsnd_endpoint: endpoint { 430 + remote-endpoint = <&codec_endpoint>; 431 + 432 + dai-format = "left_j"; 433 + bitclock-master = <&rsnd_endpoint0>; 434 + frame-master = <&rsnd_endpoint0>; 435 + 436 + playback = <&ssi0 &src0 &dvc0>; 437 + capture = <&ssi1 &src1 &dvc1>; 438 + }; 439 + }; 440 + }; 441 + 442 + 443 + /* assume audio-graph */ 444 + codec { 445 + port { 446 + codec_endpoint: endpoint { 447 + remote-endpoint = <&rsnd_endpoint>; 448 + }; 449 + }; 450 + };