From patchwork Tue Oct 7 21:32:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beniamino Galvani X-Patchwork-Id: 5049471 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 25512C11AB for ; Tue, 7 Oct 2014 21:37:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3F75D201F4 for ; Tue, 7 Oct 2014 21:37:29 +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 3E7B6201F7 for ; Tue, 7 Oct 2014 21:37:28 +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 1XbcPk-0004wt-6G; Tue, 07 Oct 2014 21:35:24 +0000 Received: from mail-wg0-x22d.google.com ([2a00:1450:400c:c00::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XbcPY-0003LM-E9 for linux-arm-kernel@lists.infradead.org; Tue, 07 Oct 2014 21:35:13 +0000 Received: by mail-wg0-f45.google.com with SMTP id m15so10580132wgh.16 for ; Tue, 07 Oct 2014 14:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EmtGo3Uv0JmOxwW/b13sGQycEn8v1/NwlZp2mBZWpVk=; b=Jcqbeo+HLOxSVb0zRzn/lQvTQziobCan8m3bU+pYubVN3MK6MmlfoVzqYRkMs1yveq AzmUS9HD3nzmhFWUdJ4c0hV8AhdZvn3dbPX7hPKtNOFOvWDQU+iOSZNuTDA4hNJ2Wtuw tfhtpky9zWL89EnFIG7HQ/f6TjXfmxqnn4XfFfvgt6GogJtkO0HsKdk96e5TisqO3IEA lB2mwCP8no4+TM9WFCxH5jF9OO9g3Us2iyxpfl9r4CK4qa2tN+aUd0UuGMxI7qTcefmX NAjvuKkyVRBA0ohPP4tfJzQqlSJRBQbaZAM7sf8SbysZchmV4AqeFaxHYuhy+IBt1c2U sZ+Q== X-Received: by 10.194.184.204 with SMTP id ew12mr7783085wjc.21.1412717690459; Tue, 07 Oct 2014 14:34:50 -0700 (PDT) Received: from sark.local (host207-98-dynamic.16-79-r.retail.telecomitalia.it. [79.16.98.207]) by mx.google.com with ESMTPSA id cw6sm22244820wjb.18.2014.10.07.14.34.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Oct 2014 14:34:49 -0700 (PDT) From: Beniamino Galvani To: Linus Walleij Subject: [PATCH 2/3] pinctrl: meson: add device tree bindings documentation Date: Tue, 7 Oct 2014 23:32:55 +0200 Message-Id: <1412717576-19737-3-git-send-email-b.galvani@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1412717576-19737-1-git-send-email-b.galvani@gmail.com> References: <1412717576-19737-1-git-send-email-b.galvani@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141007_143512_632493_2A88DF6B X-CRM114-Status: GOOD ( 13.89 ) X-Spam-Score: -0.8 (/) Cc: Mark Rutland , devicetree@vger.kernel.org, Victor Wan , Russell King , Pawel Moll , Arnd Bergmann , Ian Campbell , linux-kernel@vger.kernel.org, Beniamino Galvani , Rob Herring , Kumar Gala , Carlo Caione , Jerry Cao , 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=no 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 Add device tree bindings documentation for Amlogic Meson pinmux and GPIO controller. Signed-off-by: Beniamino Galvani --- .../devicetree/bindings/pinctrl/meson,pinctrl.txt | 80 ++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt diff --git a/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt new file mode 100644 index 0000000..dd573d9 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/meson,pinctrl.txt @@ -0,0 +1,80 @@ +* Amlogic Meson pinmux controller + +Pins are organized in banks; all banks except AO are controlled by the +same set of registers, while the AO bank uses a dedicated register +range. The device tree uses sub-nodes to represent set of banks which +share the same address space. + +Required properties for the root node: + - compatible: "amlogic,meson8-pinctrl" + - reg: address and size of the common registers controlling gpio irq + functionality + +Required properties for gpio sub-nodes: + - reg: should contain address and size for mux, pull-enable, pull and + gpio register sets + - reg-names: an array of strings describing the "reg" entries. Must + contain "mux", "pull" and "gpio". "pull-enable" is optional and + when it is missing the "pull" registers are used instead + - gpio-controller: identifies the node as a gpio controller + - #gpio-cells: must be 2 + +Valid gpio sub-nodes name are: + - "banks" for the standard banks + - "ao-bank" for the AO bank which belong to the special always-on + power domain + +Required properties for configuration nodes: + - pins: the name of a pin group. The list of all available groups can + be found in driver sources. + - function: the name of a function to activate for the specified set + of groups. The list of all available functions can be found in + driver sources. + +Example: + + pinctrl: pinctrl@c1109880 { + compatible = "amlogic,meson8-pinctrl"; + reg = <0xc1109880 0x10>; + #address-cells = <1>; + #size-cells = <1>; + ranges; + + gpio: banks@c11080b0 { + reg = <0xc11080b0 0x28>, + <0xc11080e4 0x18>, + <0xc1108120 0x18>, + <0xc1108030 0x30>; + reg-names = "mux", "pull-enable", "pull", "gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + + gpio_ao: ao-bank@c1108030 { + reg = <0xc8100014 0x4>, + <0xc810002c 0x4>, + <0xc8100024 0x8>; + reg-names = "mux", "pull", "gpio"; + gpio-controller; + #gpio-cells = <2>; + }; + + nand { + nand { + pins = "nand_io", "nand_io_ce0", "nand_io_ce1", + "nand_io_rb0", "nand_ale", "nand_cle", + "nand_wen_clk", "nand_ren_clk", "nand_dqs", + "nand_ce2", "nand_ce3"; + function = "nand"; + }; + }; + + uart_ao_a: uart_ao_a { + uart_ao_a { + pins = "uart_tx_ao_a", "uart_rx_ao_a"; + "uart_cts_ao_a", "uart_rts_ao_a"; + function = "uart_ao"; + }; + }; + }; +