1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/power/reset/gpio-poweroff.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: GPIO controlled power off 8 9maintainers: 10 - Sebastian Reichel <sre@kernel.org> 11 12description: > 13 System power off support via a GPIO line. When a shutdown is 14 executed the operating system is expected to switch the GPIO 15 from inactive to active. After a delay (active-delay-ms) it 16 is expected to be switched back to inactive. After another 17 delay (inactive-delay-ms) it is configured as active again. 18 Finally the operating system assumes the power off failed if 19 the system is still running after waiting some time (timeout-ms). 20 21properties: 22 compatible: 23 const: gpio-poweroff 24 25 gpios: 26 maxItems: 1 27 28 input: 29 type: boolean 30 description: > 31 Initially configure the GPIO line as an input. Only reconfigure 32 it to an output when the power-off sequence is initiated. If this optional 33 property is not specified, the GPIO is initialized as an output in its inactive state. 34 35 active-delay-ms: 36 default: 100 37 description: Delay to wait after driving gpio active 38 39 inactive-delay-ms: 40 default: 100 41 description: Delay to wait after driving gpio inactive 42 43 timeout-ms: 44 default: 3000 45 description: Time to wait before assuming the power off sequence failed. 46 47required: 48 - compatible 49 - gpios 50 51additionalProperties: false 52 53examples: 54 - | 55 gpio-poweroff { 56 compatible = "gpio-poweroff"; 57 gpios = <&gpio 4 0>; 58 timeout-ms = <3000>; 59 }; 60