From patchwork Wed Jun 14 08:23:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 105475 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp180280qgd; Wed, 14 Jun 2017 01:25:13 -0700 (PDT) X-Received: by 10.84.216.93 with SMTP id f29mr3693430plj.297.1497428713820; Wed, 14 Jun 2017 01:25:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497428713; cv=none; d=google.com; s=arc-20160816; b=NLJZsqiGGI7p5PjaPJlg8A3QvWMGhafiifpGG5SsYkGh1/CNUoalmhn/rW1L0ZsXG/ WH5HPFkHSCisVCfe/d31bgO74iGho+2Lpr4ep51glYeih5F++hX6KfcTx9Yf0uNs5K6r 52FieoMmYYy0qtVgD7cGPyl2h0Ow7Pn6PL8BeRVihRLsUtiaUpIbkShrm01qf6oyEvX2 xTma7Og8SbQlNK7ur3Eqr3ogJoTlbRJlX8DEtr/kQCnp6Aw40Gzwfq+eiqXS6qCSo7SG 4V1sDicKzR91GrXSKektXqEI3qQIcIvFHsl4rVb3gqM+Hj2dY73+f5ddCEjcyCZUGqTA YzMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=Tc7X27Au8ddnZ54jPJ/PqZqGXGoqfxSEw96S0/te/AU=; b=msi9M1W/bsDqaY+nkrgWGb3+TWQsibWV0kyavfjPUbLPxaXo9o8TcKzjQQDA1GDVv9 qRJ8hibXicWOnP12z+WMDSaVzFufHnl6DAFNbOet4fCF00wUcpeQRthCSy1HkG3E50kc mJ6ApJ4YyV6I0TUYJbRnkKFvl59dU+SOoczQjAKp3FsEZBTzOrypjA4SpEsOIBNEzgdR 1zOPrxODpiIIGBOkHUSLx8pDOUYbb6vLkFnuaMf2xCXRI2sXhXOJGyFrG1DTounlBjP1 MDzVOXZd0J9xciCPeLYDFvg22KDtOFFUiIk+ba1pXpCvWNFozD0/xGo8/3/Df7pOU/gW R3UQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=es4v5Bw3; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b74si170544pfc.93.2017.06.14.01.25.13; Wed, 14 Jun 2017 01:25:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=es4v5Bw3; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754295AbdFNIZL (ORCPT + 7 others); Wed, 14 Jun 2017 04:25:11 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:34388 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754396AbdFNIZA (ORCPT ); Wed, 14 Jun 2017 04:25:00 -0400 Received: by mail-pg0-f54.google.com with SMTP id v18so72590404pgb.1 for ; Wed, 14 Jun 2017 01:24:55 -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=es4v5Bw32N1KlD4l5FjYpj0iiB8Rq0ETEkcpkuWVmd1ynPFNbFuNNXK3RWRU9h5Pz/ StbCMUz+MVbZWoFLacKwPIRtxU8xgLDt+xuiiaoHkhVWbrlOpiAtBIKLAkVOk7tZu4DX GKKtqB7Hjopx/KwKkcvOKWgQiSzVT9eHKhb+I= 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=fedpv7bsV9MTBOdN49ZEv3QZjqXVy2zFpzDAdyNFtpSQiRJDXdOWgqv6hX71OmAkYX gs5+WbuXg9NMWVEkpXmJpCHnV8fl679bUTK/luCjK++qZDXu6BOH25g0Q9txXScwPp4j QjmEKYFo7TKVbfBqs35lYD0tFOwSJa/4+bmQ4xQmifzGMMFzLLQGpR56NS2Glf6p7/lv JrWLPQuHTc9Ji/4zFuQ6zeqgo63K1wLvsq7Q7AxR7FFsBQrYQ3wDKnI3As+vAEdqaX9C rmQhrrq//AXUur5Uf24DAYpDiqlsdU82K7Nn3ZQG83/RRqhppGJYuDPjkzugEK7Rfynx 8jfg== X-Gm-Message-State: AKS2vOyVlXtfnyrsCCr0hCXfx/cvOFChKbRj7ZM6We9DyF7HCJ3dHU4g Yew+U4UP76ihgbr2 X-Received: by 10.84.238.129 with SMTP id v1mr3761439plk.102.1497428694713; Wed, 14 Jun 2017 01:24:54 -0700 (PDT) Received: from docularxu-ThinkPad-T440p.219.146.1.66 ([45.56.159.99]) by smtp.gmail.com with ESMTPSA id h14sm766802pfh.71.2017.06.14.01.24.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 01:24:54 -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, lee.jones@linaro.org, ulf.hansson@linaro.org, bhelgaas@google.com, arnd@arndb.de Cc: zhangfei.gao@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-pci@vger.kernel.org, Chen Jun , John Stultz , Guodong Xu Subject: [PATCH v3 10/21] arm64: dts: hi3660: add power key dts node Date: Wed, 14 Jun 2017 16:23:27 +0800 Message-Id: <20170614082338.15673-11-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170614082338.15673-1-guodong.xu@linaro.org> References: <20170614082338.15673-1-guodong.xu@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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(+) -- 2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 {