diff mbox series

[2/2] mvebu: LS421DE: use the RTC as a wakeup source

Message ID 6133600.ifz057I5f4@tool
State Accepted
Delegated to: Petr Štetiar
Headers show
Series [1/2] kernel: rtc: rs5c372: fix alarm support | expand

Commit Message

Daniel González Cabanelas Nov. 24, 2020, 3:06 p.m. UTC
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>
---
 .../mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts
index e804665792..b63d84379b 100644
--- a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts
+++ b/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts
@@ -226,6 +226,7 @@ 
 	rs5c372a: rs5c372a@32 {
 		compatible = "ricoh,rs5c372a";
 		reg = <0x32>;
+		wakeup-source;
 	};
 };