[v3,10/11] ASoC: add bindings for stm32 DFSDM filter

Submitted by Arnaud Pouliquen on March 17, 2017, 2:08 p.m.

Details

Message ID 1489759704-30217-11-git-send-email-arnaud.pouliquen@st.com
State Changes Requested
Headers show

Commit Message

Arnaud Pouliquen March 17, 2017, 2:08 p.m.
Add bindings that describes audio settings to support
Digital Filter for pulse density modulation(PDM) microphone.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
---
V2->V3:
   Fixes based on V2 comments

 .../devicetree/bindings/sound/st,stm32-adfsdm.txt  | 41 ++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt

Comments

Rob Herring March 24, 2017, 2:52 p.m.
On Fri, Mar 17, 2017 at 03:08:23PM +0100, Arnaud Pouliquen wrote:
> Add bindings that describes audio settings to support
> Digital Filter for pulse density modulation(PDM) microphone.
> 
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
> ---
> V2->V3:
>    Fixes based on V2 comments
> 
>  .../devicetree/bindings/sound/st,stm32-adfsdm.txt  | 41 ++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
> 
> diff --git a/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt b/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
> new file mode 100644
> index 0000000..ab610bc
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
> @@ -0,0 +1,40 @@
> +STMicroelectronics audio DFSDM DT bindings
> +
> +This driver supports audio PDM microphone capture through Digital Filter format
> +Sigma Delta modulators (DFSDM).
> +
> +Required properties:
> +  - compatible: "st,stm32h7-adfsdm".
> +
> +  - #sound-dai-cells : Must be equal to 0
> +
> +  - io-channels : phandle to iio dfsdm instance node.
> +
> +
> +Example of a simple sound card using audio DFSDM node.
> +
> +	dmic0: dmic_@0 {

Drop the '_' and unit address.

> +		compatible = "dmic-codec";
> +		#sound-dai-cells = <0>;
> +	};
> +
> +	asoc-pdm@0 {

asoc is a Linux term. Drop the unit address.

> +		compatible = "st,stm32h7-adfsdm";

Is this a separate block from the ADC? A drawing of the h/w blocks and 
connections would help.

> +		#sound-dai-cells = <0>;
> +		io-channels = <&dfsdm_adc0 0>;
> +	};
> +
> +	sound_dfsdm_pdm {

sound-card {

> + 		compatible = "simple-audio-card";
> + 		simple-audio-card,name = "dfsdm_pdm";
> +
> + 		dfsdm0_mic0: simple-audio-card,dai-link@0 {

I'd suggest moving to the graph card.

> + 			format = "pdm";
> + 			cpu {
> + 				sound-dai = <&asoc_pdm1>;

This phandle doesn't point to anything.

> + 			};
> + 			dmic0_codec: codec {
> + 				sound-dai = <&dmic0>;
> + 			};
> + 		};
> +	};
> \ No newline at end of file

^^^

> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch hide | download patch | download mbox

diff --git a/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt b/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
new file mode 100644
index 0000000..ab610bc
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/st,stm32-adfsdm.txt
@@ -0,0 +1,40 @@ 
+STMicroelectronics audio DFSDM DT bindings
+
+This driver supports audio PDM microphone capture through Digital Filter format
+Sigma Delta modulators (DFSDM).
+
+Required properties:
+  - compatible: "st,stm32h7-adfsdm".
+
+  - #sound-dai-cells : Must be equal to 0
+
+  - io-channels : phandle to iio dfsdm instance node.
+
+
+Example of a simple sound card using audio DFSDM node.
+
+	dmic0: dmic_@0 {
+		compatible = "dmic-codec";
+		#sound-dai-cells = <0>;
+	};
+
+	asoc-pdm@0 {
+		compatible = "st,stm32h7-adfsdm";
+		#sound-dai-cells = <0>;
+		io-channels = <&dfsdm_adc0 0>;
+	};
+
+	sound_dfsdm_pdm {
+ 		compatible = "simple-audio-card";
+ 		simple-audio-card,name = "dfsdm_pdm";
+
+ 		dfsdm0_mic0: simple-audio-card,dai-link@0 {
+ 			format = "pdm";
+ 			cpu {
+ 				sound-dai = <&asoc_pdm1>;
+ 			};
+ 			dmic0_codec: codec {
+ 				sound-dai = <&dmic0>;
+ 			};
+ 		};
+	};
\ No newline at end of file