[PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13

Olivier Moysan posted 8 patches 1 year, 6 months ago
.../bindings/iio/adc/st,stm32-adc.yaml        |  68 ++++-
arch/arm/boot/dts/stm32mp13-pinctrl.dtsi      |   7 +
arch/arm/boot/dts/stm32mp131.dtsi             |  43 +++
arch/arm/boot/dts/stm32mp133.dtsi             |  31 +++
arch/arm/boot/dts/stm32mp135f-dk.dts          |  33 +++
drivers/iio/adc/stm32-adc-core.c              |  30 ++-
drivers/iio/adc/stm32-adc-core.h              |  30 +++
drivers/iio/adc/stm32-adc.c                   | 247 +++++++++++++++---
8 files changed, 443 insertions(+), 46 deletions(-)
[PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13
Posted by Olivier Moysan 1 year, 6 months ago
On STM32MP13 SoCs, each ADC peripheral has a single ADC block.
These ADC peripherals, ADC1 and ADC2, are fully independent.
The STM32MP131 SoC provides only ADC2, while other STM32MP13x
SoCs provide both ADC1 and ADC2.

The STM32MP13 ADC features and characteristics are slightly
different from STM32MP15 ADC ones, requiring a specific support
in the driver.

This patchset enables the ADC peripheral on STM32MP135F-DK board.

On STM32MP135F-DK board the ADC is connected to VDDA voltage
provided by the PMIC LOD1 supply, which has to be enabled through
SCMI regulator framework.
This serie introduces a fixed regulator to allow ADC probing,
while SCMI regulators support is not available. This does
not ensure ADC regulator enabling however.

Changes in v4:
- reformat patch 1 commit message
- reorder adc1 node

v3:
- Remove blank line in tag block
- Use HZ_PER_MHZ unit for max frequency definition
- Coding style updates

v2:
- Rework commit message length
- Add missing spaces
- Remove useless defines

Olivier Moysan (8):
  iio: adc: stm32-adc: fix channel sampling time init
  dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles
  iio: adc: stm32-adc: add stm32mp13 support
  iio: adc: stm32: manage min sampling time on all internal channels
  ARM: dts: stm32: add adc support to stm32mp13
  ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk
  ARM: dts: stm32: add dummy vdd_adc regulator on stm32mp135f-dk
  ARM: dts: stm32: add adc support on stm32mp135f-dk

 .../bindings/iio/adc/st,stm32-adc.yaml        |  68 ++++-
 arch/arm/boot/dts/stm32mp13-pinctrl.dtsi      |   7 +
 arch/arm/boot/dts/stm32mp131.dtsi             |  43 +++
 arch/arm/boot/dts/stm32mp133.dtsi             |  31 +++
 arch/arm/boot/dts/stm32mp135f-dk.dts          |  33 +++
 drivers/iio/adc/stm32-adc-core.c              |  30 ++-
 drivers/iio/adc/stm32-adc-core.h              |  30 +++
 drivers/iio/adc/stm32-adc.c                   | 247 +++++++++++++++---
 8 files changed, 443 insertions(+), 46 deletions(-)

-- 
2.25.1
Re: [PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13
Posted by Fabrice Gasnier 1 year, 6 months ago
On 10/12/22 16:21, Olivier Moysan wrote:
> On STM32MP13 SoCs, each ADC peripheral has a single ADC block.
> These ADC peripherals, ADC1 and ADC2, are fully independent.
> The STM32MP131 SoC provides only ADC2, while other STM32MP13x
> SoCs provide both ADC1 and ADC2.
> 
> The STM32MP13 ADC features and characteristics are slightly
> different from STM32MP15 ADC ones, requiring a specific support
> in the driver.
> 
> This patchset enables the ADC peripheral on STM32MP135F-DK board.
> 
> On STM32MP135F-DK board the ADC is connected to VDDA voltage
> provided by the PMIC LOD1 supply, which has to be enabled through
> SCMI regulator framework.
> This serie introduces a fixed regulator to allow ADC probing,
> while SCMI regulators support is not available. This does
> not ensure ADC regulator enabling however.


Hi Olivier,

I've one tiny remark on PATCH 5/8, "ARM: dts: stm32: add adc support to
stm32mp13"

With that fixed, for the whole series, you can add my:

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

Thanks,
Fabrice

> 
> Changes in v4:
> - reformat patch 1 commit message
> - reorder adc1 node
> 
> v3:
> - Remove blank line in tag block
> - Use HZ_PER_MHZ unit for max frequency definition
> - Coding style updates
> 
> v2:
> - Rework commit message length
> - Add missing spaces
> - Remove useless defines
> 
> Olivier Moysan (8):
>   iio: adc: stm32-adc: fix channel sampling time init
>   dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles
>   iio: adc: stm32-adc: add stm32mp13 support
>   iio: adc: stm32: manage min sampling time on all internal channels
>   ARM: dts: stm32: add adc support to stm32mp13
>   ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk
>   ARM: dts: stm32: add dummy vdd_adc regulator on stm32mp135f-dk
>   ARM: dts: stm32: add adc support on stm32mp135f-dk
> 
>  .../bindings/iio/adc/st,stm32-adc.yaml        |  68 ++++-
>  arch/arm/boot/dts/stm32mp13-pinctrl.dtsi      |   7 +
>  arch/arm/boot/dts/stm32mp131.dtsi             |  43 +++
>  arch/arm/boot/dts/stm32mp133.dtsi             |  31 +++
>  arch/arm/boot/dts/stm32mp135f-dk.dts          |  33 +++
>  drivers/iio/adc/stm32-adc-core.c              |  30 ++-
>  drivers/iio/adc/stm32-adc-core.h              |  30 +++
>  drivers/iio/adc/stm32-adc.c                   | 247 +++++++++++++++---
>  8 files changed, 443 insertions(+), 46 deletions(-)
>
Re: [PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13
Posted by Jonathan Cameron 1 year, 6 months ago
On Fri, 14 Oct 2022 14:52:49 +0200
Fabrice Gasnier <fabrice.gasnier@foss.st.com> wrote:

> On 10/12/22 16:21, Olivier Moysan wrote:
> > On STM32MP13 SoCs, each ADC peripheral has a single ADC block.
> > These ADC peripherals, ADC1 and ADC2, are fully independent.
> > The STM32MP131 SoC provides only ADC2, while other STM32MP13x
> > SoCs provide both ADC1 and ADC2.
> > 
> > The STM32MP13 ADC features and characteristics are slightly
> > different from STM32MP15 ADC ones, requiring a specific support
> > in the driver.
> > 
> > This patchset enables the ADC peripheral on STM32MP135F-DK board.
> > 
> > On STM32MP135F-DK board the ADC is connected to VDDA voltage
> > provided by the PMIC LOD1 supply, which has to be enabled through
> > SCMI regulator framework.
> > This serie introduces a fixed regulator to allow ADC probing,
> > while SCMI regulators support is not available. This does
> > not ensure ADC regulator enabling however.  
> 
> 
> Hi Olivier,
> 
> I've one tiny remark on PATCH 5/8, "ARM: dts: stm32: add adc support to
> stm32mp13"
> 
> With that fixed, for the whole series, you can add my:
> 
> Reviewed-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com>

Applied 1 to the the fixes-togreg branch of iio.git and
2,3,4 to the togreg branch of iio.git (pushed out as testing only
until I can rebase on rc1).

No overlap in code affected, so this should work fine and means
I don't have to remember to pick up the non fixes later in the cycle.

Thanks,

Jonathan

> 
> Thanks,
> Fabrice
> 
> > 
> > Changes in v4:
> > - reformat patch 1 commit message
> > - reorder adc1 node
> > 
> > v3:
> > - Remove blank line in tag block
> > - Use HZ_PER_MHZ unit for max frequency definition
> > - Coding style updates
> > 
> > v2:
> > - Rework commit message length
> > - Add missing spaces
> > - Remove useless defines
> > 
> > Olivier Moysan (8):
> >   iio: adc: stm32-adc: fix channel sampling time init
> >   dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles
> >   iio: adc: stm32-adc: add stm32mp13 support
> >   iio: adc: stm32: manage min sampling time on all internal channels
> >   ARM: dts: stm32: add adc support to stm32mp13
> >   ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk
> >   ARM: dts: stm32: add dummy vdd_adc regulator on stm32mp135f-dk
> >   ARM: dts: stm32: add adc support on stm32mp135f-dk
> > 
> >  .../bindings/iio/adc/st,stm32-adc.yaml        |  68 ++++-
> >  arch/arm/boot/dts/stm32mp13-pinctrl.dtsi      |   7 +
> >  arch/arm/boot/dts/stm32mp131.dtsi             |  43 +++
> >  arch/arm/boot/dts/stm32mp133.dtsi             |  31 +++
> >  arch/arm/boot/dts/stm32mp135f-dk.dts          |  33 +++
> >  drivers/iio/adc/stm32-adc-core.c              |  30 ++-
> >  drivers/iio/adc/stm32-adc-core.h              |  30 +++
> >  drivers/iio/adc/stm32-adc.c                   | 247 +++++++++++++++---
> >  8 files changed, 443 insertions(+), 46 deletions(-)
> >
Re: [PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13
Posted by Andy Shevchenko 1 year, 6 months ago
On Wed, Oct 12, 2022 at 5:23 PM Olivier Moysan
<olivier.moysan@foss.st.com> wrote:
>
> On STM32MP13 SoCs, each ADC peripheral has a single ADC block.
> These ADC peripherals, ADC1 and ADC2, are fully independent.
> The STM32MP131 SoC provides only ADC2, while other STM32MP13x
> SoCs provide both ADC1 and ADC2.
>
> The STM32MP13 ADC features and characteristics are slightly
> different from STM32MP15 ADC ones, requiring a specific support
> in the driver.
>
> This patchset enables the ADC peripheral on STM32MP135F-DK board.
>
> On STM32MP135F-DK board the ADC is connected to VDDA voltage
> provided by the PMIC LOD1 supply, which has to be enabled through
> SCMI regulator framework.
> This serie introduces a fixed regulator to allow ADC probing,
> while SCMI regulators support is not available. This does
> not ensure ADC regulator enabling however.

FWIW,
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
for patches 1,3, and 4.

> Changes in v4:
> - reformat patch 1 commit message
> - reorder adc1 node
>
> v3:
> - Remove blank line in tag block
> - Use HZ_PER_MHZ unit for max frequency definition
> - Coding style updates
>
> v2:
> - Rework commit message length
> - Add missing spaces
> - Remove useless defines
>
> Olivier Moysan (8):
>   iio: adc: stm32-adc: fix channel sampling time init
>   dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles
>   iio: adc: stm32-adc: add stm32mp13 support
>   iio: adc: stm32: manage min sampling time on all internal channels
>   ARM: dts: stm32: add adc support to stm32mp13
>   ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk
>   ARM: dts: stm32: add dummy vdd_adc regulator on stm32mp135f-dk
>   ARM: dts: stm32: add adc support on stm32mp135f-dk
>
>  .../bindings/iio/adc/st,stm32-adc.yaml        |  68 ++++-
>  arch/arm/boot/dts/stm32mp13-pinctrl.dtsi      |   7 +
>  arch/arm/boot/dts/stm32mp131.dtsi             |  43 +++
>  arch/arm/boot/dts/stm32mp133.dtsi             |  31 +++
>  arch/arm/boot/dts/stm32mp135f-dk.dts          |  33 +++
>  drivers/iio/adc/stm32-adc-core.c              |  30 ++-
>  drivers/iio/adc/stm32-adc-core.h              |  30 +++
>  drivers/iio/adc/stm32-adc.c                   | 247 +++++++++++++++---
>  8 files changed, 443 insertions(+), 46 deletions(-)
>
> --
> 2.25.1
>


-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v4 0/8] iio: stm32-adc: add support of adc for stm32mp13
Posted by Alexandre TORGUE 1 year, 6 months ago
Hi Olivier

On 10/12/22 16:21, Olivier Moysan wrote:
> On STM32MP13 SoCs, each ADC peripheral has a single ADC block.
> These ADC peripherals, ADC1 and ADC2, are fully independent.
> The STM32MP131 SoC provides only ADC2, while other STM32MP13x
> SoCs provide both ADC1 and ADC2.
> 
> The STM32MP13 ADC features and characteristics are slightly
> different from STM32MP15 ADC ones, requiring a specific support
> in the driver.
> 
> This patchset enables the ADC peripheral on STM32MP135F-DK board.
> 
> On STM32MP135F-DK board the ADC is connected to VDDA voltage
> provided by the PMIC LOD1 supply, which has to be enabled through
> SCMI regulator framework.
> This serie introduces a fixed regulator to allow ADC probing,
> while SCMI regulators support is not available. This does
> not ensure ADC regulator enabling however.
> 
> Changes in v4:
> - reformat patch 1 commit message
> - reorder adc1 node
> 
> v3:
> - Remove blank line in tag block
> - Use HZ_PER_MHZ unit for max frequency definition
> - Coding style updates
> 
> v2:
> - Rework commit message length
> - Add missing spaces
> - Remove useless defines
> 
> Olivier Moysan (8):
>    iio: adc: stm32-adc: fix channel sampling time init
>    dt-bindings: iio: adc: stm32-adc: add stm32mp13 compatibles
>    iio: adc: stm32-adc: add stm32mp13 support
>    iio: adc: stm32: manage min sampling time on all internal channels
>    ARM: dts: stm32: add adc support to stm32mp13
>    ARM: dts: stm32: add adc pins muxing on stm32mp135f-dk
>    ARM: dts: stm32: add dummy vdd_adc regulator on stm32mp135f-dk
>    ARM: dts: stm32: add adc support on stm32mp135f-dk
> 

DT patches [5 to 8] applied on stm32-next.

Thanks
Alex