public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Arnaud Pouliquen <arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Hartmut Knaack <knaack.h-Mmb7MZpHnFY@public.gmane.org>,
	Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
	Peter Meerwald-Stadler
	<pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org>,
	Jaroslav Kysela <perex-/Fr2/VpizcU@public.gmane.org>,
	Takashi Iwai <tiwai-IBi9RG/b67k@public.gmane.org>,
	Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	Maxime Coquelin
	<mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alexandre Torgue <alexandre.torgue-qxv4g6HH51o@public.gmane.org>
Subject: Re: [PATCH v6 07/13] IIO: add DT bindings for stm32 DFSDM filter
Date: Sat, 2 Dec 2017 14:55:03 +0000	[thread overview]
Message-ID: <20171202145503.19027eea@archlinux> (raw)
In-Reply-To: <1512150020-20335-8-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>

On Fri, 1 Dec 2017 18:40:14 +0100
Arnaud Pouliquen <arnaud.pouliquen-qxv4g6HH51o@public.gmane.org> wrote:

> Add bindings that describes STM32 Digital Filter for Sigma Delta
> Modulators. DFSDM allows to connect sigma delta
> modulators.
> 
> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
> Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>

Acked-by: Jonathan Cameron <Jonathan.Cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

> ---
>  .../bindings/iio/adc/st,stm32-dfsdm-adc.txt        | 127 +++++++++++++++++++++
>  1 file changed, 127 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt
> new file mode 100644
> index 0000000..4a42d76
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-dfsdm-adc.txt
> @@ -0,0 +1,127 @@
> +STMicroelectronics STM32 DFSDM ADC device driver
> +
> +
> +STM32 DFSDM ADC is a sigma delta analog-to-digital converter dedicated to
> +interface external sigma delta modulators to STM32 micro controllers.
> +It is mainly targeted for:
> +- Sigma delta modulators (motor control, metering...)
> +- PDM microphones (audio digital microphone)
> +
> +It features up to 8 serial digital interfaces (SPI or Manchester) and
> +up to 4 filters on stm32h7.
> +
> +Each child node match with a filter instance.
> +
> +Contents of a STM32 DFSDM root node:
> +------------------------------------
> +Required properties:
> +- compatible: Should be "st,stm32h7-dfsdm".
> +- reg: Offset and length of the DFSDM block register set.
> +- clocks: IP and serial interfaces clocking. Should be set according
> +		to rcc clock ID and "clock-names".
> +- clock-names: Input clock name "dfsdm" must be defined,
> +		"audio" is optional. If defined CLKOUT is based on the audio
> +		clock, else "dfsdm" is used.
> +- #interrupt-cells = <1>;
> +- #address-cells = <1>;
> +- #size-cells = <0>;
> +
> +Optional properties:
> +- spi-max-frequency: Requested only for SPI master mode.
> +		  SPI clock OUT frequency (Hz). This clock must be set according
> +		  to "clock" property. Frequency must be a multiple of the rcc
> +		  clock frequency. If not, SPI CLKOUT frequency will not be
> +		  accurate.
> +
> +Contents of a STM32 DFSDM child nodes:
> +--------------------------------------
> +
> +Required properties:
> +- compatible: Must be:
> +	"st,stm32-dfsdm-adc" for sigma delta ADCs
> +	"st,stm32-dfsdm-dmic" for audio digital microphone.
> +- reg: Specifies the DFSDM filter instance used.
> +- interrupts: IRQ lines connected to each DFSDM filter instance.
> +- st,adc-channels:	List of single-ended channels muxed for this ADC.
> +			valid values:
> +				"st,stm32h7-dfsdm" compatibility: 0 to 7.
> +- st,adc-channel-names:	List of single-ended channel names.
> +- st,filter-order:  SinC filter order from 0 to 5.
> +			0: FastSinC
> +			[1-5]: order 1 to 5.
> +			For audio purpose it is recommended to use order 3 to 5.
> +- #io-channel-cells = <1>: See the IIO bindings section "IIO consumers".
> +
> +Required properties for "st,stm32-dfsdm-adc" compatibility:
> +- io-channels: From common IIO binding. Used to pipe external sigma delta
> +		modulator or internal ADC output to DFSDM channel.
> +		This is not required for "st,stm32-dfsdm-pdm" compatibility as
> +		PDM microphone is binded in Audio DT node.
> +
> +Required properties for "st,stm32-dfsdm-pdm" compatibility:
> +- #sound-dai-cells: Must be set to 0.
> +- dma: DMA controller phandle and DMA request line associated to the
> +		filter instance (specified by the field "reg")
> +- dma-names: Must be "rx"
> +
> +Optional properties:
> +- st,adc-channel-types:	Single-ended channel input type.
> +			- "SPI_R": SPI with data on rising edge (default)
> +			- "SPI_F": SPI with data on falling edge
> +			- "MANCH_R": manchester codec, rising edge = logic 0
> +			- "MANCH_F": manchester codec, falling edge = logic 1
> +- st,adc-channel-clk-src: Conversion clock source.
> +			  - "CLKIN": external SPI clock (CLKIN x)
> +			  - "CLKOUT": internal SPI clock (CLKOUT) (default)
> +			  - "CLKOUT_F": internal SPI clock divided by 2 (falling edge).
> +			  - "CLKOUT_R": internal SPI clock divided by 2 (rising edge).
> +
> +- st,adc-alt-channel: Must be defined if two sigma delta modulator are
> +			  connected on same SPI input.
> +			  If not set, channel n is connected to SPI input n.
> +			  If set, channel n is connected to SPI input n + 1.
> +
> +- st,filter0-sync: Set to 1 to synchronize with DFSDM filter instance 0.
> +		   Used for multi microphones synchronization.
> +
> +Example of a sigma delta adc connected on DFSDM SPI port 0
> +and a pdm microphone connected on DFSDM SPI port 1:
> +
> +	ads1202: simple_sd_adc@0 {
> +		compatible = "ads1202";
> +		#io-channel-cells = <1>;
> +	};
> +
> +	dfsdm: dfsdm@40017000 {
> +		compatible = "st,stm32h7-dfsdm";
> +		reg = <0x40017000 0x400>;
> +		clocks = <&rcc DFSDM1_CK>;
> +		clock-names = "dfsdm";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		dfsdm_adc0: dfsdm-adc@0 {
> +			compatible = "st,stm32-dfsdm-adc";
> +			#io-channel-cells = <1>;
> +			reg = <0>;
> +			interrupts = <110>;
> +			st,adc-channels = <0>;
> +			st,adc-channel-names = "sd_adc0";
> +			st,adc-channel-types = "SPI_F";
> +			st,adc-channel-clk-src = "CLKOUT";
> +			io-channels = <&ads1202 0>;
> +			st,filter-order = <3>;
> +		};
> +		dfsdm_pdm1: dfsdm-pdm@1 {
> +			compatible = "st,stm32-dfsdm-dmic";
> +			reg = <1>;
> +			interrupts = <111>;
> +			dmas = <&dmamux1 102 0x400 0x00>;
> +			dma-names = "rx";
> +			st,adc-channels = <1>;
> +			st,adc-channel-names = "dmic1";
> +			st,adc-channel-types = "SPI_R";
> +			st,adc-channel-clk-src = "CLKOUT";
> +			st,filter-order = <5>;
> +		};
> +	}

  parent reply	other threads:[~2017-12-02 14:55 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 17:40 [PATCH v6 00/13] Add STM32 DFSDM support Arnaud Pouliquen
     [not found] ` <1512150020-20335-1-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-01 17:40   ` [PATCH v6 01/13] iio: Add hardware consumer buffer support Arnaud Pouliquen
     [not found]     ` <1512150020-20335-2-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:50       ` Jonathan Cameron
2017-12-01 17:40   ` [PATCH v6 03/13] IIO: hw_consumer: add devm_iio_hw_consumer_alloc Arnaud Pouliquen
     [not found]     ` <1512150020-20335-4-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:52       ` Jonathan Cameron
2017-12-01 17:40   ` [PATCH v6 07/13] IIO: add DT bindings for stm32 DFSDM filter Arnaud Pouliquen
     [not found]     ` <1512150020-20335-8-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:55       ` Jonathan Cameron [this message]
2017-12-01 17:40   ` [PATCH v6 08/13] IIO: ADC: add stm32 DFSDM core support Arnaud Pouliquen
2017-12-01 17:40   ` [PATCH v6 09/13] IIO: ADC: add STM32 DFSDM sigma delta ADC support Arnaud Pouliquen
     [not found]     ` <1512150020-20335-10-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:58       ` Jonathan Cameron
2017-12-01 17:40   ` [PATCH v6 11/13] IIO: consumer: allow to set buffer sizes Arnaud Pouliquen
2017-12-01 17:40   ` [PATCH v6 12/13] ASoC: add bindings for stm32 DFSDM filter Arnaud Pouliquen
     [not found]     ` <1512150020-20335-13-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-04 21:51       ` Rob Herring
2017-12-01 17:40   ` [PATCH v6 13/13] ASoC: stm32: add DFSDM DAI support Arnaud Pouliquen
     [not found]     ` <1512150020-20335-14-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 15:09       ` Jonathan Cameron
2017-12-04  8:58         ` Arnaud Pouliquen
2017-12-04 16:58           ` Mark Brown
2017-12-01 17:40 ` [PATCH v6 02/13] docs: driver-api: add iio hw consumer section Arnaud Pouliquen
     [not found]   ` <1512150020-20335-3-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:51     ` Jonathan Cameron
2017-12-01 17:40 ` [PATCH v6 04/13] IIO: inkern: API for manipulating channel attributes Arnaud Pouliquen
     [not found]   ` <1512150020-20335-5-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:46     ` Jonathan Cameron
2017-12-01 17:40 ` [PATCH v6 05/13] IIO: Add DT bindings for sigma delta adc modulator Arnaud Pouliquen
     [not found]   ` <1512150020-20335-6-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:52     ` Jonathan Cameron
2017-12-01 17:40 ` [PATCH v6 06/13] IIO: ADC: add sigma delta modulator support Arnaud Pouliquen
     [not found]   ` <1512150020-20335-7-git-send-email-arnaud.pouliquen-qxv4g6HH51o@public.gmane.org>
2017-12-02 14:54     ` Jonathan Cameron
2017-12-01 17:40 ` [PATCH v6 10/13] IIO: ADC: add stm32 DFSDM support for PDM microphone Arnaud Pouliquen

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=20171202145503.19027eea@archlinux \
    --to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=alexandre.torgue-qxv4g6HH51o@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=arnaud.pouliquen-qxv4g6HH51o@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=knaack.h-Mmb7MZpHnFY@public.gmane.org \
    --cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
    --cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=perex-/Fr2/VpizcU@public.gmane.org \
    --cc=pmeerw-jW+XmwGofnusTnJN9+BGXg@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=tiwai-IBi9RG/b67k@public.gmane.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox