mvebu: LS421DE: use the RTC as a wakeup source
authorDaniel González Cabanelas <dgcbueu@gmail.com>
Tue, 24 Nov 2020 15:06:52 +0000 (16:06 +0100)
committerPetr Štetiar <ynezz@true.cz>
Tue, 22 Dec 2020 17:59:10 +0000 (18:59 +0100)
The Buffalo Linkstation LS421DE comes with a Ricoh RS5C372A real time
clock. This RTC has the INTRA pin connected to the power management
circuit, allowing to wake up the device from the power off state when an
alarm is scheduled.

Add the "wakeup-source" property in the RTC dts node to allow the use
of the alarm.

Example of use, the device is powered off and it comes to life after 5
minutes:
echo $(expr $(date '+%s') + 60 * 5) > /sys/class/rtc/rtc0/wakealarm
poweroff

This feature isn't available in the stock firmware.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts

index 2a76649ec4fd57301bcf0c4119f8842fec86ed4e..dee271541e3acee3e355e902c1b98087fd84c41d 100644 (file)
        rs5c372a: rs5c372a@32 {
                compatible = "ricoh,rs5c372a";
                reg = <0x32>;
+               wakeup-source;
        };
 };