devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabrice Gasnier <fabrice.gasnier@foss.st.com>
To: Olivier Moysan <olivier.moysan@foss.st.com>,
	Rob Herring <robh+dt@kernel.org>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v4 5/8] ARM: dts: stm32: add adc support to stm32mp13
Date: Fri, 14 Oct 2022 14:52:18 +0200	[thread overview]
Message-ID: <7e53cfe8-1c85-1ad4-04be-b555cfb26a9e@foss.st.com> (raw)
In-Reply-To: <20221012142205.13041-6-olivier.moysan@foss.st.com>

On 10/12/22 16:22, Olivier Moysan wrote:
> Add ADC1 and ADC2 support to STM32MP13 SoC family.
> 
> The STM32MP131 provides only ADC2, while other STM32MP13 SoCs provide
> both ADC1 and ADC2.
> 
> Internal channels support limitations:
> - VREFINT internal channel requires calibration data from OTP memory.
>   The nvmem properties used to access OTP are not defined for time being,
>   as OTP support is not yet enabled.
> 
> - VBAT internal channel is not defined by default in SoC DT, and
>   has be defined in board DT when needed, instead. This avoids unwanted
>   current consumption on battery, when ADC conversions are performed
>   on any other channels.
> 
> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> ---
>  arch/arm/boot/dts/stm32mp131.dtsi | 43 +++++++++++++++++++++++++++++++
>  arch/arm/boot/dts/stm32mp133.dtsi | 31 ++++++++++++++++++++++
>  2 files changed, 74 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/stm32mp131.dtsi b/arch/arm/boot/dts/stm32mp131.dtsi
> index dd35a607073d..0b85e7744db5 100644
> --- a/arch/arm/boot/dts/stm32mp131.dtsi
> +++ b/arch/arm/boot/dts/stm32mp131.dtsi
> @@ -313,6 +313,49 @@ i2c5: i2c@4c006000 {
>  			status = "disabled";
>  		};
>  
> +		adc_2: adc@48004000 {

Hi Olivier,

Nodes should be sorted by address here. Maybe Alexandre will take care
when applying ?

With that fixed, you can add my:

Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>

Thanks,
Fabrice

> +			compatible = "st,stm32mp13-adc-core";
> +			reg = <0x48004000 0x400>;
> +			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&rcc ADC2>, <&rcc ADC2_K>;
> +			clock-names = "bus", "adc";
> +			interrupt-controller;
> +			#interrupt-cells = <1>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +
> +			adc2: adc@0 {
> +				compatible = "st,stm32mp13-adc";
> +				#io-channel-cells = <1>;
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				reg = <0x0>;
> +				interrupt-parent = <&adc_2>;
> +				interrupts = <0>;
> +				dmas = <&dmamux1 10 0x400 0x80000001>;
> +				dma-names = "rx";
> +				status = "disabled";
> +
> +				channel@13 {
> +					reg = <13>;
> +					label = "vrefint";
> +				};
> +				channel@14 {
> +					reg = <14>;
> +					label = "vddcore";
> +				};
> +				channel@16 {
> +					reg = <16>;
> +					label = "vddcpu";
> +				};
> +				channel@17 {
> +					reg = <17>;
> +					label = "vddq_ddr";
> +				};
> +			};
> +		};
> +
>  		rcc: rcc@50000000 {
>  			compatible = "st,stm32mp13-rcc", "syscon";
>  			reg = <0x50000000 0x1000>;
> diff --git a/arch/arm/boot/dts/stm32mp133.dtsi b/arch/arm/boot/dts/stm32mp133.dtsi
> index 531c263c9f46..df451c3c2a26 100644
> --- a/arch/arm/boot/dts/stm32mp133.dtsi
> +++ b/arch/arm/boot/dts/stm32mp133.dtsi
> @@ -33,5 +33,36 @@ m_can2: can@4400f000 {
>  			bosch,mram-cfg = <0x1400 0 0 32 0 0 2 2>;
>  			status = "disabled";
>  		};
> +
> +		adc_1: adc@48003000 {
> +			compatible = "st,stm32mp13-adc-core";
> +			reg = <0x48003000 0x400>;
> +			interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&rcc ADC1>, <&rcc ADC1_K>;
> +			clock-names = "bus", "adc";
> +			interrupt-controller;
> +			#interrupt-cells = <1>;
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +			status = "disabled";
> +
> +			adc1: adc@0 {
> +				compatible = "st,stm32mp13-adc";
> +				#io-channel-cells = <1>;
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +				reg = <0x0>;
> +				interrupt-parent = <&adc_1>;
> +				interrupts = <0>;
> +				dmas = <&dmamux1 9 0x400 0x80000001>;
> +				dma-names = "rx";
> +				status = "disabled";
> +
> +				channel@18 {
> +					reg = <18>;
> +					label = "vrefint";
> +				};
> +			};
> +		};
>  	};
>  };

  reply	other threads:[~2022-10-14 12:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 14:21 [PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13 Olivier Moysan
2022-10-12 14:21 ` [PATCH v4 1/8] iio: adc: stm32-adc: fix channel sampling time init Olivier Moysan
2022-10-15 15:56   ` Jonathan Cameron
2022-10-12 14:21 ` [PATCH v4 2/8] dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles Olivier Moysan
2022-10-12 16:25   ` Rob Herring
2022-10-12 14:22 ` [PATCH v4 3/8] iio: adc: stm32-adc: add stm32mp13 support Olivier Moysan
2022-10-12 14:22 ` [PATCH v4 4/8] iio: adc: stm32: manage min sampling time on all internal channels Olivier Moysan
2022-10-12 14:22 ` [PATCH v4 5/8] ARM: dts: stm32: add adc support to stm32mp13 Olivier Moysan
2022-10-14 12:52   ` Fabrice Gasnier [this message]
2022-10-12 14:22 ` [PATCH v4 6/8] ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk Olivier Moysan
2022-10-12 14:22 ` [PATCH v4 7/8] ARM: dts: stm32: add dummy vdd_adc regulator " Olivier Moysan
2022-10-12 14:22 ` [PATCH v4 8/8] ARM: dts: stm32: add adc support " Olivier Moysan
2022-10-12 14:37 ` [PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13 Andy Shevchenko
2022-10-14 12:52 ` Fabrice Gasnier
2022-10-15 16:01   ` Jonathan Cameron
2022-10-24  9:15 ` Alexandre TORGUE

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=7e53cfe8-1c85-1ad4-04be-b555cfb26a9e@foss.st.com \
    --to=fabrice.gasnier@foss.st.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=olivier.moysan@foss.st.com \
    --cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).