Skip to contentSkip to conversation

AST2700 interrupt controller hierarchy support

PATCH In review Ryan Chen 3 participants 13 messages Oct 22, 2025 – Oct 26, 2025

Subsystems (3)
lore
Share & tools
lore

Ryan Chen

author reviewer
#0 lore raw

v5 cover AST2700 interrupt controller hierarchy support

This series introduces YAML bindings and driver support for the ASPEED AST2700 interrupt controller hierarchy. The AST2700 SoC contains two top-level interrupt controller blocks, INTC0 and INTC1, each responsible for routing different interrupt groups to various CPU targets.

v5:
- Adds two new YAML bindings:
- aspeed,ast2700-intc0.yaml
- aspeed,ast2700-intc1.yaml
- irq-aspeed-intc.c
- add aspeed,ast2700-intc0-ic, aspeed,ast2700-intc0-ic compatible.

v4:
- aspeed,ast2700-intc.yaml
- Clarify the relationship between INTC0/INTC1 parent nodes, the aspeed,ast2700-intc-ic child nodes, and the GIC.
- Add a block diagram and DT examples showing the cascaded wiring (GIC <- INTC0 <- INTC1 children).
- Mirrors the datasheet-described topology and register map, including the separation of INTC0/INTC1 regions.
- Lets DT unambiguously express first-level (GIC parent) and cascaded second-level (INTC0 parent) interrupt controllers via examples that use interrupts for INTC0 children and interrupts-extended for INTC1 children routed into INTC0.

- irq-ast2700-intc.c
- Drop all string decoding and human readable tables. Debugfs now dumps raw routing/protection registers only.
- Split into a separate source file and made it modular
- If the compatible not match ast2700-intc0/1, bail out return -ENODEV.

v3:
- aspeed,ast2700-intc.yaml
- Clarify the relationship between INTC0/INTC1 parent nodes, the aspeed,ast2700-intc-ic child nodes, and the GIC.
- Add a block diagram and DT examples showing the cascaded wiring

    (GIC <- INTC0 <- INTC1 children).

- Mirrors the datasheet-described topology and register map, including the separation of INTC0/INTC1 regions and their routing/protection registers.
- Lets DT unambiguously express first-level (GIC parent) and cascaded second-level (INTC0 parent) interrupt controllers via examples that use interrupts for INTC0 children and interrupts-extended for INTC1 children routed into INTC0.

- irq-aspeed-intc.c
- separate c file from irq-aspeed-intc.c
- make m

v2:
- fix dt bindingcheck

Ryan Chen (3):
dt-bindings: interrupt-controller: aspeed,ast2700: Add support for
INTC hierarchy
Irqchip/ast2700-intc: add debugfs support for routing/protection
display
irqchip: aspeed: add compatible strings for ast2700-intc0-ic and

    ast2700-intc1-ic
 .../aspeed,ast2700-intc0.yaml                 |  97 ++++++++++
 .../aspeed,ast2700-intc1.yaml                 |  94 ++++++++++
 drivers/irqchip/Kconfig                       |   6 +
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-aspeed-intc.c             |   2 +
 drivers/irqchip/irq-ast2700-intc.c            | 174 ++++++++++++++++++
 6 files changed, 374 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc1.yaml
 create mode 100644 drivers/irqchip/irq-ast2700-intc.c
Signature · 1 line
2.34.1
author reviewer
#1 lore raw

PATCH v5 1/3 dt-bindings: interrupt-controller: aspeed,ast2700: Add support for INTC hierarchy

AST2700 contains two-level interrupt controllers (INTC0 and INTC1), each with its own register space and handling different sets of peripherals.

---
 .../aspeed,ast2700-intc0.yaml                 | 97 +++++++++++++++++++
 .../aspeed,ast2700-intc1.yaml                 | 94 ++++++++++++++++++
 2 files changed, 191 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc1.yaml
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml new file +97 -0
new file mode 100644
index 000000000000..93a5b142b0a2
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/aspeed,ast2700-intc0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+maintainers:
+  - Ryan Chen <[email protected]>
+
+title: ASPEED AST2700 Interrupt Controller 0
+
+description:
+  This interrupt controller hardware is first level interrupt controller that
+  is hooked to the GIC interrupt controller. It's useful to combine multiple
+  interrupt sources into 1 interrupt to GIC interrupt controller.
+
+properties:
+  compatible:
+    const: aspeed,ast2700-intc0
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^interrupt-controller@":
+    type: object
+    description: A child interrupt controller node
+    additionalProperties: false
+
+    properties:
+      compatible:
+        enum:
+          - aspeed,ast2700-intc0-ic
+
+      reg:
+        maxItems: 1
+
+      '#interrupt-cells':
+        const: 1
+
+      interrupt-controller: true
+
+      interrupts:
+        minItems: 1
+        maxItems: 10
+
+    required:
+      - compatible
+      - reg
+      - interrupt-controller
+      - '#interrupt-cells'
+      - interrupts
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    intc0: interrupt-controller@12100000 {
+        compatible = "aspeed,ast2700-intc0";
+        reg = <0x12100000 0x4000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x12100000 0x4000>;
+
+        intc0_11: interrupt-controller@1b00 {
+            #interrupt-cells = <1>;
+            interrupt-controller;
+            compatible = "aspeed,ast2700-intc0-ic";
+            reg = <0x1b00 0x10>;
+            interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
+        };
+    };
\ No newline at end of file
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc1.yaml new file +94 -0

95 lines not on this page · raw message

Signature · 1 line
2.34.1
author reviewer
#7 lore raw

PATCH v5 2/3 Irqchip/ast2700-intc: add debugfs support for routing/protection display

In reply to Ryan Chen

AST2700 INTC0/INTC1 nodes ("aspeed,ast2700-intc0/1") not only include the interrupt controller child node ("aspeed,ast2700-intc-ic"), but also provide interrupt routing and register protection features. Adds debugfs entries for interrupt routing and protection status for AST2700 INTC0/INTC1.

---
 drivers/irqchip/Kconfig            |   6 +
 drivers/irqchip/Makefile           |   1 +
 drivers/irqchip/irq-ast2700-intc.c | 174 +++++++++++++++++++++++++++++
 3 files changed, 181 insertions(+)
 create mode 100644 drivers/irqchip/irq-ast2700-intc.c
drivers/irqchip/Kconfig +6 -0
index a61c6dc63c29..75922d5c4da6 100644
@@ -111,6 +111,12 @@ config AL_FIC
 	help
 	  Support Amazon's Annapurna Labs Fabric Interrupt Controller.
 
+config AST2700_INTC
+	tristate "AST2700 Interrupt Controller"
+	depends on ARCH_ASPEED
+	help
+	  Support AST2700 Interrupt Controller.
+
 config ATMEL_AIC_IRQ
 	bool
 	select GENERIC_IRQ_CHIP
drivers/irqchip/Makefile +1 -0
index 3de083f5484c..055724a9e536 100644
@@ -91,6 +91,7 @@ obj-$(CONFIG_LS_EXTIRQ)			+= irq-ls-extirq.o
 obj-$(CONFIG_LS_SCFG_MSI)		+= irq-ls-scfg-msi.o
 obj-$(CONFIG_ARCH_ASPEED)		+= irq-aspeed-vic.o irq-aspeed-i2c-ic.o irq-aspeed-scu-ic.o
 obj-$(CONFIG_ARCH_ASPEED)		+= irq-aspeed-intc.o
+obj-$(CONFIG_AST2700_INTC)		+= irq-ast2700-intc.o
 obj-$(CONFIG_STM32MP_EXTI)		+= irq-stm32mp-exti.o
 obj-$(CONFIG_STM32_EXTI) 		+= irq-stm32-exti.o
 obj-$(CONFIG_QCOM_IRQ_COMBINER)		+= qcom-irq-combiner.o
drivers/irqchip/irq-ast2700-intc.c new file +174 -0

174 lines not on this page · raw message

Signature · 1 line
2.34.1
author reviewer
#10 lore raw

PATCH v5 3/3 irqchip: aspeed: add compatible strings for ast2700-intc0-ic and ast2700-intc1-ic

In reply to Ryan Chen

The AST2700 SoC defines two parent interrupt controller blocks (INTC0 and INTC1), each containing multiple interrupt-controller child instances ("*-intc-ic"). The existing irqchip driver (irq-aspeed-intc.c) currently only registers a single compatible
string: "aspeed,ast2700-intc-ic"

To support device trees that describe the INTC0 and INTC1 hierarchy more precisely, this patch adds two additional compatible strings:
- "aspeed,ast2700-intc0-ic"
- "aspeed,ast2700-intc1-ic"

Both map to the same initialization function
aspeed_intc_ic_of_init().

This allows DTS bindings and drivers for AST2700 INTC0/INTC1 to be matched correctly, while maintaining backward compatibility with the original compatible string.

---
 drivers/irqchip/irq-aspeed-intc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/irqchip/irq-aspeed-intc.c +2 -0
index 8330221799a0..a40b406dc8fa 100644
@@ -137,3 +137,5 @@ static int __init aspeed_intc_ic_of_init(struct device_node *node,
 }
 
 IRQCHIP_DECLARE(ast2700_intc_ic, "aspeed,ast2700-intc-ic", aspeed_intc_ic_of_init);
+IRQCHIP_DECLARE(ast2700_intc0_ic, "aspeed,ast2700-intc0-ic", aspeed_intc_ic_of_init);
+IRQCHIP_DECLARE(ast2700_intc1_ic, "aspeed,ast2700-intc1-ic", aspeed_intc_ic_of_init);
Signature · 1 line
2.34.1
#2 lore raw

Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700: Add support for INTC hierarchy

In reply to Ryan Chen
Quoted 4 lines · Ryan Chen

AST2700 contains two-level interrupt controllers (INTC0 and INTC1), each with its own register space and handling different sets of peripherals.

Quoted 8 lines
---
 .../aspeed,ast2700-intc0.yaml                 | 97 +++++++++++++++++++
 .../aspeed,ast2700-intc1.yaml                 | 94 ++++++++++++++++++
 2 files changed, 191 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc1.yaml

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc1.yaml:94:7: [error] no new line character at the end of file (new-line-at-end-of-file) ./Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml:97:7: [error] no new line character at the end of file (new-line-at-end-of-file)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

maintainer
#3 lore raw

Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700: Add support for INTC hierarchy

In reply to Ryan Chen
Quoted 3 lines · Ryan Chen

AST2700 contains two-level interrupt controllers (INTC0 and INTC1), each with its own register space and handling different sets of peripherals.

This is a mess!

How does this relate to the existing "aspeed,ast2700-intc-ic"? Its schema has a block diagram of connections which I can understand. This does not.

The use of child nodes here is questionable. A variable number of interrupt banks is not a reason to have child nodes. I'm only guessing that's what's happening here because you haven't explained it.

Quoted 58 lines
---
 .../aspeed,ast2700-intc0.yaml                 | 97 +++++++++++++++++++
 .../aspeed,ast2700-intc1.yaml                 | 94 ++++++++++++++++++
 2 files changed, 191 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc1.yaml
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml new file +43 -0
new file mode 100644
index 000000000000..93a5b142b0a2
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/aspeed,ast2700-intc0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+maintainers:
+  - Ryan Chen <[email protected]>
+
+title: ASPEED AST2700 Interrupt Controller 0
+
+description:
+  This interrupt controller hardware is first level interrupt controller that
+  is hooked to the GIC interrupt controller. It's useful to combine multiple
+  interrupt sources into 1 interrupt to GIC interrupt controller.
+
+properties:
+  compatible:
+    const: aspeed,ast2700-intc0
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^interrupt-controller@":
+    type: object
+    description: A child interrupt controller node
+    additionalProperties: false
+
+    properties:
+      compatible:
+        enum:
+          - aspeed,ast2700-intc0-ic
+
+      reg:

Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml line 53

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml new file +10 -0
+        maxItems: 1
+
+      '#interrupt-cells':
+        const: 1
+
+      interrupt-controller: true
+
+      interrupts:
+        minItems: 1
+        maxItems: 10

What are the 10 different interrupts? You have to define what each one is.

Quoted 11 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml new file +11 -0
+
+    required:
+      - compatible
+      - reg
+      - interrupt-controller
+      - '#interrupt-cells'
+      - interrupts
+
+required:
+  - compatible
+  - reg

Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml line 74

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml new file +10 -0
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    intc0: interrupt-controller@12100000 {

This node is not an interrupt-controller.

Quoted 14 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml new file +14 -0
+        compatible = "aspeed,ast2700-intc0";
+        reg = <0x12100000 0x4000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x12100000 0x4000>;
+
+        intc0_11: interrupt-controller@1b00 {
+            #interrupt-cells = <1>;
+            interrupt-controller;
+            compatible = "aspeed,ast2700-intc0-ic";
+            reg = <0x1b00 0x10>;
+            interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>,

Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml line 97

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc0.yaml new file +9 -0
+                         <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
+        };
+    };
\ No newline at end of file

Fix.

Quoted 104 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700-intc1.yaml new file +94 -0
new file mode 100644
index 000000000000..2f807d074211
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/aspeed,ast2700-intc1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+maintainers:
+  - Ryan Chen <[email protected]>
+
+title: ASPEED AST2700 Interrupt Controller 1
+
+description:
+  This interrupt controller hardware is second level interrupt controller that
+  is hooked to a parent interrupt controller. It's useful to combine multiple
+  interrupt sources into 1 interrupt to parent interrupt controller.
+
+properties:
+  compatible:
+    const: aspeed,ast2700-intc1
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^interrupt-controller@":
+    type: object
+    description: A child interrupt controller node
+    additionalProperties: false
+
+    properties:
+      compatible:
+        enum:
+          - aspeed,ast2700-intc1-ic
+
+      reg:
+        maxItems: 1
+
+      '#interrupt-cells':
+        const: 1
+
+      interrupt-controller: true
+
+      interrupts-extended:
+        minItems: 1
+        maxItems: 1
+
+    required:
+      - compatible
+      - reg
+      - interrupt-controller
+      - '#interrupt-cells'
+      - interrupts-extended
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    intc1: interrupt-controller@14c18000 {
+        compatible = "aspeed,ast2700-intc1";
+        reg = <0x14c18000 0x400>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x14c18000 0x400>;
+
+        intc1_0: interrupt-controller@100 {
+            compatible = "aspeed,ast2700-intc1-ic";
+            reg = <0x100 0x10>;
+            #interrupt-cells = <1>;
+            interrupt-controller;
+            interrupts-extended = <&intc0_11 0>;
+        };
+
+        intc1_1: interrupt-controller@110 {
+            compatible = "aspeed,ast2700-intc1-ic";
+            reg = <0x110 0x10>;
+            #interrupt-cells = <1>;
+            interrupt-controller;
+            interrupts-extended = <&intc0_11 1>;
+        };
+    };
\ No newline at end of file
Signature · 1 line
2.34.1
#8 lore raw

Re: [PATCH v5 2/3] Irqchip/ast2700-intc: add debugfs support for routing/protection display

In reply to Ryan Chen

On Wed, Oct 22 2025 at 14:55, Ryan Chen wrote:

The prefix is: irqchip/ast....:

Quoted 3 lines

AST2700 INTC0/INTC1 nodes ("aspeed,ast2700-intc0/1") not only include the interrupt controller child node ("aspeed,ast2700-intc-ic"), but also provide interrupt routing and register protection features.

Lacks a new line to open a new paragraph.

Quoted 1 line

Adds debugfs entries for interrupt routing and protection status for

Add

Quoted 1 line

AST2700 INTC0/INTC1.

But what you are failing to explain is why this is required and useful. Just adding code because we can is not a real good reason.

Thanks,

tglx

#11 lore raw

Re: [PATCH v5 3/3] irqchip: aspeed: add compatible strings for ast2700-intc0-ic and ast2700-intc1-ic

In reply to Ryan Chen

On Wed, Oct 22 2025 at 14:55, Ryan Chen wrote:

The subject prefix is: irqchip/aspeed-intc:

It's documented how to make them:

https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-subject

Quoted 8 lines

The AST2700 SoC defines two parent interrupt controller blocks (INTC0 and INTC1), each containing multiple interrupt-controller child instances ("*-intc-ic"). The existing irqchip driver (irq-aspeed-intc.c) currently only registers a single compatible
string: "aspeed,ast2700-intc-ic"

To support device trees that describe the INTC0 and INTC1 hierarchy more precisely, this patch adds two additional

s/this patch adds/add/

git grep 'This patch' Documentation/process/

Quoted 6 lines

compatible strings:
- "aspeed,ast2700-intc0-ic"
- "aspeed,ast2700-intc1-ic"

Both map to the same initialization function
aspeed_intc_ic_of_init().

The backticks are pointless. Just write aspeed...init()

Thanks,

tglx

author reviewer
#4 lore raw

RE: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700: Add support for INTC hierarchy

In reply to Rob Herring

Hello Rob.
Thank you for your detailed review and comments.

Quoted 8 lines

Subject: Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700:
Add support for INTC hierarchy

Quoted 3 lines · Ryan Chen

AST2700 contains two-level interrupt controllers (INTC0 and INTC1), each with its own register space and handling different sets of peripherals.

Quoted 8 lines

This is a mess!

How does this relate to the existing "aspeed,ast2700-intc-ic"? Its schema has a block diagram of connections which I can understand. This does not.

The use of child nodes here is questionable. A variable number of interrupt banks is not a reason to have child nodes. I'm only guessing that's what's happening here because you haven't explained it.

Let me clarify the hardware structure and the purpose of these bindings.

The AST2700 SoC includes two top-level interrupt controller modules, INTC0 and INTC1. (aspeed,ast2700-intc0, aspeed,ast2700-intc1) Each of them provides routing selection and register protection features.
Within each INTCx block, there are multiple sub-blocks called intc-ic, each handling multi-interrupt sources. ("aspeed,ast2700-intc0-ic", "aspeed,ast2700-intc1-ic")

Cascading occurs between the child banks:
Level 1 : intc0-ic have multi-interrupts connect to GIC (root) Level 2 : multi Intc1-ic# connect to intc0-ic
The parent intc0/1 nodes expose register regions for routing and protection control, serving as containers for their intc-ic children.

The following simplified diagram shows the hierarchy:

                                 +----------+       +----------+
                                 |  intc0   |       |  intc1   |
- - - - - - - - - - - - - - - - -+---- -----+- -  - +------ - -+
  +-----------------------+      |          |       |          |
  | +-------+ +---------+ |      |          |       |          |
  | |       | |         | |      |          |       |          |
  | |  PSP  +-+ GIC     | |      |          |       |          |
  | |       | |         | |      |          |       |          |
  | +-------+ |         | |      |          |       |          |
  |           |         | |      +----------+       |          |
  |           | 192~201 <-|------+          <-------+ intc1-ic |
  |           +---------+ |      |          |       |          |
  +-----------------------+      | intc0-ic <-------+ intc1-ic |
                                 |          |       |          |
                                 | 			<-------+ intc1-ic |
                                 +----------+		  .....
Quoted 76 lines
Quoted 5 lines
---
 .../aspeed,ast2700-intc0.yaml                 | 97

+++++++++++++++++++

Quoted 1 line
 .../aspeed,ast2700-intc1.yaml                 | 94

++++++++++++++++++

Quoted 68 lines
 2 files changed, 191 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700- intc0.yaml create mode 100644 Documentation/devicetree/bindings/interrupt-controller/aspeed,ast2700- intc1.yaml

diff --git a/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast270 0-intc0.yaml b/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast270 0-intc0.yaml
new file mode 100644
index 000000000000..93a5b142b0a2

Documentation/devicetree/bindings/interrupt-controller/aspeed,as new file +51 -0
+++ t2700-intc0.yaml
@@ -0,0 +1,97 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
+---
+$id:
+http://devicetree.org/schemas/interrupt-controller/aspeed,ast2700-int
+c0.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+maintainers:
+  - Ryan Chen <[email protected]>
+
+title: ASPEED AST2700 Interrupt Controller 0
+
+description:
+  This interrupt controller hardware is first level interrupt
+controller that
+  is hooked to the GIC interrupt controller. It's useful to combine
+multiple
+  interrupt sources into 1 interrupt to GIC interrupt controller.
+
+properties:
+  compatible:
+    const: aspeed,ast2700-intc0
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^interrupt-controller@":
+    type: object
+    description: A child interrupt controller node
+    additionalProperties: false
+
+    properties:
+      compatible:
+        enum:
+          - aspeed,ast2700-intc0-ic
+
+      reg:
+        maxItems: 1
+
+      '#interrupt-cells':
+        const: 1
Quoted 8 lines

Documentation/devicetree/bindings/interrupt-controller/aspeed,as line 56

Quoted 6 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,as new file +6 -0
+
+      interrupt-controller: true
+
+      interrupts:
+        minItems: 1
+        maxItems: 10

What are the 10 different interrupts? You have to define what each one is.

In currently design in level 1, intc0-ic connect 10 interrupts to CPU GIC. So, should i use const:10 or I just use minItems: 1?

Quoted 16 lines
Quoted 16 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,as new file +15 -0
+
+    required:
+      - compatible
+      - reg
+      - interrupt-controller
+      - '#interrupt-cells'
+      - interrupts
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
Quoted 8 lines

Documentation/devicetree/bindings/interrupt-controller/aspeed,as line 77

Quoted 6 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,as new file +6 -0
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    intc0: interrupt-controller@12100000 {

This node is not an interrupt-controller.

If can't use the interrupt-controller here. What can I use? "intc0: controller@12100000" is ok ??

Quoted 26 lines
Quoted 15 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,as new file +14 -0
+        compatible = "aspeed,ast2700-intc0";
+        reg = <0x12100000 0x4000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x12100000 0x4000>;
+
+        intc0_11: interrupt-controller@1b00 {
+            #interrupt-cells = <1>;
+            interrupt-controller;
+            compatible = "aspeed,ast2700-intc0-ic";
+            reg = <0x1b00 0x10>;
+            interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>,

Documentation/devicetree/bindings/interrupt-controller/aspeed,as

Quoted 10 lines
Documentation/devicetree/bindings/interrupt-controller/aspeed,as new file +9 -0
+                         <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
+        };
+    };
\ No newline at end of file
Quoted 1 line

Fix.

Will fix it in next version.

Quoted 113 lines
Quoted 113 lines

diff --git a/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast270 0-intc1.yaml b/Documentation/devicetree/bindings/interrupt-controller/aspeed,ast270 0-intc1.yaml
new file mode 100644
index 000000000000..2f807d074211

Documentation/devicetree/bindings/interrupt-controller/aspeed,as new file +98 -1
+++ t2700-intc1.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
+---
+$id:
+http://devicetree.org/schemas/interrupt-controller/aspeed,ast2700-int
+c1.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+maintainers:
+  - Ryan Chen <[email protected]>
+
+title: ASPEED AST2700 Interrupt Controller 1
+
+description:
+  This interrupt controller hardware is second level interrupt
+controller that
+  is hooked to a parent interrupt controller. It's useful to combine
+multiple
+  interrupt sources into 1 interrupt to parent interrupt controller.
+
+properties:
+  compatible:
+    const: aspeed,ast2700-intc1
+
+  reg:
+    maxItems: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^interrupt-controller@":
+    type: object
+    description: A child interrupt controller node
+    additionalProperties: false
+
+    properties:
+      compatible:
+        enum:
+          - aspeed,ast2700-intc1-ic
+
+      reg:
+        maxItems: 1
+
+      '#interrupt-cells':
+        const: 1
+
+      interrupt-controller: true
+
+      interrupts-extended:
+        minItems: 1
+        maxItems: 1
+
+    required:
+      - compatible
+      - reg
+      - interrupt-controller
+      - '#interrupt-cells'
+      - interrupts-extended
+
+required:
+  - compatible
+  - reg
+  - '#address-cells'
+  - '#size-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    intc1: interrupt-controller@14c18000 {
+        compatible = "aspeed,ast2700-intc1";
+        reg = <0x14c18000 0x400>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x14c18000 0x400>;
+
+        intc1_0: interrupt-controller@100 {
+            compatible = "aspeed,ast2700-intc1-ic";
+            reg = <0x100 0x10>;
+            #interrupt-cells = <1>;
+            interrupt-controller;
+            interrupts-extended = <&intc0_11 0>;
+        };
+
+        intc1_1: interrupt-controller@110 {
+            compatible = "aspeed,ast2700-intc1-ic";
+            reg = <0x110 0x10>;
+            #interrupt-cells = <1>;
+            interrupt-controller;
+            interrupts-extended = <&intc0_11 1>;
+        };
+    };
\ No newline at end of file
--

2.34.1

author reviewer
#9 lore raw

RE: [PATCH v5 2/3] Irqchip/ast2700-intc: add debugfs support for routing/protection display

In reply to Thomas Gleixner
Quoted 6 lines

Subject: Re: [PATCH v5 2/3] Irqchip/ast2700-intc: add debugfs support for routing/protection display

On Wed, Oct 22 2025 at 14:55, Ryan Chen wrote:

The prefix is: irqchip/ast....:

I'll use irqchip/aspeed-intc:

Quoted 6 lines
Quoted 4 lines

AST2700 INTC0/INTC1 nodes ("aspeed,ast2700-intc0/1") not only include the interrupt controller child node ("aspeed,ast2700-intc-ic"), but also provide interrupt routing and register protection features.

Lacks a new line to open a new paragraph.

I'll split the opening sentence and the follow-up paragraph in the commit message.

Quoted 4 lines
Quoted 2 lines

Adds debugfs entries for interrupt routing and protection status for

Add

Will update

Quoted 5 lines
Quoted 2 lines

AST2700 INTC0/INTC1.

But what you are failing to explain is why this is required and useful. Just adding code because we can is not a real good reason.

The INTC0/INTC1 routing and protection registers are set up by early firmware and are not modified by Linux.

When routing is off, interrupts get merged/misdirected silently.
A minimal kernel-side visibility helps confirm that the upstream interrupt topology (e.g., which INTC1 groups are funneled to which INTC0 inputs / GIC SPIs) matches what the DT and drivers assume.

The protection bits gate which CPU can write/read specific INTC windows (PSP/SSP/TSP). When those are mis-programmed, Linux can neither steer nor even read status in places it expects to. A raw readout lets us verify that Linux isn't boxed out by mistake.

Quoted 4 lines

Thanks,

tglx

author reviewer
#12 lore raw

RE: [PATCH v5 3/3] irqchip: aspeed: add compatible strings for ast2700-intc0-ic and ast2700-intc1-ic

In reply to Thomas Gleixner
Quoted 5 lines

Subject: Re: [PATCH v5 3/3] irqchip: aspeed: add compatible strings for ast2700-intc0-ic and ast2700-intc1-ic

On Wed, Oct 22 2025 at 14:55, Ryan Chen wrote:

Quoted 7 lines

The subject prefix is: irqchip/aspeed-intc:

It's documented how to make them:

https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#patch-su
bject

Thanks, will fix.

Quoted 11 lines
Quoted 9 lines

The AST2700 SoC defines two parent interrupt controller blocks (INTC0 and INTC1), each containing multiple interrupt-controller child instances ("*-intc-ic"). The existing irqchip driver (irq-aspeed-intc.c) currently only registers a single compatible
string: "aspeed,ast2700-intc-ic"

To support device trees that describe the INTC0 and INTC1 hierarchy more precisely, this patch adds two additional

s/this patch adds/add/

will fix.

Quoted 3 lines

git grep 'This patch' Documentation/process/

will fix.

Quoted 8 lines
Quoted 6 lines

compatible strings:
- "aspeed,ast2700-intc0-ic"
- "aspeed,ast2700-intc1-ic"

Both map to the same initialization function
aspeed_intc_ic_of_init().

The backticks are pointless. Just write aspeed...init()

will fix.

Thanks a lot.

Quoted 4 lines

Thanks,

tglx

maintainer
#5 lore raw

Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700: Add support for INTC hierarchy

In reply to Ryan Chen
Quoted 30 lines · Ryan Chen

Hello Rob.
Thank you for your detailed review and comments.

Quoted 8 lines

Subject: Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700:
Add support for INTC hierarchy

Quoted 3 lines · Ryan Chen

AST2700 contains two-level interrupt controllers (INTC0 and INTC1), each with its own register space and handling different sets of peripherals.

Quoted 8 lines

This is a mess!

How does this relate to the existing "aspeed,ast2700-intc-ic"? Its schema has a block diagram of connections which I can understand. This does not.

The use of child nodes here is questionable. A variable number of interrupt banks is not a reason to have child nodes. I'm only guessing that's what's happening here because you haven't explained it.

Let me clarify the hardware structure and the purpose of these bindings.

The AST2700 SoC includes two top-level interrupt controller modules, INTC0 and INTC1. (aspeed,ast2700-intc0, aspeed,ast2700-intc1) Each of them provides routing selection and register protection features.
Within each INTCx block, there are multiple sub-blocks called intc-ic, each handling multi-interrupt sources. ("aspeed,ast2700-intc0-ic", "aspeed,ast2700-intc1-ic")

Quoted 5 lines

Cascading occurs between the child banks:
Level 1 : intc0-ic have multi-interrupts connect to GIC (root) Level 2 : multi Intc1-ic# connect to intc0-ic
The parent intc0/1 nodes expose register regions for routing and protection control, serving as containers for their intc-ic children.

Being a 2nd vs. 3rd level interrupt controller is not a reason for different compatibles. The programming model is obviously the same for both as you essentially have 0 driver changes. Having N banks of 32 interrupts vs. 1 bank of 32 interrupts is not a reason to have multiple intcN-ic nodes. That is a very common difference between instances of the same interrupt controller such as the GIC.

What you need to do is simply extend your driver to support N banks of 32 interrupts. That's what almost every other irqchip driver with more than 32 interrupts does. If you are lucky, then the offset to each bank's registers is just hwirq/32 * <bank stride> and the number of banks can be calculated from the length of 'reg'. If you are not lucky, then you could put 1 'reg' entry for each bank.

AFAICT, the existing binding in aspeed,ast2700-intc.yaml should work for you.

Quoted 4 lines

The following simplified diagram shows the hierarchy:

Quoted 16 lines
                                 +----------+       +----------+
                                 |  intc0   |       |  intc1   |
- - - - - - - - - - - - - - - - -+---- -----+- -  - +------ - -+
  +-----------------------+      |          |       |          |
  | +-------+ +---------+ |      |          |       |          |
  | |       | |         | |      |          |       |          |
  | |  PSP  +-+ GIC     | |      |          |       |          |
  | |       | |         | |      |          |       |          |
  | +-------+ |         | |      |          |       |          |
  |           |         | |      +----------+       |          |
  |           | 192~201 <-|------+          <-------+ intc1-ic |
  |           +---------+ |      |          |       |          |
  +-----------------------+      | intc0-ic <-------+ intc1-ic |
                                 |          |       |          |
                                 | 			<-------+ intc1-ic |
                                 +----------+		  .....

You already match on intc0 and handle 32 interrupts. Now you are adding intc0-ic to match on and handling the same 32 interrupts?

Rob

author reviewer
#6 lore raw

RE: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700: Add support for INTC hierarchy

Quoted 75 lines

Subject: Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: aspeed,ast2700:
Add support for INTC hierarchy

Quoted 4 lines · Ryan Chen

Hello Rob.
Thank you for your detailed review and comments.

Quoted 1 line

Subject: Re: [PATCH v5 1/3] dt-bindings: interrupt-controller:

aspeed,ast2700:

Quoted 11 lines
Quoted 11 lines

Add support for INTC hierarchy

Quoted 3 lines · Ryan Chen

AST2700 contains two-level interrupt controllers (INTC0 and INTC1), each with its own register space and handling different sets of peripherals.

This is a mess!

How does this relate to the existing "aspeed,ast2700-intc-ic"? Its schema has a block diagram of connections which I can understand. This

does not.

Quoted 14 lines
Quoted 4 lines

The use of child nodes here is questionable. A variable number of interrupt banks is not a reason to have child nodes. I'm only guessing that's what's happening here because you haven't explained it.

Let me clarify the hardware structure and the purpose of these bindings.

The AST2700 SoC includes two top-level interrupt controller modules, INTC0 and INTC1. (aspeed,ast2700-intc0, aspeed,ast2700-intc1) Each of them provides routing selection and register protection features. Within each INTCx block, there are multiple sub-blocks called intc-ic, each handling multi-interrupt sources. ("aspeed,ast2700-intc0-ic", "aspeed,ast2700-intc1-ic")

Quoted 5 lines

Cascading occurs between the child banks:
Level 1 : intc0-ic have multi-interrupts connect to GIC (root) Level 2 : multi Intc1-ic# connect to intc0-ic The parent intc0/1 nodes expose register regions for routing and protection control, serving as containers for their intc-ic children.

Being a 2nd vs. 3rd level interrupt controller is not a reason for different compatibles. The programming model is obviously the same for both as you essentially have 0 driver changes. Having N banks of 32 interrupts vs. 1 bank of 32 interrupts is not a reason to have multiple intcN-ic nodes. That is a very common difference between instances of the same interrupt controller such as the GIC.

What you need to do is simply extend your driver to support N banks of 32 interrupts. That's what almost every other irqchip driver with more than 32 interrupts does. If you are lucky, then the offset to each bank's registers is just hwirq/32 * <bank stride> and the number of banks can be calculated from the length of 'reg'. If you are not lucky, then you could put 1 'reg' entry for each bank.

AFAICT, the existing binding in aspeed,ast2700-intc.yaml should work for you.

Quoted 4 lines

The following simplified diagram shows the hierarchy:

Quoted 14 lines
                                 +----------+       +----------+
                                 |  intc0   |       |  intc1   |
- - - - - - - - - - - - - - - - -+---- -----+- -  - +------ - -+
  +-----------------------+      |          |       |          |
  | +-------+ +---------+ |      |          |       |          |
  | |       | |         | |      |          |       |          |
  | |  PSP  +-+ GIC     | |      |          |       |          |
  | |       | |         | |      |          |       |          |
  | +-------+ |         | |      |          |       |          |
  |           |         | |      +----------+       |          |
  |           | 192~201 <-|------+          <-------+ intc1-ic |
  |           +---------+ |      |          |       |          |
  +-----------------------+      | intc0-ic <-------+ intc1-ic |
                                 |          |       |
Quoted 6 lines

|

Quoted 2 lines
                                 | 			<-------+ intc1-ic |
                                 +----------+		  .....

You already match on intc0 and handle 32 interrupts. Now you are adding intc0-ic to match on and handling the same 32 interrupts?

Thank your guidance, understood your point. the currently is met requirement. For currently aspeed,ast2700-intc.yaml I still need update following. #1. Interrupts:
- maxItems: 6
+ minItems: 1
+ maxItems: 10

The 1 level request multi-interrupt to root GIC, the max is 10. 2nd level only request 1 to level 1 intc-ic.
in level 1: will be need 10, 2nd level only need 1.

Level1 :

        intc0_11: interrupt-controller@12101b00 {
            compatible = "aspeed,ast2700-intc-ic";
            reg = <0x0 0x12101b00 0x0 0x10>;
            #interrupt-cells = <1>;
            interrupt-controller;
            interrupts = <GIC_SPI 192 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 194 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 195 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 199 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>,
                    <GIC_SPI 201 IRQ_TYPE_LEVEL_HIGH>;
        };

Level 2:

     intc1_0: interrupt-controller@14c18100 {
            compatible = "aspeed,ast2700-intc-ic";
            reg = <0x0 0x14c18100 0x0 0x10>;
            #interrupt-cells = <1>;
            interrupt-controller;
            interrupts-extended = <&intc0_11 0>;
        };

#2. '#interrupt-cells':

    -const: 2 
    +const: 1

Due to the driver irq-aspeed-intc.c not support any trigger type.

Quoted 2 lines

Rob