Skip to content

Commit

Permalink
arm64: tegra: Add gpio-keys nodes for Smaug
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rhyland Klein authored and Thierry Reding committed Apr 11, 2016
1 parent 0e91ba4 commit a26f396
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions arch/arm64/boot/dts/nvidia/tegra210-smaug.dts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/dts-v1/;

#include <dt-bindings/input/input.h>

#include "tegra210.dtsi"

/ {
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit a26f396

Please sign in to comment.