]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: dts: broadcom: Add board DTS for Rpi5 which includes RP1 node
authorAndrea della Porta <andrea.porta@suse.com>
Thu, 29 May 2025 13:50:46 +0000 (15:50 +0200)
committerFlorian Fainelli <florian.fainelli@broadcom.com>
Mon, 9 Jun 2025 17:10:30 +0000 (10:10 -0700)
Add the fully populated DTS for RaspberryPi 5 which includes
the RP1 node definition. The inclusion tree is as follow (the
arrow points to the includer):

rp1-common.dtsi ----> rp1-nexus.dtsi ----> bcm2712-rpi-5-b.dts
                                               ^
                                               |
                                           bcm2712-rpi-5-b-ovl-rp1.dts

This is designed to maximize the compatibility with downstream DT
while ensuring that a fully defined DT (one which includes the RP1
node as opposed to load it from overlay at runtime) is present
since early boot stage.

Since the preferred board DT is the fully populated one, name it
bcm2712-rpi-5-b.dts and move the previous one into
bcm2712-rpi-5-b-ovl-rp1.dts.

Signed-off-by: Andrea della Porta <andrea.porta@suse.com>
Link: https://lore.kernel.org/r/20250529135052.28398-9-andrea.porta@suse.com
Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com>
arch/arm64/boot/dts/broadcom/Makefile
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts [new file with mode: 0644]
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts

index 01ecfa30418453e510c801bec66f991d5566514d..031875a277d7e4da2adb7badf93fa9ea351dfa31 100644 (file)
@@ -7,6 +7,7 @@ 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-ovl-rp1.dtb \
                              bcm2712-d-rpi-5-b.dtb \
                              bcm2837-rpi-2-b.dtb \
                              bcm2837-rpi-3-a-plus.dtb \
diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
new file mode 100644 (file)
index 0000000..6ea3c10
--- /dev/null
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include "bcm2712.dtsi"
+
+/ {
+       compatible = "raspberrypi,5-model-b", "brcm,bcm2712";
+       model = "Raspberry Pi 5";
+
+       aliases {
+               serial10 = &uart10;
+       };
+
+       chosen: chosen {
+               stdout-path = "serial10:115200n8";
+       };
+
+       clk_rp1_xosc: clock-50000000 {
+               compatible = "fixed-clock";
+               #clock-cells = <0>;
+               clock-output-names = "rp1-xosc";
+               clock-frequency = <50000000>;
+       };
+
+       /* Will be filled by the bootloader */
+       memory@0 {
+               device_type = "memory";
+               reg = <0 0 0 0x28000000>;
+       };
+
+       sd_io_1v8_reg: sd-io-1v8-reg {
+               compatible = "regulator-gpio";
+               regulator-name = "vdd-sd-io";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               regulator-always-on;
+               regulator-settling-time-us = <5000>;
+               gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>;
+               states = <1800000 1>,
+                        <3300000 0>;
+       };
+
+       sd_vcc_reg: sd-vcc-reg {
+               compatible = "regulator-fixed";
+               regulator-name = "vcc-sd";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-boot-on;
+               enable-active-high;
+               gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+/* The Debug UART, on Rpi5 it's on JST-SH 1.0mm 3-pin connector
+ * labeled "UART", i.e. the interface with the system console.
+ */
+&uart10 {
+       status = "okay";
+};
+
+/* SDIO1 is used to drive the SD card */
+&sdio1 {
+       vqmmc-supply = <&sd_io_1v8_reg>;
+       vmmc-supply = <&sd_vcc_reg>;
+       bus-width = <4>;
+       sd-uhs-sdr50;
+       sd-uhs-ddr50;
+       sd-uhs-sdr104;
+};
+
+&soc {
+       firmware: firmware {
+               compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               mboxes = <&mailbox>;
+               dma-ranges;
+
+               firmware_clocks: clocks {
+                       compatible = "raspberrypi,firmware-clocks";
+                       #clock-cells = <1>;
+               };
+
+               reset: reset {
+                       compatible = "raspberrypi,firmware-reset";
+                       #reset-cells = <1>;
+               };
+       };
+
+       power: power {
+               compatible = "raspberrypi,bcm2835-power";
+               firmware = <&firmware>;
+               #power-domain-cells = <1>;
+       };
+};
+
+&hvs {
+       clocks = <&firmware_clocks 4>, <&firmware_clocks 16>;
+       clock-names = "core", "disp";
+};
+
+&hdmi0 {
+       clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
+       clock-names = "hdmi", "bvb", "audio", "cec";
+};
+
+&hdmi1 {
+       clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
+       clock-names = "hdmi", "bvb", "audio", "cec";
+};
+
+&pcie1 {
+       status = "okay";
+};
+
+&pcie2 {
+       status = "okay";
+};
index 6ea3c102e0d6765d20d809c8680013ec8b6da076..a70a9b158df30dbfd20ac29bdaa0c9e9e241848d 100644 (file)
 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
-/dts-v1/;
-
-#include <dt-bindings/gpio/gpio.h>
-#include "bcm2712.dtsi"
-
-/ {
-       compatible = "raspberrypi,5-model-b", "brcm,bcm2712";
-       model = "Raspberry Pi 5";
-
-       aliases {
-               serial10 = &uart10;
-       };
-
-       chosen: chosen {
-               stdout-path = "serial10:115200n8";
-       };
-
-       clk_rp1_xosc: clock-50000000 {
-               compatible = "fixed-clock";
-               #clock-cells = <0>;
-               clock-output-names = "rp1-xosc";
-               clock-frequency = <50000000>;
-       };
-
-       /* Will be filled by the bootloader */
-       memory@0 {
-               device_type = "memory";
-               reg = <0 0 0 0x28000000>;
-       };
-
-       sd_io_1v8_reg: sd-io-1v8-reg {
-               compatible = "regulator-gpio";
-               regulator-name = "vdd-sd-io";
-               regulator-min-microvolt = <1800000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-boot-on;
-               regulator-always-on;
-               regulator-settling-time-us = <5000>;
-               gpios = <&gio_aon 3 GPIO_ACTIVE_HIGH>;
-               states = <1800000 1>,
-                        <3300000 0>;
-       };
-
-       sd_vcc_reg: sd-vcc-reg {
-               compatible = "regulator-fixed";
-               regulator-name = "vcc-sd";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
-               regulator-boot-on;
-               enable-active-high;
-               gpios = <&gio_aon 4 GPIO_ACTIVE_HIGH>;
-       };
-};
-
-/* The Debug UART, on Rpi5 it's on JST-SH 1.0mm 3-pin connector
- * labeled "UART", i.e. the interface with the system console.
+/*
+ * bcm2712-rpi-5-b-ovl-rp1.dts is the overlay-ready DT which will make
+ * the RP1 driver to load the RP1 dtb overlay at runtime, while
+ * bcm2712-rpi-5-b.dts (this file) is the fully defined one (i.e. it
+ * already contains RP1 node, so no overlay is loaded nor needed).
+ * This file is not intended to be modified, nodes should be added
+ * to the included bcm2712-rpi-5-b-ovl-rp1.dts.
  */
-&uart10 {
-       status = "okay";
-};
 
-/* SDIO1 is used to drive the SD card */
-&sdio1 {
-       vqmmc-supply = <&sd_io_1v8_reg>;
-       vmmc-supply = <&sd_vcc_reg>;
-       bus-width = <4>;
-       sd-uhs-sdr50;
-       sd-uhs-ddr50;
-       sd-uhs-sdr104;
-};
-
-&soc {
-       firmware: firmware {
-               compatible = "raspberrypi,bcm2835-firmware", "simple-mfd";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               mboxes = <&mailbox>;
-               dma-ranges;
-
-               firmware_clocks: clocks {
-                       compatible = "raspberrypi,firmware-clocks";
-                       #clock-cells = <1>;
-               };
-
-               reset: reset {
-                       compatible = "raspberrypi,firmware-reset";
-                       #reset-cells = <1>;
-               };
-       };
-
-       power: power {
-               compatible = "raspberrypi,bcm2835-power";
-               firmware = <&firmware>;
-               #power-domain-cells = <1>;
-       };
-};
-
-&hvs {
-       clocks = <&firmware_clocks 4>, <&firmware_clocks 16>;
-       clock-names = "core", "disp";
-};
+/dts-v1/;
 
-&hdmi0 {
-       clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
-       clock-names = "hdmi", "bvb", "audio", "cec";
-};
+#include "bcm2712-rpi-5-b-ovl-rp1.dts"
 
-&hdmi1 {
-       clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
-       clock-names = "hdmi", "bvb", "audio", "cec";
+&pcie2 {
+       #include "rp1-nexus.dtsi"
 };
 
 &pcie1 {