1 From ae5bd19ff96560fb75a75c7d2374bed60bbd9669 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Thu, 11 Nov 2021 10:24:02 +0000
4 Subject: [PATCH] overlays: Additional parameters for gpio-poweroff
6 The gpio-poweroff driver supports active-delay-ms and inactive-delay-ms
7 properties. Add parameters to set these parameters - active_delay_ms
10 See: https://forums.raspberrypi.com/viewtopic.php?t=323508
12 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
14 arch/arm/boot/dts/overlays/README | 7 +++++++
15 arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts | 2 ++
16 2 files changed, 9 insertions(+)
18 --- a/arch/arm/boot/dts/overlays/README
19 +++ b/arch/arm/boot/dts/overlays/README
20 @@ -1155,6 +1155,11 @@ Info: Drives a GPIO high or low on pow
21 or reboot). This also disables the ability to trigger a boot by driving
24 + The GPIO starts in an inactive state. At poweroff time it is driven
25 + active for 100ms, then inactive for 100ms, then active again. It is
26 + safe to remove the power at any point after the initial activation of
29 Users of this overlay are required to provide an external mechanism to
30 switch off the power supply when signalled - failure to do so results
31 in a kernel BUG, increased power consumption and undefined behaviour.
32 @@ -1170,6 +1175,8 @@ Params: gpiopin GPIO for
33 input Set if the gpio pin should be configured as
35 export Set to export the configured pin to sysfs
36 + active_delay_ms Initial GPIO active period (default 100)
37 + inactive_delay_ms Subsequent GPIO inactive period (default 100)
38 timeout_ms Specify (in ms) how long the kernel waits for
39 power-down before issuing a WARN (default 3000).
41 --- a/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts
42 +++ b/arch/arm/boot/dts/overlays/gpio-poweroff-overlay.dts
44 input = <&power_ctrl>,"input?";
45 export = <&power_ctrl>,"export?";
46 timeout_ms = <&power_ctrl>,"timeout-ms:0";
47 + active_delay_ms = <&power_ctrl>,"active-delay-ms:0";
48 + inactive_delay_ms = <&power_ctrl>,"inactive-delay-ms:0";