Re: [PATCH v2 6/8] dt-bindings: rtc: Add linux,wakeup-states

From: Krzysztof Kozlowski

Date: Mon Nov 23 2026 - 05:48:23 EST


On Mon, Nov 16, 2026 at 12:25:05AM +0000, Igor Velkov wrote:
> A board can have more than one RTC with an alarm that wakes the system,
> for example an I2C RTC next to an RTC in the PMIC or the SoC firmware.
> Which of them wakes the system depends on the sleep state and on the
> board's firmware: amlogic,meson-vrtc is a register the firmware reads
> when the application processors suspend, so it wakes the system from
> deep sleep only, and whether an I2C RTC wakes the system from deep
> sleep depends on the firmware handling its interrupt line.
>
> Add linux,wakeup-states to describe this per RTC: the suspend states an
> alarm of the RTC wakes the system from, named as in /sys/power/mem_sleep,
> or none for an RTC whose alarm wakes the system from no suspend state.
>
> List it in nxp,pcf8563.yaml and amlogic,meson-vrtc.yaml, which do not
> allow unlisted properties.
>
> Signed-off-by: Igor Velkov <iav@xxxxxx>
> ---
> .../devicetree/bindings/rtc/amlogic,meson-vrtc.yaml | 2 ++
> Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml | 2 ++
> Documentation/devicetree/bindings/rtc/rtc.yaml | 17 +++++++++++++++++
> 3 files changed, 21 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml b/Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml
> index a89865fa676a..51cce4b2a7ff 100644
> --- a/Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/amlogic,meson-vrtc.yaml
> @@ -30,6 +30,8 @@ properties:
> reg:
> maxItems: 1
>
> + linux,wakeup-states: true
> +
> required:
> - compatible
> - reg
> diff --git a/Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml b/Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml
> index 22909a96123e..e464432e4690 100644
> --- a/Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml
> +++ b/Documentation/devicetree/bindings/rtc/nxp,pcf8563.yaml
> @@ -32,6 +32,8 @@ properties:
> interrupts:
> maxItems: 1
>
> + linux,wakeup-states: true
> +
> start-year: true
> wakeup-source: true
>
> diff --git a/Documentation/devicetree/bindings/rtc/rtc.yaml b/Documentation/devicetree/bindings/rtc/rtc.yaml
> index e46d50b1063e..54f41858dda4 100644
> --- a/Documentation/devicetree/bindings/rtc/rtc.yaml
> +++ b/Documentation/devicetree/bindings/rtc/rtc.yaml
> @@ -26,6 +26,23 @@ properties:
> 0: not chargeable
> 1: chargeable
>
> + linux,wakeup-states:
> + $ref: /schemas/types.yaml#/definitions/string-array

This looks exactly like re-implementing system-idle-states.yaml and wakeup-source.

Best regards,
Krzysztof