Skip to contentSkip to conversation

arm64: broadcom: bcm2712: Rework rp1 overlay handling

RFC PATCH Superseded Rob Herring (Arm) 4 participants 5 messages Nov 17, 2025 – Dec 18, 2025

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Rob Herring (Arm)

author maintainer
#0 lore raw

RFC PATCH 1/1 arm64: broadcom: bcm2712: Rework rp1 overlay handling

It's a requirement that DT overlays be applied at build time in order to validate them as overlays are not validated on their own.

Simply adding a build time target is possible, but it's also not desirable to have targets which include the overlay contents and apply the same overlay.

Rework the targets such that there are 2 overlays: the existing RP1 overlay and the board specific configuration of the RP1 (bcm2712-rpi-5-b.dtso).

---
The missing applying of rp1.dtbo will soon be a warning[1].

The comment in bcm2712-rpi-5-b.dts(o) needs updating or removing. The RP1 driver or userspace handling of the overlay probably needs updating to handle the 2 overlays. IIRC, I think we can apply overlays to overlays which may be useful here. If not, adding that to the tools should be possible.

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

---
 arch/arm64/boot/dts/broadcom/Makefile                 | 10 ++++++++--
 ...m2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} |  2 +-
 .../{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso}     | 11 +++++------
 3 files changed, 14 insertions(+), 9 deletions(-)
 rename arch/arm64/boot/dts/broadcom/{bcm2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} (95%)
 rename arch/arm64/boot/dts/broadcom/{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso} (92%)
arch/arm64/boot/dts/broadcom/Makefile +8 -2
index 83d45afc6588..4957edec9d9f 100644
@@ -6,9 +6,9 @@ DTC_FLAGS := -@
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2711-rpi-4-b.dtb \
 			      bcm2711-rpi-cm4-io.dtb \
-			      bcm2712-rpi-5-b.dtb \
+			      bcm2712-rpi-5-b.dtbo \
 			      bcm2712-rpi-5-b-ovl-rp1.dtb \
-			      bcm2712-d-rpi-5-b.dtb \
+			      bcm2712-d-rpi-5-b-base.dtb \
 			      bcm2837-rpi-2-b.dtb \
 			      bcm2837-rpi-3-a-plus.dtb \
 			      bcm2837-rpi-3-b.dtb \
@@ -17,6 +17,12 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2837-rpi-zero-2-w.dtb \
 			      rp1.dtbo
 
+bcm2712-rpi-5-b-dtbs := bcm2712-rpi-5-b-ovl-rp1.dtb rp1.dtbo bcm2712-rpi-5-b.dtbo
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2712-rpi-5-b.dtb
+
+bcm2712-d-rpi-5-b-dtbs := bcm2712-d-rpi-5-b-base.dtb rp1.dtbo bcm2712-rpi-5-b.dtbo
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2712-d-rpi-5-b.dtb
+
 subdir-y	+= bcmbca
 subdir-y	+= northstar2
 subdir-y	+= stingray
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b-base.dts renamed from arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts +1 -1
similarity index 95%
rename from arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
rename to arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b-base.dts
index 7de24d60bcd1..48a0ae118839 100644
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
 /dts-v1/;
 
-#include "bcm2712-rpi-5-b.dts"
+#include "bcm2712-rpi-5-b-ovl-rp1.dts"
 
 &gio_aon {
 	brcm,gpio-bank-widths = <15 6>;
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +5 -6
similarity index 92%
rename from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
rename to arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso
index b8f256545022..89d099c00035 100644
@@ -15,19 +15,18 @@
  */
 
 /dts-v1/;
+/plugin/;
 
-#include "bcm2712-rpi-5-b-ovl-rp1.dts"
-
-&pcie2 {
-	#include "rp1-nexus.dtsi"
-};
+#include <dt-bindings/gpio/gpio.h>
 
 &rp1_eth {
 	status = "okay";
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy1>;
+        #address-cells = <1>;
+        #size-cells = <0>;
 
-	mdio {
+	mdio@1 {
 		reg = <0x1>;
 		reset-gpios = <&rp1_gpio 32 GPIO_ACTIVE_LOW>;
 		reset-delay-us = <5000>;
Signature · 1 line
2.51.0
#1 lore raw
Quoted 20 lines · Rob Herring (Arm)

It's a requirement that DT overlays be applied at build time in order to validate them as overlays are not validated on their own.

Simply adding a build time target is possible, but it's also not desirable to have targets which include the overlay contents and apply the same overlay.

Rework the targets such that there are 2 overlays: the existing RP1 overlay and the board specific configuration of the RP1 (bcm2712-rpi-5-b.dtso).

---
The missing applying of rp1.dtbo will soon be a warning[1].

The comment in bcm2712-rpi-5-b.dts(o) needs updating or removing. The RP1 driver or userspace handling of the overlay probably needs updating to handle the 2 overlays. IIRC, I think we can apply overlays to overlays which may be useful here. If not, adding that to the tools should be possible.

Quoted 5 lines

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

---
 arch/arm64/boot/dts/broadcom/Makefile                 | 10 ++++++++--
 ...m2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} |  2 +-
 .../{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso}     | 11 +++++------

So now Linus' tree has warnings. Can this be applied by anyone around Broadcom and sent as fixes?

Best regards,
Krzysztof

maintainer
#2 lore raw
Quoted 28 lines · Krzysztof Kozlowski
Quoted 20 lines · Rob Herring (Arm)

It's a requirement that DT overlays be applied at build time in order to validate them as overlays are not validated on their own.

Simply adding a build time target is possible, but it's also not desirable to have targets which include the overlay contents and apply the same overlay.

Rework the targets such that there are 2 overlays: the existing RP1 overlay and the board specific configuration of the RP1 (bcm2712-rpi-5-b.dtso).

---
The missing applying of rp1.dtbo will soon be a warning[1].

The comment in bcm2712-rpi-5-b.dts(o) needs updating or removing. The RP1 driver or userspace handling of the overlay probably needs updating to handle the 2 overlays. IIRC, I think we can apply overlays to overlays which may be useful here. If not, adding that to the tools should be possible.

Quoted 5 lines

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

---
  arch/arm64/boot/dts/broadcom/Makefile                 | 10 ++++++++--
  ...m2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} |  2 +-
  .../{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso}     | 11 +++++------
Quoted 2 lines

So now Linus' tree has warnings. Can this be applied by anyone around Broadcom and sent as fixes?

It's an RFC and I was hoping to get Andrea to comment on this patch before applying.

Signature · 1 line
Florian
#3 lore raw
In reply to Rob Herring (Arm)

Hi Rob,
sorry for the delay...

Quoted 83 lines · Rob Herring (Arm)

It's a requirement that DT overlays be applied at build time in order to validate them as overlays are not validated on their own.

Simply adding a build time target is possible, but it's also not desirable to have targets which include the overlay contents and apply the same overlay.

Rework the targets such that there are 2 overlays: the existing RP1 overlay and the board specific configuration of the RP1 (bcm2712-rpi-5-b.dtso).

---
The missing applying of rp1.dtbo will soon be a warning[1].

The comment in bcm2712-rpi-5-b.dts(o) needs updating or removing. The RP1 driver or userspace handling of the overlay probably needs updating to handle the 2 overlays. IIRC, I think we can apply overlays to overlays which may be useful here. If not, adding that to the tools should be possible.

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

---
 arch/arm64/boot/dts/broadcom/Makefile                 | 10 ++++++++--
 ...m2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} |  2 +-
 .../{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso}     | 11 +++++------
 3 files changed, 14 insertions(+), 9 deletions(-)
 rename arch/arm64/boot/dts/broadcom/{bcm2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} (95%)
 rename arch/arm64/boot/dts/broadcom/{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso} (92%)
arch/arm64/boot/dts/broadcom/Makefile +8 -2
index 83d45afc6588..4957edec9d9f 100644
@@ -6,9 +6,9 @@ DTC_FLAGS := -@
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2711-rpi-4-b.dtb \
 			      bcm2711-rpi-cm4-io.dtb \
-			      bcm2712-rpi-5-b.dtb \
+			      bcm2712-rpi-5-b.dtbo \
 			      bcm2712-rpi-5-b-ovl-rp1.dtb \
-			      bcm2712-d-rpi-5-b.dtb \
+			      bcm2712-d-rpi-5-b-base.dtb \
 			      bcm2837-rpi-2-b.dtb \
 			      bcm2837-rpi-3-a-plus.dtb \
 			      bcm2837-rpi-3-b.dtb \
@@ -17,6 +17,12 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2837-rpi-zero-2-w.dtb \
 			      rp1.dtbo
 
+bcm2712-rpi-5-b-dtbs := bcm2712-rpi-5-b-ovl-rp1.dtb rp1.dtbo bcm2712-rpi-5-b.dtbo
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2712-rpi-5-b.dtb
+
+bcm2712-d-rpi-5-b-dtbs := bcm2712-d-rpi-5-b-base.dtb rp1.dtbo bcm2712-rpi-5-b.dtbo
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2712-d-rpi-5-b.dtb
+
 subdir-y	+= bcmbca
 subdir-y	+= northstar2
 subdir-y	+= stingray
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b-base.dts renamed from arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts +1 -1
similarity index 95%
rename from arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
rename to arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b-base.dts
index 7de24d60bcd1..48a0ae118839 100644
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
 /dts-v1/;
 
-#include "bcm2712-rpi-5-b.dts"
+#include "bcm2712-rpi-5-b-ovl-rp1.dts"
 
 &gio_aon {
 	brcm,gpio-bank-widths = <15 6>;
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +0 -0
similarity index 92%
rename from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
rename to arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso
index b8f256545022..89d099c00035 100644
@@ -15,19 +15,18 @@
  */

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso line 20

Quoted 10 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +2 -5
 
 /dts-v1/;
+/plugin/;
 
-#include "bcm2712-rpi-5-b-ovl-rp1.dts"
-
-&pcie2 {
-	#include "rp1-nexus.dtsi"
-};
+#include <dt-bindings/gpio/gpio.h>

Sounds reasonable to me, please let me have a full round of tests to check for any issue with the driver and I'll come back with feedback.

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso line 27

Quoted 7 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +2 -0
 &rp1_eth {
 	status = "okay";
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy1>;
+        #address-cells = <1>;
+        #size-cells = <0>;

I think this should go in a separate patch.

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso line 29

Quoted 3 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +1 -1
-	mdio {
+	mdio@1 {

Ditto.

Many thanks,
Andrea

Quoted 6 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +0 -0
 		reg = <0x1>;
 		reset-gpios = <&rp1_gpio 32 GPIO_ACTIVE_LOW>;
 		reset-delay-us = <5000>;
Signature · 1 line
2.51.0
#4 lore raw

Hi Rob,

Quoted 91 lines · Andrea della Porta

Hi Rob,
sorry for the delay...

Quoted 87 lines · Rob Herring (Arm)

It's a requirement that DT overlays be applied at build time in order to validate them as overlays are not validated on their own.

Simply adding a build time target is possible, but it's also not desirable to have targets which include the overlay contents and apply the same overlay.

Rework the targets such that there are 2 overlays: the existing RP1 overlay and the board specific configuration of the RP1 (bcm2712-rpi-5-b.dtso).

---
The missing applying of rp1.dtbo will soon be a warning[1].

The comment in bcm2712-rpi-5-b.dts(o) needs updating or removing. The RP1 driver or userspace handling of the overlay probably needs updating to handle the 2 overlays. IIRC, I think we can apply overlays to overlays which may be useful here. If not, adding that to the tools should be possible.

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

---
 arch/arm64/boot/dts/broadcom/Makefile                 | 10 ++++++++--
 ...m2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} |  2 +-
 .../{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso}     | 11 +++++------
 3 files changed, 14 insertions(+), 9 deletions(-)
 rename arch/arm64/boot/dts/broadcom/{bcm2712-d-rpi-5-b.dts => bcm2712-d-rpi-5-b-base.dts} (95%)
 rename arch/arm64/boot/dts/broadcom/{bcm2712-rpi-5-b.dts => bcm2712-rpi-5-b.dtso} (92%)
arch/arm64/boot/dts/broadcom/Makefile +8 -2
index 83d45afc6588..4957edec9d9f 100644
@@ -6,9 +6,9 @@ DTC_FLAGS := -@
 dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2711-rpi-4-b.dtb \
 			      bcm2711-rpi-cm4-io.dtb \
-			      bcm2712-rpi-5-b.dtb \
+			      bcm2712-rpi-5-b.dtbo \
 			      bcm2712-rpi-5-b-ovl-rp1.dtb \
-			      bcm2712-d-rpi-5-b.dtb \
+			      bcm2712-d-rpi-5-b-base.dtb \
 			      bcm2837-rpi-2-b.dtb \
 			      bcm2837-rpi-3-a-plus.dtb \
 			      bcm2837-rpi-3-b.dtb \
@@ -17,6 +17,12 @@ dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
 			      bcm2837-rpi-zero-2-w.dtb \
 			      rp1.dtbo
 
+bcm2712-rpi-5-b-dtbs := bcm2712-rpi-5-b-ovl-rp1.dtb rp1.dtbo bcm2712-rpi-5-b.dtbo
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2712-rpi-5-b.dtb
+
+bcm2712-d-rpi-5-b-dtbs := bcm2712-d-rpi-5-b-base.dtb rp1.dtbo bcm2712-rpi-5-b.dtbo
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2712-d-rpi-5-b.dtb
+
 subdir-y	+= bcmbca
 subdir-y	+= northstar2
 subdir-y	+= stingray
arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b-base.dts renamed from arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts +1 -1
similarity index 95%
rename from arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
rename to arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b-base.dts
index 7de24d60bcd1..48a0ae118839 100644
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
 /dts-v1/;
 
-#include "bcm2712-rpi-5-b.dts"
+#include "bcm2712-rpi-5-b-ovl-rp1.dts"
 
 &gio_aon {
 	brcm,gpio-bank-widths = <15 6>;
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +1 -0
similarity index 92%
rename from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
rename to arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso
index b8f256545022..89d099c00035 100644
@@ -15,19 +15,18 @@
  */
 
 /dts-v1/;
+/plugin/;
 
Quoted 9 lines

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso line 20

Quoted 6 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +1 -5
-#include "bcm2712-rpi-5-b-ovl-rp1.dts"
-
-&pcie2 {
-	#include "rp1-nexus.dtsi"
-};
+#include <dt-bindings/gpio/gpio.h>

Sounds reasonable to me, please let me have a full round of tests to check for any issue with the driver and I'll come back with feedback.

Just a heads up, since you've posted this new revision [1] and that I'm currently reworking RP1 overlay (in order to drop it), I assume that this patch is no longer relevant and I'll avoid testing it.

Thanks,
Andrea

[1] - https://lore.kernel.org/all/aUQA5IKqqsrElzKP@apocalypse/

Quoted 26 lines

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso line 27

Quoted 8 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +2 -0
 &rp1_eth {
 	status = "okay";
 	phy-mode = "rgmii-id";
 	phy-handle = <&phy1>;
+        #address-cells = <1>;
+        #size-cells = <0>;

I think this should go in a separate patch.

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso line 29

Quoted 3 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +1 -1
-	mdio {
+	mdio@1 {

Ditto.

Many thanks,
Andrea

Quoted 6 lines
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtso renamed from arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts +0 -0
 		reg = <0x1>;
 		reset-gpios = <&rp1_gpio 32 GPIO_ACTIVE_LOW>;
 		reset-delay-us = <5000>;
Signature · 1 line
2.51.0