Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp514656ybj; Thu, 7 May 2020 00:57:22 -0700 (PDT) X-Google-Smtp-Source: APiQypJjTvjwnskynzSNT43WVZdZl675DdeFc9prY3ftSLur5WmGczxFYMP4H+y2Qa0WkY3QlL8z X-Received: by 2002:a05:6402:30b4:: with SMTP id df20mr4619009edb.324.1588838241819; Thu, 07 May 2020 00:57:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588838241; cv=none; d=google.com; s=arc-20160816; b=NUT3KjG2v8nw+PE8yzuZ9sqM0iM8S8Sh9aRy8stJgV8aqa81HK8KxminUiQg4cE14L CnzgnssuC/8EVpjWBjR8StKZlTOzB821RTT6Zh9It9NnRbPaTWenlK0Z5mCpJrVmieXt 6FX661lFG33PsCFuy0+HtKHUSLS3auCrRoDujKvHAD/64Ek/EBzFCCTUxvCBngcdLn1i OJduAGlTqIzUE33v0+HCZdhDdYWtNEAuBabOxZoJX0hZKAqVptes0mZRV9fvvRQo5J7R yulaaoZKuSj5oC9I09pw3MbkpqakfrlJYi2aG7yhH8quLydfBxjbDHf3Gs8yEjilxuH0 slGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=yv10EHyW7VjD1LB3hm7xGgcO430MyF0rNbAaJVm70Lw=; b=mhKcXF0qwDuPwefwtednQr1e/CI+9vWE28M8pUIpnSxJyrv1YnsuB8pIkijpmQLEoh pL//lVS9NuocyG7yHwozKV0iFel1d4Klau8oK0o6889p08F/pEGroPXCrqgZmElsPLpM VWUKEFDcSuv789prkQsTiUXadG1hNAnp83491VqAtX4ba1gmyEzeRwFInLkLSq70CXJk oI406AvnWZI0G5HUXVJxcjmfS6Q8OdOW4av8BPF6g6fg9KWdQSdSkcL1U16OHPGMdIJB PRfFZyDVHDsIIRypefX/bpmPDgZrMSCQBmK4bCI+BH9+KZhesgNLcWyTB50I8oHAm3gy ltKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k8si2728966eja.365.2020.05.07.00.56.58; Thu, 07 May 2020 00:57:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726320AbgEGHzH (ORCPT + 99 others); Thu, 7 May 2020 03:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43826 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725862AbgEGHzG (ORCPT ); Thu, 7 May 2020 03:55:06 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D33AC061A41 for ; Thu, 7 May 2020 00:55:06 -0700 (PDT) Received: from ramsan ([IPv6:2a02:1810:ac12:ed60:6572:4a1f:d283:9ae8]) by michel.telenet-ops.be with bizsmtp id bjv42200a3ZRV0X06jv4l4; Thu, 07 May 2020 09:55:05 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1jWbN2-0001WQ-Jm; Thu, 07 May 2020 09:55:04 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1jWbN2-0008PY-Gd; Thu, 07 May 2020 09:55:04 +0200 From: Geert Uytterhoeven To: Rob Herring , Thomas Gleixner , Jason Cooper , Marc Zyngier Cc: Yoshihiro Kaneko , devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH v3] dt-bindings: irqchip: renesas-intc-irqpin: Convert to json-schema Date: Thu, 7 May 2020 09:55:03 +0200 Message-Id: <20200507075503.32291-1-geert+renesas@glider.be> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yoshihiro Kaneko Convert the Renesas Interrupt Controller (INTC) for external pins Device Tree binding documentation to json-schema. Signed-off-by: Yoshihiro Kaneko Co-developed-by: Geert Uytterhoeven Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Kaneko-san, - Update license, - Fix title, - Remove standard descriptions, - reg: fix minItems, add descriptions, - interrupts: fix {min,max}Items, - sense-bitfield-width: add enum and default, use description, - control-parent: use description, - Make clocks and power-domains required on SH/R-Mobile, - Group interrupts in example, v2: - Correct Geert-san's E-mail address, - Delete Guennadi-san from the maintainer of this binding, - Give 'sense-bitfield-width' the uint32 type, - Describe 'control-parent' property as a boolean. --- .../renesas,intc-irqpin.txt | 62 ---------- .../renesas,intc-irqpin.yaml | 108 ++++++++++++++++++ 2 files changed, 108 insertions(+), 62 deletions(-) delete mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt create mode 100644 Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.yaml diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt deleted file mode 100644 index 772c550d3b4bcfe2..0000000000000000 --- a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.txt +++ /dev/null @@ -1,62 +0,0 @@ -DT bindings for the R-/SH-Mobile irqpin controller - -Required properties: - -- compatible: has to be "renesas,intc-irqpin-", "renesas,intc-irqpin" - as fallback. - Examples with soctypes are: - - "renesas,intc-irqpin-r8a7740" (R-Mobile A1) - - "renesas,intc-irqpin-r8a7778" (R-Car M1A) - - "renesas,intc-irqpin-r8a7779" (R-Car H1) - - "renesas,intc-irqpin-sh73a0" (SH-Mobile AG5) - -- reg: Base address and length of each register bank used by the external - IRQ pins driven by the interrupt controller hardware module. The base - addresses, length and number of required register banks varies with soctype. -- interrupt-controller: Identifies the node as an interrupt controller. -- #interrupt-cells: has to be <2>: an interrupt index and flags, as defined in - interrupts.txt in this directory. -- interrupts: Must contain a list of interrupt specifiers. For each interrupt - provided by this irqpin controller instance, there must be one entry, - referring to the corresponding parent interrupt. - -Optional properties: - -- any properties, listed in interrupts.txt, and any standard resource allocation - properties -- sense-bitfield-width: width of a single sense bitfield in the SENSE register, - if different from the default 4 bits -- control-parent: disable and enable interrupts on the parent interrupt - controller, needed for some broken implementations -- clocks: Must contain a reference to the functional clock. This property is - mandatory if the hardware implements a controllable functional clock for - the irqpin controller instance. -- power-domains: Must contain a reference to the power domain. This property is - mandatory if the irqpin controller instance is part of a controllable power - domain. - - -Example -------- - - irqpin1: interrupt-controller@e6900004 { - compatible = "renesas,intc-irqpin-r8a7740", - "renesas,intc-irqpin"; - #interrupt-cells = <2>; - interrupt-controller; - reg = <0xe6900004 4>, - <0xe6900014 4>, - <0xe6900024 1>, - <0xe6900044 1>, - <0xe6900064 1>; - interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH - 0 149 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&mstp2_clks R8A7740_CLK_INTCA>; - power-domains = <&pd_a4s>; - }; diff --git a/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.yaml b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.yaml new file mode 100644 index 0000000000000000..800243d3ee8ef42f --- /dev/null +++ b/Documentation/devicetree/bindings/interrupt-controller/renesas,intc-irqpin.yaml @@ -0,0 +1,108 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/interrupt-controller/renesas,intc-irqpin.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas Interrupt Controller (INTC) for external pins + +maintainers: + - Geert Uytterhoeven + +properties: + compatible: + items: + - enum: + - renesas,intc-irqpin-r8a7740 # R-Mobile A1 + - renesas,intc-irqpin-r8a7778 # R-Car M1A + - renesas,intc-irqpin-r8a7779 # R-Car H1 + - renesas,intc-irqpin-sh73a0 # SH-Mobile AG5 + - const: renesas,intc-irqpin + + reg: + minItems: 5 + items: + - description: Interrupt control register + - description: Interrupt priority register + - description: Interrupt source register + - description: Interrupt mask register + - description: Interrupt mask clear register + - description: Interrupt control register for ICR0 with IRLM0 bit + + interrupt-controller: true + + '#interrupt-cells': + const: 2 + + interrupts: + minItems: 1 + maxItems: 8 + + sense-bitfield-width: + allOf: + - $ref: /schemas/types.yaml#/definitions/uint32 + - enum: [2, 4] + default: 4 + description: + Width of a single sense bitfield in the SENSE register, if different from the + default. + + control-parent: + type: boolean + description: + Disable and enable interrupts on the parent interrupt controller, needed for some + broken implementations. + + clocks: + maxItems: 1 + + power-domains: + maxItems: 1 + +required: + - compatible + - reg + - interrupt-controller + - '#interrupt-cells' + - interrupts + +if: + properties: + compatible: + contains: + enum: + - renesas,intc-irqpin-r8a7740 + - renesas,intc-irqpin-sh73a0 +then: + required: + - clocks + - power-domains + +additionalProperties: false + +examples: + - | + #include + #include + #include + + irqpin1: interrupt-controller@e6900004 { + compatible = "renesas,intc-irqpin-r8a7740", "renesas,intc-irqpin"; + reg = <0xe6900004 4>, + <0xe6900014 4>, + <0xe6900024 1>, + <0xe6900044 1>, + <0xe6900064 1>; + interrupt-controller; + #interrupt-cells = <2>; + interrupts = , + , + , + , + , + , + , + ; + clocks = <&mstp2_clks R8A7740_CLK_INTCA>; + power-domains = <&pd_a4s>; + }; -- 2.17.1