diff mbox

[1/3] dt-bindings: iio: stm32-adc: add support for STM32MP1.

Message ID 1524065874-434-2-git-send-email-fabrice.gasnier@st.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fabrice Gasnier April 18, 2018, 3:37 p.m. UTC
Document support for STM32MP1 ADC. It's quite similar to STM32H7 ADC.
Introduce "st,stm32mp1-adc" compatible to handle variants of this
hardware such as vregready flag, interrupts, clock rate.

Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
---
 Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Jonathan Cameron April 21, 2018, 3:36 p.m. UTC | #1
On Wed, 18 Apr 2018 17:37:52 +0200
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:

> Document support for STM32MP1 ADC. It's quite similar to STM32H7 ADC.
> Introduce "st,stm32mp1-adc" compatible to handle variants of this
> hardware such as vregready flag, interrupts, clock rate.
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Pretty uncontroversial I think so I'll take this one with out
waiting Rob or Mark's time (though of course they are welcome
to offer feedback!)

Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.

Thanks,

Jonathan

> ---
>  Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> index e8bb824..9994384 100644
> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> @@ -24,8 +24,11 @@ Required properties:
>  - compatible: Should be one of:
>    "st,stm32f4-adc-core"
>    "st,stm32h7-adc-core"
> +  "st,stm32mp1-adc-core"
>  - reg: Offset and length of the ADC block register set.
> -- interrupts: Must contain the interrupt for ADC block.
> +- interrupts: One or more interrupts for ADC block. Some parts like stm32f4
> +  and stm32h7 share a common ADC interrupt line. stm32mp1 has separate
> +  lines for each ADC within ADC block.
>  - clocks: Core can use up to two clocks, depending on part used:
>    - "adc" clock: for the analog circuitry, common to all ADCs.
>      It's required on stm32f4.
> @@ -53,6 +56,7 @@ Required properties:
>  - compatible: Should be one of:
>    "st,stm32f4-adc"
>    "st,stm32h7-adc"
> +  "st,stm32mp1-adc"
>  - reg: Offset of ADC instance in ADC block (e.g. may be 0x0, 0x100, 0x200).
>  - clocks: Input clock private to this ADC instance. It's required only on
>    stm32f4, that has per instance clock input for registers access.

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rob Herring April 24, 2018, 4:27 p.m. UTC | #2
On Wed, Apr 18, 2018 at 05:37:52PM +0200, Fabrice Gasnier wrote:
> Document support for STM32MP1 ADC. It's quite similar to STM32H7 ADC.
> Introduce "st,stm32mp1-adc" compatible to handle variants of this
> hardware such as vregready flag, interrupts, clock rate.
> 
> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> ---
>  Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> index e8bb824..9994384 100644
> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> @@ -24,8 +24,11 @@ Required properties:
>  - compatible: Should be one of:
>    "st,stm32f4-adc-core"
>    "st,stm32h7-adc-core"
> +  "st,stm32mp1-adc-core"
>  - reg: Offset and length of the ADC block register set.
> -- interrupts: Must contain the interrupt for ADC block.
> +- interrupts: One or more interrupts for ADC block. Some parts like stm32f4
> +  and stm32h7 share a common ADC interrupt line. stm32mp1 has separate
> +  lines for each ADC within ADC block.

How many interrupt lines is that?

>  - clocks: Core can use up to two clocks, depending on part used:
>    - "adc" clock: for the analog circuitry, common to all ADCs.
>      It's required on stm32f4.
> @@ -53,6 +56,7 @@ Required properties:
>  - compatible: Should be one of:
>    "st,stm32f4-adc"
>    "st,stm32h7-adc"
> +  "st,stm32mp1-adc"
>  - reg: Offset of ADC instance in ADC block (e.g. may be 0x0, 0x100, 0x200).
>  - clocks: Input clock private to this ADC instance. It's required only on
>    stm32f4, that has per instance clock input for registers access.
> -- 
> 1.9.1
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Fabrice Gasnier April 25, 2018, 7:22 a.m. UTC | #3
On 04/24/2018 06:27 PM, Rob Herring wrote:
> On Wed, Apr 18, 2018 at 05:37:52PM +0200, Fabrice Gasnier wrote:
>> Document support for STM32MP1 ADC. It's quite similar to STM32H7 ADC.
>> Introduce "st,stm32mp1-adc" compatible to handle variants of this
>> hardware such as vregready flag, interrupts, clock rate.
>>
>> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
>> ---
>>  Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 6 +++++-
>>  1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
>> index e8bb824..9994384 100644
>> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
>> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
>> @@ -24,8 +24,11 @@ Required properties:
>>  - compatible: Should be one of:
>>    "st,stm32f4-adc-core"
>>    "st,stm32h7-adc-core"
>> +  "st,stm32mp1-adc-core"
>>  - reg: Offset and length of the ADC block register set.
>> -- interrupts: Must contain the interrupt for ADC block.
>> +- interrupts: One or more interrupts for ADC block. Some parts like stm32f4
>> +  and stm32h7 share a common ADC interrupt line. stm32mp1 has separate
>> +  lines for each ADC within ADC block.
> 
> How many interrupt lines is that?

Hi Rob, Jonathan,

I should have mentioned this: stm32mp1 has two separate interrupt lines
for each ADC within ADC block.

Do you wish I send a V2 for this ? Or a patch to fix this ?

Please let me know,
BR,
Fabrice

> 
>>  - clocks: Core can use up to two clocks, depending on part used:
>>    - "adc" clock: for the analog circuitry, common to all ADCs.
>>      It's required on stm32f4.
>> @@ -53,6 +56,7 @@ Required properties:
>>  - compatible: Should be one of:
>>    "st,stm32f4-adc"
>>    "st,stm32h7-adc"
>> +  "st,stm32mp1-adc"
>>  - reg: Offset of ADC instance in ADC block (e.g. may be 0x0, 0x100, 0x200).
>>  - clocks: Input clock private to this ADC instance. It's required only on
>>    stm32f4, that has per instance clock input for registers access.
>> -- 
>> 1.9.1
>>
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jonathan Cameron April 28, 2018, 3:18 p.m. UTC | #4
On Wed, 25 Apr 2018 09:22:02 +0200
Fabrice Gasnier <fabrice.gasnier@st.com> wrote:

> On 04/24/2018 06:27 PM, Rob Herring wrote:
> > On Wed, Apr 18, 2018 at 05:37:52PM +0200, Fabrice Gasnier wrote:  
> >> Document support for STM32MP1 ADC. It's quite similar to STM32H7 ADC.
> >> Introduce "st,stm32mp1-adc" compatible to handle variants of this
> >> hardware such as vregready flag, interrupts, clock rate.
> >>
> >> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
> >> ---
> >>  Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt | 6 +++++-
> >>  1 file changed, 5 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> >> index e8bb824..9994384 100644
> >> --- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> >> +++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
> >> @@ -24,8 +24,11 @@ Required properties:
> >>  - compatible: Should be one of:
> >>    "st,stm32f4-adc-core"
> >>    "st,stm32h7-adc-core"
> >> +  "st,stm32mp1-adc-core"
> >>  - reg: Offset and length of the ADC block register set.
> >> -- interrupts: Must contain the interrupt for ADC block.
> >> +- interrupts: One or more interrupts for ADC block. Some parts like stm32f4
> >> +  and stm32h7 share a common ADC interrupt line. stm32mp1 has separate
> >> +  lines for each ADC within ADC block.  
> > 
> > How many interrupt lines is that?  
> 
> Hi Rob, Jonathan,
> 
> I should have mentioned this: stm32mp1 has two separate interrupt lines
> for each ADC within ADC block.
> 
> Do you wish I send a V2 for this ? Or a patch to fix this ?
Hmm. I haven't pushed this out as non rebasing so I'll revert this
and the associated support so you can clean this corner up.

So please send a V2.

Thanks,

Jonathan

> 
> Please let me know,
> BR,
> Fabrice
> 
> >   
> >>  - clocks: Core can use up to two clocks, depending on part used:
> >>    - "adc" clock: for the analog circuitry, common to all ADCs.
> >>      It's required on stm32f4.
> >> @@ -53,6 +56,7 @@ Required properties:
> >>  - compatible: Should be one of:
> >>    "st,stm32f4-adc"
> >>    "st,stm32h7-adc"
> >> +  "st,stm32mp1-adc"
> >>  - reg: Offset of ADC instance in ADC block (e.g. may be 0x0, 0x100, 0x200).
> >>  - clocks: Input clock private to this ADC instance. It's required only on
> >>    stm32f4, that has per instance clock input for registers access.
> >> -- 
> >> 1.9.1
> >>  
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

Patch

diff --git a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
index e8bb824..9994384 100644
--- a/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
+++ b/Documentation/devicetree/bindings/iio/adc/st,stm32-adc.txt
@@ -24,8 +24,11 @@  Required properties:
 - compatible: Should be one of:
   "st,stm32f4-adc-core"
   "st,stm32h7-adc-core"
+  "st,stm32mp1-adc-core"
 - reg: Offset and length of the ADC block register set.
-- interrupts: Must contain the interrupt for ADC block.
+- interrupts: One or more interrupts for ADC block. Some parts like stm32f4
+  and stm32h7 share a common ADC interrupt line. stm32mp1 has separate
+  lines for each ADC within ADC block.
 - clocks: Core can use up to two clocks, depending on part used:
   - "adc" clock: for the analog circuitry, common to all ADCs.
     It's required on stm32f4.
@@ -53,6 +56,7 @@  Required properties:
 - compatible: Should be one of:
   "st,stm32f4-adc"
   "st,stm32h7-adc"
+  "st,stm32mp1-adc"
 - reg: Offset of ADC instance in ADC block (e.g. may be 0x0, 0x100, 0x200).
 - clocks: Input clock private to this ADC instance. It's required only on
   stm32f4, that has per instance clock input for registers access.