Devicetree
 help / color / mirror / Atom feed
* [PATCH v3 0/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
@ 2026-08-04 13:13 Gregor Herburger
  2026-08-04 13:13 ` [PATCH v3 1/2] dt-bindings: arm: bcm2835: Add Raspberry Pi 5 d0 Stepping Gregor Herburger
  2026-08-04 13:13 ` [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Gregor Herburger
  0 siblings, 2 replies; 7+ messages in thread
From: Gregor Herburger @ 2026-08-04 13:13 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden,
	Eric Anholt, Stefan Wahren
  Cc: devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Gregor Herburger

The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping
and in a c Stepping. There are two separate dts files. The
bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for
the d Stepping. The d stepping does not set its own compatible/model
string but uses "raspberrypi,5-model-b".

These two steppings are not compatible. Booting with the wrong dtb file
causes a crash at boot.

Add a compatibles string "raspberrypi,5-model-b-d0" to allow us to
distinguish between those two steppings.

---
Changes in v3:
- Remove fallback compatible
- Link to v2: https://patch.msgid.link/20260803-bcm2712-d-stepping-compatible-v2-0-803017e4ba7a@linutronix.de

Changes in v2:
- Removed the wrong oneOf
- Link to v1: https://patch.msgid.link/20260803-bcm2712-d-stepping-compatible-v1-0-401934357a44@linutronix.de

---
Gregor Herburger (2):
      dt-bindings: arm: bcm2835: Add Raspberry Pi 5 d0 Stepping
      arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible

 Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 1 +
 arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts     | 5 +++++
 2 files changed, 6 insertions(+)
---
base-commit: 8ba098e6b6ff0db8edf28528d1552be261af30d4
change-id: 20260731-bcm2712-d-stepping-compatible-4b40f0c4bda5

Best regards,
--  
Gregor Herburger <gregor.herburger@linutronix.de>


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

* [PATCH v3 1/2] dt-bindings: arm: bcm2835: Add Raspberry Pi 5 d0 Stepping
  2026-08-04 13:13 [PATCH v3 0/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Gregor Herburger
@ 2026-08-04 13:13 ` Gregor Herburger
  2026-08-04 13:13 ` [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Gregor Herburger
  1 sibling, 0 replies; 7+ messages in thread
From: Gregor Herburger @ 2026-08-04 13:13 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden,
	Eric Anholt, Stefan Wahren
  Cc: devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Gregor Herburger

Add the Raspberry Pi 5 d0 Stepping to the schema.

Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
---
 Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
index 2729a542c4f35..e2b32905c6a8f 100644
--- a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
+++ b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
@@ -26,6 +26,7 @@ properties:
       - description: BCM2712 based Boards
         items:
           - enum:
+              - raspberrypi,5-model-b-d0
               - raspberrypi,5-model-b
           - const: brcm,bcm2712
 

-- 
2.47.3


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

* [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
  2026-08-04 13:13 [PATCH v3 0/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Gregor Herburger
  2026-08-04 13:13 ` [PATCH v3 1/2] dt-bindings: arm: bcm2835: Add Raspberry Pi 5 d0 Stepping Gregor Herburger
@ 2026-08-04 13:13 ` Gregor Herburger
  2026-08-04 14:57   ` Stefan Wahren
  1 sibling, 1 reply; 7+ messages in thread
From: Gregor Herburger @ 2026-08-04 13:13 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden,
	Eric Anholt, Stefan Wahren
  Cc: devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Gregor Herburger

The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping
and in a c Stepping. There are two separate dts files. The
bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for
the d Stepping. The d stepping does not set its own compatible/model
string but uses "raspberrypi,5-model-b".

These two steppings are not compatible. Booting with the wrong dtb file
causes a crash at boot.

Add a compatibles string "raspberrypi,5-model-b-d0" to allow us to
distinguish between those two steppings.

Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
---
 arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
index 127be0fc27c22..5a86ad69645c3 100644
--- a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
+++ b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
@@ -3,6 +3,11 @@
 
 #include "bcm2712-rpi-5-b.dts"
 
+/ {
+	compatible = "raspberrypi,5-model-b-d0", "brcm,bcm2712";
+	model = "Raspberry Pi 5 d0 Stepping";
+};
+
 &gio_aon {
 	brcm,gpio-bank-widths = <15 6>;
 

-- 
2.47.3


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

* Re: [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
  2026-08-04 13:13 ` [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Gregor Herburger
@ 2026-08-04 14:57   ` Stefan Wahren
  2026-08-05  7:27     ` Gregor Herburger
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2026-08-04 14:57 UTC (permalink / raw)
  To: Gregor Herburger, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Florian Fainelli, Broadcom internal kernel review list, Ray Jui,
	Scott Branden, Eric Anholt
  Cc: devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel

Hi Gregor,

sorry for my late reply.

Am 04.08.26 um 15:13 schrieb Gregor Herburger:
> The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping
> and in a c Stepping. There are two separate dts files. The
> bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for
> the d Stepping. The d stepping does not set its own compatible/model
> string but uses "raspberrypi,5-model-b".
In case the SoC and not the board has a D stepping, why do just change 
the board compatible without the SoC compatible like "brcm,bcm2712-d0"?
>
> These two steppings are not compatible. Booting with the wrong dtb file
> causes a crash at boot.
This sounds like the patch should have a fixes tag?
>
> Add a compatibles string "raspberrypi,5-model-b-d0" to allow us to
> distinguish between those two steppings.
>
> Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
> ---
>   arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
> index 127be0fc27c22..5a86ad69645c3 100644
> --- a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
> +++ b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
> @@ -3,6 +3,11 @@
>   
>   #include "bcm2712-rpi-5-b.dts"
>   
> +/ {
> +	compatible = "raspberrypi,5-model-b-d0", "brcm,bcm2712";
> +	model = "Raspberry Pi 5 d0 Stepping";
> +};
> +
>   &gio_aon {
>   	brcm,gpio-bank-widths = <15 6>;
>   
>


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

* Re: [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
  2026-08-04 14:57   ` Stefan Wahren
@ 2026-08-05  7:27     ` Gregor Herburger
  2026-08-05 11:55       ` Stefan Wahren
  0 siblings, 1 reply; 7+ messages in thread
From: Gregor Herburger @ 2026-08-05  7:27 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden,
	Eric Anholt, devicetree, linux-rpi-kernel, linux-arm-kernel,
	linux-kernel

On Tue, Aug 04, 2026 at 04:57:09PM +0200, Stefan Wahren wrote:
> Hi Gregor,
> 
> sorry for my late reply.
> 
> Am 04.08.26 um 15:13 schrieb Gregor Herburger:
> > The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping
> > and in a c Stepping. There are two separate dts files. The
> > bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for
> > the d Stepping. The d stepping does not set its own compatible/model
> > string but uses "raspberrypi,5-model-b".
> In case the SoC and not the board has a D stepping, why do just change the
> board compatible without the SoC compatible like "brcm,bcm2712-d0"?
> > 
You mean changing both compatible strings? Like this:
	compatible = "raspberrypi,5-model-b-d0", "brcm,bcm2712-d0";

Don't know actually. Have not found an example for something like this in the
tree. I prefer it actually like it is. Would like to hear the opinion of an
devicetree maintainer about this.

> > These two steppings are not compatible. Booting with the wrong dtb file
> > causes a crash at boot.
> This sounds like the patch should have a fixes tag?
Yes can add one.
> > 
> > Add a compatibles string "raspberrypi,5-model-b-d0" to allow us to
> > distinguish between those two steppings.
> > 
> > Signed-off-by: Gregor Herburger <gregor.herburger@linutronix.de>
> > ---
> >   arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts | 5 +++++
> >   1 file changed, 5 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
> > index 127be0fc27c22..5a86ad69645c3 100644
> > --- a/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
> > +++ b/arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dts
> > @@ -3,6 +3,11 @@
> >   #include "bcm2712-rpi-5-b.dts"
> > +/ {
> > +	compatible = "raspberrypi,5-model-b-d0", "brcm,bcm2712";
> > +	model = "Raspberry Pi 5 d0 Stepping";
> > +};
> > +
> >   &gio_aon {
> >   	brcm,gpio-bank-widths = <15 6>;
> > 
> 

-- 
Gregor Herburger
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 35; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/legal/data-protection.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Dr. Wilfried Wessner, 
Katharina Kopp, Alexander Gieringer

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

* Re: [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
  2026-08-05  7:27     ` Gregor Herburger
@ 2026-08-05 11:55       ` Stefan Wahren
  2026-08-05 12:52         ` Gregor Herburger
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Wahren @ 2026-08-05 11:55 UTC (permalink / raw)
  To: Gregor Herburger
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden,
	devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Peter Robinson

Hi Gregor,

drop Eric and add Peter.

Am 05.08.26 um 09:27 schrieb Gregor Herburger:
> On Tue, Aug 04, 2026 at 04:57:09PM +0200, Stefan Wahren wrote:
>> Hi Gregor,
>>
>> sorry for my late reply.
>>
>> Am 04.08.26 um 15:13 schrieb Gregor Herburger:
>>> The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping
>>> and in a c Stepping. There are two separate dts files. The
>>> bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for
>>> the d Stepping. The d stepping does not set its own compatible/model
>>> string but uses "raspberrypi,5-model-b".
>> In case the SoC and not the board has a D stepping, why do just change the
>> board compatible without the SoC compatible like "brcm,bcm2712-d0"?
> You mean changing both compatible strings? Like this:
> 	compatible = "raspberrypi,5-model-b-d0", "brcm,bcm2712-d0";
I just want to mention that your explanation doesn't match to your 
changes. The first compatible represent the whole board (RPi 5) and the 
second one represent only the SoC (BCM2712). Since the SoC is different 
according your explanation, i would expect the SoC compatible needs to 
be changed. And in case the SoC changes, also the board won't be 
compatible anymore, correct?

Usually we try to avoid to model different SoC steppings in the device 
tree, because this introduce a lot of redundancy. But it seems that the 
differences are signifcant here.

In case this suggestion break something, this needs further explanation 
in the patch.

Best regards

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

* Re: [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible
  2026-08-05 11:55       ` Stefan Wahren
@ 2026-08-05 12:52         ` Gregor Herburger
  0 siblings, 0 replies; 7+ messages in thread
From: Gregor Herburger @ 2026-08-05 12:52 UTC (permalink / raw)
  To: Stefan Wahren
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Florian Fainelli,
	Broadcom internal kernel review list, Ray Jui, Scott Branden,
	devicetree, linux-rpi-kernel, linux-arm-kernel, linux-kernel,
	Peter Robinson

Hi Stefan,
On Wed, Aug 05, 2026 at 01:55:50PM +0200, Stefan Wahren wrote:
> Hi Gregor,
> 
> drop Eric and add Peter.
> 
> Am 05.08.26 um 09:27 schrieb Gregor Herburger:
> > On Tue, Aug 04, 2026 at 04:57:09PM +0200, Stefan Wahren wrote:
> > > Hi Gregor,
> > > 
> > > sorry for my late reply.
> > > 
> > > Am 04.08.26 um 15:13 schrieb Gregor Herburger:
> > > > The bcm2712 found on the Raspberry Pi 5 is available in the d Stepping
> > > > and in a c Stepping. There are two separate dts files. The
> > > > bcm2712-rpi-5-b.dts for the c Stepping and the bcm2712-d-rpi-5-b.dts for
> > > > the d Stepping. The d stepping does not set its own compatible/model
> > > > string but uses "raspberrypi,5-model-b".
> > > In case the SoC and not the board has a D stepping, why do just change the
> > > board compatible without the SoC compatible like "brcm,bcm2712-d0"?
> > You mean changing both compatible strings? Like this:
> > 	compatible = "raspberrypi,5-model-b-d0", "brcm,bcm2712-d0";
> I just want to mention that your explanation doesn't match to your changes.
> The first compatible represent the whole board (RPi 5) and the second one
> represent only the SoC (BCM2712). Since the SoC is different according your
> explanation, i would expect the SoC compatible needs to be changed. And in
> case the SoC changes, also the board won't be compatible anymore, correct?
Yes the SoC differs in these two versions and the board is maybe the same (but
not compatible). Compatible strings should go from most specific to most general
[0]. If we would have the same first string for both steppings it wouldn't be
distinguishable. So at least the first string must be unique.

E.g systemd-boot only matches the first compatible string [1].

The only example I found for SoC steppings in the tree is the
'marvell,rd88f6281-a' and 'marvell,rd88f6281-z0'.
Although these dts are from 2014 and I don't know if this is still the current
best practice.
> 
> Usually we try to avoid to model different SoC steppings in the device tree,
> because this introduce a lot of redundancy. But it seems that the
> differences are signifcant here.
Yes but here we are with two devicetrees which are not compatible.
> 
> In case this suggestion break something, this needs further explanation in
> the patch.
I can update the commit message if it is not clear enough.
> 
> Best regards


[0] https://github.com/devicetree-org/devicetree-specification/blob/main/source/chapter2-devicetree-basics.rst#compatible
[1] https://github.com/systemd/systemd/blob/main/src/boot/devicetree.c#L182

-- 
Gregor Herburger
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 35; Fax.: +49 7556 25 999 99

Hinweise zum Datenschutz finden Sie hier (Informations on data privacy 
can be found here): https://linutronix.de/legal/data-protection.php

Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen | 
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700 
806 | Geschäftsführer (Managing Directors): Dr. Wilfried Wessner, 
Katharina Kopp, Alexander Gieringer

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

end of thread, other threads:[~2026-08-05 12:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 13:13 [PATCH v3 0/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Gregor Herburger
2026-08-04 13:13 ` [PATCH v3 1/2] dt-bindings: arm: bcm2835: Add Raspberry Pi 5 d0 Stepping Gregor Herburger
2026-08-04 13:13 ` [PATCH v3 2/2] arm64: dts: broadcom: bcm2712-d-rpi-5-b: add compatible Gregor Herburger
2026-08-04 14:57   ` Stefan Wahren
2026-08-05  7:27     ` Gregor Herburger
2026-08-05 11:55       ` Stefan Wahren
2026-08-05 12:52         ` Gregor Herburger

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