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: 9785967 X-Patchwork-Delegate: bhelgaas@google.com 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 BF13C60384 for ; Wed, 14 Jun 2017 09:53:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95A94205AB for ; Wed, 14 Jun 2017 09:53:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89936285C3; Wed, 14 Jun 2017 09:53:41 +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=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AE15205AB for ; Wed, 14 Jun 2017 09:53:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751820AbdFNJxj (ORCPT ); Wed, 14 Jun 2017 05:53:39 -0400 Received: from mail-pg0-f46.google.com ([74.125.83.46]:32964 "EHLO mail-pg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754644AbdFNIYz (ORCPT ); Wed, 14 Jun 2017 04:24:55 -0400 Received: by mail-pg0-f46.google.com with SMTP id f185so72595831pgc.0 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=kpywa+Urt+DHKrJBxV2wdgVe9i0B4eRFNJLg4Qw8WnuEl6P1fqyX58cgAhsrHoHYuZ Kszp7eQIgXiJlkAP4QRYq+vpoVCV5HtOXs/7Xc18cp1w34zrbNVt3fhWC5rjhuHlLxUs XHZY1LrE9CJYXoUHtWQCqmWkHwBiSXw9Xj+itWf85TO5O97IDGlQ2vJGB0w4aB9OnveJ kpjqpR+DeOHUcOuhGJqCx7abaBGRg488+qqx1lWhR8pgpS3dN8fwBepqGXPS8QtuNfzQ +W6cRaI6ynjcjCsFwd6dTFgqkiVybG5v/NqUTcKoZg6MZB3fr/ZPpoCTADmwcz8vp8sf 0z4w== X-Gm-Message-State: AKS2vOxDrgJU6zcEoSuurGmo2RZDTyiMA04gFpVouZ6S9f1DnAhDJwN9 8reDFb/0L1KvYkCp 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: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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 {