Add the power button as a gpio-keys KEY_POWER button, and mark it as a wakeup source so it can be used under the OS both as a 'sleep' and as a 'wake' button.
Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org> --- Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts index 6ae7d5f300b6..d2cd7ef90e6f 100644 --- a/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts +++ b/Silicon/Socionext/SynQuacer/DeviceTree/DeveloperBox.dts @@ -15,9 +15,23 @@ #include "SynQuacer.dtsi" +#define KEY_POWER 116 + / { model = "Socionext Developer Box"; compatible = "socionext,developer-box", "socionext,synquacer"; + + gpio-keys { + compatible = "gpio-keys"; + interrupt-parent = <&exiu>; + + power { + label = "Power Button"; + linux,code = <KEY_POWER>; + interrupts = <GIC_SPI 120 IRQ_TYPE_EDGE_FALLING>; + wakeup-source; + }; + }; }; &gpio { -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel