Skip to contentSkip to conversation

Add MStar interrupt controller support

PATCH Applied Mark-PK Tsai 4 participants 8 messages Sep 2, 2020 – Oct 11, 2020

Subsystems (4)
lore
Share & tools
lore

Mark-PK Tsai

author maintainer
#0 lore raw

v3 cover Add MStar interrupt controller support

MStar contain a legacy interrupt controller that routes interrupts to the GIC. SigmaStar and Mediatek TV SoCs also have this interrupt controller IP.

Mark-PK Tsai (2):
irqchip: irq-mst: Add MStar interrupt controller support
dt-bindings: interrupt-controller: Add MStar interrupt controller

 .../interrupt-controller/mstar,mst-intc.yaml  |  64 ++++++
 MAINTAINERS                                   |   7 +
 drivers/irqchip/Kconfig                       |   8 +
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-mst-intc.c                | 199 ++++++++++++++++++
 5 files changed, 279 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
 create mode 100644 drivers/irqchip/irq-mst-intc.c
Signature · 1 line
2.18.0
author maintainer
#1 lore raw

PATCH v3 1/2 irqchip: irq-mst: Add MStar interrupt controller support

Add MStar interrupt controller support using hierarchy irq domain.

---
 MAINTAINERS                    |   7 ++
 drivers/irqchip/Kconfig        |   8 ++
 drivers/irqchip/Makefile       |   1 +
 drivers/irqchip/irq-mst-intc.c | 199 +++++++++++++++++++++++++++++++++
 4 files changed, 215 insertions(+)
 create mode 100644 drivers/irqchip/irq-mst-intc.c
MAINTAINERS +7 -0
index e4647c84c987..f3ce60b181af 100644
@@ -11755,6 +11755,13 @@ Q:	http://patchwork.linuxtv.org/project/linux-media/list/
 T:	git git://linuxtv.org/anttip/media_tree.git
 F:	drivers/media/usb/msi2500/
 
+MSTAR INTERRUPT CONTROLLER DRIVER
+M:	Mark-PK Tsai <[email protected]>
+M:	Daniel Palmer <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
+F:	drivers/irqchip/irq-mst-intc.c
+
 MSYSTEMS DISKONCHIP G3 MTD DRIVER
 M:	Robert Jarzmik <[email protected]>
 L:	[email protected]
drivers/irqchip/Kconfig +8 -0
index bfc9719dbcdc..c6321a69aed9 100644
@@ -571,4 +571,12 @@ config LOONGSON_PCH_MSI
 	help
 	  Support for the Loongson PCH MSI Controller.
 
+config MST_IRQ
+	bool "MStar Interrupt Controller"
+	default ARCH_MEDIATEK
+	select IRQ_DOMAIN
+	select IRQ_DOMAIN_HIERARCHY
+	help
+	  Support MStar Interrupt Controller.
+
 endmenu
drivers/irqchip/Makefile +1 -0
index 133f9c45744a..e2688a62403e 100644
@@ -111,3 +111,4 @@ obj-$(CONFIG_LOONGSON_HTPIC)		+= irq-loongson-htpic.o
 obj-$(CONFIG_LOONGSON_HTVEC)		+= irq-loongson-htvec.o
 obj-$(CONFIG_LOONGSON_PCH_PIC)		+= irq-loongson-pch-pic.o
 obj-$(CONFIG_LOONGSON_PCH_MSI)		+= irq-loongson-pch-msi.o
+obj-$(CONFIG_MST_IRQ)			+= irq-mst-intc.o
drivers/irqchip/irq-mst-intc.c new file +199 -0

199 lines not on this page · raw message

Signature · 1 line
2.18.0
merge bot Applied
#2 lore raw

[tip: irq/core] irqchip/irq-mst: Add MStar interrupt controller support

The following commit has been merged into the irq/core branch of tip:

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     ad4c938c92af91302e363b1842c82f1cc4a6c4fd
Gitweb:        https://git.kernel.org/tip/ad4c938c92af91302e363b1842c82f1cc4a6c4fd
Author:        Mark-PK Tsai <[email protected]>
AuthorDate:    Wed, 02 Sep 2020 14:33:43 +08:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Sat, 10 Oct 2020 12:39:27 +01:00

irqchip/irq-mst: Add MStar interrupt controller support

Add MStar interrupt controller support using hierarchy irq domain.

---
 MAINTAINERS                    |   7 +-
 drivers/irqchip/Kconfig        |   8 +-
 drivers/irqchip/Makefile       |   1 +-
 drivers/irqchip/irq-mst-intc.c | 199 ++++++++++++++++++++++++++++++++-
 4 files changed, 215 insertions(+)
 create mode 100644 drivers/irqchip/irq-mst-intc.c
MAINTAINERS +7 -0
index b5cfab0..c1e90fc 100644
@@ -11771,6 +11771,13 @@ Q:	http://patchwork.linuxtv.org/project/linux-media/list/
 T:	git git://linuxtv.org/anttip/media_tree.git
 F:	drivers/media/usb/msi2500/
 
+MSTAR INTERRUPT CONTROLLER DRIVER
+M:	Mark-PK Tsai <[email protected]>
+M:	Daniel Palmer <[email protected]>
+S:	Maintained
+F:	Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
+F:	drivers/irqchip/irq-mst-intc.c
+
 MSYSTEMS DISKONCHIP G3 MTD DRIVER
 M:	Robert Jarzmik <[email protected]>
 L:	[email protected]
drivers/irqchip/Kconfig +8 -0
index bfc9719..c6321a6 100644
@@ -571,4 +571,12 @@ config LOONGSON_PCH_MSI
 	help
 	  Support for the Loongson PCH MSI Controller.
 
+config MST_IRQ
+	bool "MStar Interrupt Controller"
+	default ARCH_MEDIATEK
+	select IRQ_DOMAIN
+	select IRQ_DOMAIN_HIERARCHY
+	help
+	  Support MStar Interrupt Controller.
+
 endmenu
drivers/irqchip/Makefile +1 -0
index 133f9c4..e2688a6 100644
@@ -111,3 +111,4 @@ obj-$(CONFIG_LOONGSON_HTPIC)		+= irq-loongson-htpic.o
 obj-$(CONFIG_LOONGSON_HTVEC)		+= irq-loongson-htvec.o
 obj-$(CONFIG_LOONGSON_PCH_PIC)		+= irq-loongson-pch-pic.o
 obj-$(CONFIG_LOONGSON_PCH_MSI)		+= irq-loongson-pch-msi.o
+obj-$(CONFIG_MST_IRQ)			+= irq-mst-intc.o
drivers/irqchip/irq-mst-intc.c new file +199 -0

199 lines not on this page · raw message

author maintainer
#3 lore raw

PATCH v3 2/2 dt-bindings: interrupt-controller: Add MStar interrupt controller

In reply to Mark-PK Tsai

Add binding for MStar interrupt controller.

---
 .../interrupt-controller/mstar,mst-intc.yaml  | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml new file +64 -0
new file mode 100644
index 000000000000..bbf0f26cd008
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/mstar,mst-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar Interrupt Controller
+
+maintainers:
+  - Mark-PK Tsai <[email protected]>
+
+description: |+
+  MStar, SigmaStar and Mediatek TV SoCs contain multiple legacy
+  interrupt controllers that routes interrupts to the GIC.
+
+  The HW block exposes a number of interrupt controllers, each
+  can support up to 64 interrupts.
+
+properties:
+  compatible:
+    const: mstar,mst-intc
+
+  interrupt-controller: true
+
+  "#interrupt-cells":
+    const: 3
+    description: |
+      Use the same format as specified by GIC in arm,gic.yaml.
+
+  reg:
+    maxItems: 1
+
+  mstar,irqs-map-range:
+    description: |
+      The range <start, end> of parent interrupt controller's interrupt
+      lines that are hardwired to mstar interrupt controller.
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    items:
+      minItems: 2
+      maxItems: 2
+
+  mstar,intc-no-eoi:
+    description:
+      Mark this controller has no End Of Interrupt(EOI) implementation.
+    type: boolean
+
+required:
+  - compatible
+  - reg
+  - mstar,irqs-map-range
+
+additionalProperties: false
+
+examples:
+  - |
+    mst_intc0: interrupt-controller@1f2032d0 {
+      compatible = "mstar,mst-intc";
+      interrupt-controller;
+      #interrupt-cells = <3>;
+      interrupt-parent = <&gic>;
+      reg = <0x1f2032d0 0x30>;
+      mstar,irqs-map-range = <0 63>;
+    };
+...
Signature · 1 line
2.18.0
author maintainer
#4 lore raw

Re: [PATCH 2/2] dt-bindings: interrupt-controller: Add MStar interrupt controller

Hi,

I've updated the yaml and post it in the patch series v3[1]. But I still keep the vendor specific property mstar,irqs-map-range as I mentioned in the last reply.
Please review it.

[1] https://lore.kernel.org/lkml/[email protected]/

maintainer Reviewed-by on v3 2/2
#5 lore raw

Re: [PATCH v3 2/2] dt-bindings: interrupt-controller: Add MStar interrupt controller

In reply to Mark-PK Tsai
Quoted 8 lines · Mark-PK Tsai

Add binding for MStar interrupt controller.

---
 .../interrupt-controller/mstar,mst-intc.yaml  | 64 +++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
merge bot Applied
#6 lore raw

[tip: irq/core] dt-bindings: interrupt-controller: Add MStar interrupt controller

In reply to Mark-PK Tsai
The following commit has been merged into the irq/core branch of tip:

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     6d8af863b89da6bdce013db2216b432b4016042e
Gitweb:        https://git.kernel.org/tip/6d8af863b89da6bdce013db2216b432b4016042e
Author:        Mark-PK Tsai <[email protected]>
AuthorDate:    Wed, 02 Sep 2020 14:33:44 +08:00
Committer:     Marc Zyngier <[email protected]>
CommitterDate: Sat, 10 Oct 2020 12:45:16 +01:00

dt-bindings: interrupt-controller: Add MStar interrupt controller

Add binding for MStar interrupt controller.

---
 Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml
Documentation/devicetree/bindings/interrupt-controller/mstar,mst-intc.yaml new file +64 -0
new file mode 100644
index 0000000..bbf0f26
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/interrupt-controller/mstar,mst-intc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MStar Interrupt Controller
+
+maintainers:
+  - Mark-PK Tsai <[email protected]>
+
+description: |+
+  MStar, SigmaStar and Mediatek TV SoCs contain multiple legacy
+  interrupt controllers that routes interrupts to the GIC.
+
+  The HW block exposes a number of interrupt controllers, each
+  can support up to 64 interrupts.
+
+properties:
+  compatible:
+    const: mstar,mst-intc
+
+  interrupt-controller: true
+
+  "#interrupt-cells":
+    const: 3
+    description: |
+      Use the same format as specified by GIC in arm,gic.yaml.
+
+  reg:
+    maxItems: 1
+
+  mstar,irqs-map-range:
+    description: |
+      The range <start, end> of parent interrupt controller's interrupt
+      lines that are hardwired to mstar interrupt controller.
+    $ref: /schemas/types.yaml#/definitions/uint32-matrix
+    items:
+      minItems: 2
+      maxItems: 2
+
+  mstar,intc-no-eoi:
+    description:
+      Mark this controller has no End Of Interrupt(EOI) implementation.
+    type: boolean
+
+required:
+  - compatible
+  - reg
+  - mstar,irqs-map-range
+
+additionalProperties: false
+
+examples:
+  - |
+    mst_intc0: interrupt-controller@1f2032d0 {
+      compatible = "mstar,mst-intc";
+      interrupt-controller;
+      #interrupt-cells = <3>;
+      interrupt-parent = <&gic>;
+      reg = <0x1f2032d0 0x30>;
+      mstar,irqs-map-range = <0 63>;
+    };
+...
#7 lore raw
In reply to Mark-PK Tsai
Quoted 8 lines · Mark-PK Tsai

MStar contain a legacy interrupt controller that routes interrupts to the GIC. SigmaStar and Mediatek TV SoCs also have this interrupt controller IP.

Mark-PK Tsai (2):
irqchip: irq-mst: Add MStar interrupt controller support
dt-bindings: interrupt-controller: Add MStar interrupt controller

Once the binding gets approved, I'll queue this for 5.10.

Thanks,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.