From patchwork Wed Jan 25 18:51:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 9537813 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A672F6046A for ; Wed, 25 Jan 2017 18:56:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9362B27D4D for ; Wed, 25 Jan 2017 18:56:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8448127D9B; Wed, 25 Jan 2017 18:56:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2487727D4D for ; Wed, 25 Jan 2017 18:56:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752617AbdAYS4L (ORCPT ); Wed, 25 Jan 2017 13:56:11 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:33726 "EHLO outils.crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbdAYSw3 (ORCPT ); Wed, 25 Jan 2017 13:52:29 -0500 From: Paul Cercueil To: Linus Walleij , Rob Herring , Mark Rutland , Ralf Baechle , Ulf Hansson Cc: Boris Brezillon , Thierry Reding , Bartlomiej Zolnierkiewicz , Maarten ter Huurne , Lars-Peter Clausen , Paul Burton , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mips@linux-mips.org, linux-mmc@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pwm@vger.kernel.org, linux-fbdev@vger.kernel.org, james.hogan@imgtec.com, Paul Cercueil Subject: [PATCH v3 02/14] Documentation: dt/bindings: Document pinctrl-gpio Date: Wed, 25 Jan 2017 19:51:55 +0100 Message-Id: <20170125185207.23902-3-paul@crapouillou.net> In-Reply-To: <20170125185207.23902-1-paul@crapouillou.net> References: <27071da2f01d48141e8ac3dfaa13255d@mail.crapouillou.net> <20170125185207.23902-1-paul@crapouillou.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1485370346; bh=12rkR7GRnwhoUeUkuBz2EGVCLEuZrVkwZp/hNn5B+g8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=axK9kz8tKIhhmJRAXdlWoZ7rlZxXSgHvS6PhHlvq4NFQB1OpMWQwqONX89mjSzvrZGKHXFI/cBTePw16tVO8gbHFRZnWmtiUzczB6hZEmbLNWIJlJ52UHAiLSASSfaJOcdq+z7vh+z0GMNhUnZaRqJRg/o4XYjt+pI6HHI3F/Xk= Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit adds documentation for the devicetree bidings of the pinctrl-gpio driver, which handles GPIOs of the Ingenic SoCs currently supported by the Linux kernel. Signed-off-by: Paul Cercueil --- .../devicetree/bindings/gpio/ingenic,gpio.txt | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/ingenic,gpio.txt v2: New patch v3: No changes diff --git a/Documentation/devicetree/bindings/gpio/ingenic,gpio.txt b/Documentation/devicetree/bindings/gpio/ingenic,gpio.txt new file mode 100644 index 000000000000..b2eb20494365 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/ingenic,gpio.txt @@ -0,0 +1,45 @@ +Ingenic jz47xx GPIO controller + +Required properties: + - compatible: + - "ingenic,jz4740-gpio" for the JZ4740 SoC + - "ingenic,jz4780-gpio" for the JZ4780 SoC + + - reg: Base address and length of each memory resource used by the GPIO + controller hardware module. + + - gpio-controller: Marks the device node as a GPIO controller. + - #gpio-cells: Should be 2. The first cell is the GPIO number and the second + cell specifies GPIO flags, as defined in . Only the + GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported. + - gpio-ranges: Range of pins managed by the GPIO controller. + +Optional properties: + - base: The GPIO number to use as the base for this driver. + - interrupt-controller: Marks the device node as an interrupt controller. + - interrupts: Interrupt specifier for the controllers interrupt. + Required if 'interrupt-controller' is specified. + +Please refer to gpio.txt in this directory for details of gpio-ranges property +and the common GPIO bindings used by client devices. + +The GPIO controller also acts as an interrupt controller. It uses the default +two cells specifier as described in Documentation/devicetree/bindings/ +interrupt-controller/interrupts.txt. + +Example: + +gpa: gpio-controller@10010000 { + compatible = "ingenic,jz4740-gpio"; + reg = <0x10010000 0x100>; + + gpio-controller; + gpio-ranges = <&pinctrl 0 0 32>; + #gpio-cells = <2>; + + interrupt-controller; + #interrupt-cells = <2>; + + interrupt-parent = <&intc>; + interrupts = <28>; +};