From patchwork Fri Nov 20 01:29:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 7663731 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9CAA1BF90C for ; Fri, 20 Nov 2015 01:45:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B7A35204A2 for ; Fri, 20 Nov 2015 01:45:24 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D7088204A0 for ; Fri, 20 Nov 2015 01:45:23 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zzaje-0005bm-NU; Fri, 20 Nov 2015 01:43:34 +0000 Received: from mleia.com ([178.79.152.223] helo=mail.mleia.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZzaWt-00073N-2r for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2015 01:30:34 +0000 Received: from mail.mleia.com (localhost [127.0.0.1]) by mail.mleia.com (Postfix) with ESMTP id 8CAF511672A; Fri, 20 Nov 2015 01:31:19 +0000 (GMT) From: Vladimir Zapolskiy To: Rob Herring , Linus Walleij , Alexandre Courbot , Arnd Bergmann Subject: [PATCH 2/4] arm: dts: lpc32xx: extend description of gpio controller node Date: Fri, 20 Nov 2015 03:29:53 +0200 Message-Id: <1447982995-30231-3-git-send-email-vz@mleia.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447982995-30231-1-git-send-email-vz@mleia.com> References: <1447982995-30231-1-git-send-email-vz@mleia.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20151120_013119_599046_A67687E8 X-CRM114-Status: GOOD ( 11.24 ) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151120_013119_599046_A67687E8 X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.5 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Roland Stigge , devicetree@vger.kernel.org, Russell King , linux-arm-kernel@lists.infradead.org, linux-gpio@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The change adds detailed description of NXP LPC32xx GPIO controller node. Note, in future possibly P0 and P1 banks can be converted to interrupt controllers, but this requires pinmux configuration, which is missing at the moment. The change does not affect any GPIO controller clients. Signed-off-by: Vladimir Zapolskiy --- arch/arm/boot/dts/lpc32xx.dtsi | 85 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 84 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/lpc32xx.dtsi b/arch/arm/boot/dts/lpc32xx.dtsi index 603f005..9153654 100644 --- a/arch/arm/boot/dts/lpc32xx.dtsi +++ b/arch/arm/boot/dts/lpc32xx.dtsi @@ -398,11 +398,94 @@ clocks = <&clk LPC32XX_CLK_RTC>; }; - gpio: gpio@40028000 { + gpio: gpio-controller@40028000 { compatible = "nxp,lpc3220-gpio"; reg = <0x40028000 0x1000>; gpio-controller; #gpio-cells = <3>; /* bank, pin, flags */ + + ranges = <0 0x0 0x40028000 0x00001000>, + <1 0x0 0x40028000 0x00001000>, + <2 0x0 0x40028000 0x00001000>, + <3 0x0 0x40028000 0x00001000>, + <4 0x0 0x40028000 0x00001000>, + <5 0x0 0x40028000 0x00001000>; + #address-cells = <2>; + #size-cells = <1>; + + gpio_p0: gpio-controller@0 { + reg = <0 0x40 0x1C>; + gpio-bank-name = "p0"; + gpios = <8>; + + interrupt-parent = <&sic2>; + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; + }; + + gpio_p1: gpio-controller@1 { + reg = <1 0x60 0x1C>; + gpio-bank-name = "p1"; + gpios = <24>; + + interrupt-parent = <&sic2>; + interrupts = <8 IRQ_TYPE_LEVEL_HIGH>; + }; + + gpio_p2: gpio-controller@2 { + reg = <2 0x10 0x18>; + gpio-bank-name = "p2"; + gpios = <13>; + gpio-no-output-state; + }; + + gpio_gpio: gpio-controller@3 { + reg = <3 0x00 0x1C>; + gpio-bank-name = "gpio"; + gpio-offset = <25>; + gpio-input-mask = <0x01007c00>, <0x01007c00>; + + interrupt-parent = <&sic2>; + interrupts = <0 IRQ_TYPE_LEVEL_HIGH>, + <1 IRQ_TYPE_LEVEL_HIGH>, + <2 IRQ_TYPE_LEVEL_HIGH>, + <3 IRQ_TYPE_LEVEL_HIGH>, + <4 IRQ_TYPE_LEVEL_HIGH>, + <5 IRQ_TYPE_LEVEL_HIGH>; + + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio_gpi: gpio-controller@4 { + reg = <4 0x00 0x04>; + gpio-bank-name = "gpi"; + gpio-input-only; + gpio-input-mask = <0x1aff83ff>, <0x100803ff>; + + interrupts-extended = + <&sic2 22 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 23 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 24 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 25 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 26 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 27 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 28 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 15 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 9 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 10 IRQ_TYPE_LEVEL_HIGH>, + <&sic2 11 IRQ_TYPE_LEVEL_HIGH>, + <&sic1 4 IRQ_TYPE_LEVEL_HIGH>; + + interrupt-controller; + #interrupt-cells = <2>; + }; + + gpio_gpo: gpio-controller@5 { + reg = <5 0x00 0x10>; + gpio-bank-name = "gpo"; + gpios = <24>; + gpio-output-only; + }; }; timer4: timer@4002C000 {