From patchwork Wed Sep 27 02:45:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 9972981 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 0407660375 for ; Wed, 27 Sep 2017 02:46:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D441028F32 for ; Wed, 27 Sep 2017 02:46:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8BA528F5E; Wed, 27 Sep 2017 02:46:47 +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=ham 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 6148428F32 for ; Wed, 27 Sep 2017 02:46:47 +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=bXkIF0sh/9XxM/0LH40glI4zdF eZA/TlLP0/CeoM8IocrYqZSmN1W2oHoMkW8THiw6UVyDMEtB6YGbOwmM53vo88Z6VqK2VJcizXe2z gSN/mLQP6fdXkgHCdrPlQkFhdn31OmPvQ0KjpK49A5v2GzfdeR4UwDzXgtv+eUo1inHycPArt4rLa QHqJ1NyuxuKw06X2TKbLl9kqRJno0FMAFQqGrh24tYfA9i8JFWOjjwNdHOsCtv4Nrj3s59w6m0p2v QmWkmuFJWyMj4tpKlcumff+ZhtoGqlo8iZQVjgPnWwMkJ2GgwvbWLQxX2v6Q9gryRsIc/cI3vfnnL nn+PahrQ==; 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 1dx2N0-0006LC-2S; Wed, 27 Sep 2017 02:46:42 +0000 Received: from conuserg-07.nifty.com ([210.131.2.74]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dx2Mv-00062e-HV for linux-arm-kernel@lists.infradead.org; Wed, 27 Sep 2017 02:46:39 +0000 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-07.nifty.com with ESMTP id v8R2jiYN009483; Wed, 27 Sep 2017 11:45:46 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com v8R2jiYN009483 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1506480346; bh=P4nFzQKMWibQFU0QwvqMPvI6Eei29vRx/+/3NWAsb+8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OMKhOMyx+qu56E/CzE71+76xOwkzI6+QiVgNnZ/wCFQQhiPlzbLpc+ei0kpSe64/n m37oIVSeEo6Cb9va2Mgcyf2lHzOGbcW21AjTmmwabzixCZG1/nX+YjJLt7BRUzeM8n sS/LCtSKGq9LU5whH+9U6VFRfY1Z0As8QPOLl6C5I8g91cxd/pxQhYnMgUbKr6YIdp qbkLhZOG/702uscgDknoWZsPpa9X3wc2tcgvIaY34yRXuVYCpv9tJLKpIzrP4sYrpe LxjHLMi8FntsSobbxM3W5p2l5zeUyGDNwvMigk3HYOnrVHN96Q1MDUGaPlWp1YQ7a1 5tp6o1oz7LQ7g== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-gpio@vger.kernel.org Subject: [PATCH v7 1/2] dt-bindings: gpio: uniphier: add UniPhier GPIO binding Date: Wed, 27 Sep 2017 11:45:42 +0900 Message-Id: <1506480343-9597-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506480343-9597-1-git-send-email-yamada.masahiro@socionext.com> References: <1506480343-9597-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_194637_959485_03153C14 X-CRM114-Status: GOOD ( 11.10 ) 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>; + };