From patchwork Fri Jul 26 20:25:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Mayer X-Patchwork-Id: 2834317 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8EAEFC0319 for ; Fri, 26 Jul 2013 20:27:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 994F2201E0 for ; Fri, 26 Jul 2013 20:27:19 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 90D69201DE for ; Fri, 26 Jul 2013 20:27:18 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2obJ-0000XH-1P; Fri, 26 Jul 2013 20:26:57 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2ob9-0006pZ-Ls; Fri, 26 Jul 2013 20:26:47 +0000 Received: from mms3.broadcom.com ([216.31.210.19]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V2oay-0006nR-WD for linux-arm-kernel@lists.infradead.org; Fri, 26 Jul 2013 20:26:37 +0000 Received: from [10.9.208.57] by mms3.broadcom.com with ESMTP (Broadcom SMTP Relay (Email Firewall v6.5)); Fri, 26 Jul 2013 13:16:40 -0700 X-Server-Uuid: B86B6450-0931-4310-942E-F00ED04CA7AF Received: from IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) by IRVEXCHCAS08.corp.ad.broadcom.com (10.9.208.57) with Microsoft SMTP Server (TLS) id 14.1.438.0; Fri, 26 Jul 2013 13:26:25 -0700 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP3.corp.ad.broadcom.com (10.9.207.53) with Microsoft SMTP Server id 14.1.438.0; Fri, 26 Jul 2013 13:26:25 -0700 Received: from mail.broadcom.com (lbrmn-lnxub70.ric.broadcom.com [10.136.8.215]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id 482C4F2D75; Fri, 26 Jul 2013 13:26:24 -0700 (PDT) From: "Markus Mayer" To: "ARM Kernel List" , "Stephen Warren" , "Linus Walleij" , "Device Tree List" Subject: [PATCH v3 2/3] ARM: bcm281xx: Device Tree bindings for GPIO driver Date: Fri, 26 Jul 2013 13:25:44 -0700 Message-ID: <1374870345-8276-3-git-send-email-markus.mayer@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1374870345-8276-1-git-send-email-markus.mayer@linaro.org> References: <1374870345-8276-1-git-send-email-markus.mayer@linaro.org> MIME-Version: 1.0 X-WSS-ID: 7DEC06AD2L852567224-03-01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130726_162637_213897_33F4638C X-CRM114-Status: GOOD ( 10.76 ) X-Spam-Score: -4.2 (----) Cc: Christian Daudt , Markus Mayer , Linaro Patches X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.7 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 Signed-off-by: Markus Mayer Reviewed-by: Christian Daudt Reviewed-by: Tim Kryger Reviewed-by: Matt Porter --- .../devicetree/bindings/gpio/gpio-bcm-kona.txt | 41 ++++++++++++++++++++ arch/arm/boot/dts/bcm11351.dtsi | 16 ++++++++ 2 files changed, 57 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt b/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt new file mode 100644 index 0000000..08e9b5a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-bcm-kona.txt @@ -0,0 +1,41 @@ +Broadcom Kona Family GPIO +------------------------- + +This GPIO driver is used in the following Broadcom SoCs: + BCM11130, BCM11140, BCM11351, BCM28145, BCM28155 + +The GPIO controller only supports edge, not level triggering. + +Required properties: + - compatible: "brcm,kona-gpio" + - reg: Physical base address and length of the controller's registers. + - interrupts: The interrupt outputs from the controller. + - #gpio-cells: Should be <2>. The first cell is the pin number, the second + cell is used to specify optional parameters: + - bit 0 specifies polarity (0 for normal, 1 for inverted) + - #interrupt-cells: Should be <2>. The first cell is the GPIO number. + The second cell is used to specify flags: + - trigger type (bits[1:0]): + 1 = low-to-high edge triggered. + 2 = high-to-low edge triggered. + 3 = low-to-high or high-to-low edge triggered + Valid values are 1, 2, 3 + - gpio-controller: Marks the device node as a GPIO controller. + - interrupt-controller: Marks the device node as an interrupt controller. + +Example: + gpio: gpio@35003000 { + compatible = "brcm,kona-gpio"; + reg = <0x35003000 0x800>; + interrupts = + <0x0 106 0x4 + 0x0 115 0x4 + 0x0 114 0x4 + 0x0 113 0x4 + 0x0 112 0x4 + 0x0 111 0x4>; + #gpio-cells = <2>; + #interrupt-cells = <2>; + gpio-controller; + interrupt-controller; + }; diff --git a/arch/arm/boot/dts/bcm11351.dtsi b/arch/arm/boot/dts/bcm11351.dtsi index c0cdf66..13aaa06 100644 --- a/arch/arm/boot/dts/bcm11351.dtsi +++ b/arch/arm/boot/dts/bcm11351.dtsi @@ -63,6 +63,22 @@ clock-frequency = <32768>; }; + gpio: gpio@35003000 { + compatible = "brcm,kona-gpio"; + reg = <0x35003000 0x800>; + interrupts = + <0x0 106 0x4 + 0x0 115 0x4 + 0x0 114 0x4 + 0x0 113 0x4 + 0x0 112 0x4 + 0x0 111 0x4>; + #gpio-cells = <2>; + #interrupt-cells = <2>; + gpio-controller; + interrupt-controller; + }; + sdio0: sdio@0x3f180000 { compatible = "bcm,kona-sdhci"; reg = <0x3f180000 0x10000>;