From patchwork Thu Oct 9 20:07:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 398235 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 986051400D2 for ; Fri, 10 Oct 2014 08:00:00 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751032AbaJIU74 (ORCPT ); Thu, 9 Oct 2014 16:59:56 -0400 Received: from static.88-198-24-112.clients.your-server.de ([88.198.24.112]:47072 "EHLO nbd.name" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750918AbaJIU74 (ORCPT ); Thu, 9 Oct 2014 16:59:56 -0400 From: John Crispin To: Ralf Baechle , Linus Walleij Cc: linux-mips@linux-mips.org, linux-gpio@vger.kernel.org Subject: [PATCH 1/2] DT: Add documentation for gpio-rt2880 Date: Thu, 9 Oct 2014 22:07:20 +0200 Message-Id: <1412885241-12476-1-git-send-email-blogic@openwrt.org> X-Mailer: git-send-email 1.7.10.4 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Describe gpio-rt2880 binding. Signed-off-by: John Crispin Cc: linux-mips@linux-mips.org Cc: devicetree@vger.kernel.org Cc: linux-gpio@vger.kernel.org --- .../devicetree/bindings/gpio/gpio-rt2880.txt | 40 ++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-rt2880.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-rt2880.txt b/Documentation/devicetree/bindings/gpio/gpio-rt2880.txt new file mode 100644 index 0000000..b4acf02 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-rt2880.txt @@ -0,0 +1,40 @@ +Ralink SoC GPIO controller bindings + +Required properties: +- compatible: + - "ralink,rt2880-gpio" for Ralink controllers +- #gpio-cells : Should be two. + - first cell is the pin number + - second cell is used to specify optional parameters (unused) +- gpio-controller : Marks the device node as a GPIO controller +- reg : Physical base address and length of the controller's registers +- interrupt-parent: phandle to the INTC device node +- interrupts : Specify the INTC interrupt number +- ralink,num-gpios : Specify the number of GPIOs +- ralink,register-map : The register layout depends on the GPIO bank and actual + SoC type. Register offsets need to be in this order. + [ INT, EDGE, RENA, FENA, DATA, DIR, POL, SET, RESET, TOGGLE ] + +Optional properties: +- ralink,gpio-base : Specify the GPIO chips base number + +Example: + + gpio0: gpio@600 { + compatible = "ralink,rt5350-gpio", "ralink,rt2880-gpio"; + + #gpio-cells = <2>; + gpio-controller; + + reg = <0x600 0x34>; + + interrupt-parent = <&intc>; + interrupts = <6>; + + ralink,gpio-base = <0>; + ralink,num-gpios = <24>; + ralink,register-map = [ 00 04 08 0c + 20 24 28 2c + 30 34 ]; + + };