mbox series

[v6,0/7] Add STM32MP25 LPTIM support: MFD, PWM, IIO, counter, clocksource

Message ID 20250429125133.1574167-1-fabrice.gasnier@foss.st.com
Headers show
Series Add STM32MP25 LPTIM support: MFD, PWM, IIO, counter, clocksource | expand

Message

Fabrice Gasnier April 29, 2025, 12:51 p.m. UTC
This series adds support for STM32MP25 to MFD PWM, IIO, counter and
clocksource low-power timer (LPTIM) drivers.
This new variant is managed by using a new DT compatible string, hardware
configuration and version registers.
It comes with a slightly updated register set, some new features and new
interconnect signals inside the SoC.
Same feature list as on STM32MP1x is supported currently.
The device tree files add all instances in stm32mp251 dtsi file.

Changes in V6
---
- Fixed kernel test robot warning
  https://lore.kernel.org/oe-kbuild-all/202504261456.aCATBoYN-lkp@intel.com/

Changes in V5
---
- Add a necessary delay in clocksource driver, when enabling the timer.
- Add collected Acks
- Dropped IIO trigger patch as applied by Jonathan [1] (no dependency)
  [1] https://lore.kernel.org/all/20250331110435.26157ebe@jic23-huawei/

Changes in V4
---
- Simplify IIO trigger driver as per Jonathan's comments.
- Rework clocksource driver: encapsulate mp25 changes in separate function
  after Daniel's suggestion.
- Add some definitions to MFD header.

Changes in V3
---
- Yaml indentation issue fixed, reported by Rob's bot

Changes in V2
---
- Review comments from Krzysztof
  - Adopt compatible fallback in dt-bindings and driver
  - drivers: drop "st,stm32mp25-..." compatibles when unused (e.g. no .data)
  - counter driver: no update (patch dropped)
  - defconfig: only enable the necessary config for upstream board
  - add lptimer DT node in stm32mp257f-ev1 board
- Add missing management of IER access for stm32mp25

Fabrice Gasnier (7):
  dt-bindings: mfd: stm32-lptimer: add support for stm32mp25
  mfd: stm32-lptimer: add support for stm32mp25
  clocksource: stm32-lptimer: add support for stm32mp25
  pwm: stm32-lp: add support for stm32mp25
  arm64: defconfig: enable STM32 LP timer clockevent driver
  arm64: dts: st: add low-power timer nodes on stm32mp251
  arm64: dts: st: use lptimer3 as tick broadcast source on
    stm32mp257f-ev1

 .../bindings/mfd/st,stm32-lptimer.yaml        |  40 +++-
 arch/arm64/boot/dts/st/stm32mp251.dtsi        | 177 ++++++++++++++
 arch/arm64/boot/dts/st/stm32mp257f-ev1.dts    |   8 +
 arch/arm64/configs/defconfig                  |   2 +
 drivers/clocksource/timer-stm32-lp.c          |  61 ++++-
 drivers/mfd/stm32-lptimer.c                   |  33 ++-
 drivers/pwm/pwm-stm32-lp.c                    | 219 +++++++++++++++---
 include/linux/mfd/stm32-lptimer.h             |  37 ++-
 8 files changed, 537 insertions(+), 40 deletions(-)

Comments

Lee Jones May 1, 2025, 1:14 p.m. UTC | #1
On Tue, 29 Apr 2025, Fabrice Gasnier wrote:

> This series adds support for STM32MP25 to MFD PWM, IIO, counter and
> clocksource low-power timer (LPTIM) drivers.
> This new variant is managed by using a new DT compatible string, hardware
> configuration and version registers.
> It comes with a slightly updated register set, some new features and new
> interconnect signals inside the SoC.
> Same feature list as on STM32MP1x is supported currently.
> The device tree files add all instances in stm32mp251 dtsi file.
> 
> Changes in V6
> ---
> - Fixed kernel test robot warning
>   https://lore.kernel.org/oe-kbuild-all/202504261456.aCATBoYN-lkp@intel.com/
> 
> Changes in V5
> ---
> - Add a necessary delay in clocksource driver, when enabling the timer.
> - Add collected Acks
> - Dropped IIO trigger patch as applied by Jonathan [1] (no dependency)
>   [1] https://lore.kernel.org/all/20250331110435.26157ebe@jic23-huawei/
> 
> Changes in V4
> ---
> - Simplify IIO trigger driver as per Jonathan's comments.
> - Rework clocksource driver: encapsulate mp25 changes in separate function
>   after Daniel's suggestion.
> - Add some definitions to MFD header.
> 
> Changes in V3
> ---
> - Yaml indentation issue fixed, reported by Rob's bot
> 
> Changes in V2
> ---
> - Review comments from Krzysztof
>   - Adopt compatible fallback in dt-bindings and driver
>   - drivers: drop "st,stm32mp25-..." compatibles when unused (e.g. no .data)
>   - counter driver: no update (patch dropped)
>   - defconfig: only enable the necessary config for upstream board
>   - add lptimer DT node in stm32mp257f-ev1 board
> - Add missing management of IER access for stm32mp25
> 
> Fabrice Gasnier (7):
>   dt-bindings: mfd: stm32-lptimer: add support for stm32mp25
>   mfd: stm32-lptimer: add support for stm32mp25
>   clocksource: stm32-lptimer: add support for stm32mp25
>   pwm: stm32-lp: add support for stm32mp25
>   arm64: defconfig: enable STM32 LP timer clockevent driver
>   arm64: dts: st: add low-power timer nodes on stm32mp251
>   arm64: dts: st: use lptimer3 as tick broadcast source on
>     stm32mp257f-ev1
> 
>  .../bindings/mfd/st,stm32-lptimer.yaml        |  40 +++-
>  arch/arm64/boot/dts/st/stm32mp251.dtsi        | 177 ++++++++++++++
>  arch/arm64/boot/dts/st/stm32mp257f-ev1.dts    |   8 +
>  arch/arm64/configs/defconfig                  |   2 +
>  drivers/clocksource/timer-stm32-lp.c          |  61 ++++-
>  drivers/mfd/stm32-lptimer.c                   |  33 ++-
>  drivers/pwm/pwm-stm32-lp.c                    | 219 +++++++++++++++---
>  include/linux/mfd/stm32-lptimer.h             |  37 ++-
>  8 files changed, 537 insertions(+), 40 deletions(-)

Is it just the Clocksource Ack that we're waiting on now?
Fabrice Gasnier May 5, 2025, 12:17 p.m. UTC | #2
On 5/1/25 15:14, Lee Jones wrote:
> On Tue, 29 Apr 2025, Fabrice Gasnier wrote:
> 
>> This series adds support for STM32MP25 to MFD PWM, IIO, counter and
>> clocksource low-power timer (LPTIM) drivers.
>> This new variant is managed by using a new DT compatible string, hardware
>> configuration and version registers.
>> It comes with a slightly updated register set, some new features and new
>> interconnect signals inside the SoC.
>> Same feature list as on STM32MP1x is supported currently.
>> The device tree files add all instances in stm32mp251 dtsi file.
>>
>> Changes in V6
>> ---
>> - Fixed kernel test robot warning
>>   https://lore.kernel.org/oe-kbuild-all/202504261456.aCATBoYN-lkp@intel.com/
>>
>> Changes in V5
>> ---
>> - Add a necessary delay in clocksource driver, when enabling the timer.
>> - Add collected Acks
>> - Dropped IIO trigger patch as applied by Jonathan [1] (no dependency)
>>   [1] https://lore.kernel.org/all/20250331110435.26157ebe@jic23-huawei/
>>
>> Changes in V4
>> ---
>> - Simplify IIO trigger driver as per Jonathan's comments.
>> - Rework clocksource driver: encapsulate mp25 changes in separate function
>>   after Daniel's suggestion.
>> - Add some definitions to MFD header.
>>
>> Changes in V3
>> ---
>> - Yaml indentation issue fixed, reported by Rob's bot
>>
>> Changes in V2
>> ---
>> - Review comments from Krzysztof
>>   - Adopt compatible fallback in dt-bindings and driver
>>   - drivers: drop "st,stm32mp25-..." compatibles when unused (e.g. no .data)
>>   - counter driver: no update (patch dropped)
>>   - defconfig: only enable the necessary config for upstream board
>>   - add lptimer DT node in stm32mp257f-ev1 board
>> - Add missing management of IER access for stm32mp25
>>
>> Fabrice Gasnier (7):
>>   dt-bindings: mfd: stm32-lptimer: add support for stm32mp25
>>   mfd: stm32-lptimer: add support for stm32mp25
>>   clocksource: stm32-lptimer: add support for stm32mp25
>>   pwm: stm32-lp: add support for stm32mp25
>>   arm64: defconfig: enable STM32 LP timer clockevent driver
>>   arm64: dts: st: add low-power timer nodes on stm32mp251
>>   arm64: dts: st: use lptimer3 as tick broadcast source on
>>     stm32mp257f-ev1
>>
>>  .../bindings/mfd/st,stm32-lptimer.yaml        |  40 +++-
>>  arch/arm64/boot/dts/st/stm32mp251.dtsi        | 177 ++++++++++++++
>>  arch/arm64/boot/dts/st/stm32mp257f-ev1.dts    |   8 +
>>  arch/arm64/configs/defconfig                  |   2 +
>>  drivers/clocksource/timer-stm32-lp.c          |  61 ++++-
>>  drivers/mfd/stm32-lptimer.c                   |  33 ++-
>>  drivers/pwm/pwm-stm32-lp.c                    | 219 +++++++++++++++---
>>  include/linux/mfd/stm32-lptimer.h             |  37 ++-
>>  8 files changed, 537 insertions(+), 40 deletions(-)
> 
> Is it just the Clocksource Ack that we're waiting on now?
> 
Hi Lee,

Yes,

Best Regards,
Fabrice
Lee Jones May 13, 2025, 10:14 a.m. UTC | #3
On Tue, 29 Apr 2025 14:51:26 +0200, Fabrice Gasnier wrote:
> This series adds support for STM32MP25 to MFD PWM, IIO, counter and
> clocksource low-power timer (LPTIM) drivers.
> This new variant is managed by using a new DT compatible string, hardware
> configuration and version registers.
> It comes with a slightly updated register set, some new features and new
> interconnect signals inside the SoC.
> Same feature list as on STM32MP1x is supported currently.
> The device tree files add all instances in stm32mp251 dtsi file.
> 
> [...]

Applied, thanks!

[1/7] dt-bindings: mfd: stm32-lptimer: add support for stm32mp25
      commit: 3f9ce9d0760ad68a9c20167664d026d91da66879
[2/7] mfd: stm32-lptimer: add support for stm32mp25
      commit: 4f8ceb0302b36c5f78bcc8d0e7cfa2372fba134c
[3/7] clocksource: stm32-lptimer: add support for stm32mp25
      commit: 5414bc8c57c41038b1994cd21a2cc0b8415c1544
[4/7] pwm: stm32-lp: add support for stm32mp25
      commit: 3f51b232c1da8e59eb562f1d81533334827a4799

--
Lee Jones [李琼斯]
Lee Jones May 13, 2025, 10:17 a.m. UTC | #4
On Tue, 13 May 2025, Lee Jones wrote:

> On Tue, 29 Apr 2025 14:51:26 +0200, Fabrice Gasnier wrote:
> > This series adds support for STM32MP25 to MFD PWM, IIO, counter and
> > clocksource low-power timer (LPTIM) drivers.
> > This new variant is managed by using a new DT compatible string, hardware
> > configuration and version registers.
> > It comes with a slightly updated register set, some new features and new
> > interconnect signals inside the SoC.
> > Same feature list as on STM32MP1x is supported currently.
> > The device tree files add all instances in stm32mp251 dtsi file.
> > 
> > [...]
> 
> Applied, thanks!
> 
> [1/7] dt-bindings: mfd: stm32-lptimer: add support for stm32mp25
>       commit: 3f9ce9d0760ad68a9c20167664d026d91da66879
> [2/7] mfd: stm32-lptimer: add support for stm32mp25
>       commit: 4f8ceb0302b36c5f78bcc8d0e7cfa2372fba134c
> [3/7] clocksource: stm32-lptimer: add support for stm32mp25
>       commit: 5414bc8c57c41038b1994cd21a2cc0b8415c1544
> [4/7] pwm: stm32-lp: add support for stm32mp25
>       commit: 3f51b232c1da8e59eb562f1d81533334827a4799

In future, please match the subject format with that expected by the
subsystem.  For this, `git log --oneline -- <subsystem>` is your friend.

I changed them all for you this time.

The above patches have been applied and submitted for build testing.
Once complete, I'll follow-up with an PR for the other maintainers to
pull from.

Note to self: ib-mfd-clocksource-pwm-6.16
Alexandre TORGUE May 14, 2025, 8:24 a.m. UTC | #5
Hi Fabrice

On 4/29/25 14:51, Fabrice Gasnier wrote:
> This series adds support for STM32MP25 to MFD PWM, IIO, counter and
> clocksource low-power timer (LPTIM) drivers.
> This new variant is managed by using a new DT compatible string, hardware
> configuration and version registers.
> It comes with a slightly updated register set, some new features and new
> interconnect signals inside the SoC.
> Same feature list as on STM32MP1x is supported currently.
> The device tree files add all instances in stm32mp251 dtsi file.
> 

Following patches are applied on stm32-next:

[PATCH v6 5/7] arm64: defconfig: enable STM32 LP timer clockevent driver
[PATCH v6 6/7] arm64: dts: st: add low-power timer nodes on stm32mp251
[PATCH v6 7/7] arm64: dts: st: use lptimer3 as tick broadcast source on 
stm32mp257f-ev1


Thanks
Alex