From patchwork Thu Dec 10 20:31:59 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karsten Merker X-Patchwork-Id: 7822241 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2FE8FBEEE1 for ; Thu, 10 Dec 2015 20:34:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E116204E7 for ; Thu, 10 Dec 2015 20:34:58 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42FB7205C2 for ; Thu, 10 Dec 2015 20:34:57 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1a77tx-0004KL-NZ; Thu, 10 Dec 2015 20:33:21 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a77th-0004Do-Du for linux-arm-kernel@lists.infradead.org; Thu, 10 Dec 2015 20:33:07 +0000 Received: from excalibur.cnev.de ([78.34.114.210]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0LalbM-1aVA6u1kzo-00kOVH; Thu, 10 Dec 2015 21:32:20 +0100 Received: from localhost ([127.0.0.1] helo=excalibur.cnev.de) by excalibur.cnev.de with esmtp (Exim 4.84) (envelope-from ) id 1a77st-0000Cs-TW; Thu, 10 Dec 2015 21:32:16 +0100 From: Karsten Merker To: Maxime Ripard , Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dev@linux-sunxi.org Subject: [PATCH 1/3] ARM: dts: sun7i: Olimex A20-SOM-EVB: Add LRADC keys Date: Thu, 10 Dec 2015 21:31:59 +0100 Message-Id: <1449779521-754-2-git-send-email-merker@debian.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1449779521-754-1-git-send-email-merker@debian.org> References: <1449779521-754-1-git-send-email-merker@debian.org> X-Provags-ID: V03:K0:XY2rGFILcRBN4aMq2h6f4ZqjXK1A5PfzsyVnvFct4uvtlX3ukbc cdCJJQPOEAdiOvzNIRx5cTkU5XUkkAn7OynVItgNNFV1xTzTsrSxVLtkjGmOTrypGkw8L52 TfGFFeR0TPz43S6x5coQtqIE8RanOoLhTBXaOQORxW+AX7yex58yoNg06aI4I/Hsl+PiuCN BXE+IKa+x5VaseaAmpeHA== X-UI-Out-Filterresults: notjunk:1; V01:K0:5V1rDxAnV/w=:S7eA6vHjhgqT7jyH1JxxIM /AySkJFVtXwF2QZdP2NRLAiadWA/LRrtmhfsH5rKoWR4TC4vYzJ1yY7UiXLIGQSXAfmtJSiAC WgNOA2oW6msqNgkehOw7qNId61I6CFoH74ly1f8/i/UIuVuZlF2ZN8lwpq6j137JBv0eu2EhK JpIRVRoF1lwKNLgy0v1jrtE8TvLdLvLqdnt3oq1vD1Si7BUfiiI+5DauAPYPpgEKy2GnXrRzs GrR7aGy0eB2BuO4xoFTLXbfZ90c56fkkt2u6XcQAVv7huZUk2sJKwEPVfgbCVxK3rNvOwXEk9 A74LqXF2WWkLNbQnw+qZ0cWhMA/L+V0beZNZazhH4TerafyQ+TOINqTaNDKrCUrazotTqslB+ RIrRCAjLRVuqz2fwuSi8oDRd80vdxy5efZHI3ApJYE5k41cc0V8lZ8OarE3Y2y7Djd/m8Vc34 +XRmJdEu7zKX/6jVuPuxlGk+G91Z3eFnbWNG8fOFabuQdN0+gIg7qew5wNeLZXsaf1pdYLVjY e/zHdiJl9E1Z8P89sbXdjcfQ5LUwY5BXDddh1H1eIMHuU9fVnlLpe8ATdg2vywxd/IhTUz7pk Cz3uAdKth+ld3jkug14zSpz+U06IhtGp4yjyPp6TVTKjEuT8hDIULXkzXNxzroV+mXHL4H9er q0vOdGb7EZH4GJXzT2mhLse7LBgzurF6fpA8RbEcPIxePO2uEM8Bxkv/OmMuniOgtGVc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151210_123306_050096_BC4933F9 X-CRM114-Status: GOOD ( 11.34 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Karsten Merker , Hans de Goede , Rob Herring , linux-kernel@vger.kernel.org, Ian Campbell MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 b7fe102..6562a6bc 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 @@ -110,6 +112,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>;