st,sti-asoc-card.txt 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. STMicroelectronics sti ASoC cards
  2. The sti ASoC Sound Card can be used, for all sti SoCs using internal sti-sas
  3. codec or external codecs.
  4. sti sound drivers allows to expose sti SoC audio interface through the
  5. generic ASoC simple card. For details about sound card declaration please refer to
  6. Documentation/devicetree/bindings/sound/simple-card.txt.
  7. 1) sti-uniperiph-dai: audio dai device.
  8. ---------------------------------------
  9. Required properties:
  10. - compatible: "st,sti-uni-player" or "st,sti-uni-reader"
  11. - st,syscfg: phandle to boot-device system configuration registers
  12. - clock-names: name of the clocks listed in clocks property in the same order
  13. - reg: CPU DAI IP Base address and size entries, listed in same
  14. order than the CPU_DAI properties.
  15. - reg-names: names of the mapped memory regions listed in regs property in
  16. the same order.
  17. - interrupts: CPU_DAI interrupt line, listed in the same order than the
  18. CPU_DAI properties.
  19. - dma: CPU_DAI DMA controller phandle and DMA request line, listed in the same
  20. order than the CPU_DAI properties.
  21. - dma-names: identifier string for each DMA request line in the dmas property.
  22. "tx" for "st,sti-uni-player" compatibility
  23. "rx" for "st,sti-uni-reader" compatibility
  24. - version: IP version integrated in SOC.
  25. - dai-name: DAI name that describes the IP.
  26. Required properties ("st,sti-uni-player" compatibility only):
  27. - clocks: CPU_DAI IP clock source, listed in the same order than the
  28. CPU_DAI properties.
  29. - uniperiph-id: internal SOC IP instance ID.
  30. - IP mode: IP working mode depending on associated codec.
  31. "HDMI" connected to HDMI codec IP and IEC HDMI formats.
  32. "SPDIF"connected to SPDIF codec and support SPDIF formats.
  33. "PCM" PCM standard mode for I2S or TDM bus.
  34. Optional properties:
  35. - pinctrl-0: defined for CPU_DAI@1 and CPU_DAI@4 to describe I2S PIOs for
  36. external codecs connection.
  37. - pinctrl-names: should contain only one value - "default".
  38. Example:
  39. sti_uni_player2: sti-uni-player@2 {
  40. compatible = "st,sti-uni-player";
  41. status = "okay";
  42. #sound-dai-cells = <0>;
  43. st,syscfg = <&syscfg_core>;
  44. clocks = <&clk_s_d0_flexgen CLK_PCM_2>;
  45. reg = <0x8D82000 0x158>;
  46. interrupts = <GIC_SPI 86 IRQ_TYPE_NONE>;
  47. dmas = <&fdma0 4 0 1>;
  48. dai-name = "Uni Player #1 (DAC)";
  49. dma-names = "tx";
  50. uniperiph-id = <2>;
  51. version = <5>;
  52. mode = "PCM";
  53. };
  54. sti_uni_player3: sti-uni-player@3 {
  55. compatible = "st,sti-uni-player";
  56. status = "okay";
  57. #sound-dai-cells = <0>;
  58. st,syscfg = <&syscfg_core>;
  59. clocks = <&clk_s_d0_flexgen CLK_SPDIFF>;
  60. reg = <0x8D85000 0x158>;
  61. interrupts = <GIC_SPI 89 IRQ_TYPE_NONE>;
  62. dmas = <&fdma0 7 0 1>;
  63. dma-names = "tx";
  64. dai-name = "Uni Player #1 (PIO)";
  65. uniperiph-id = <3>;
  66. version = <5>;
  67. mode = "SPDIF";
  68. };
  69. sti_uni_reader1: sti-uni-reader@1 {
  70. compatible = "st,sti-uni-reader";
  71. status = "disabled";
  72. #sound-dai-cells = <0>;
  73. st,syscfg = <&syscfg_core>;
  74. reg = <0x8D84000 0x158>;
  75. interrupts = <GIC_SPI 88 IRQ_TYPE_NONE>;
  76. dmas = <&fdma0 6 0 1>;
  77. dma-names = "rx";
  78. dai-name = "Uni Reader #1 (HDMI RX)";
  79. version = <3>;
  80. };
  81. 2) sti-sas-codec: internal audio codec IPs driver
  82. -------------------------------------------------
  83. Required properties:
  84. - compatible: "st,sti<chip>-sas-codec" .
  85. Should be chip "st,stih416-sas-codec" or "st,stih407-sas-codec"
  86. - st,syscfg: phandle to boot-device system configuration registers.
  87. - pinctrl-0: SPDIF PIO description.
  88. - pinctrl-names: should contain only one value - "default".
  89. Example:
  90. sti_sas_codec: sti-sas-codec {
  91. compatible = "st,stih407-sas-codec";
  92. #sound-dai-cells = <1>;
  93. st,reg_audio = <&syscfg_core>;
  94. pinctrl-names = "default";
  95. pinctrl-0 = <&pinctrl_spdif_out >;
  96. };
  97. Example of audio card declaration:
  98. sound {
  99. compatible = "simple-audio-card";
  100. simple-audio-card,name = "sti audio card";
  101. status = "okay";
  102. simple-audio-card,dai-link@0 {
  103. /* DAC */
  104. format = "i2s";
  105. dai-tdm-slot-width = <32>;
  106. cpu {
  107. sound-dai = <&sti_uni_player2>;
  108. };
  109. codec {
  110. sound-dai = <&sti_sasg_codec 1>;
  111. };
  112. };
  113. simple-audio-card,dai-link@1 {
  114. /* SPDIF */
  115. format = "left_j";
  116. cpu {
  117. sound-dai = <&sti_uni_player3>;
  118. };
  119. codec {
  120. sound-dai = <&sti_sasg_codec 0>;
  121. };
  122. };
  123. };