linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] Add interrupts property to interrupt aggregators/routers
@ 2024-09-03  8:31 Vaishnav Achath
  2024-09-03  8:31 ` [RFC DONOTMERGE PATCH 1/1] arm64: dts: ti: k3-am62p-main: Add interrupts property for DMSS INTA Vaishnav Achath
  0 siblings, 1 reply; 2+ messages in thread
From: Vaishnav Achath @ 2024-09-03  8:31 UTC (permalink / raw)
  To: tglx, nm, vigneshr, kristo, robh, krzk+dt, conor+dt
  Cc: linux-arm-kernel, devicetree, linux-kernel, xen-devel, u-kumar1,
	vaishnav.a

The interrupt aggregator in TI K3 devices currently uses a
custom vendor property "ti,interrupt-ranges" [1] to specify the interrupt
source to parent mapping. As per interrupt controller bindings [2],
it is mandatory for Nodes that describe devices which generate
interrupts to contain an "interrupts" property, an "interrupts-extended"
property, or both.

Without this, standard DT parsing code cannot identify the mapping, 
for example while booting these platforms with Xen hypervisor, we see
that the interrupts are not injected to the guest Linux since the mapping
is missing, and Xen expects standard properties to specify the mapping[3],
while adding the interrupts fixes the issue, for some platforms the list of
interrupts can be so large with more than 192 entries[4], moreover in some
systems (like TI K3 platforms), system designers can change the mappings
according to system needs and a long list of repeating entries is error prone
and difficult to maintain.

Are there any existing solution to solve this problem of maintaining long list
of identical interrupt properties (mostly continuous) other than adding individual
entries one by one?

It looks like such general solutions will help multiple platforms, TI platforms
use ti,interrupt-ranges[1], Socionext platforms make use of socionext,interrupt-ranges[5]
and multiple other platforms which maintain long list of interrupts in DT[6] can benefit
from such general implementation. If there are no existing solution is it okay to add new
support for a general property, my proposal is for sometihing similar to interrupt-template
and interrupt-ranges as described in [7].

1- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/ti/k3-am62a-main.dtsi#n111
2- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
3- https://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/common/device-tree/device-tree.c#l1135
4- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/ti/k3-j784s4-main.dtsi#n1346
5- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/socionext/uniphier-ld11.dtsi#n228
6- https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/arm64/boot/dts/nvidia/tegra234.dtsi#n126
7- https://android.googlesource.com/kernel/common/+/android-trusty-4.4/Documentation/devicetree/bindings/trusty/trusty-irq.txt#10

Thanks and Regards,
Vaishnav

Vaishnav Achath (1):
  arm64: dts: ti: k3-am62p-main: Add interrupts property for DMSS INTA

 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 35 +++++++++++++++++++++++
 1 file changed, 35 insertions(+)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [RFC DONOTMERGE PATCH 1/1] arm64: dts: ti: k3-am62p-main: Add interrupts property for DMSS INTA
  2024-09-03  8:31 [RFC PATCH 0/1] Add interrupts property to interrupt aggregators/routers Vaishnav Achath
@ 2024-09-03  8:31 ` Vaishnav Achath
  0 siblings, 0 replies; 2+ messages in thread
From: Vaishnav Achath @ 2024-09-03  8:31 UTC (permalink / raw)
  To: tglx, nm, vigneshr, kristo, robh, krzk+dt, conor+dt
  Cc: linux-arm-kernel, devicetree, linux-kernel, xen-devel, u-kumar1,
	vaishnav.a

The interrupt aggregator in DMSS for TI K3 devices currently uses a
custom vendor property "ti,interrupt-ranges" to specify the interrupt
source to parent mapping. As per interrupt controller bindings [1],
it is mandatory for Nodes that describe devices which generate
interrupts to contain an "interrupts" property, an "interrupts-extended"
property, or both. Add interrupts property to the Interrupt aggregator
node so that the mapping is specified in a standard manner.

1 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/interrupt-controller/interrupts.txt

Signed-off-by: Vaishnav Achath <vaishnav.a@ti.com>
---

DONOTMERGE - while adding the interrupts property helps to conform to the
bindings, it is difficult to maintain the long list and this is not the only
platform affected, if this is the direction to fix it, I will fix for all K3
platforms together, more details on RFC in cover letter.

 arch/arm64/boot/dts/ti/k3-am62p-main.dtsi | 35 +++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
index 420c77c8e9e5..0c7912d177fe 100644
--- a/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62p-main.dtsi
@@ -40,6 +40,41 @@ &oc_sram {
 
 &inta_main_dmss {
 	ti,interrupt-ranges = <5 69 35>;
+	interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 70 IRQ_TYPE_LEVEL_HIGH>,
+		     <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
 };
 
 &main_pmx0 {
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-03  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03  8:31 [RFC PATCH 0/1] Add interrupts property to interrupt aggregators/routers Vaishnav Achath
2024-09-03  8:31 ` [RFC DONOTMERGE PATCH 1/1] arm64: dts: ti: k3-am62p-main: Add interrupts property for DMSS INTA Vaishnav Achath

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).