ARM: dts: update bcm2711-rpi-cm4.dts and -400
authorPhil Elwell <phil@raspberrypi.com>
Wed, 31 Mar 2021 09:22:30 +0000 (10:22 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Wed, 31 Mar 2021 13:09:32 +0000 (14:09 +0100)
Neither CM4 nor Pi 400 have appeared upstream yet, and as a result
they have missed out on improvements to the Pi 4B platform.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
ARM: dts: Bring bcm2711-rpi-400.dts up-to-date

Pi 400 support has not appeared upstream yet, and as a result it has
missed out on improvements to the other Pi 4 platforms.

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
arch/arm/boot/dts/bcm2711-rpi-400.dts
arch/arm/boot/dts/bcm2711-rpi-cm4.dts

index 557ea8d..1bb8854 100644 (file)
@@ -24,6 +24,7 @@
                emmc2bus = &emmc2bus;
                ethernet0 = &genet;
                pcie0 = &pcie0;
+               blconfig = &blconfig;
        };
 
        leds {
        status = "okay";
 };
 
+&rmem {
+       /*
+        * RPi4's co-processor will copy the board's bootloader configuration
+        * into memory for the OS to consume. It'll also update this node with
+        * its placement information.
+        */
+       blconfig: nvram@0 {
+               compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0x0 0x0 0x0>;
+               no-map;
+               status = "disabled";
+       };
+};
+
 /* SDHCI is used to control the SDIO for wireless */
 &sdhci {
        #address-cells = <1>;
index 9a99940..a39e5c2 100644 (file)
@@ -3,6 +3,8 @@
 #include "bcm2711.dtsi"
 #include "bcm2835-rpi.dtsi"
 
+#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
+
 / {
        compatible = "raspberrypi,4-compute-module", "brcm,bcm2711";
        model = "Raspberry Pi Compute Module 4";
@@ -22,6 +24,7 @@
                emmc2bus = &emmc2bus;
                ethernet0 = &genet;
                pcie0 = &pcie0;
+               blconfig = &blconfig;
        };
 
        leds {
 };
 
 &firmware {
+       firmware_clocks: clocks {
+               compatible = "raspberrypi,firmware-clocks";
+               #clock-cells = <1>;
+       };
+
        expgpio: gpio {
                compatible = "raspberrypi,firmware-gpio";
                gpio-controller;
                        output-low;
                };
        };
+
+       reset: reset {
+               compatible = "raspberrypi,firmware-reset";
+               #reset-cells = <1>;
+       };
 };
 
 &gpio {
        status = "okay";
 };
 
-&vc4 {
-       status = "okay";
-};
-
-&vec {
-       status = "disabled";
-};
-
 &pwm1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pwm1_0_gpio40 &pwm1_1_gpio41>;
        status = "okay";
 };
 
+&rmem {
+       /*
+        * RPi4's co-processor will copy the board's bootloader configuration
+        * into memory for the OS to consume. It'll also update this node with
+        * its placement information.
+        */
+       blconfig: nvram@0 {
+               compatible = "raspberrypi,bootloader-config", "nvmem-rmem";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               reg = <0x0 0x0 0x0>;
+               no-map;
+               status = "disabled";
+       };
+};
+
 /* SDHCI is used to control the SDIO for wireless */
 &sdhci {
        #address-cells = <1>;
        };
 };
 
+&pcie0 {
+       pci@1,0 {
+               #address-cells = <3>;
+               #size-cells = <2>;
+               ranges;
+
+               reg = <0 0 0 0 0>;
+
+               usb@1,0 {
+                       reg = <0x10000 0 0 0 0>;
+                       resets = <&reset RASPBERRYPI_FIRMWARE_RESET_ID_USB>;
+               };
+       };
+};
+
 /* uart0 communicates with the BT module */
 &uart0 {
        pinctrl-names = "default";
        interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
 };
 
+&vc4 {
+       status = "okay";
+};
+
+&vec {
+       status = "disabled";
+};
+
 // =============================================
 // Downstream rpi- changes
 
 #include "bcm283x-rpi-csi0-2lane.dtsi"
 #include "bcm283x-rpi-csi1-4lane.dtsi"
 #include "bcm283x-rpi-i2c0mux_0_44.dtsi"
+#include "bcm283x-rpi-cam1-regulator.dtsi"
 
 / {
        chosen {
        };
 
        /delete-node/ wifi-pwrseq;
-
-       cam0_reg: cam1_reg: cam1_reg {
-               compatible = "regulator-fixed";
-               regulator-name = "cam1-reg";
-               gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-               status = "disabled";
-       };
 };
 
 &mmcnr {
        brcm,disable-headphones = <1>;
 };
 
+cam0_reg: &cam1_reg {
+       gpio = <&expgpio 5 GPIO_ACTIVE_HIGH>;
+};
+
 / {
        __overrides__ {
                act_led_gpio = <&act_led>,"gpios:4";