From patchwork Sun Feb 18 17:03:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Keeping X-Patchwork-Id: 10226835 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C2F10602CB for ; Sun, 18 Feb 2018 17:05:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1649287D4 for ; Sun, 18 Feb 2018 17:05:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5E8E2886D; Sun, 18 Feb 2018 17:05:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 45CAA287D4 for ; Sun, 18 Feb 2018 17:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=SPKiR3nDH0OInMpdFez7XpadAlv8m/wzgX/lJeNhrlU=; b=KoQT3B9btveOSWbiN83UNiR90d jY8/NdxRVLLjatkwM/iS/BivWKwvFGuTKXB4Z4qWQWT+Vi/bYNPiSQmWaBL0uu8sqn3EeZbqgpNb1 +nyZnJc01FBWwReBpPdrO7Z37bVgHHwGGEf5rERNXMggEyee09oLpL4G5iuQh+CqUpWjJIaMV+EZT a03vafHEETQiWmK5e7WVtxANKLeTxfos+fkuI+OXFRH68kM4imUJ1d/YPUbtEXttKmPsIjK8PllzF 7L4OO/o5lVLzrbUqjuzD9kv2j/ULumbPT/DRht9ihlyBFZvS/5v9obBszskU4N1OTNL1iJ7kW0uLc WkkYOsEg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1enSP8-0004bf-W3; Sun, 18 Feb 2018 17:05:34 +0000 Received: from dougal.metanate.com ([90.155.101.14] helo=metanate.com) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1enSNj-0002iZ-0f; Sun, 18 Feb 2018 17:04:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=simple/simple; d=metanate.com; s=stronger; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+NSfxl9yQEYmCDAQ+fLCP/QN1UVZlCuHIwNuwqVLpB4=; b=VPRqdbCn71JI/v2C9ouguQswsQ /hiieIbVxhK3hqZ4Kh528h32uZ+NkKvvS4DXTCx1kRL3q3UjVvz2p/IiuAibGvSIEWj/vRgF6F58a XjW2HMSXm8IXYjoINyRXv/IAhCECYKdcN5klLFaWVlDkeWxB6Nf8ssLOjPEhDAeyhBkoaVr+dKHYT ZaVUzkYBP0gMY4Vg2a90K6jNzAxtEFLspEGatd7JOFvTBboCANr3nmKSOFsq6m4iN/C0pUYVxcrUA kSbGtMHNx8a8VDkNU5mUeqOVC8JmwkfxO3x8BMv17jVkQF4BgcK576mAK9HBVp6LCdF0a0uTsj0Fm Yd3KEltA==; Received: from johnkeeping.plus.com ([81.174.171.191] helo=localhost.localdomain) by shrek.metanate.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1enSNO-0005wn-Mh; Sun, 18 Feb 2018 17:03:47 +0000 From: John Keeping To: Heiko Stuebner Subject: [PATCH 2/3] ARM: dts: rockchip: add recovery button for Rock2 Square Date: Sun, 18 Feb 2018 17:03:35 +0000 Message-Id: <20180218170336.31819-2-john@metanate.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180218170336.31819-1-john@metanate.com> References: <20180218170336.31819-1-john@metanate.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180218_090407_306586_33C788CA X-CRM114-Status: UNSURE ( 9.48 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-rockchip@lists.infradead.org, John Keeping , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The recovery button is connected to ADC1. This is the same setup as the Firefly board, but for Rock2 the power supply is connected on the module and all of the inputs are wired up to the edge connector, so use of the ADC depends on the carrier board. Signed-off-by: John Keeping --- arch/arm/boot/dts/rk3288-rock2-som.dtsi | 4 ++++ arch/arm/boot/dts/rk3288-rock2-square.dts | 17 +++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-rock2-som.dtsi b/arch/arm/boot/dts/rk3288-rock2-som.dtsi index b9c471fcbd42..51f36a1b698e 100644 --- a/arch/arm/boot/dts/rk3288-rock2-som.dtsi +++ b/arch/arm/boot/dts/rk3288-rock2-som.dtsi @@ -280,6 +280,10 @@ }; }; +&saradc { + vref-supply = <&vcc_18>; +}; + &tsadc { rockchip,hw-tshut-mode = <0>; /* tshut mode 0:CRU 1:GPIO */ rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */ diff --git a/arch/arm/boot/dts/rk3288-rock2-square.dts b/arch/arm/boot/dts/rk3288-rock2-square.dts index 6adeb331452f..0ea2a3a1fa51 100644 --- a/arch/arm/boot/dts/rk3288-rock2-square.dts +++ b/arch/arm/boot/dts/rk3288-rock2-square.dts @@ -50,6 +50,19 @@ stdout-path = "serial2:115200n8"; }; + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + + button-recovery { + label = "Recovery"; + linux,code = ; + press-threshold-microvolt = <0>; + }; + }; + gpio-keys { compatible = "gpio-keys"; @@ -281,6 +294,10 @@ }; }; +&saradc { + status = "okay"; +}; + &spdif { status = "okay"; };