diff --git a/arch/arm64/boot/dts/qcom/sc8180x-surface-pro-x.dts b/arch/arm64/boot/dts/qcom/sc8180x-surface-pro-x.dts index 91bf6480f0026..d16210a729f9b 100644 --- a/arch/arm64/boot/dts/qcom/sc8180x-surface-pro-x.dts +++ b/arch/arm64/boot/dts/qcom/sc8180x-surface-pro-x.dts @@ -8,6 +8,7 @@ /dts-v1/; #include +#include #include #include #include @@ -58,6 +59,23 @@ }; }; + gpio-keys-lid { + compatible = "gpio-keys"; + label = "Lid"; + + pinctrl-names = "default"; + pinctrl-0 = <&lid_default>; + + switch-lid { + label = "Lid"; + gpios = <&tlmm 121 GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + wakeup-source; + wakeup-event-action = ; + }; + }; + chosen { }; @@ -888,6 +906,14 @@ pins = "gpio10"; function = "edp_hot"; }; + + lid_default: lid-default-state { + pins = "gpio121"; + function = "gpio"; + + input-enable; + bias-disable; + }; }; &pmc8180a_gpios {