From: Thierry Reding Date: Thu, 23 Feb 2017 17:30:51 +0000 (+0100) Subject: arm64: tegra: Add GPIO keys on P2771 X-Git-Tag: v4.12-rc1~52^2~11^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=59686a92782c38e0f8bd603fcfef3c6b5f307c97;p=thirdparty%2Fkernel%2Flinux.git arm64: tegra: Add GPIO keys on P2771 The P2771 has three keys (power, volume up and volume down) that are connected to pins on the AON GPIO controller. Acked-by: Jon Hunter Signed-off-by: Thierry Reding --- diff --git a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts index b80c1c3483db7..9a1d022286527 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts +++ b/arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts @@ -1,5 +1,7 @@ /dts-v1/; +#include + #include "tegra186-p3310.dtsi" / { @@ -13,6 +15,38 @@ vmmc-supply = <&vdd_sd>; }; + gpio-keys { + compatible = "gpio-keys"; + + power { + label = "Power"; + gpios = <&gpio_aon TEGRA_AON_GPIO(FF, 0) + GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + debounce-interval = <10>; + wakeup-source; + }; + + volume-up { + label = "Volume Up"; + gpios = <&gpio_aon TEGRA_AON_GPIO(FF, 1) + GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + debounce-interval = <10>; + }; + + volume-down { + label = "Volume Down"; + gpios = <&gpio_aon TEGRA_AON_GPIO(FF, 2) + GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + debounce-interval = <10>; + }; + }; + regulators { vdd_sd: regulator@100 { compatible = "regulator-fixed";