From patchwork Fri Dec 12 00:05:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 5478371 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 0FD08BEEA8 for ; Fri, 12 Dec 2014 00:05:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E67F3201ED for ; Fri, 12 Dec 2014 00:05:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F0E67201B9 for ; Fri, 12 Dec 2014 00:05:41 +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 1XzDhX-0003I4-HK; Fri, 12 Dec 2014 00:03:19 +0000 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XzDhN-0003Bw-L4 for linux-arm-kernel@lists.infradead.org; Fri, 12 Dec 2014 00:03:10 +0000 X-IronPort-AV: E=Sophos;i="5.07,560,1413270000"; d="scan'208";a="53033076" Received: from irvexchcas08.broadcom.com (HELO IRVEXCHCAS08.corp.ad.broadcom.com) ([10.9.208.57]) by mail-gw1-out.broadcom.com with ESMTP; 11 Dec 2014 17:52:40 -0800 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.3.174.1; Thu, 11 Dec 2014 16:02:47 -0800 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.3.174.1; Thu, 11 Dec 2014 16:02:48 -0800 Received: from mail.broadcom.com (lbrmn-lnxub44.ric.broadcom.com [10.136.8.49]) by mail-irva-13.broadcom.com (Postfix) with ESMTP id F410440FE6; Thu, 11 Dec 2014 16:02:09 -0800 (PST) From: Ray Jui To: Rob Herring , Pawel Moll , "Mark Rutland" , Ian Campbell , Kumar Gala , "Linus Walleij" , Alexandre Courbot , Grant Likely , Christian Daudt , Matt Porter , Florian Fainelli , Russell King , Joe Perches , "Arnd Bergmann" Subject: [PATCH v5 1/3] gpio: Cygnus: define Broadcom Cygnus GPIO binding Date: Thu, 11 Dec 2014 16:05:04 -0800 Message-ID: <1418342706-14755-2-git-send-email-rjui@broadcom.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1418342706-14755-1-git-send-email-rjui@broadcom.com> References: <1418342706-14755-1-git-send-email-rjui@broadcom.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141211_160309_798258_04EDA448 X-CRM114-Status: GOOD ( 10.08 ) X-Spam-Score: -2.3 (--) Cc: devicetree@vger.kernel.org, Scott Branden , Ray Jui , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 Document the GPIO device tree binding for Broadcom Cygnus SoC Signed-off-by: Ray Jui Reviewed-by: Scott Branden --- .../devicetree/bindings/gpio/brcm,cygnus-gpio.txt | 87 ++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/brcm,cygnus-gpio.txt diff --git a/Documentation/devicetree/bindings/gpio/brcm,cygnus-gpio.txt b/Documentation/devicetree/bindings/gpio/brcm,cygnus-gpio.txt new file mode 100644 index 0000000..0e446d4 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/brcm,cygnus-gpio.txt @@ -0,0 +1,87 @@ +Broadcom Cygnus GPIO Controller + +Required properties: + +- compatible: + Must be "brcm,cygnus-gpio" + +- reg: + Define the base and range of the I/O address space that contain the Cygnus +GPIO controller registers + +- ngpios: + Total number of GPIOs the controller provides + +- linux,gpio-base: + Base GPIO number of this controller + +- #gpio-cells: + Must be two. The first cell is the GPIO pin number (within the +controller's domain) and the second cell is used for the following: + bit[0]: polarity (0 for normal and 1 for inverted) + bit[18:16]: internal pull up/down: 0 - pull up/down disabled + 1 - pull up enabled + 2 - pull down enabled + bit[22:20]: drive strength: 0 - 2 mA + 1 - 4 mA + 2 - 6 mA + 3 - 8 mA + 4 - 10 mA + 5 - 12 mA + 6 - 14 mA + 7 - 16 mA + +- gpio-controller: + Specifies that the node is a GPIO controller + +Optional properties: + +- interrupt-controller: + Specifies that the node is an interrupt controller. Not all Cygnus GPIO +interfaces support interrupt, e.g., the CRMU GPIO controller does not have its +interrupt routed to the main processor's GIC + +- interrupts: + The interrupt outputs from the GPIO controller. + +- no-drv-strength: + Specifies the GPIO controller does not support drive strength configuration + +Example: + gpio_asiu: gpio@180a5000 { + compatible = "brcm,cygnus-gpio"; + reg = <0x180a5000 0x668>; + ngpios = <122>; + linux,gpio-base = <0>; + #gpio-cells = <2>; + gpio-controller; + interrupt-controller; + interrupts = ; + }; + + gpio_crmu: gpio@03024800 { + compatible = "brcm,cygnus-gpio"; + reg = <0x03024800 0x50>; + ngpios = <6>; + linux,gpio-base = <146>; + #gpio-cells = <2>; + gpio-controller; + no-drv-strength; + }; + + /* + * Touchscreen that uses the ASIU GPIO 100, with internal pull-up + * enabled + */ + tsc { + ... + ... + gpio-event = <&gpio_asiu 100 0x10000>; + }; + + /* Bluetooth that uses the CRMU GPIO 2, with polarity inverted */ + bluetooth { + ... + ... + bcm,rfkill-bank-sel = <&gpio_crmu 2 1> + }