ARM: dts: rockchip: add adc button for Firefly
authorRandy Li <ayaka@soulik.info>
Tue, 30 May 2017 15:52:46 +0000 (23:52 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 1 Jun 2017 20:24:41 +0000 (22:24 +0200)
The only adc button connected to adc input is recovery button.

Signed-off-by: Randy Li <ayaka@soulik.info>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm/boot/dts/rk3288-firefly-reload.dts
arch/arm/boot/dts/rk3288-firefly.dtsi

index d0b3204..b11a282 100644 (file)
        model = "Firefly-RK3288-reload";
        compatible = "firefly,firefly-rk3288-reload", "rockchip,rk3288";
 
+       adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 1>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1800000>;
+
+               button-recovery {
+                       label = "Recovery";
+                       linux,code = <KEY_VENDOR>;
+                       press-threshold-microvolt = <0>;
+               };
+       };
+
        gpio-keys {
                compatible = "gpio-keys";
 
        status = "okay";
 };
 
+&saradc {
+       status = "okay";
+};
+
 &sdmmc {
        bus-width = <4>;
        cap-mmc-highspeed;
index 8647473..32dabae 100644 (file)
                reg = <0 0x80000000>;
        };
 
+       adc-keys {
+               compatible = "adc-keys";
+               io-channels = <&saradc 1>;
+               io-channel-names = "buttons";
+               keyup-threshold-microvolt = <1800000>;
+
+               button-recovery {
+                       label = "Recovery";
+                       linux,code = <KEY_VENDOR>;
+                       press-threshold-microvolt = <0>;
+               };
+       };
+
        dovdd_1v8: dovdd-1v8-regulator {
                compatible = "regulator-fixed";
                regulator-name = "dovdd_1v8";