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

ASoC: sti: add binding for ASoC driver

Add ASoC driver bindings documentation.
Describe the required properties for each of the hardware IPs drivers.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Arnaud Pouliquen and committed by
Mark Brown
05e85d4e d770e558

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