From: James Tai <james.tai@realtek.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Marc Zyngier <maz@kernel.org>, "Rob Herring" <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
James Tai <james.tai@realtek.com>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Subject: [PATCH v4 1/6] dt-bindings: interrupt-controller: Add support for Realtek DHC SoCs
Date: Thu, 28 Dec 2023 14:08:20 +0800 [thread overview]
Message-ID: <20231228060825.1380439-2-james.tai@realtek.com> (raw)
In-Reply-To: <20231228060825.1380439-1-james.tai@realtek.com>
Add the YAML documentation for Realtek DHC (Digital Home Center) SoCs.
Signed-off-by: James Tai <james.tai@realtek.com>
---
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Marc Zyngier <maz@kernel.org>
CC: Rob Herring <robh+dt@kernel.org>
CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
CC: Conor Dooley <conor+dt@kernel.org>
CC: linux-kernel@vger.kernel.org
CC: devicetree@vger.kernel.org
v3 to v4 change:
- Adjusted the allOf block to add constraints on the interrupts per variant
v2 to v3 change:
- Retested the bindings using the new version of the dtschema
- Fixed the order of property items
- Removed redundant files and replaced them with 'realtek,intc.yaml'
- Replaced 'interrupts-extended' with 'interrupts'
- Added a description for 'interrupts'
- Reduced the example code
v1 to v2 change:
- Tested the bindings using 'make dt_binding_check'
- Fixed code style issues
.../interrupt-controller/realtek,intc.yaml | 131 ++++++++++++++++++
1 file changed, 131 insertions(+)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/realtek,intc.yaml
diff --git a/Documentation/devicetree/bindings/interrupt-controller/realtek,intc.yaml b/Documentation/devicetree/bindings/interrupt-controller/realtek,intc.yaml
new file mode 100644
index 000000000000..d3e4919850cc
--- /dev/null
+++ b/Documentation/devicetree/bindings/interrupt-controller/realtek,intc.yaml
@@ -0,0 +1,131 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/realtek,intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Realtek DHC SoCs Interrupt Controller
+
+maintainers:
+ - James Tai <james.tai@realtek.com>
+
+description:
+ This interrupt controller is a component of Realtek DHC (Digital Home Center)
+ SoCs and is designed to receive interrupts from peripheral devices.
+
+ Each DHC SoC has two sets of interrupt controllers, each capable of
+ handling up to 32 interrupts.
+
+properties:
+ compatible:
+ enum:
+ - realtek,rtd1319-intc-iso
+ - realtek,rtd1319-intc-misc
+ - realtek,rtd1319d-intc-iso
+ - realtek,rtd1319d-intc-misc
+ - realtek,rtd1325-intc-iso
+ - realtek,rtd1325-intc-misc
+ - realtek,rtd1619b-intc-iso
+ - realtek,rtd1619b-intc-misc
+
+ reg:
+ maxItems: 1
+
+ interrupt-controller: true
+
+ '#interrupt-cells':
+ const: 1
+
+ '#address-cells':
+ const: 0
+
+ interrupts:
+ minItems: 1
+ maxItems: 3
+ description:
+ Contains the GIC SPI IRQs mapped to the external interrupt lines.
+
+required:
+ - compatible
+ - reg
+ - interrupt-controller
+ - '#interrupt-cells'
+ - '#address-cells'
+ - interrupts
+
+additionalProperties: false
+
+allOf:
+ - $ref: /schemas/interrupt-controller.yaml#
+ - if:
+ properties:
+ compatible:
+ enum:
+ - realtek,rtd1319-intc-iso
+ then:
+ properties:
+ interrupts:
+ minItems: 1
+ items:
+ - description: isolation irqs
+ - description: rtc irq
+ - if:
+ properties:
+ compatible:
+ enum:
+ - realtek,rtd1319d-intc-iso
+ - realtek,rtd1325-intc-iso
+ - realtek,rtd1619b-intc-iso
+ then:
+ properties:
+ interrupts:
+ minItems: 1
+ items:
+ - description: isolation irqs
+ - description: watchdog irq
+ - if:
+ properties:
+ compatible:
+ enum:
+ - realtek,rtd1319-intc-misc
+ then:
+ properties:
+ interrupts:
+ minItems: 3
+ items:
+ - description: miscellaneous irqs
+ - description: watchdog irq
+ - description: uart1 irq
+ - description: uart2 irq
+ - if:
+ properties:
+ compatible:
+ enum:
+ - realtek,rtd1319d-intc-misc
+ - realtek,rtd1325-intc-misc
+ - realtek,rtd1619b-intc-misc
+ then:
+ properties:
+ interrupts:
+ minItems: 2
+ items:
+ - description: miscellaneous irqs
+ - description: uart1 irq
+ - description: uart2 irq
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+ realtek_iso_intc: interrupt-controller@40 {
+ compatible = "realtek,rtd1319-intc-iso";
+ reg = <0x00 0x40>;
+ interrupt-parent = <&gic>;
+ interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ };
+...
--
2.25.1
next prev parent reply other threads:[~2023-12-28 6:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 6:08 [PATCH v4 0/6] Initial support for the Realtek interrupt controller James Tai
2023-12-28 6:08 ` James Tai [this message]
2023-12-28 7:41 ` [PATCH v4 1/6] dt-bindings: interrupt-controller: Add support for Realtek DHC SoCs Krzysztof Kozlowski
2023-12-29 15:59 ` James Tai [戴志峰]
2023-12-28 6:08 ` [PATCH v4 2/6] irqchip: Add interrupt controller " James Tai
2023-12-28 6:08 ` [PATCH v4 3/6] irqchip: Introduce RTD1319 support using the Realtek common interrupt controller driver James Tai
2023-12-28 6:08 ` [PATCH v4 4/6] irqchip: Introduce RTD1319D " James Tai
2024-01-09 4:45 ` kernel test robot
2023-12-28 6:08 ` [PATCH v4 5/6] irqchip: Introduce RTD1325 " James Tai
2023-12-28 6:08 ` [PATCH v4 6/6] irqchip: Introduce RTD1619B " James Tai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231228060825.1380439-2-james.tai@realtek.com \
--to=james.tai@realtek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=robh+dt@kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®