Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/3] irqchip/bcm2712-mip: Expose all 20 MIP1 outputs
@ 2026-12-04 21:18 Nicolai Buchwitz
  2026-12-04 21:18 ` [PATCH v2 1/3] dt-bindings: interrupt-controller: brcm,bcm2712-msix: Allow multiple ranges Nicolai Buchwitz
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Nicolai Buchwitz @ 2026-12-04 21:18 UTC (permalink / raw)
  To: Thomas Gleixner, Radu Rendec, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Stanimir Varbanov
  Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
	Jonathan Bell, Stefan Wahren, Nicolai Buchwitz

This series makes all 20 outputs of MIP1 (the MSI controller of BCM2712's
pcie1) usable. Previously it was limited to only 8 of them.

The remaining outputs are routed to GIC SPIs which are not contiguous, so
a single msi-ranges entry can't describe them. Jonathan from Raspberry Pi
checked the mapping against the Broadcom documentation they have and
confirmed my measurements [1]. The mapping applies to all revisions of
BCM2712, as every rpi-eeprom release for Pi 5 sets the enable bit on C1
and D0 has it hardwired [1].

Patch 1 extends the binding to allow multiple msi-ranges entries, patch 2
adds support for them to the driver and patch 3 adds the missing outputs
to bcm2712.dtsi. DTs with a single range keep working as before. The
series is based on tip irq/drivers, as it depends on e5cd48011ba4
("irqchip/bcm2712-mip: Fix multi-MSI allocation for non-power-of-two
counts").

Please let me know how the patches should ideally be routed. I guess
Florian will take the DTS patch through the Broadcom tree and the other
two will go through the irq tree?

An earlier version of this patchset has already been merged in the
Raspberry Pi downstream kernel [2] and was also tested there. Additionally
I've tested the series on a Revolution Pi Connect 5 (CM5), which has three
LAN7430 (6 MSI-X vectors each) behind a Diodes PCIe switch. With DPC
enabled the switch ports take another 6 outputs. Vectors per NIC:

                  8 outputs         20 outputs
  --------------------------------------------
  without DPC     6, 2, INTx        6, 6, 6
  with DPC        2, INTx, INTx     6, 6, 2

As the RC MSI interrupt can't be pinned to a certain core, more MIP outputs
are beneficial for our industrial Ethernet applications. Multiple NVMe
drives or custom FPGA designs [3] would benefit from these changes as well.

[1] https://github.com/raspberrypi/linux/pull/7729#issuecomment-6581536952
    https://github.com/raspberrypi/linux/pull/7729#issuecomment-6581999696
[2] https://github.com/raspberrypi/linux/pull/7729
[3] https://forums.raspberrypi.com/viewtopic.php?t=398134

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Changes in v2:
- Fix style issues pointed out by Thomas
- Add short explanation for the bitmap setup in probe
- Link to v1: https://patch.msgid.link/20261202-nb-bcm2712-mip-msi-ranges-v1-0-eb3db393f2e2@tipi-net.de

To: Thomas Gleixner <tglx@kernel.org>
To: Radu Rendec <radu@rendec.net>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Florian Fainelli <florian.fainelli@broadcom.com>
To: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
To: Stanimir Varbanov <svarbanov@suse.de>
Cc: linux-kernel@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-rpi-kernel@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org

---
Nicolai Buchwitz (3):
      dt-bindings: interrupt-controller: brcm,bcm2712-msix: Allow multiple ranges
      irqchip/bcm2712-mip: Support multiple MSI ranges
      arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs

 .../interrupt-controller/brcm,bcm2712-msix.yaml    |  16 ++-
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi          |  13 ++-
 drivers/irqchip/irq-bcm2712-mip.c                  | 126 +++++++++++++--------
 3 files changed, 105 insertions(+), 50 deletions(-)
---
base-commit: 21f3995610426ef9c930b49b1e8e21eb771d8568
change-id: 20261202-nb-bcm2712-mip-msi-ranges-74e4c68a87e0

Best regards,
--  
Nicolai Buchwitz <nb@tipi-net.de>


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

* [PATCH v2 1/3] dt-bindings: interrupt-controller: brcm,bcm2712-msix: Allow multiple ranges
  2026-12-04 21:18 [PATCH v2 0/3] irqchip/bcm2712-mip: Expose all 20 MIP1 outputs Nicolai Buchwitz
@ 2026-12-04 21:18 ` Nicolai Buchwitz
  2026-12-04 21:18 ` [PATCH v2 2/3] irqchip/bcm2712-mip: Support multiple MSI ranges Nicolai Buchwitz
  2026-12-04 21:18 ` [PATCH v2 3/3] arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs Nicolai Buchwitz
  2 siblings, 0 replies; 5+ messages in thread
From: Nicolai Buchwitz @ 2026-12-04 21:18 UTC (permalink / raw)
  To: Thomas Gleixner, Radu Rendec, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Stanimir Varbanov
  Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
	Jonathan Bell, Stefan Wahren, Nicolai Buchwitz

The MIP outputs are not wired to one contiguous block of GIC SPIs, so a
single msi-ranges entry cannot describe all of them. Define how several
entries map to the outputs. Allow the legacy brcm,msi-offset only with
a single entry, which is the only case the driver has handled.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
 .../bindings/interrupt-controller/brcm,bcm2712-msix.yaml | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
index c84614663b5d..5ad380b28c57 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
@@ -16,6 +16,13 @@ description:
 
 allOf:
   - $ref: /schemas/interrupt-controller/msi-controller.yaml#
+  - if:
+      required:
+        - brcm,msi-offset
+    then:
+      properties:
+        msi-ranges:
+          maxItems: 1
 
 properties:
   compatible:
@@ -29,9 +36,16 @@ properties:
   "#msi-cells":
     const: 0
 
+  msi-ranges:
+    description:
+      Each entry maps the next consecutive MIP outputs, starting at
+      output 0, to the given GIC SPIs.
+
   brcm,msi-offset:
     $ref: /schemas/types.yaml#/definitions/uint32
-    description: Shift the allocated MSI's.
+    description:
+      Legacy. Shifts both the MIP output and the GIC SPI of a single
+      msi-ranges entry. Not allowed with more than one entry.
 
 unevaluatedProperties: false
 

-- 
2.53.0


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

* [PATCH v2 2/3] irqchip/bcm2712-mip: Support multiple MSI ranges
  2026-12-04 21:18 [PATCH v2 0/3] irqchip/bcm2712-mip: Expose all 20 MIP1 outputs Nicolai Buchwitz
  2026-12-04 21:18 ` [PATCH v2 1/3] dt-bindings: interrupt-controller: brcm,bcm2712-msix: Allow multiple ranges Nicolai Buchwitz
@ 2026-12-04 21:18 ` Nicolai Buchwitz
  2026-12-04 21:18 ` [PATCH v2 3/3] arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs Nicolai Buchwitz
  2 siblings, 0 replies; 5+ messages in thread
From: Nicolai Buchwitz @ 2026-12-04 21:18 UTC (permalink / raw)
  To: Thomas Gleixner, Radu Rendec, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Stanimir Varbanov
  Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
	Jonathan Bell, Stefan Wahren, Nicolai Buchwitz

The MIP outputs are not wired to one contiguous block of GIC SPIs, so a
single msi-ranges entry can only describe part of a MIP. Accept one
entry per contiguous run, in output order, and look up the SPI for each
message.

brcm,msi-offset keeps its meaning for the existing single range and is
rejected when more than one range is given.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
 drivers/irqchip/irq-bcm2712-mip.c | 126 ++++++++++++++++++++++++--------------
 1 file changed, 79 insertions(+), 47 deletions(-)

diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c
index 5a13bb4c18f6..be2630d20cf7 100644
--- a/drivers/irqchip/irq-bcm2712-mip.c
+++ b/drivers/irqchip/irq-bcm2712-mip.c
@@ -26,23 +26,25 @@
 #define MIP_INT_STATUSL_VPU	0xa0
 #define MIP_INT_STATUSH_VPU	0xb0
 
+#define MIP_NUM_IRQS		64
+
 /**
  * struct mip_priv - MSI-X interrupt controller data
- * @lock:	Used to protect bitmap alloc/free
- * @base:	Base address of MMIO area
- * @msg_addr:	PCIe MSI-X address
- * @msi_base:	MSI base
- * @num_msis:	Count of MSIs
- * @msi_offset:	MSI offset
- * @bitmap:	A bitmap for hwirqs
- * @parent:	Parent domain (GIC)
- * @dev:	A device pointer
+ * @lock:		Used to protect bitmap alloc/free
+ * @base:		Base address of MMIO area
+ * @msg_addr:		PCIe MSI-X address
+ * @parent_irqs:	GIC SPI numbers indexed by MIP message data
+ * @num_msis:		Count of MSIs
+ * @msi_offset:		MSI offset
+ * @bitmap:		A bitmap for hwirqs
+ * @parent:		Parent domain (GIC)
+ * @dev:		A device pointer
  */
 struct mip_priv {
 	spinlock_t		lock;
 	void __iomem		*base;
 	u64			msg_addr;
-	u32			msi_base;
+	u32			parent_irqs[MIP_NUM_IRQS];
 	u32			num_msis;
 	u32			msi_offset;
 	unsigned long		*bitmap;
@@ -74,10 +76,9 @@ static int mip_alloc_hwirq(struct mip_priv *mip, unsigned int nr_irqs)
 	unsigned long hwirq;
 
 	guard(spinlock)(&mip->lock);
-	hwirq = bitmap_find_next_zero_area_off(mip->bitmap, mip->num_msis, 0,
-					       nr_irqs, roundup_pow_of_two(nr_irqs) - 1,
-					       mip->msi_offset);
-	if (hwirq >= mip->num_msis)
+	hwirq = bitmap_find_next_zero_area(mip->bitmap, MIP_NUM_IRQS, 0, nr_irqs,
+					   roundup_pow_of_two(nr_irqs) - 1);
+	if (hwirq >= MIP_NUM_IRQS)
 		return -ENOSPC;
 
 	bitmap_set(mip->bitmap, hwirq, nr_irqs);
@@ -95,8 +96,8 @@ static int mip_middle_domain_alloc(struct irq_domain *domain, unsigned int virq,
 				   unsigned int nr_irqs, void *arg)
 {
 	struct mip_priv *mip = domain->host_data;
+	unsigned int hwirq, i, allocated = 0;
 	struct irq_fwspec fwspec = {0};
-	unsigned int hwirq, i;
 	struct irq_data *irqd;
 	int irq, ret;
 
@@ -104,21 +105,24 @@ static int mip_middle_domain_alloc(struct irq_domain *domain, unsigned int virq,
 	if (irq < 0)
 		return irq;
 
-	hwirq = irq + mip->msi_offset;
+	hwirq = irq;
 
 	fwspec.fwnode = domain->parent->fwnode;
 	fwspec.param_count = 3;
 	fwspec.param[0] = 0;
-	fwspec.param[1] = hwirq + mip->msi_base;
 	fwspec.param[2] = IRQ_TYPE_EDGE_RISING;
 
-	ret = irq_domain_alloc_irqs_parent(domain, virq, nr_irqs, &fwspec);
-	if (ret)
-		goto err_free_hwirq;
-
 	for (i = 0; i < nr_irqs; i++) {
+		fwspec.param[1] = mip->parent_irqs[hwirq + i];
+		ret = irq_domain_alloc_irqs_parent(domain, virq + i, 1, &fwspec);
+		if (ret)
+			goto err_free;
+		allocated++;
+
 		irqd = irq_domain_get_irq_data(domain->parent, virq + i);
-		irqd->chip->irq_set_type(irqd, IRQ_TYPE_EDGE_RISING);
+		ret = irqd->chip->irq_set_type(irqd, IRQ_TYPE_EDGE_RISING);
+		if (ret)
+			goto err_free;
 
 		ret = irq_domain_set_hwirq_and_chip(domain, virq + i, hwirq + i,
 						    &mip_middle_irq_chip, mip);
@@ -133,8 +137,8 @@ static int mip_middle_domain_alloc(struct irq_domain *domain, unsigned int virq,
 	return 0;
 
 err_free:
-	irq_domain_free_irqs_parent(domain, virq, nr_irqs);
-err_free_hwirq:
+	if (allocated)
+		irq_domain_free_irqs_parent(domain, virq, allocated);
 	mip_free_hwirq(mip, irq, nr_irqs);
 	return ret;
 }
@@ -152,7 +156,7 @@ static void mip_middle_domain_free(struct irq_domain *domain, unsigned int virq,
 	mip = irq_data_get_irq_chip_data(irqd);
 	hwirq = irqd_to_hwirq(irqd);
 	irq_domain_free_irqs_parent(domain, virq, nr_irqs);
-	mip_free_hwirq(mip, hwirq - mip->msi_offset, nr_irqs);
+	mip_free_hwirq(mip, hwirq, nr_irqs);
 }
 
 static const struct irq_domain_ops mip_middle_domain_ops = {
@@ -185,7 +189,7 @@ static int mip_init_domains(struct mip_priv *mip, struct device_node *np)
 		.fwnode		= of_fwnode_handle(np),
 		.ops		= &mip_middle_domain_ops,
 		.host_data	= mip,
-		.size		= mip->num_msis,
+		.size		= MIP_NUM_IRQS,
 		.parent		= mip->parent,
 		.dev		= mip->dev,
 	};
@@ -208,37 +212,59 @@ static int mip_init_domains(struct mip_priv *mip, struct device_node *np)
 
 static int mip_parse_dt(struct mip_priv *mip, struct device_node *np)
 {
-	struct of_phandle_args args;
+	int ret, count;
+	u32 first;
 	u64 size;
-	int ret;
 
 	ret = of_property_read_u32(np, "brcm,msi-offset", &mip->msi_offset);
 	if (ret)
 		mip->msi_offset = 0;
+	if (mip->msi_offset >= MIP_NUM_IRQS)
+		return -EINVAL;
 
-	ret = of_parse_phandle_with_args(np, "msi-ranges", "#interrupt-cells",
-					 0, &args);
+	ret = of_property_read_reg(np, 1, &mip->msg_addr, &size);
 	if (ret)
 		return ret;
 
-	ret = of_property_read_u32_index(np, "msi-ranges", args.args_count + 1,
-					 &mip->num_msis);
-	if (ret)
-		goto err_put;
+	/* <&gic type spi flags span> per range */
+	count = of_property_count_u32_elems(np, "msi-ranges");
+	if (count <= 0 || count % 5)
+		return -EINVAL;
+	if (count > 5 && of_property_present(np, "brcm,msi-offset"))
+		return -EINVAL;
 
-	ret = of_property_read_reg(np, 1, &mip->msg_addr, &size);
-	if (ret)
-		goto err_put;
+	first = mip->msi_offset;
+	for (int range = 0; range < count / 5; range++) {
+		struct of_phandle_args args;
+		struct irq_domain *parent;
+		u32 span, cells;
+
+		ret = of_parse_phandle_with_fixed_args(np, "msi-ranges", 4, range, &args);
+		if (ret)
+			return ret;
 
-	mip->msi_base = args.args[1];
+		ret = of_property_read_u32(args.np, "#interrupt-cells", &cells);
+		parent = irq_find_host(args.np);
+		of_node_put(args.np);
+		if (ret)
+			return ret;
 
-	mip->parent = irq_find_host(args.np);
-	if (!mip->parent)
-		ret = -EINVAL;
+		span = args.args[3];
+		if (cells != 3 || args.args[0] != 0 || args.args[2] != IRQ_TYPE_EDGE_RISING ||
+		    !span || span > MIP_NUM_IRQS - first)
+			return -EINVAL;
 
-err_put:
-	of_node_put(args.np);
-	return ret;
+		if (!parent || (mip->parent && parent != mip->parent))
+			return -EINVAL;
+		mip->parent = parent;
+
+		/* The legacy offset shifts the SPI as well as the message data */
+		for (unsigned int i = 0; i < span; i++)
+			mip->parent_irqs[first + i] = args.args[1] + mip->msi_offset + i;
+		first += span;
+	}
+	mip->num_msis = first - mip->msi_offset;
+	return 0;
 }
 
 static int mip_msi_probe(struct platform_device *pdev, struct device_node *parent)
@@ -264,18 +290,24 @@ static int mip_msi_probe(struct platform_device *pdev, struct device_node *paren
 		goto err_priv;
 	}
 
-	mip->bitmap = bitmap_zalloc(mip->num_msis, GFP_KERNEL);
+	mip->bitmap = bitmap_alloc(MIP_NUM_IRQS, GFP_KERNEL);
 	if (!mip->bitmap) {
 		ret = -ENOMEM;
 		goto err_base;
 	}
+	/*
+	 * The bitmap is indexed by message data. Mark everything outside the
+	 * outputs described in DT as allocated, so it is never handed out.
+	 */
+	bitmap_fill(mip->bitmap, MIP_NUM_IRQS);
+	bitmap_clear(mip->bitmap, mip->msi_offset, mip->num_msis);
 
 	ret = mip_init_domains(mip, node);
 	if (ret)
 		goto err_map;
 
-	dev_dbg(&pdev->dev, "MIP: MSI-X count: %u, base: %u, offset: %u, msg_addr: %llx\n",
-		mip->num_msis, mip->msi_base, mip->msi_offset, mip->msg_addr);
+	dev_dbg(&pdev->dev, "MIP: MSI-X count: %u, offset: %u, msg_addr: %llx\n",
+		mip->num_msis, mip->msi_offset, mip->msg_addr);
 
 	return 0;
 

-- 
2.53.0


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

* [PATCH v2 3/3] arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs
  2026-12-04 21:18 [PATCH v2 0/3] irqchip/bcm2712-mip: Expose all 20 MIP1 outputs Nicolai Buchwitz
  2026-12-04 21:18 ` [PATCH v2 1/3] dt-bindings: interrupt-controller: brcm,bcm2712-msix: Allow multiple ranges Nicolai Buchwitz
  2026-12-04 21:18 ` [PATCH v2 2/3] irqchip/bcm2712-mip: Support multiple MSI ranges Nicolai Buchwitz
@ 2026-12-04 21:18 ` Nicolai Buchwitz
  2026-12-04 21:32   ` sashiko-bot
  2 siblings, 1 reply; 5+ messages in thread
From: Nicolai Buchwitz @ 2026-12-04 21:18 UTC (permalink / raw)
  To: Thomas Gleixner, Radu Rendec, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Stanimir Varbanov
  Cc: linux-kernel, devicetree, linux-rpi-kernel, linux-arm-kernel,
	Jonathan Bell, Stefan Wahren, Nicolai Buchwitz

MIP1 serves pcie1, the external PCIe x1 port on Pi 5 and CM5, but only
8 of its outputs are described. A single multi-queue device can use
most of them, and further devices get fewer vectors or none.

Raising each MIP output on a CM5 and checking which SPI goes pending
shows 20 wired outputs. The others have no route. The mapping matches
the Broadcom documentation for BCM2712. On C1 every rpi-eeprom release
for Pi 5 sets the bit that enables it. On D0 it is always on.

  MIP output    GIC SPI
   0..1         196..197
   2..3         200..201
   4..5         206..207
   6            240
   7            246
   8..15        255..262
  16            275
  17            282
  18            263
  19            283

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
index edae2f3584a8..dcbd1e674042 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
+++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
@@ -690,8 +690,17 @@ mip1: msi-controller@1000131000 {
 			reg = <0x10 0x00131000 0x00 0xc0>,
 			      <0xff 0xfffff000 0x00 0x1000>;
 			msi-controller;
-			msi-ranges = <&gicv2 GIC_SPI 247 IRQ_TYPE_EDGE_RISING 8>;
-			brcm,msi-offset = <8>;
+			/* In MIP output order, the SPIs are not contiguous */
+			msi-ranges = <&gicv2 GIC_SPI 196 IRQ_TYPE_EDGE_RISING 2>,
+				     <&gicv2 GIC_SPI 200 IRQ_TYPE_EDGE_RISING 2>,
+				     <&gicv2 GIC_SPI 206 IRQ_TYPE_EDGE_RISING 2>,
+				     <&gicv2 GIC_SPI 240 IRQ_TYPE_EDGE_RISING 1>,
+				     <&gicv2 GIC_SPI 246 IRQ_TYPE_EDGE_RISING 1>,
+				     <&gicv2 GIC_SPI 255 IRQ_TYPE_EDGE_RISING 8>,
+				     <&gicv2 GIC_SPI 275 IRQ_TYPE_EDGE_RISING 1>,
+				     <&gicv2 GIC_SPI 282 IRQ_TYPE_EDGE_RISING 1>,
+				     <&gicv2 GIC_SPI 263 IRQ_TYPE_EDGE_RISING 1>,
+				     <&gicv2 GIC_SPI 283 IRQ_TYPE_EDGE_RISING 1>;
 		};
 
 		isp: isp@1000880000 {

-- 
2.53.0


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

* Re: [PATCH v2 3/3] arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs
  2026-12-04 21:18 ` [PATCH v2 3/3] arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs Nicolai Buchwitz
@ 2026-12-04 21:32   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-12-04 21:32 UTC (permalink / raw)
  To: Nicolai Buchwitz; +Cc: devicetree, robh, conor+dt

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] arm64: dts: broadcom: mip1 change shrinks to 2 MSIs without
  driver support
--

commit fb712888022541177b7371963cac812112fd0969
Author: Nicolai Buchwitz <nb@tipi-net.de>

arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs

This commit replaces the single 8-SPI msi-ranges entry and brcm,msi-offset
property on mip1 with ten msi-ranges entries covering all 20 wired MIP1
outputs.

> diff --git a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
> index edae2f3584a8d..dcbd1e6740420 100644
> --- a/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
> +++ b/arch/arm64/boot/dts/broadcom/bcm2712.dtsi
> @@ -690,8 +690,17 @@ mip1: msi-controller@1000131000 {
>  			reg = <0x10 0x00131000 0x00 0xc0>,
>  			      <0xff 0xfffff000 0x00 0x1000>;
>  			msi-controller;
> -			msi-ranges = <&gicv2 GIC_SPI 247 IRQ_TYPE_EDGE_RISING 8>;
> -			brcm,msi-offset = <8>;
> +			/* In MIP output order, the SPIs are not contiguous */
> +			msi-ranges = <&gicv2 GIC_SPI 196 IRQ_TYPE_EDGE_RISING 2>,
> +				     <&gicv2 GIC_SPI 200 IRQ_TYPE_EDGE_RISING 2>,
> +				     <&gicv2 GIC_SPI 206 IRQ_TYPE_EDGE_RISING 2>,
> +				     <&gicv2 GIC_SPI 240 IRQ_TYPE_EDGE_RISING 1>,
> +				     <&gicv2 GIC_SPI 246 IRQ_TYPE_EDGE_RISING 1>,
> +				     <&gicv2 GIC_SPI 255 IRQ_TYPE_EDGE_RISING 8>,
> +				     <&gicv2 GIC_SPI 275 IRQ_TYPE_EDGE_RISING 1>,
> +				     <&gicv2 GIC_SPI 282 IRQ_TYPE_EDGE_RISING 1>,
> +				     <&gicv2 GIC_SPI 263 IRQ_TYPE_EDGE_RISING 1>,
> +				     <&gicv2 GIC_SPI 283 IRQ_TYPE_EDGE_RISING 1>;
>  		};

[Severity: Medium]
Can this silently shrink pcie1 from 8 MSI-X vectors down to 2 on kernels
without commit "irqchip/bcm2712-mip: Support multiple MSI ranges"?

Without that driver change, mip_parse_dt() in
drivers/irqchip/irq-bcm2712-mip.c defaults msi_offset to 0, parses only
index 0 of msi-ranges, and silently ignores the remaining nine entries.

Because the first tuple now has a span of 2, mip1 probes with num_msis = 2.
Once the root port claims a vector, at most one vector remains for an
endpoint, regressing existing PCIe setups on Pi 5 and CM5.

Since DTS patches merge separately from irqchip patches, this hits if the DT
branch lands ahead of the driver or when an older kernel boots with a new
DTB.

Per Documentation/process/maintainer-soc.rst, incompatible DTS changes
should wait until the companion driver is merged, and the commit message
should note the driver dependency and compatibility impact.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204-nb-bcm2712-mip-msi-ranges-v2-0-d3f31e52429d@tipi-net.de?part=3

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

end of thread, other threads:[~2026-12-04 21:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04 21:18 [PATCH v2 0/3] irqchip/bcm2712-mip: Expose all 20 MIP1 outputs Nicolai Buchwitz
2026-12-04 21:18 ` [PATCH v2 1/3] dt-bindings: interrupt-controller: brcm,bcm2712-msix: Allow multiple ranges Nicolai Buchwitz
2026-12-04 21:18 ` [PATCH v2 2/3] irqchip/bcm2712-mip: Support multiple MSI ranges Nicolai Buchwitz
2026-12-04 21:18 ` [PATCH v2 3/3] arm64: dts: broadcom: bcm2712: Expose all 20 MIP1 outputs Nicolai Buchwitz
2026-12-04 21:32   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox