From patchwork Thu May 25 08:18:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 9747943 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 F0CF960246 for ; Thu, 25 May 2017 08:22:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E39032656B for ; Thu, 25 May 2017 08:22:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7FDA2785D; Thu, 25 May 2017 08:22:08 +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 [65.50.211.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 CD24F2656B for ; Thu, 25 May 2017 08:22:07 +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=ZTD5RXwZ9rm2aU5Zl4WwhPXHV2zq651rHRfpXQ9wNhI=; b=QYvW0iMRSUVtn7m1Z26fqxAtnb 2Z8FhGAPnY54AUmMkRQ92RbKqR0zozwZdmprUytuHdDYLMrc+/XJmumg1WH/BGLq3gtfKLhwVXtyp ZGVHZXSXsfmP3Fir6m5J9S5P+nSRjdVPCrSEfTILke+7aNQC2bczwxDj+vLa4z4p6OJiSaCylDXUT UORAykQ3a44g/G3+FHfu0l+Cbz9t553CCrkJrTlyMh8NGL+ZVj3lMi6jE5wO3b5QxsHSuGXs+qlIh R9sXUQI0Pr9Fuy7Uq16uUjeEbIyvb851MOKzOFOvsPGI0Sp3NEr+kkDIkUse3HHtOuvAGzFb2u5vL 6PLNzc+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dDo22-0000JO-9t; Thu, 25 May 2017 08:22:06 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dDo0L-0007Ee-0H for linux-arm-kernel@bombadil.infradead.org; Thu, 25 May 2017 08:20:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; 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=X6/H86AoT9SYw5uZPqpjGBaeqytuolgQzVCEB6Bujm8=; b=dycz8kq5b/Ihe6t7lmkcMFV+y tYFzq+UEjwzKxgAFk2Py/6b9ndOhKUbkXrQzhtZZ66hVLYRoTtkzHKMnYmWOlXls3k3qSE8vg882V HGHiW1QdN5f3oKaOefyhAofj3EDNi/+nSStfXsCzv9eKnjencWv16zK3GtzV3/pNEjJnBYPWGCsPu aZ2AYJh8nxqglPbRCkx7BbPOlT8j+BzC0fmDXoaPwwmitv/bq8GrmoqFkn5f1rRsPFUSyaE9/4dZ7 cwYGN755jALC61lRTUXhZVslo6U0f0SeofrlShBvAjya65whQdZEErXyBv1ZsIuaJ4RXMIxWLQye9 djp2iQmoQ==; Received: from mail-pf0-x236.google.com ([2607:f8b0:400e:c00::236]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dDo0J-0001Jr-8s for linux-arm-kernel@lists.infradead.org; Thu, 25 May 2017 08:20:19 +0000 Received: by mail-pf0-x236.google.com with SMTP id n23so160518563pfb.2 for ; Thu, 25 May 2017 01:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X6/H86AoT9SYw5uZPqpjGBaeqytuolgQzVCEB6Bujm8=; b=b92Lwp6lRHcEC3hIVkMYZ+QdYRdiN5et963Kx9Ie/aCTfox4HrshbNeCEvjB+95jhR kfTp81unh6890oKFVlX9vD/B3gahTklAXVPrk0iFtAfIYoC9quwq3lZH3e/B1t4Bikkk WZ4dJiQuPaCQOtTwTkFzFL/MoI9620WcBB1DM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X6/H86AoT9SYw5uZPqpjGBaeqytuolgQzVCEB6Bujm8=; b=cVz5COmF9XodxN6UeDjqgONw4Gf5AECwWH3fn4vjioSMazq6D7u/JcNw3Orx/nvMsi skCo9CO5L9/1LTh5XplBRGzpNLcJ413FglUcbGaj8lNp9i9c9LBPVoLILIILUwNDIyge Dj8KpxOl658QkPrRJuvYvbfqFP8liO/mmrSL/7p1od0MXJqgQHNbrXvpij4ujdGHYbPB /HPowSngn75m7KdEyCeI3qVDwsIN4A+fkaPBtb6eRlCYrkqzWTft+4pXv+rAv8I5FR0P IwD/o+d5h9or91OQwpO396hi9K3l8eqirS2zGDLsdzU9+UhRJoroAg2zwHbx+re9oRZQ zXOA== X-Gm-Message-State: AODbwcCzefQVbh1tnBwU1KLR9gmg6yfKgKEjTW9i6jVm14qeIXj9KKkv HKIOlfVES7wyK0Y+ X-Received: by 10.84.225.130 with SMTP id u2mr47915658plj.91.1495700397967; Thu, 25 May 2017 01:19:57 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.56.159.222]) by smtp.gmail.com with ESMTPSA id b72sm11574470pfd.118.2017.05.25.01.19.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 25 May 2017 01:19:57 -0700 (PDT) From: Guodong Xu To: robh+dt@kernel.org, mark.rutland@arm.com, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, wangkefeng.wang@huawei.com, xuejiancheng@hisilicon.com, peter.griffin@linaro.org, puck.chen@hisilicon.com Subject: [PATCH v2 10/12] arm64: dts: hi3660: add power key dts node Date: Thu, 25 May 2017 16:18:52 +0800 Message-Id: <20170525081854.4701-11-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170525081854.4701-1-guodong.xu@linaro.org> References: <20170525081854.4701-1-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170525_042019_412175_DABE4776 X-CRM114-Status: GOOD ( 10.28 ) 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: devicetree@vger.kernel.org, Guodong Xu , linux-kernel@vger.kernel.org, John Stultz , linux-arm-kernel@lists.infradead.org, zhangfei.gao@linaro.org, Chen Jun 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 From: Chen Jun We use gpio_034 as power key on hikey960, and set gpio with pull-up state, when key press the voltage on the gpio will come to lower, and power key event will be reported. Signed-off-by: Chen Jun Signed-off-by: John Stultz Signed-off-by: Guodong Xu --- arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts index c25fff9..7aac35b 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts @@ -10,6 +10,8 @@ #include "hi3660.dtsi" #include "hikey960-pinctrl.dtsi" #include +#include +#include / { model = "HiKey960"; @@ -34,6 +36,19 @@ /* rewrite this at bootloader */ reg = <0x0 0x0 0x0 0x0>; }; + + keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>; + + power { + wakeup-source; + gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; + label = "GPIO Power"; + linux,code = ; + }; + }; }; &i2c0 {