Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp4539513imd; Tue, 30 Oct 2018 03:45:50 -0700 (PDT) X-Google-Smtp-Source: AJdET5dKiKvxqiJ2+Kbz4x7dagTmN+suZxmWXuy5j5t3rxMMCP+07N/xA4WmjoQcPoWd0CCfcSMf X-Received: by 2002:a65:64d5:: with SMTP id t21-v6mr2217623pgv.428.1540896350913; Tue, 30 Oct 2018 03:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540896350; cv=none; d=google.com; s=arc-20160816; b=wOFil56kQYajJrHtrCuwZ1dXUMk1Ch6psNih+MT0dOKHu9F49kXGl/DGKtqYro1B5U IX/R+oGW8bjF59XKRLtCSOpoE5HYhoOmoFI6YLw4ikKKwwRWZR9reyc3C3r1wxUVOauT Ja+Ftd7Hnq2R3plELflMo7l4v1sxnwREdloVCKovWZLdkV+Fl2NcwfG7N/Wycb2U/TCC NqlfJ16ditbFx26wWzNfPAQlcQviTauRyrleUPmuhy0RbJPvBxhmSnCllublcUuDbqAA T5hYfFIGat4mVEDewNLCxkPdZvDBvxDEKOkSOS7aERu1/IL9Uf0LNWuBOts5Mph+mddW ChWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=V6U/OgM2zzIlnVXGLj0snScZM59/Fy//srr229MDZB0=; b=UPDPW+LkfQmHJcTep3sIXGxKt+B3mL3/mZf29wiBGN2rR05rXFo23y0fqQzI4kc5un yc+QMstXkn/wu0Zb8vXa2EhiWmfsMGG/QIHdbXd0xlhr+TAgtgKB9SBEW4zTIPZ+oOJh r8DAfP9t0wFNvxqi425q8J5JyjytKBUTyO8bfCXVjqfAvbRFi+SDD0oJnNCQC2bJRmp5 y4tWN5gsSZ+kkZVrCPTFD4uK1pDPiGKTCwAWYJBlRUuph+Y6yiXAf9vk6vglMbvblXok EZIz0W5m3ODfoX5Rs9WiQXC6ICj2MtdK/BlnIcqTcf/iTctAefXGttK+uhOlMQ6rCFjQ 92QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1-v6si23123324pls.17.2018.10.30.03.45.35; Tue, 30 Oct 2018 03:45:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727603AbeJ3TiA (ORCPT + 99 others); Tue, 30 Oct 2018 15:38:00 -0400 Received: from relmlor3.renesas.com ([210.160.252.173]:38508 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726692AbeJ3TiA (ORCPT ); Tue, 30 Oct 2018 15:38:00 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie2.idc.renesas.com with ESMTP; 30 Oct 2018 19:45:01 +0900 Received: from relmlii2.idc.renesas.com (relmlii2.idc.renesas.com [10.200.68.66]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 95F1F95E51; Tue, 30 Oct 2018 19:45:01 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.54,444,1534777200"; d="scan'208";a="296394853" Received: from unknown (HELO vbox.ree.adwin.renesas.com) ([10.226.37.67]) by relmlii2.idc.renesas.com with ESMTP; 30 Oct 2018 19:44:58 +0900 From: Phil Edworthy To: Marc Zyngier , Thomas Gleixner , Jason Cooper , Rob Herring , Mark Rutland Cc: Geert Uytterhoeven , linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Phil Edworthy , devicetree@vger.kernel.org Subject: [PATCH v2 1/2] dt-bindings/interrupt-controller: rzn1: Add RZ/N1 gpio irq mux binding Date: Tue, 30 Oct 2018 10:44:37 +0000 Message-Id: <20181030104438.27827-2-phil.edworthy@renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181030104438.27827-1-phil.edworthy@renesas.com> References: <20181030104438.27827-1-phil.edworthy@renesas.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add device binding documentation for the Renesas RZ/N1 GPIO interrupt multiplexer. Signed-off-by: Phil Edworthy --- v2: - Use interrupt-map to allow the GPIO controller info to be specified as part of the irq. - Don't show status in binding examples. - Don't show the soc/board split in binding doc. --- .../interrupt-controller/renesas,rzn1-mux.txt | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas,rzn1-mux.txt diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,rzn1-mux.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzn1-mux.txt new file mode 100644 index 000000000000..0b4ba27c00ef --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,rzn1-mux.txt @@ -0,0 +1,92 @@ +* Renesas RZ/N1 GPIO Interrupt Multiplexer + +On Renesas RZ/N1 devices, there are several GPIO Controllers each with a number +of interrupt outputs. All of the interrupts from the GPIO Controllers are passed +to the GPIO Interrupt Multiplexer, which selects a sub-set of the interrupts to +pass onto the system interrupt controller. + +A single node in the device tree is used to describe the GPIO IRQ Muxer. + +Required properties: +- compatible: SoC-specific compatible string "renesas,-gpioirqmux" + followed by "renesas,rzn1-gpioirqmux" as fallback. The SoC-specific compatible + strings must be one of: + "renesas,r9a06g032-gpioirqmux" for RZ/N1D + "renesas,r9a06g033-gpioirqmux" for RZ/N1S +- interrupt-controller: Identifies the node as an interrupt controller. +- #interrupt-cells: should be <1>. The meaning of the cells is the input + interrupt index, 0 to 95. +- reg: Base address and size of GPIO IRQ Muxer registers. +- interrupts: This is a list of interrupt specifiers. Each interrupt consists of + three numbers that represent: + - (a) the index of the GPIO Interrupt Multiplexer output interrupt (0..7) + - (b) the index of the GPIO Controller input interrupt (0..2) + - (c) the interrupt index of the GPIO Controller input interrupt (0..31). +- interrupt-parent: A phandle for a local node that specifies an interrupt-map. + The interrupt-map node must specify #interrupt-cells = <3>, and an + interrupt-map property. The interrupt-map is used to translate the interrupt + specifier to the output interrupts. It is used in conjunction with an + interrupt-map-mask property to mask (b) and (c) from the interrupt specifier + so that essentially there is a direct map from (a) to the output interrupt. + Therefore (b) and (c) can be used to determine the interrupt source and + configure the hardware accordingly. For information on interrupts, + see Documentation/devicetree/bindings/interrupt-controller/interrupts.txt + +Example: + + The following is an example for the RZ/N1D SoC. + + gpioirqmux: gpioirqmux@51000480 { + compatible = "renesas,r9a06g032-gpioirqmux", + "renesas,rzn1-gpioirqmux"; + reg = <0x51000480 0x20>; + + interrupt-controller; + #interrupt-cells = <1>; + interrupt-parent = <&gpioirqmux_map>; + interrupts = + <0 1 17>, /* gpio1a 17 */ + <1 1 24>, /* gpio1a 24 */ + <2 1 26>; /* gpio1a 26 */ + + gpioirqmux_map: gpioirqmux-map { + #interrupt-cells = <3>; + #address-cells = <0>; + interrupt-map-mask = <7 0 0>; + interrupt-map = + <0 0 0 &gic GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>, + <1 0 0 &gic GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>, + <2 0 0 &gic GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>, + <3 0 0 &gic GIC_SPI 106 IRQ_TYPE_LEVEL_HIGH>, + <4 0 0 &gic GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>, + <5 0 0 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, + <6 0 0 &gic GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>, + <7 0 0 &gic GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>; + }; + }; + + gpio1: gpio@5000c000 { + compatible = "snps,dw-apb-gpio"; + reg = <0x5000c000 0x80>; + #address-cells = <1>; + #size-cells = <0>; + clock-names = "bus"; + clocks = <&sysctrl R9A06G032_HCLK_GPIO1>; + + gpio1a: gpio-controller@0 { + compatible = "snps,dw-apb-gpio-port"; + bank-name = "gpio1a"; + gpio-controller; + #gpio-cells = <2>; + snps,nr-gpios = <32>; + reg = <0>; + + interrupt-controller; + interrupt-parent = <&gpioirqmux>; + interrupts = < 0 1 2 3 4 5 6 7 + 8 9 10 11 12 13 14 15 + 16 17 18 19 20 21 22 23 + 24 25 26 27 28 29 30 31 >; + #interrupt-cells = <2>; + }; + }; -- 2.17.1