From patchwork Sun Apr 3 13:26:09 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neil Armstrong X-Patchwork-Id: 8734261 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 360BF9F38C for ; Sun, 3 Apr 2016 13:29:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 49031201F4 for ; Sun, 3 Apr 2016 13:29:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 40EE120218 for ; Sun, 3 Apr 2016 13:29:38 +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 1ami3m-0008Gt-H8; Sun, 03 Apr 2016 13:27:22 +0000 Received: from mail-qk0-x234.google.com ([2607:f8b0:400d:c09::234]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ami3O-00089p-F0 for linux-arm-kernel@lists.infradead.org; Sun, 03 Apr 2016 13:27:00 +0000 Received: by mail-qk0-x234.google.com with SMTP id o6so54099780qkc.2 for ; Sun, 03 Apr 2016 06:26:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=w0ajZ8w4Bcz3qQRBChSpQwM8ws7yp6Z8+Ok2aCTuta4=; b=mjZjv3gr2qaDJmcCLJfMdCZCeBW51T/jSC/bcipXSOvCcV+t/Kk+LxeMOVddKxfKgw 9+BQvK7Vvt325H91bB9EoKQvEaTAYf4AFIu2r6fzu1gXsvUQojxCOkUnwnR+O+MS24/c MAe6BELlyvA3UoqwzhP42MSU3uKPDzy37awEzhnxWOkKJC48WC2AwQs0BLK3jb9nuxcM VIRQ3OW8IXVjChCjuh60OAqNKpZKSzpk3GBwJyTUfU2oA/G1i954WQbWXrAKvVSWXYBp 4If0COnMij1FCtQ+wt9wvjHfji4rTja+qro6Je7a4nAVjwOHwW5XWC0Vwb4uIPVvfDcK 6vvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=w0ajZ8w4Bcz3qQRBChSpQwM8ws7yp6Z8+Ok2aCTuta4=; b=BKdzK/Gz2w5n9IW1SPWx7hURMTuqE21fwZZEgSdhVkOuqyYQtoy7DqZLDAMq1xrD4y Fayft1eJutgjO0tUlS5ZZApXKbn1J3yGxwgzrsbDC+lhpojxMCtARI9Pl8qSe/KrnIlC fO+ZdS9Ve7CYnv80ta6PxZPuIIrUCdEGsy/fBV4YgksyiOVVtvfgkNREqPF5T7pFKCeX xg75kYiLXZ/sI1yv8VCtJzLdnyCEgX1KvGlIFiw0aQmsx+gRju/LkQt+qijsC1soE6je Oet1e5jue2VydTC6k6duh2MM4Xj83S8LnhYpmBWpRMbzEcphVXT7heKlOAlmdVXxgKjq FczQ== X-Gm-Message-State: AD7BkJKDQMx/juI1AHB12mGrkmoPK04rl3c0537aO3xyCrSsL03W5r8hG9hsIZJgft0r/Wko X-Received: by 10.55.214.1 with SMTP id t1mr29341333qki.4.1459689997091; Sun, 03 Apr 2016 06:26:37 -0700 (PDT) Received: from zoidberg.hil-sandthx.snd.wayport.net (ip-64-134-238-64.public.wayport.net. [64.134.238.64]) by smtp.gmail.com with ESMTPSA id y99sm10317416qge.3.2016.04.03.06.26.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 03 Apr 2016 06:26:36 -0700 (PDT) From: Neil Armstrong To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linus.walleij@linaro.org, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/2] dt-bindings: Add Oxford Semiconductor OXNAS pinctrl and gpio bindings Date: Sun, 3 Apr 2016 15:26:09 +0200 Message-Id: <1459689969-5326-3-git-send-email-narmstrong@baylibre.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459689969-5326-1-git-send-email-narmstrong@baylibre.com> References: <1459689969-5326-1-git-send-email-narmstrong@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160403_062658_660397_9B539DEE X-CRM114-Status: GOOD ( 16.18 ) X-Spam-Score: -1.9 (-) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong 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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Add pinctrl and gpio DT bindings for Oxford Semiconductor OXNAS SoC Family. This version supports the ARM926EJ-S based OX810SE SoC with 34 IO pins. Signed-off-by: Neil Armstrong --- .../devicetree/bindings/gpio/gpio_oxnas.txt | 43 ++++++++++++++++ .../devicetree/bindings/pinctrl/oxnas,pinctrl.txt | 57 ++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio_oxnas.txt create mode 100644 Documentation/devicetree/bindings/pinctrl/oxnas,pinctrl.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio_oxnas.txt b/Documentation/devicetree/bindings/gpio/gpio_oxnas.txt new file mode 100644 index 0000000..ddd3de9 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio_oxnas.txt @@ -0,0 +1,43 @@ +* Oxford Semiconductor OXNAS SoC GPIO Controller + +Required properties: + - compatible: "oxsemi,ox810se-gpio" + - reg: Base address and length for the device. + - interrupts: The port interrupt shared by all pins. + - gpio-controller: Marks the port as GPIO controller. + - #gpio-cells: Two. The first cell is the pin number and + the second cell is used to specify the gpio polarity as defined in + defined in : + 0 = GPIO_ACTIVE_HIGH + 1 = GPIO_ACTIVE_LOW + - interrupt-controller: Marks the device node as an interrupt controller. + - #interrupt-cells: Two. The first cell is the GPIO number and second cell + is used to specify the trigger type as defined in + : + IRQ_TYPE_EDGE_RISING + IRQ_TYPE_EDGE_FALLING + IRQ_TYPE_EDGE_BOTH + - gpio-ranges: Interaction with the PINCTRL subsystem. + +Example: + +gpio0: gpio@0 { + compatible = "oxsemi,ox810se-gpio"; + reg = <0x000000 0x100000>; + interrupts = <21>; + #gpio-cells = <2>; + gpio-controller; + interrupt-controller; + #interrupt-cells = <2>; + gpio-ranges = <&pinctrl 0 0 32>; +}; + +keys { + ... + + button@sw1 { + label = "ESC"; + linux,code = <1>; + gpios = <&gpio0 12 0>; + }; +}; diff --git a/Documentation/devicetree/bindings/pinctrl/oxnas,pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/oxnas,pinctrl.txt new file mode 100644 index 0000000..d607432 --- /dev/null +++ b/Documentation/devicetree/bindings/pinctrl/oxnas,pinctrl.txt @@ -0,0 +1,57 @@ +* Oxford Semiconductor OXNAS SoC Family Pin Controller + +Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and +../interrupt-controller/interrupts.txt for generic information regarding +pin controller, GPIO, and interrupt bindings. + +OXNAS 'pin configuration node' is a node of a group of pins which can be +used for a specific device or function. This node represents configurations of +pins, optional function, and optional mux related configuration. + +Required properties for pin controller node: + - compatible: "oxsemi,ox810se-pinctrl" + - oxsemi,sys-ctrl: a phandle to the system controller syscon node + +Required properties for pin configuration sub-nodes: + - pins: List of pins to which the configuration applies. + +Optional properties for pin configuration sub-nodes: +---------------------------------------------------- + - function: Mux function for the specified pins. + - bias-pull-up: Enable weak pull-up. + +Example: + +pinctrl: pinctrl { + compatible = "oxsemi,ox810se-pinctrl"; + + /* Regmap for sys registers */ + oxsemi,sys-ctrl = <&sys>; + + pinctrl_uart2: pinctrl_uart2 { + uart2a { + pins = "gpio31"; + function = "fct3"; + }; + uart2b { + pins = "gpio32"; + function = "fct3"; + }; + }; +}; + +uart2: serial@900000 { + compatible = "ns16550a"; + reg = <0x900000 0x100000>; + clocks = <&sysclk>; + interrupts = <29>; + reg-shift = <0>; + fifo-size = <16>; + reg-io-width = <1>; + current-speed = <115200>; + no-loopback-test; + status = "disabled"; + resets = <&reset 22>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_uart2>; +};