From patchwork Mon Dec 8 02:38:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 418553 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 65F751400D5 for ; Mon, 8 Dec 2014 13:37:57 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753933AbaLHChn (ORCPT ); Sun, 7 Dec 2014 21:37:43 -0500 Received: from mail-gw1-out.broadcom.com ([216.31.210.62]:11463 "EHLO mail-gw1-out.broadcom.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753782AbaLHCgR (ORCPT ); Sun, 7 Dec 2014 21:36:17 -0500 X-IronPort-AV: E=Sophos;i="5.07,536,1413270000"; d="scan'208";a="52653928" Received: from irvexchcas07.broadcom.com (HELO IRVEXCHCAS07.corp.ad.broadcom.com) ([10.9.208.55]) by mail-gw1-out.broadcom.com with ESMTP; 07 Dec 2014 20:24:03 -0800 Received: from IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) by IRVEXCHCAS07.corp.ad.broadcom.com (10.9.208.55) with Microsoft SMTP Server (TLS) id 14.3.174.1; Sun, 7 Dec 2014 18:36:17 -0800 Received: from mail-irva-13.broadcom.com (10.10.10.20) by IRVEXCHSMTP1.corp.ad.broadcom.com (10.9.207.51) with Microsoft SMTP Server id 14.3.174.1; Sun, 7 Dec 2014 18:36:15 -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 9BA3B40FE6; Sun, 7 Dec 2014 18:35:41 -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 CC: Scott Branden , , , , , , "Ray Jui" Subject: [PATCH v2 1/5] gpio: Cygnus: define Broadcom Cygnus GPIO binding Date: Sun, 7 Dec 2014 18:38:32 -0800 Message-ID: <1418006316-324-2-git-send-email-rjui@broadcom.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1418006316-324-1-git-send-email-rjui@broadcom.com> References: <1418006316-324-1-git-send-email-rjui@broadcom.com> MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 | 85 ++++++++++++++++++++ 1 file changed, 85 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..24a1513 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/brcm,cygnus-gpio.txt @@ -0,0 +1,85 @@ +Broadcom Cygnus GPIO Controller + +Required properties: + +- compatible: + Currently supported Cygnus GPIO controllers include: + "brcm,cygnus-ccm-gpio": ChipcommonG GPIO controller + "brcm,cygnus-asiu-gpio": ASIU GPIO controller + "brcm,cygnus-crmu-gpio": CRMU GPIO controller + +- 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 + +- #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-interrupt: + Specifies that the GPIO interface does not support interrupt + +Example: + gpio_asiu: gpio@180a5000 { + compatible = "brcm,cygnus-asiu-gpio"; + reg = <0x180a5000 0x668>; + ngpios = <122>; + #gpio-cells = <2>; + gpio-controller; + interrupt-controller; + interrupts = ; + }; + + gpio_crmu: gpio@03024800 { + compatible = "brcm,cygnus-crmu-gpio"; + reg = <0x03024800 0x50>; + ngpios = <6>; + #gpio-cells = <2>; + gpio-controller; + no-interrupt; + }; + + /* + * 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> + }