All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: alsa-devel@alsa-project.org
Cc: broonie@kernel.org, arnaud.pouliquen@st.com, lgirdwood@gmail.com
Subject: [PATCH v2 1/9] ASoC: sti: add binding for ASoc driver
Date: Mon, 18 May 2015 14:12:48 +0200	[thread overview]
Message-ID: <1431951176-24670-2-git-send-email-arnaud.pouliquen@st.com> (raw)
In-Reply-To: <1431951176-24670-1-git-send-email-arnaud.pouliquen@st.com>

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>
---
 .../devicetree/bindings/sound/st,sti-asoc-card.txt | 158 +++++++++++++++++++++
 1 file changed, 158 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt

diff --git a/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt b/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
new file mode 100644
index 0000000..e4296bb
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
@@ -0,0 +1,158 @@
+STMicroelectronics sti ASOC cards
+
+The sti ASoC Sound Card can be used, for all sti SoCs using internal sti-sas
+codec or external codecs.
+
+sti sound drivers allows to expose sti SOC audio interface through the
+generic ASOC simple card. For details about sound card declaration please refer to
+Documentation/devicetree/bindings/sound/simple-card.txt.
+
+-sti-asoc-platform: audio platform engine.
+Required properties:
+  - compatible: "st,sti-audio-platform".
+  - st,syscfg: phandle to boot-device system configuration registers
+  - clocks: CPU_DAI IP clock source, listed in the same order than the
+	    CPU_DAI properties.
+  - clock-names: name of the clocks listed in clocks property in the same order
+  - reg: CPU DAI IP Base address and size entries, listed  in same
+	 order than the CPU_DAI properties.
+  - reg-names: names of the mapped memory regions listed in regs property in
+	       the same order.
+  - interrupts: CPU_DAI interrupt line, listed in the same order than the
+		CPU_DAI properties.
+  - dma: CPU_DAI DMA controller phandle and DMA request line, listed in the same
+	 order than the CPU_DAI properties.
+  - dma-names: identifier string for each DMA request line in the dmas property.
+
+- cpu-dai: sti-asoc-platform subnode that describes properties for a CPU-DAI instance.
+Required properties:
+  - dai-name: DAI name that describes the IP.
+  - uniperiph-id: internal SOC IP instance ID.
+  - version: IP version integrated in SOC.
+  - IP mode: IP working mode depending on associated codec.
+	"HDMI" connected to HDMI codec IP and IEC HDMI formats.
+	"SPDIF"connected to SPDIF codec and support SPDIF formats.
+	"PCM"  PCM standard mode for I2S or TDM bus.
+
+Optional properties:
+  - standby:  standby mode activation deactivation. this mode is specific to
+	      Uni player IP and allows to transmit bus clock and a pattern data
+	      while audio stream is stopped or paused.
+  - auto-suspend-delay: runtime auto suspend delay (in ms) before deactivating
+			stanby mode. Equivalent to the DAPM mechanism but for
+			CPU DAI.
+  - pinctrl-0: defined for CPU_DAI@1 and CPU_DAI@4 to describe I2S PIOs for
+	       external codecs connection.
+  - pinctrl-names: should contain only one value - "default".
+
+- sti-sas-codec: internal audio codec IPs driver
+Required properties:
+  - compatible: "st,sti<chip>-sas-codec" .
+	Should be chip "st,sti416-sas-codec" or "st,sti417-sas-codec"
+  - st,syscfg: phandle to boot-device system configuration registers.
+  - pinctrl-0: SPDIF PIO description.
+  - pinctrl-names: should contain only one value - "default".
+
+audio_controller: sti-asoc-platform {
+		#sound-dai-cells = <1>;
+		compatible = "st,sti-audio-platform";
+		st,syscfg = <&syscfg_core>;
+		clocks = <&clk_s_d0_flexgen CLK_PCM_0>, /*UPP 0*/
+			 <&clk_s_d0_flexgen CLK_PCM_1>, /*UPP 1*/
+			 <&clk_s_d0_flexgen CLK_PCM_2>, /*UPP 2*/
+			 <&clk_s_d0_flexgen CLK_SPDIFF>, /*UPP 3 */
+			 <0>, /*UPR 0: no clock*/
+			 <0>; /*UPR 1: no clock */
+		clock-names = "uni_p0", "uni_p1", "uni_p2", "uni_p3",
+			      "no_clock", "no_clock";
+		reg = <0x8D80000 0x158>, <0x8D81000  0x158>,
+		      <0x8D82000  0x158>, <0x8D85000  0x158>,
+		      <0x8D83000  0x158>, <0x8D84000  0x158>;
+		interrupts = <GIC_SPI 84 IRQ_TYPE_NONE>,
+			     <GIC_SPI 85 IRQ_TYPE_NONE>,
+			     <GIC_SPI 86 IRQ_TYPE_NONE>,
+			     <GIC_SPI 89 IRQ_TYPE_NONE>,
+			     <GIC_SPI 87 IRQ_TYPE_NONE>,
+			     <GIC_SPI 88 IRQ_TYPE_NONE>;
+
+		dmas = <&fdma0 2 0 1>, <&fdma0 3 0 1>,
+		       <&fdma0 4 0 1>, <&fdma0 7 0 1>,
+		       <&fdma0 5 0 1>, <&fdma0 6 0 1>;
+
+		dma-names = "tx-0", "tx-1",
+			    "tx-2", "tx-3",
+			    "rx-4", "rx-5";
+		cpu-dai@0 {
+				dai-name = "Uni Player #0 (HDMI)";
+				uniperiph-id = <0>;
+				version = <5>;
+				mode = "HDMI";
+		};
+
+		cpu-dai@1 {
+				dai-name = "Uni Player #1 (PIO)";
+				uniperiph-id = <1>;
+				version = <5>;
+				mode = "PCM";
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2s_8ch_out>;
+		};
+		cpu-dai@2 {
+				dai-name = "Uni Player #2 (DAC)";
+				uniperiph-id = <2>;
+				version = <5>;
+				mode = "PCM";
+		};
+		cpu-dai@3 {
+				dai-name = "Uni Player #3 (SPDIF)";
+				uniperiph-id = <3>;
+				version = <5>;
+				mode = "SPDIF";
+		};
+		cpu-dai@4 {
+				dai-name = "Uni Reader #0 (PCM IN)";
+				version = <3>;
+				pinctrl-names = "default";
+				pinctrl-0 = <&pinctrl_i2s_8ch_in>;
+		};
+		cpu-dai@5 {
+				dai-name = "Uni Reader #1 (HDMI)";
+				version = <3>;
+		};
+	};
+
+	sti_sas_codec: sti-sas-codec {
+		compatible = "st,stih407-sas-codec";
+		#sound-dai-cells = <1>;
+		st,reg_audio = <&syscfg_core>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_spdif_out >;
+	};
+
+Example of audio card declaration:
+	sound {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "sti audio card";
+		status = "okay";
+
+		simple-audio-card,dai-link@0 {	/* DAC */
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 2>;
+			};
+
+			codec {
+				sound-dai = <&sti_sasg_codec 1>;
+			};
+		};
+		simple-audio-card,dai-link@1 {	/* SPDIF */
+			format = "left_j";
+			cpu {
+				sound-dai = <&audio_controller 3>;
+			};
+
+			codec {
+				sound-dai = <&sti_sasg_codec 0>;
+			};
+		};
+	};
-- 
1.9.1

  reply	other threads:[~2015-05-18 12:13 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18 12:12 [PATCH v2 0/9] asoc: Add audio for sti platforms Arnaud Pouliquen
2015-05-18 12:12 ` Arnaud Pouliquen [this message]
2015-05-22 12:43   ` [PATCH v2 1/9] ASoC: sti: add binding for ASoc driver Mark Brown
2015-05-22 13:24     ` Arnaud Pouliquen
2015-05-25 12:14       ` Mark Brown
2015-05-18 12:12 ` [PATCH v2 2/9] ASoC: sti: Add uniperipheral header file Arnaud Pouliquen
2015-05-18 12:12 ` [PATCH v2 3/9] ASoC: sti: Add CPU DAI driver for playback Arnaud Pouliquen
2015-05-25 12:37   ` Mark Brown
2015-05-26 13:51     ` Arnaud Pouliquen
2015-05-18 12:12 ` [PATCH v2 4/9] ASoC: sti: Add CPU DAI driver for capture Arnaud Pouliquen
2015-05-25 12:39   ` Mark Brown
2015-05-18 12:12 ` [PATCH v2 5/9] ASoC: sti: Add platform driver Arnaud Pouliquen
2015-05-25 12:50   ` Mark Brown
2015-05-27  8:48     ` Arnaud Pouliquen
2015-05-27 12:06       ` Lars-Peter Clausen
2015-05-18 12:12 ` [PATCH v2 6/9] ASoC: Add ability to build sti drivers Arnaud Pouliquen
2015-05-25 12:50   ` Mark Brown
2015-05-18 12:12 ` [PATCH v2 7/9] ASoC: Codec: Add sti platform codec Arnaud Pouliquen
2015-05-25 13:01   ` Mark Brown
2015-06-01 17:41     ` Arnaud Pouliquen
2015-06-02 19:12       ` Mark Brown
2015-05-18 12:12 ` [PATCH v2 8/9] ASoC: sti: Add clock adjustement control Arnaud Pouliquen
2015-05-25 14:37   ` Mark Brown
2015-05-18 12:12 ` [PATCH v2 9/9] ASoC: sti: Add IEC control Arnaud Pouliquen
2015-05-25 14:36   ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431951176-24670-2-git-send-email-arnaud.pouliquen@st.com \
    --to=arnaud.pouliquen@st.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.