From 15228f04de82c2f6d893926423b71c9ce8c4200e Mon Sep 17 00:00:00 2001 From: Karsten Merker Date: Thu, 10 Dec 2015 21:31:59 +0100 Subject: [PATCH] ARM: dts: sun7i: Olimex A20-SOM-EVB: Add LRADC keys The Olimex A20-SOM-EVB is an evaluation board for the Olimex A20-SOM system-on-module. It provides a set of android-style buttons (labeled "VOL+", "VOL-", "MENU", "SEARCH", "HOME", "ESC" and "ENTER") which are connected to a low-resolution ADC via a resistor network. This patch adds appropriate button definitions to the board dts. The voltages assigned to the keys are specified in the board schematics published by the manufacturer. Signed-off-by: Karsten Merker Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts | 56 ++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts b/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts index a91879e..beccb25 100644 --- a/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts +++ b/arch/arm/boot/dts/sun7i-a20-olimex-som-evb.dts @@ -1,5 +1,6 @@ /* * Copyright 2015 - Marcus Cooper + * Copyright 2015 - Karsten Merker * * This file is dual-licensed: you can use it either under the terms * of the GPL or the X11 license, at your option. Note that this dual @@ -45,6 +46,7 @@ #include "sunxi-common-regulators.dtsi" #include +#include #include #include @@ -114,6 +116,60 @@ }; }; +&lradc { + vref-supply = <®_vcc3v0>; + status = "okay"; + + button@190 { + label = "Volume Up"; + linux,code = ; + channel = <0>; + voltage = <190000>; + }; + + button@390 { + label = "Volume Down"; + linux,code = ; + channel = <0>; + voltage = <390000>; + }; + + button@600 { + label = "Menu"; + linux,code = ; + channel = <0>; + voltage = <600000>; + }; + + button@800 { + label = "Search"; + linux,code = ; + channel = <0>; + voltage = <800000>; + }; + + button@980 { + label = "Home"; + linux,code = ; + channel = <0>; + voltage = <980000>; + }; + + button@1180 { + label = "Esc"; + linux,code = ; + channel = <0>; + voltage = <1180000>; + }; + + button@1400 { + label = "Enter"; + linux,code = ; + channel = <0>; + voltage = <1400000>; + }; +}; + &mmc0 { pinctrl-names = "default"; pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin_reference_design>; -- 2.7.4