diff options
author | Rhyland Klein <rklein@nvidia.com> | 2016-03-03 20:54:25 +0100 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-04-11 15:39:25 +0200 |
commit | a26f3963d980ff0d5a33a01b9a93c80b9d370835 (patch) | |
tree | b193312dafa8607613e76a9917316ccd5d30dbee /arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | |
parent | arm64: tegra: Enable power and volume keys on Jetson TX1 (diff) | |
download | linux-a26f3963d980ff0d5a33a01b9a93c80b9d370835.tar.xz linux-a26f3963d980ff0d5a33a01b9a93c80b9d370835.zip |
arm64: tegra: Add gpio-keys nodes for Smaug
Add gpio-keys nodes for the volumn controls, lid switch, tablet mode and
power button.
Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
[treding@nvidia.com: use symbolic names for input types and codes]
[treding@nvidia.com: use wakeup-source instead of gpio-key,wakeup]
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'arch/arm64/boot/dts/nvidia/tegra210-smaug.dts')
-rw-r--r-- | arch/arm64/boot/dts/nvidia/tegra210-smaug.dts | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts index e687f68149c5..89d16e09c2d7 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts +++ b/arch/arm64/boot/dts/nvidia/tegra210-smaug.dts @@ -1,5 +1,7 @@ /dts-v1/; +#include <dt-bindings/input/input.h> + #include "tegra210.dtsi" / { @@ -76,6 +78,47 @@ }; }; + gpio-keys { + compatible = "gpio-keys"; + gpio-keys,name = "gpio-keys"; + + power { + label = "Power"; + gpios = <&gpio TEGRA_GPIO(X, 5) GPIO_ACTIVE_LOW>; + linux,code = <KEY_POWER>; + debounce-interval = <30>; + wakeup-source; + }; + + lid { + label = "Lid"; + gpios = <&gpio TEGRA_GPIO(B, 4) GPIO_ACTIVE_LOW>; + linux,input-type = <EV_SW>; + linux,code = <SW_LID>; + wakeup-source; + }; + + tablet_mode { + label = "Tablet Mode"; + gpios = <&gpio TEGRA_GPIO(Z, 2) GPIO_ACTIVE_HIGH>; + linux,input-type = <EV_SW>; + linux,code = <SW_TABLET_MODE>; + wakeup-source; + }; + + volume_down { + label = "Volume Down"; + gpios = <&gpio TEGRA_GPIO(X, 7) GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEDOWN>; + }; + + volume_up { + label = "Volume Up"; + gpios = <&gpio TEGRA_GPIO(M, 4) GPIO_ACTIVE_LOW>; + linux,code = <KEY_VOLUMEUP>; + }; + }; + psci { compatible = "arm,psci-1.0"; method = "smc"; |