From patchwork Mon Apr 16 02:40:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 133422 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3087681ljb; Sun, 15 Apr 2018 19:40:50 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+od8o02zBrUYR14FvobDr111SRIYuw4KICVUrj4icRbXYsa9AvLKN1FfDCLu+8TsG+0GH3 X-Received: by 2002:a17:902:8488:: with SMTP id c8-v6mr703652plo.357.1523846450495; Sun, 15 Apr 2018 19:40:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523846450; cv=none; d=google.com; s=arc-20160816; b=d7moc3lgbXSO2nmIpi7F8Yld3rLxtOrbikIJJre6QnhjbyJMJSIwSTiblAuKZS0WOU S9EYqc4jiw9aTdVhgZsN0favav++3JgRSK/s7wu7KthgJNVvwZORByqhRjI+7trIotKV WFyH+vlSJZ9Tk4Gogi/eCWxvt4Fletnc2slo/8IWxFnW6AGgIsWuWYtDcqMbjyrSXISv 6EG6hSB30XSk8/8PnJx77K8SbNAhhFbv+g/UCwj+5n+YBuoLEUIzbzfhabrvPFoa5b9I T+dzVrzORuH7woY7k0/vKi9dCCqBbRKk9LIqRSFjGJy3JIK/o1az3UdPQkI0ToJVTr6N XX7g== 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=BeLRjnh3E4phOTctK2EV+oISe1wwP5JCCFWp0NrPEbI=; b=JRYQ6kMBSEmgWSW/mWzAkzRxjZS4NS5lhGkoScSSvFD+B2uSpKbpYXkD3UekDiUtdK Uf4sE/AGCKe4GylB4busOPbN6eH4XKNW2NNdZ+bjJ62bYU7Rs1RAfI73EVJ13AkQZLmj MQScxcJn3SQmymQBBezSWe4BDkRQDbHkkh30GFY2fGi0ZYBh6An2zVE5iZ3YWuU6Xahz 7PoG1A/ZHpH3XoeRZ+qNRjTJ6EIVUGsF+rTSpKdnphdVPYU6YqMYJLgXylE4wbvoObnO PseErct8BVtfGI3sSZsZvEgLwoN3SQqYs1Si0WC3CsosOBXpLoZJUzzRbJnDcwIhnepa Vetg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Jgh+aiD0; 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 e3si8552759pgr.400.2018.04.15.19.40.50; Sun, 15 Apr 2018 19:40:50 -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.s=google header.b=Jgh+aiD0; 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 S1752630AbeDPCkt (ORCPT + 6 others); Sun, 15 Apr 2018 22:40:49 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:41222 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751774AbeDPCks (ORCPT ); Sun, 15 Apr 2018 22:40:48 -0400 Received: by mail-pl0-f66.google.com with SMTP id bj1-v6so9165579plb.8 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=th9AwKe7RnYfF/P0hFYCyQTUE65OrFYTiiXY/OH+soSalsw1JbEz1QYqobeWWhPAr+ /z6LHvwPEckvDGm3gghwCxDAwc1Pv1tGPjYTdiAhu66YsL9OzVMiqg/gxRuFdwRvhibi Q05pSCRjrZM5iO/G205v3JGytcihtE403TovmR7BsRSEgf+KEqq9+BVzIPTOFO5ImdG2 S6StrAjtHzsJI3eUddr2pue5QrYtTdPzA3oVB8f6kANVnYI/2pi0zXQCSf1ouHBpRs7M 66iINgQbTa9LIn3Nvzx4QiI92SQIU5+RDMZsXZOhdXuISF7xafqAEJMelQ1dFZgVGTD1 KFrA== X-Gm-Message-State: ALQs6tDD8QOzw8VhkR+jhmx7BkJhawmbGvVrcbpuWUfzOTq52+hS2p3U zlws+jhAONAi+AI938IEKjYxHg== 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: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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(+) -- 1.7.9.5 -- 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/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>;