From patchwork Thu Jun 15 03:04:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guodong Xu X-Patchwork-Id: 9787921 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 2F6E66038E for ; Thu, 15 Jun 2017 03:07:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26D69283A6 for ; Thu, 15 Jun 2017 03:07:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1B7FC283DA; Thu, 15 Jun 2017 03:07:28 +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 A1104283C5 for ; Thu, 15 Jun 2017 03:07:27 +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=mrcA073G5L6FpZ0LeCqPcGbVhu shdfrQaultLENm2ToSdWIcElnTxLUe/rLf6OCZBGpf4fnWqYsVn9rYvdkz1wXaWtScTYE8ZLeLqLD Eh6QuU3KL88z4rQRonU5AzVoCDRlQs9HWmsJDHrOZEI1BR2+YXMpATNr/qTNM85K8DCvixrzbtxLK Qvybayfgnw58dHyKE0pq90ot1oEJ/MeF5iDKHcf1S9v/tn7ntWJbFrxecjBnkdxUr9May+pV6/qIk l3d8j+fNF32KAuj11W6OrgovJNqDeWpXswJ/3LIlWNaWyQP6vpPz2Pl334hBhLNVsJJKD6FYewvqY 395vA33A==; 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 1dLL82-0002up-GS; Thu, 15 Jun 2017 03:07:26 +0000 Received: from mail-pf0-x22d.google.com ([2607:f8b0:400e:c00::22d]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dLL7M-0001tV-JM for linux-arm-kernel@lists.infradead.org; Thu, 15 Jun 2017 03:06:51 +0000 Received: by mail-pf0-x22d.google.com with SMTP id x63so1360937pff.3 for ; Wed, 14 Jun 2017 20:06:24 -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=BNJq6Mr51UzTg0P2x8AfQ8aqxnzQttgO+vFAVokynyQGygpv03lqah52WBnqueawXh K6c7GnJUmAs1bKB9fSoySdkKUTdqkcB9r7lLNqyNZP8ExdPI51FEXTpXZXwR/wpiy7HX CYaiIPXvKxBm/Rcd+KArItIZ3u+RHPxfpSy+U= 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=rCg+DHKkcQw64B9zGKx22hsfXi3ABDrSvFUhNZ/LNGnJDM40WHU/RrYANwyfjEuavJ C19QvilX0X59nsY27YP4UVbJrVMBiWuLy8XpumwlKw6j55q6tAzevOKvZ+LEr/zp7dxJ J3gr0PzkXgfsZt6irJfQW9y1lp4fDOqRQgsZPMVn+z5GqQPvJakUeGQsraVxNrNBiK2q o11TjYeWbsOUterp1wVVlHVPL5IXWq0KTMfUCL132Cz9/ct7TQf9EL+zQ3jy7PaS+4Rt Sfi+J/7EkNVfLB7uapfCl3WDA8G+j4JKXISQ8TyU3/QRx6ouQ6B1nYTe/2AzNnvDBj0o 5t0Q== X-Gm-Message-State: AKS2vOxenyIIjh6SBskL2zif54ldGepN+VOJgh0g8xVRA+lwRJ2Hfbk2 LPfNOSk7W4FWd1Xq X-Received: by 10.84.175.65 with SMTP id s59mr3604413plb.20.1497495983759; Wed, 14 Jun 2017 20:06:23 -0700 (PDT) Received: from localhost.localdomain ([45.56.159.17]) by smtp.gmail.com with ESMTPSA id y65sm2156656pgd.33.2017.06.14.20.06.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 20:06:23 -0700 (PDT) From: Guodong Xu To: lee.jones@linaro.org, robh+dt@kernel.org, mark.rutland@arm.com, xuwei5@hisilicon.com, catalin.marinas@arm.com, will.deacon@arm.com, lgirdwood@gmail.com, broonie@kernel.org, khilman@baylibre.com, arnd@arndb.de, gregory.clement@free-electrons.com, horms+renesas@verge.net.au, olof@lixom.net, thomas.petazzoni@free-electrons.com, yamada.masahiro@socionext.com, riku.voipio@linaro.org, treding@nvidia.com, krzk@kernel.org, eric@anholt.net, damm+renesas@opensource.se, ard.biesheuvel@linaro.org, linus.walleij@linaro.org, geert+renesas@glider.be Subject: [PATCH v4 10/20] arm64: dts: hi3660: add power key dts node Date: Thu, 15 Jun 2017 11:04:07 +0800 Message-Id: <20170615030417.14059-11-guodong.xu@linaro.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170615030417.14059-1-guodong.xu@linaro.org> References: <20170615030417.14059-1-guodong.xu@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170614_200645_159568_F759CE5B X-CRM114-Status: UNSURE ( 9.07 ) 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: devicetree@vger.kernel.org, Guodong Xu , hw.wangxiaoyin@hisilicon.com, linux-kernel@vger.kernel.org, John Stultz , linux-arm-kernel@lists.infradead.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 {