[PATCH 02/13] ARM: dts: broadcom: bcm2835-rpi: Move non simple-bus nodes to root level

Rob Herring (Arm) posted 13 patches 1 month ago
[PATCH 02/13] ARM: dts: broadcom: bcm2835-rpi: Move non simple-bus nodes to root level
Posted by Rob Herring (Arm) 1 month ago
The 'gpu' and 'firmware' nodes are not MMIO devices, so they should not be
under a 'simple-bus'. Additionally, the "raspberrypi,bcm2835-power" node
is part of the firmware, so move it under the /firmware node.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
 arch/arm/boot/dts/broadcom/bcm2835-common.dtsi |  7 ++++---
 arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi    | 16 ++++++++--------
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi b/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi
index 9261b67dbee1..1e76b290510d 100644
--- a/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi
@@ -141,9 +141,10 @@ v3d: v3d@7ec00000 {
 			interrupts = <1 10>;
 		};
 
-		vc4: gpu {
-			compatible = "brcm,bcm2835-vc4";
-		};
+	};
+
+	vc4: gpu {
+		compatible = "brcm,bcm2835-vc4";
 	};
 };
 
diff --git a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
index e9bf41b9f5c1..9ab70b519a63 100644
--- a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
@@ -1,15 +1,13 @@
 #include <dt-bindings/power/raspberrypi-power.h>
 
 / {
-	soc {
-		firmware: firmware {
-			compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
-			mboxes = <&mailbox>;
+	firmware: firmware {
+		compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
+		mboxes = <&mailbox>;
 
-			firmware_clocks: clocks {
-				compatible = "raspberrypi,firmware-clocks";
-				#clock-cells = <1>;
-			};
+		firmware_clocks: clocks {
+			compatible = "raspberrypi,firmware-clocks";
+			#clock-cells = <1>;
 		};
 
 		power: power {
@@ -17,7 +15,9 @@ power: power {
 			firmware = <&firmware>;
 			#power-domain-cells = <1>;
 		};
+	};
 
+	soc {
 		vchiq: mailbox@7e00b840 {
 			compatible = "brcm,bcm2835-vchiq";
 			reg = <0x7e00b840 0x3c>;

-- 
2.51.0
Re: [PATCH 02/13] ARM: dts: broadcom: bcm2835-rpi: Move non simple-bus nodes to root level
Posted by Marek Szyprowski 1 month ago
On 07.01.2026 03:09, Rob Herring (Arm) wrote:
> The 'gpu' and 'firmware' nodes are not MMIO devices, so they should not be
> under a 'simple-bus'. Additionally, the "raspberrypi,bcm2835-power" node
> is part of the firmware, so move it under the /firmware node.
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>

This breaks operation of all drivers under the firmware node. I'm not 
exactly sure why, but they are not properly instantiated. It must be 
something specific to "firmware" name, but I didn't dig enough to find 
exactly where and why.

After changing the "/firmware" node name "xfirmware" everything works again:


diff --git a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi 
b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
index 9ab70b519a63..464f032ccb71 100644
--- a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
@@ -1,7 +1,7 @@
  #include <dt-bindings/power/raspberrypi-power.h>

  / {
-       firmware: firmware {
+       firmware: xfirmware {
                 compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
                 mboxes = <&mailbox>;


Same issue occurs with bcm2712 change (patch 3/13).


> ---
>   arch/arm/boot/dts/broadcom/bcm2835-common.dtsi |  7 ++++---
>   arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi    | 16 ++++++++--------
>   2 files changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi b/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi
> index 9261b67dbee1..1e76b290510d 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi
> +++ b/arch/arm/boot/dts/broadcom/bcm2835-common.dtsi
> @@ -141,9 +141,10 @@ v3d: v3d@7ec00000 {
>   			interrupts = <1 10>;
>   		};
>   
> -		vc4: gpu {
> -			compatible = "brcm,bcm2835-vc4";
> -		};
> +	};
> +
> +	vc4: gpu {
> +		compatible = "brcm,bcm2835-vc4";
>   	};
>   };
>   
> diff --git a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
> index e9bf41b9f5c1..9ab70b519a63 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
> +++ b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
> @@ -1,15 +1,13 @@
>   #include <dt-bindings/power/raspberrypi-power.h>
>   
>   / {
> -	soc {
> -		firmware: firmware {
> -			compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
> -			mboxes = <&mailbox>;
> +	firmware: firmware {
> +		compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
> +		mboxes = <&mailbox>;
>   
> -			firmware_clocks: clocks {
> -				compatible = "raspberrypi,firmware-clocks";
> -				#clock-cells = <1>;
> -			};
> +		firmware_clocks: clocks {
> +			compatible = "raspberrypi,firmware-clocks";
> +			#clock-cells = <1>;
>   		};
>   
>   		power: power {
> @@ -17,7 +15,9 @@ power: power {
>   			firmware = <&firmware>;
>   			#power-domain-cells = <1>;
>   		};
> +	};
>   
> +	soc {
>   		vchiq: mailbox@7e00b840 {
>   			compatible = "brcm,bcm2835-vchiq";
>   			reg = <0x7e00b840 0x3c>;
>
Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

Re: [PATCH 02/13] ARM: dts: broadcom: bcm2835-rpi: Move non simple-bus nodes to root level
Posted by Rob Herring 3 weeks, 6 days ago
On Fri, Jan 9, 2026 at 6:01 AM Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
>
> On 07.01.2026 03:09, Rob Herring (Arm) wrote:
> > The 'gpu' and 'firmware' nodes are not MMIO devices, so they should not be
> > under a 'simple-bus'. Additionally, the "raspberrypi,bcm2835-power" node
> > is part of the firmware, so move it under the /firmware node.
> >
> > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
>
> This breaks operation of all drivers under the firmware node. I'm not
> exactly sure why, but they are not properly instantiated. It must be
> something specific to "firmware" name, but I didn't dig enough to find
> exactly where and why.
>
> After changing the "/firmware" node name "xfirmware" everything works again:
>
>
> diff --git a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
> b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
> index 9ab70b519a63..464f032ccb71 100644
> --- a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
> +++ b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
> @@ -1,7 +1,7 @@
>   #include <dt-bindings/power/raspberrypi-power.h>
>
>   / {
> -       firmware: firmware {
> +       firmware: xfirmware {
>                  compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
>                  mboxes = <&mailbox>;
>
>
> Same issue occurs with bcm2712 change (patch 3/13).

The issue is how /firmware is handled in drivers/of/platform.c and it
doesn't create a device for the /firmware node. I think the fix here
is /firmware needs to be just a container node and move
"raspberrypi,bcm2835-firmware" down a level. That also allows for
different types of firmware such as a TEE or SCMI should those or
something similar ever be needed.

I'll see if I can get kernelci to test that change. I don't think my
branch boots all boards though...

Rob
Re: [PATCH 02/13] ARM: dts: broadcom: bcm2835-rpi: Move non simple-bus nodes to root level
Posted by Florian Fainelli 3 weeks, 2 days ago
On 1/12/26 10:09, Rob Herring wrote:
> On Fri, Jan 9, 2026 at 6:01 AM Marek Szyprowski
> <m.szyprowski@samsung.com> wrote:
>>
>> On 07.01.2026 03:09, Rob Herring (Arm) wrote:
>>> The 'gpu' and 'firmware' nodes are not MMIO devices, so they should not be
>>> under a 'simple-bus'. Additionally, the "raspberrypi,bcm2835-power" node
>>> is part of the firmware, so move it under the /firmware node.
>>>
>>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
>>
>> This breaks operation of all drivers under the firmware node. I'm not
>> exactly sure why, but they are not properly instantiated. It must be
>> something specific to "firmware" name, but I didn't dig enough to find
>> exactly where and why.
>>
>> After changing the "/firmware" node name "xfirmware" everything works again:
>>
>>
>> diff --git a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
>> b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
>> index 9ab70b519a63..464f032ccb71 100644
>> --- a/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
>> +++ b/arch/arm/boot/dts/broadcom/bcm2835-rpi.dtsi
>> @@ -1,7 +1,7 @@
>>    #include <dt-bindings/power/raspberrypi-power.h>
>>
>>    / {
>> -       firmware: firmware {
>> +       firmware: xfirmware {
>>                   compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
>>                   mboxes = <&mailbox>;
>>
>>
>> Same issue occurs with bcm2712 change (patch 3/13).
> 
> The issue is how /firmware is handled in drivers/of/platform.c and it
> doesn't create a device for the /firmware node. I think the fix here
> is /firmware needs to be just a container node and move
> "raspberrypi,bcm2835-firmware" down a level. That also allows for
> different types of firmware such as a TEE or SCMI should those or
> something similar ever be needed.
> 
> I'll see if I can get kernelci to test that change. I don't think my
> branch boots all boards though...

Dropped this patch for now, until your of_platform.c fix lands and I can 
apply your two other patches.
-- 
Florian
Re: [PATCH 02/13] ARM: dts: broadcom: bcm2835-rpi: Move non simple-bus nodes to root level
Posted by Florian Fainelli 1 month ago
From: Florian Fainelli <f.fainelli@gmail.com>

On Tue, 06 Jan 2026 20:09:41 -0600, "Rob Herring (Arm)" <robh@kernel.org> wrote:
> The 'gpu' and 'firmware' nodes are not MMIO devices, so they should not be
> under a 'simple-bus'. Additionally, the "raspberrypi,bcm2835-power" node
> is part of the firmware, so move it under the /firmware node.
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---

Applied to https://github.com/Broadcom/stblinux/commits/devicetree/next, thanks!
--
Florian