diff options
author | Neil Armstrong <narmstrong@baylibre.com> | 2017-03-07 13:40:22 +0300 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2017-03-23 06:46:51 +0300 |
commit | 82838e6f523aa02332318f09599474ed2ac4d134 (patch) | |
tree | 93946f244874160cfc5fc5380953a5b6dc82ba1a /arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | |
parent | 9ded9b0fa8dc3d039ded0f5a0bdc3f82eb4b9259 (diff) | |
download | linux-82838e6f523aa02332318f09599474ed2ac4d134.tar.xz |
ARM64: dts: meson-gx: Add Buttons to Q200 and P230 boards
This patch adds support for the P230 and Q200 ADC laddered button and
GPIO button.
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts')
-rw-r--r-- | arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts index e6ac39b712b7..b65776b01911 100644 --- a/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts +++ b/arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts @@ -43,12 +43,47 @@ /dts-v1/; +#include <dt-bindings/input/input.h> + #include "meson-gxm.dtsi" #include "meson-gx-p23x-q20x.dtsi" / { compatible = "amlogic,q200", "amlogic,s912", "amlogic,meson-gxm"; model = "Amlogic Meson GXM (S912) Q200 Development Board"; + + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 0>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1710000>; + + button-function { + label = "Update"; + linux,code = <KEY_VENDOR>; + press-threshold-microvolt = <10000>; + }; + }; + + gpio-keys-polled { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <100>; + + button@0 { + label = "power"; + linux,code = <KEY_POWER>; + gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + }; + }; + + vddio_ao18: regulator-vddio_ao18 { + compatible = "regulator-fixed"; + regulator-name = "VDDIO_AO18"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; }; /* Q200 has exclusive choice between internal or external PHY */ @@ -77,3 +112,8 @@ max-speed = <1000>; }; }; + +&saradc { + status = "okay"; + vref-supply = <&vddio_ao18>; +}; |