2023-01-20 19:06:00

by Doug Berger

[permalink] [raw]
Subject: [PATCH 5/6] dt-bindings: rtc: brcm,brcmstb-waketimer: add alarm interrupt

A second interrupt can optionally be specified for this device
to be used for generating RTC alarm interrupts.

Signed-off-by: Doug Berger <[email protected]>
---
.../bindings/rtc/brcm,brcmstb-waketimer.yaml | 22 ++++++++++++++++---
1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml b/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
index 9fe079917a98..a9199f299a68 100644
--- a/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
+++ b/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
@@ -11,7 +11,8 @@ maintainers:

description:
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.
+ ability to wake up the system from low-power suspend/standby modes and
+ optionally generate RTC alarm interrupts.

allOf:
- $ref: "rtc.yaml#"
@@ -24,8 +25,14 @@ properties:
maxItems: 1

interrupts:
- description: the TIMER interrupt
- maxItems: 1
+ minItems: 1
+ items:
+ - description: the TIMER interrupt
+ - description: the ALARM interrupt
+ description:
+ The TIMER interrupt wakes the system from low-power suspend/standby modes.
+ An ALARM interrupt may be specified to interrupt the CPU when an RTC alarm
+ is enabled.

clocks:
description: clock reference in the 27MHz domain
@@ -42,3 +49,12 @@ examples:
interrupt-parent = <&aon_pm_l2_intc>;
clocks = <&upg_fixed>;
};
+
+ - |
+ rtc@f041a080 {
+ compatible = "brcm,brcmstb-waketimer";
+ reg = <0xf041a080 0x14>;
+ interrupts-extended = <&aon_pm_l2_intc 0x04>,
+ <&upg_aux_aon_intr2_intc 0x08>;
+ clocks = <&upg_fixed>;
+ };
--
2.25.1


2023-01-21 19:26:18

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 5/6] dt-bindings: rtc: brcm,brcmstb-waketimer: add alarm interrupt

On 20/01/2023 20:01, Doug Berger wrote:
> A second interrupt can optionally be specified for this device
> to be used for generating RTC alarm interrupts.
>
> Signed-off-by: Doug Berger <[email protected]>
> ---
> .../bindings/rtc/brcm,brcmstb-waketimer.yaml | 22 ++++++++++++++++---
> 1 file changed, 19 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml b/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
> index 9fe079917a98..a9199f299a68 100644
> --- a/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
> +++ b/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.yaml
> @@ -11,7 +11,8 @@ maintainers:
>
> description:
> 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.
> + ability to wake up the system from low-power suspend/standby modes and
> + optionally generate RTC alarm interrupts.
>
> allOf:
> - $ref: "rtc.yaml#"
> @@ -24,8 +25,14 @@ properties:
> maxItems: 1
>
> interrupts:
> - description: the TIMER interrupt
> - maxItems: 1
> + minItems: 1
> + items:
> + - description: the TIMER interrupt
> + - description: the ALARM interrupt
> + description:
> + The TIMER interrupt wakes the system from low-power suspend/standby modes.
> + An ALARM interrupt may be specified to interrupt the CPU when an RTC alarm
> + is enabled.
>
> clocks:
> description: clock reference in the 27MHz domain
> @@ -42,3 +49,12 @@ examples:
> interrupt-parent = <&aon_pm_l2_intc>;
> clocks = <&upg_fixed>;
> };
> +
> + - |
> + rtc@f041a080 {
> + compatible = "brcm,brcmstb-waketimer";
> + reg = <0xf041a080 0x14>;
> + interrupts-extended = <&aon_pm_l2_intc 0x04>,
> + <&upg_aux_aon_intr2_intc 0x08>;
> + clocks = <&upg_fixed>;

Change of number of interrupts does not really justify new example. You
can squash it with previous example or just skip it.

Best regards,
Krzysztof