From patchwork Wed Sep 27 02:40:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9972977 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 A5B6860393 for ; Wed, 27 Sep 2017 02:43:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9891028F2C for ; Wed, 27 Sep 2017 02:43:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8738728F32; Wed, 27 Sep 2017 02:43:10 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 192FA28F5F for ; Wed, 27 Sep 2017 02:43:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ijyVqHB6UyI+FbhP6c3YH7pMgsAfoQ8W7nrDm7KJQA0=; b=bncTIQJQ3jvKyDXT5XggoaoEcY VhV+NvMKkDZyAAptX3DqLdVqnfQ7pf/DezdvjMDnGbKxigoPs083ZLN3kRsqJVDOp738mkgecXP7g 2zhd5CVo6Q+A3tRYKGZTr3FZRfiSOSjJ29X9PsnmhbBt5BFZ1tNnFkfc0ER7hd4qwb0R+Ln5B7P6T 3KI6WlG7k06NHl7HNKZL3SqvVXpPAA3GTysI3whMhXR83+U8MZDdPKF9GERtVkJNW93tdSWqBo97c P7DwE/Gw6mEPG9GXOCUAqR6l3Uz6SlhaXgCnDgpa5ikhxQTaDB25x/8hXYBA4gHqcJX4HGdguKi9M Ihp+4TYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dx2IQ-00029u-2D; Wed, 27 Sep 2017 02:41:58 +0000 Received: from conuserg-08.nifty.com ([210.131.2.75]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dx2IM-0001z4-BH for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2017 02:41:56 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id v8R2eoYR029272; Wed, 27 Sep 2017 11:40:51 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com v8R2eoYR029272 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506480052; bh=P4nFzQKMWibQFU0QwvqMPvI6Eei29vRx/+/3NWAsb+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TTVzQitUKN0bv9QOvQBAVkpfim61qr4U6AzCBuLkNNyZkjrtyhUkNDVickBc3NRcD rcPApjllA5TowAuY3iQjLDEZYoSHgQ5bo3eeV611s7CVUA3cr5oEBSCfRD1qUrJfoo WQB6KjgwhsybaZNovMyQjqjWSFt8GpbNYp/CByn7GT1jLeZtb+KmW01cmgCsp66V1c G2ZDPRr5l/DTZbitH1oYJyse1ZBdGKZUoUdjnDGLJE7mmVo0gRuyFF9wwmUoSPawy+ pRIdweIHPnwXa5L3zV3jPMGVTv4EJR7YazSUuwSPrzq48EpTtjcuGJmMwPDeZarJrc BetAmCA/HUgBA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-gpio@vger.kernel.org Subject: [PATCH v6 1/2] dt-bindings: gpio: uniphier: add UniPhier GPIO binding Date: Wed, 27 Sep 2017 11:40:21 +0900 Message-Id: <1506480022-8995-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506480022-8995-1-git-send-email-yamada.masahiro@socionext.com> References: <1506480022-8995-1-git-send-email-yamada.masahiro@socionext.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170926_194154_743617_1B75319A X-CRM114-Status: GOOD ( 11.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Jassi Brar , Linus Walleij , linux-kernel@vger.kernel.org, Masahiro Yamada , Rob Herring , Masami Hiramatsu , Rob Herring , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP This GPIO controller is used on UniPhier SoC family. The vendor specific property "socionext,interrupt-ranges" is for specifying interrupt mapping to the parent interrupt controller because the mapping is not contiguous. It works like "ranges", but transforms "interrupts" instead of "reg". Signed-off-by: Masahiro Yamada Acked-by: Rob Herring --- .../devicetree/bindings/gpio/gpio-uniphier.txt | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpio/gpio-uniphier.txt diff --git a/Documentation/devicetree/bindings/gpio/gpio-uniphier.txt b/Documentation/devicetree/bindings/gpio/gpio-uniphier.txt new file mode 100644 index 0000000..6d9251a --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/gpio-uniphier.txt @@ -0,0 +1,40 @@ +UniPhier GPIO controller + +Required properties: +- compatible: Should be "socionext,uniphier-gpio". +- reg: Specifies offset and length of the register set for the device. +- gpio-controller: Marks the device node as a GPIO controller. +- #gpio-cells: Should be 2. The first cell is the pin number and the second + cell is used to specify optional parameters. +- interrupt-parent: Specifies the parent interrupt controller. +- interrupt-controller: Marks the device node as an interrupt controller. +- #interrupt-cells: Should be 2. The first cell defines the interrupt number. + The second cell bits[3:0] is used to specify trigger type as follows: + 1 = low-to-high edge triggered + 2 = high-to-low edge triggered + 4 = active high level-sensitive + 8 = active low level-sensitive + Valid combinations are 1, 2, 3, 4, 8. +- ngpios: Specifies the number of GPIO lines. +- gpio-ranges: Mapping to pin controller pins (as described in gpio.txt) +- socionext,interrupt-ranges: Specifies an interrupt number mapping between + this GPIO controller and its interrupt parent, in the form of arbitrary + number of triplets. + +Optional properties: +- gpio-ranges-group-names: Used for named gpio ranges (as described in gpio.txt) + +Example: + gpio: gpio@55000000 { + compatible = "socionext,uniphier-gpio"; + reg = <0x55000000 0x200>; + interrupt-parent = <&aidet>; + interrupt-controller; + #interrupt-cells = <2>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&pinctrl 0 0 0>; + gpio-ranges-group-names = "gpio_range"; + ngpios = <248>; + socionext,interrupt-ranges = <0 48 16>, <16 154 5>, <21 217 3>; + };