aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Armstrong <narmstrong@baylibre.com>2017-01-16 05:22:45 -0500
committerKevin Hilman <khilman@baylibre.com>2017-01-30 13:47:59 -0500
commit6b6a1867667a90f399762dc1ee6add5b4aa646c9 (patch)
tree088a6caf6429f57b4ae760e5e021d39022dc3bae
parentbd80ef5ed46233d90f216805ff40aba326ff1bdd (diff)
ARM64: dts: meson-gxbb-p200: add ADC laddered keys
Add the 5 buttons connected to a resistor laddered matrix and sampled by the SAR ADC channel 0. Only the p200 board has these buttons, the P201 doesn't. Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
-rw-r--r--arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts50
1 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts
index 03e3d76626dd..fc0e86cb4cde 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-p200.dts
@@ -45,10 +45,55 @@
45/dts-v1/; 45/dts-v1/;
46 46
47#include "meson-gxbb-p20x.dtsi" 47#include "meson-gxbb-p20x.dtsi"
48#include <dt-bindings/input/input.h>
48 49
49/ { 50/ {
50 compatible = "amlogic,p200", "amlogic,meson-gxbb"; 51 compatible = "amlogic,p200", "amlogic,meson-gxbb";
51 model = "Amlogic Meson GXBB P200 Development Board"; 52 model = "Amlogic Meson GXBB P200 Development Board";
53
54 avdd18_usb_adc: regulator-avdd18_usb_adc {
55 compatible = "regulator-fixed";
56 regulator-name = "AVDD18_USB_ADC";
57 regulator-min-microvolt = <1800000>;
58 regulator-max-microvolt = <1800000>;
59 };
60
61 adc_keys {
62 compatible = "adc-keys";
63 io-channels = <&saradc 0>;
64 io-channel-names = "buttons";
65 keyup-threshold-microvolt = <1800000>;
66
67 button-home {
68 label = "Home";
69 linux,code = <KEY_HOME>;
70 press-threshold-microvolt = <900000>; /* 50% */
71 };
72
73 button-esc {
74 label = "Esc";
75 linux,code = <KEY_ESC>;
76 press-threshold-microvolt = <684000>; /* 38% */
77 };
78
79 button-up {
80 label = "Volume Up";
81 linux,code = <KEY_VOLUMEUP>;
82 press-threshold-microvolt = <468000>; /* 26% */
83 };
84
85 button-down {
86 label = "Volume Down";
87 linux,code = <KEY_VOLUMEDOWN>;
88 press-threshold-microvolt = <252000>; /* 14% */
89 };
90
91 button-menu {
92 label = "Menu";
93 linux,code = <KEY_MENU>;
94 press-threshold-microvolt = <0>; /* 0% */
95 };
96 };
52}; 97};
53 98
54&i2c_B { 99&i2c_B {
@@ -56,3 +101,8 @@
56 pinctrl-0 = <&i2c_b_pins>; 101 pinctrl-0 = <&i2c_b_pins>;
57 pinctrl-names = "default"; 102 pinctrl-names = "default";
58}; 103};
104
105&saradc {
106 status = "okay";
107 vref-supply = <&avdd18_usb_adc>;
108};