]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM64: dts: meson-gx: Add Buttons to Q200 and P230 boards
authorNeil Armstrong <narmstrong@baylibre.com>
Tue, 7 Mar 2017 10:40:22 +0000 (11:40 +0100)
committerKevin Hilman <khilman@baylibre.com>
Thu, 23 Mar 2017 03:46:51 +0000 (20:46 -0700)
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>
arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts

index 7663d6775823b6d16e38d404ac731ac369c2b7ca..f9fbfdad8ddef6ca5fc291fc40672254a2bf61c8 100644 (file)
 
 /dts-v1/;
 
+#include <dt-bindings/input/input.h>
+
 #include "meson-gxl-s905d.dtsi"
 #include "meson-gx-p23x-q20x.dtsi"
 
 / {
        compatible = "amlogic,p230", "amlogic,s905d", "amlogic,meson-gxl";
        model = "Amlogic Meson GXL (S905D) P230 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>;
+       };
 };
 
 /* P230 has exclusive choice between internal or external PHY */
@@ -77,3 +112,8 @@ external_phy: ethernet-phy@0 {
                max-speed = <1000>;
        };
 };
+
+&saradc {
+       status = "okay";
+       vref-supply = <&vddio_ao18>;
+};
index e6ac39b712b78397f7b631dfa7f676f0da039324..b65776b019118d21851b6fa59202a3b80aba9b6e 100644 (file)
 
 /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 @@ external_phy: ethernet-phy@0 {
                max-speed = <1000>;
        };
 };
+
+&saradc {
+       status = "okay";
+       vref-supply = <&vddio_ao18>;
+};