Broadcom STB wake-timer support
v2 cover Broadcom STB wake-timer support
Hi Alexandre,
This patch series adds support for the Broadcom STB wake-timer. This is a 27Mhz timer which allows the system to exit S2/S3/S5 sleep states when configured.
The wake-timer has has a long history within our internal/downstream tree, and Brian authored it in the first place, then Markus added the rtc bits, and then I cleaned it up for upstream.
Changes in v2:
- added Rob's Acked-by tag to the device tree binding patch
- removed dev_dbg() prints
- removed unnecessary initialization in .read_alarm callback
- rebase against latest rtc-next
Thanks!
Brian Norris (1):
rtc: brcmstb-waketimer: Add Broadcom STB wake-timer
Florian Fainelli (1):
dt-bindings: Document the Broadcom STB wake-up timer node
.../bindings/rtc/brcm,brcmstb-waketimer.txt | 22 ++ drivers/rtc/Kconfig | 11 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-brcmstb-waketimer.c | 345 +++++++++++++++++++++ 4 files changed, 379 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt create mode 100644 drivers/rtc/rtc-brcmstb-waketimer.c
Signature · 1 line
2.9.3
PATCH v2 1/2 dt-bindings: Document the Broadcom STB wake-up timer node
Document the binding for the Broadcom STB SoCs wake-up timer node allowing the system to generate alarms and exit low power states.
--- .../bindings/rtc/brcm,brcmstb-waketimer.txt | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt
Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt new file +22 -0
@@ -0,0 +1,22 @@ +Broadcom STB wake-up Timer + +The Broadcom STB wake-up timer provides a 27Mhz resolution timer, with the +ability to wake up the system from low-power suspend/standby modes. + +Required properties: +- compatible : should contain "brcm,brcmstb-waketimer" +- reg : the register start and length for the WKTMR block +- interrupts : The TIMER interrupt +- interrupt-parent: The phandle to the Always-On (AON) Power Management (PM) L2 + interrupt controller node +- clocks : The phandle to the UPG fixed clock (27Mhz domain) + +Example: + +waketimer at f0411580 { + compatible = "brcm,brcmstb-waketimer"; + reg = <0xf0411580 0x14>; + interrupts = <0x3>; + interrupt-parent = <&aon_pm_l2_intc>; + clocks = <&upg_fixed>; +};
Signature · 1 line
2.9.3
PATCH v2 2/2 rtc: brcmstb-waketimer: Add Broadcom STB wake-timer
In reply to Florian FainelliFrom: Brian Norris <[email protected]>
This adds support for the Broadcom STB wake-timer which is a timer in the chip's 27Mhz clock domain that offers the ability to wake the system (wake-up source) from suspend states (S2, S3, S5). It is supported using the rtc framework allowing us to configure alarms for system wake-up.
--- drivers/rtc/Kconfig | 11 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-brcmstb-waketimer.c | 325 ++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) create mode 100644 drivers/rtc/rtc-brcmstb-waketimer.c
drivers/rtc/Kconfig +11 -0
@@ -197,6 +197,17 @@ config RTC_DRV_AC100 This driver can also be built as a module. If so, the module will be called rtc-ac100. +config RTC_DRV_BRCMSTB + tristate "Broadcom STB wake-timer" + depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST + default ARCH_BRCMSTB || BMIPS_GENERIC + help + If you say yes here you get support for the wake-timer found on + Broadcom STB SoCs (BCM7xxx). + + This driver can also be built as a module. If so, the module will + be called rtc-brcmstb-waketimer. + config RTC_DRV_AS3722 tristate "ams AS3722 RTC driver" depends on MFD_AS3722
drivers/rtc/Makefile +1 -0
@@ -36,6 +36,7 @@ obj-$(CONFIG_RTC_DRV_AT91RM9200)+= rtc-at91rm9200.o obj-$(CONFIG_RTC_DRV_AT91SAM9) += rtc-at91sam9.o obj-$(CONFIG_RTC_DRV_AU1XXX) += rtc-au1xxx.o obj-$(CONFIG_RTC_DRV_BFIN) += rtc-bfin.o +obj-$(CONFIG_RTC_DRV_BRCMSTB) += rtc-brcmstb-waketimer.o obj-$(CONFIG_RTC_DRV_BQ32K) += rtc-bq32k.o obj-$(CONFIG_RTC_DRV_BQ4802) += rtc-bq4802.o obj-$(CONFIG_RTC_DRV_CMOS) += rtc-cmos.o
drivers/rtc/rtc-brcmstb-waketimer.c new file +325 -0
325 lines not on this page · raw message
Signature · 1 line
2.9.3
Re: [PATCH v2 2/2] rtc: brcmstb-waketimer: Add Broadcom STB wake-timer
Quoted 10 lines · Florian Fainelli
From: Brian Norris <[email protected]>
This adds support for the Broadcom STB wake-timer which is a timer in the chip's 27Mhz clock domain that offers the ability to wake the system (wake-up source) from suspend states (S2, S3, S5). It is supported using the rtc framework allowing us to configure alarms for system wake-up.
Signed-off-by Brian Norris <[email protected]>Signed-off-by Markus Mayer <[email protected]>Signed-off-by Florian Fainelli <[email protected]>
Quoted 7 lines
--- drivers/rtc/Kconfig | 11 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-brcmstb-waketimer.c | 325 ++++++++++++++++++++++++++++++++++++ 3 files changed, 337 insertions(+) create mode 100644 drivers/rtc/rtc-brcmstb-waketimer.c
Both applied, thanks.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com