clockevent: add low power STM32 timer
Subsystems (5)
v2 cover clockevent: add low power STM32 timer
This series add low power timer as boadcast clockevent device. Low power timer could runs even when CPUs are in idle mode and could wakeup them.
version 2:
- stm32 clkevent driver is now a child of the stm32 lp timer node
- add a probe function and adpat the driver to use regmap provide by it parent
- stop using timer_of helpers
- document the bindings inside stm32 lptimer yaml
Benjamin Gaignard (2):
dt-bindings: mfd: Document STM32 low power clkevent bindings
clocksource: Add Low Power STM32 timers driver
.../devicetree/bindings/mfd/st,stm32-lptimer.yaml | 14 ++ drivers/clocksource/Kconfig | 4 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-stm32-lp.c | 251 +++++++++++++++++++++ 4 files changed, 270 insertions(+) create mode 100644 drivers/clocksource/timer-stm32-lp.c
Signature · 1 line
2.15.0
PATCH v2 1/2 dt-bindings: mfd: Document STM32 low power clkevent bindings
Add a subnode to STM low power timer bindings to support clkevent driver
---
version 2:
- document the bindings inside stm32 lptimer yaml
.../devicetree/bindings/mfd/st,stm32-lptimer.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
Documentation/devicetree/bindings/mfd/st,stm32-lptimer.yaml +14 -0
@@ -81,6 +81,16 @@ patternProperties: required: - compatible + clkevent: + type: object + + properties: + compatible: + const: st,stm32-clkevent-lp + + required: + - compatible + required: - "#address-cells" - "#size-cells"
@@ -115,6 +125,10 @@ examples: counter { compatible = "st,stm32-lptimer-counter"; }; + + clkevent { + compatible = "st,stm32-clkevent-lp"; + }; }; ...
Signature · 1 line
2.15.0
PATCH v2 2/2 clocksource: Add Low Power STM32 timers driver
In reply to Benjamin GaignardFrom: Benjamin Gaignard <[email protected]>
Implement clock event driver using low power STM32 timers.
Low power timers counter s running even in when CPU is in stop mode. It could be used as clock event broadcaster to wake up CPUs but not like a clocksource because each it rise an interrupt the counter restart from 0.
---
version 2:
- stm32 clkevent driver is now a child of the stm32 lp timer node
- add a probe function and adpat the driver to use regmap provide by it parent
- stop using timer_of helpers
drivers/clocksource/Kconfig | 4 + drivers/clocksource/Makefile | 1 + drivers/clocksource/timer-stm32-lp.c | 251 +++++++++++++++++++++++++++++++++++ 3 files changed, 256 insertions(+) create mode 100644 drivers/clocksource/timer-stm32-lp.c
drivers/clocksource/Kconfig +4 -0
@@ -292,6 +292,10 @@ config CLKSRC_STM32 select CLKSRC_MMIO select TIMER_OF +config CLKSRC_STM32_LP + bool "Low power clocksource for STM32 SoCs" + depends on OF && ARM && (MACH_STM32MP157 || COMPILE_TEST) + config CLKSRC_MPS2 bool "Clocksource for MPS2 SoCs" if COMPILE_TEST depends on GENERIC_SCHED_CLOCK
drivers/clocksource/Makefile +1 -0
@@ -44,6 +44,7 @@ obj-$(CONFIG_BCM_KONA_TIMER) += bcm_kona_timer.o obj-$(CONFIG_CADENCE_TTC_TIMER) += timer-cadence-ttc.o obj-$(CONFIG_CLKSRC_EFM32) += timer-efm32.o obj-$(CONFIG_CLKSRC_STM32) += timer-stm32.o +obj-$(CONFIG_CLKSRC_STM32_LP) += timer-stm32-lp.o obj-$(CONFIG_CLKSRC_EXYNOS_MCT) += exynos_mct.o obj-$(CONFIG_CLKSRC_LPC32XX) += timer-lpc32xx.o obj-$(CONFIG_CLKSRC_MPS2) += mps2-timer.o
drivers/clocksource/timer-stm32-lp.c new file +251 -0
251 lines not on this page · raw message
Signature · 1 line
2.15.0