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: 10226833 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 814B4602CB for ; Sun, 18 Feb 2018 17:05:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F23C2886D for ; Sun, 18 Feb 2018 17:05:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63CB828879; Sun, 18 Feb 2018 17:05:39 +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 0D1832886D for ; Sun, 18 Feb 2018 17:05:38 +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=1m8DqSdXKnyQRh+3Or6NSAyCr3MiJdlp4wYc5wihiUo=; b=thc6buwDv4MtZM/7m9jAY6geeJ mPdXTUpE5fxG7E9UjlOJ5gJEUPcvUJ03KYVbF9XUQfpFt9rAE2zaTe8hgQc+p8RP9Inj4WJMPJAGr 4YR66zvC9MpY20mFL30x8RIzrqVtMh2DKWIuHqI3jnWi/w+6R6/9vw/NsTGwMK+BNAYE9wbxYYZcC jw9MncPbES/INtbHKhvZqppn4t8XKrUcGdgnVIxjJ633eQJnMBKEZBADd8kdYuYHPh55QRdF4RfQ3 5ZFXr96svI41iPYL3KaAFp+/ZqcHjnZgBOuXn7rgRbMhTN7sTS5swa5MNvkd6vAp040V8KpRHpuco hTwP6AeA==; 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 1enSP5-0004Rf-NF; Sun, 18 Feb 2018 17:05:31 +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-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms 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-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=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"; };