Received: by 10.192.165.156 with SMTP id m28csp157237imm; Sun, 15 Apr 2018 19:43:12 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/5gjjvJ5ZQ2B2fYVaJf5B0ja58+Xs/zstddyjffgZQyQcajbNucyiU3O4hhfYLNmTVCFFf X-Received: by 2002:a17:902:8a81:: with SMTP id p1-v6mr14066391plo.183.1523846592717; Sun, 15 Apr 2018 19:43:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523846592; cv=none; d=google.com; s=arc-20160816; b=y0QsJr75sg/N0eIwPHw+u35Iz7hlPEkA53T22iEGLrUdjYguO7BlZeJ09i2uhVPUyG EL7qotYs6k8aRL+3lduAdt/iZBlK/4rpyZldwnyBDdyDxeMhAfIej1xPfznHygRwjXfs zK+RvS99i7TcLcr+Lf0vbgo/4BEgDhjx+pza7ofBtR7M6hca6Yi5Zd014d6yB2ZTVMDu pvQ12w09aBks1BPBYXn5txPFRSrWJWQQsPVzLLOucPPqjIkeOEmt6b9EOAGpzPxuoJWS HQpeTp8SwJA9PNVZGECEmmISjVWrHBaxhqCB49UO+B4YOiNp3Rml/iG+Rk7pm5DT/He+ 2AnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=2xD7531NSQgnnEsTGbc86fAdC93TdYhBr661G8cuI98=; b=D5XjhPU6T+sCK4ZPHvAqe+qP6dq1vQDIKcvUpXIBy+wrVF6xbMWgTSpukput9gQYXG 7G/StiCQW2Qe4HyTKNW7562V9nT3vDVC0b6+/G2c24Cs/tDgHCXZInZSgnn9qBKfdJ72 ulFuBXDDIoV4lKXE3KJgPP5EQ1tpnsmw4oHq5Jkc3mFwbsP4SwaNeubTLuffwfzBxNx3 pudj4pozyFM5sjcBbKbGJUCnPNSJqbnTkxOss/uTle9NJU/arqTxWA+0DdG4fvsbIXus phd56n5BVzaFBgJ0t8WLI290nPAtcuFKjd2p4VYiWsmE00f6SrXeUon+8PF65Ae4+lgO jKAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jgh+aiD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (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 k2si5688225pgs.4.2018.04.15.19.42.58; Sun, 15 Apr 2018 19:43:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jgh+aiD0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752755AbeDPCku (ORCPT + 99 others); Sun, 15 Apr 2018 22:40:50 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:35570 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752212AbeDPCks (ORCPT ); Sun, 15 Apr 2018 22:40:48 -0400 Received: by mail-pl0-f66.google.com with SMTP id 61-v6so9185954plb.2 for ; Sun, 15 Apr 2018 19:40:48 -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; bh=2xD7531NSQgnnEsTGbc86fAdC93TdYhBr661G8cuI98=; b=Jgh+aiD08LdRf+rXg7ASHJauaxo0vW1fCc+8SFiko8b3zSc6IM5AS6HmcsnROb4zjv N7zi8xSE4SrFHbf9fOcnQ7Hhwpyb4CBv7+aHiUG4vCGgrRBBoTRQFuCcrGzn0i6OEvcM tMoYt/Vdrpo7sDga5JE0nAvE5ANT2GG2a3c+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; bh=2xD7531NSQgnnEsTGbc86fAdC93TdYhBr661G8cuI98=; b=qNusuduh37Ramj5lAPhffxuP7yew3mVdZ7QxPOZYhTyaa+IoDVvNEHp+Ic53NMnqaR T6Adk0RQXMb2JZcY52qv7vB8ei6hw/juhUIE2vGOrNk0zlZoegnkxr5blGjlM27tkrct vle6QYTL2DAFWZ35VVpI7AT78iklzLdPzOKYKKz1VFXtw/EtSz5gQeLDLpi726EF5p76 403Tisy11AYaojj6pF/1gKa5Rn8WxNr/TfTEoV9mvO341edA3zYI8pw1cHNoDSwNFzVx U8g9vbIZmRe2yCTzdzsDpIHkmiT2AIaH7GSAcaTCa6oDtN1hGs8/JT1/nPmqRVgIWcfZ zIKQ== X-Gm-Message-State: ALQs6tCMIfQBXUfk7B7XXj6qBCxN+s2vC7xzMfaoFfVRm1QTl6hUWk2j qqhZGJcZk9n462EQpM4priw0cxFYc4Q= X-Received: by 2002:a17:902:9a90:: with SMTP id w16-v6mr3180259plp.390.1523846447847; Sun, 15 Apr 2018 19:40:47 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id k70sm20920418pga.72.2018.04.15.19.40.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Apr 2018 19:40:47 -0700 (PDT) From: Baolin Wang To: robh+dt@kernel.org, mark.rutland@arm.com, catalin.marinas@arm.com, will.deacon@arm.com, arnd@arndb.de, orsonzhai@gmail.com, zhang.lyra@gmail.com Cc: devicetree@vger.kernel.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, broonie@kernel.org, baolin.wang@linaro.org Subject: [PATCH 1/2] arm64: dts: Add GPIO and GPIO keys device nodes Date: Mon, 16 Apr 2018 10:40:03 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch adds device nodes to enable one GPIO controller located on digital chip, 2 EIC (external interrupt controller) controllers loacted on PMIC and digital chip for Spreadtrum SC9860 platform. Moreover this patch adds 3 GPIO keys relied on EIC controller to support power key and volume up/down keys. Signed-off-by: Baolin Wang --- arch/arm64/boot/dts/sprd/sc2731.dtsi | 11 ++++++++ arch/arm64/boot/dts/sprd/sc9860.dtsi | 30 ++++++++++++++++++++ arch/arm64/boot/dts/sprd/whale2.dtsi | 50 ++++++++++++++++++++++++++++++++++ 3 files changed, 91 insertions(+) diff --git a/arch/arm64/boot/dts/sprd/sc2731.dtsi b/arch/arm64/boot/dts/sprd/sc2731.dtsi index 4331006..98d3b4f 100644 --- a/arch/arm64/boot/dts/sprd/sc2731.dtsi +++ b/arch/arm64/boot/dts/sprd/sc2731.dtsi @@ -24,6 +24,17 @@ interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; }; + pmic_eic: gpio@300 { + compatible = "sprd,sc27xx-eic"; + reg = <0x300>; + interrupt-parent = <&sc2731_pmic>; + interrupts = <5 IRQ_TYPE_LEVEL_HIGH>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + }; + regulators { compatible = "sprd,sc27xx-regulator"; diff --git a/arch/arm64/boot/dts/sprd/sc9860.dtsi b/arch/arm64/boot/dts/sprd/sc9860.dtsi index 5dbfb79..3066a55 100644 --- a/arch/arm64/boot/dts/sprd/sc9860.dtsi +++ b/arch/arm64/boot/dts/sprd/sc9860.dtsi @@ -7,6 +7,8 @@ */ #include +#include +#include #include "whale2.dtsi" / { @@ -679,5 +681,33 @@ }; }; }; + + gpio-keys { + compatible = "gpio-keys"; + + key-volumedown { + label = "Volume Down Key"; + linux,code = ; + gpios = <&eic_debounce 2 GPIO_ACTIVE_LOW>; + debounce-interval = <2>; + wakeup-source; + }; + + key-volumeup { + label = "Volume Up Key"; + linux,code = ; + gpios = <&pmic_eic 10 GPIO_ACTIVE_HIGH>; + debounce-interval = <2>; + wakeup-source; + }; + + key-power { + label = "Power Key"; + linux,code = ; + gpios = <&pmic_eic 1 GPIO_ACTIVE_HIGH>; + debounce-interval = <2>; + wakeup-source; + }; + }; }; }; diff --git a/arch/arm64/boot/dts/sprd/whale2.dtsi b/arch/arm64/boot/dts/sprd/whale2.dtsi index 66a881e..bf7e70c 100644 --- a/arch/arm64/boot/dts/sprd/whale2.dtsi +++ b/arch/arm64/boot/dts/sprd/whale2.dtsi @@ -154,6 +154,56 @@ clocks = <&aon_gate CLK_SPLK_EB>; }; + eic_debounce: gpio@40210000 { + compatible = "sprd,sc9860-eic-debounce"; + reg = <0 0x40210000 0 0x80>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; + }; + + eic_latch: gpio@40210080 { + compatible = "sprd,sc9860-eic-latch"; + reg = <0 0x40210080 0 0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; + }; + + eic_async: gpio@402100a0 { + compatible = "sprd,sc9860-eic-async"; + reg = <0 0x402100a0 0 0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; + }; + + eic_sync: gpio@402100c0 { + compatible = "sprd,sc9860-eic-sync"; + reg = <0 0x402100c0 0 0x20>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; + }; + + ap_gpio: gpio@40280000 { + compatible = "sprd,sc9860-gpio"; + reg = <0 0x40280000 0 0x1000>; + gpio-controller; + #gpio-cells = <2>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = ; + }; + pin_controller: pinctrl@402a0000 { compatible = "sprd,sc9860-pinctrl"; reg = <0 0x402a0000 0 0x10000>; -- 1.7.9.5