* [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support
@ 2021-06-06 12:16 Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 1/7] ARM: dts: bcm283x: Fix up MMC node names Stefan Wahren
` (6 more replies)
0 siblings, 7 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
This series adds support for the Raspberry Pi 400.
Changes in V2:
- add collected Reviewed-by and Acked-by
- add memory node, ethernet alias and gpio expander to bcm2711-rpi.dtsi
- drop PCIe USB reset control from bcm2711-rpi.dtsi
- add patch to fixup LED node names
- include RPi 4 B dts into RPi 400 dts
Stefan Wahren (7):
ARM: dts: bcm283x: Fix up MMC node names
watchdog: bcm2835_wdt: consider system-power-controller property
ARM: dts: Move BCM2711 RPi specific into separate dtsi
dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema
ARM: dts: bcm283x: Fix up GPIO LED node names
ARM: dts: Add Raspberry Pi 400 support
arm64: dts: broadcom: Add reference to RPi 400
.../devicetree/bindings/arm/bcm/bcm2835.yaml | 1 +
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 85 +++-------------------
arch/arm/boot/dts/bcm2711-rpi-400.dts | 45 ++++++++++++
arch/arm/boot/dts/bcm2711-rpi.dtsi | 74 +++++++++++++++++++
arch/arm/boot/dts/bcm2711.dtsi | 2 +-
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 4 +-
arch/arm/boot/dts/bcm2835-rpi-a.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 4 +-
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-b.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi | 2 +-
arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-zero.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 4 +-
arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 4 +-
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 4 +-
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 2 +-
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 2 +-
arch/arm/boot/dts/bcm283x.dtsi | 2 +-
arch/arm64/boot/dts/broadcom/Makefile | 3 +-
arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts | 2 +
drivers/watchdog/bcm2835_wdt.c | 10 ++-
24 files changed, 165 insertions(+), 98 deletions(-)
create mode 100644 arch/arm/boot/dts/bcm2711-rpi-400.dts
create mode 100644 arch/arm/boot/dts/bcm2711-rpi.dtsi
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts
--
2.7.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH V2 1/7] ARM: dts: bcm283x: Fix up MMC node names
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
@ 2021-06-06 12:16 ` Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property Stefan Wahren
` (5 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
Fix the node names for the MMC/SD card controller to conform
to the standard node name mmc@..
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
---
arch/arm/boot/dts/bcm2711.dtsi | 2 +-
arch/arm/boot/dts/bcm283x.dtsi | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi
index 720beec..d872064 100644
--- a/arch/arm/boot/dts/bcm2711.dtsi
+++ b/arch/arm/boot/dts/bcm2711.dtsi
@@ -413,7 +413,7 @@
ranges = <0x0 0x7e000000 0x0 0xfe000000 0x01800000>;
dma-ranges = <0x0 0xc0000000 0x0 0x00000000 0x40000000>;
- emmc2: emmc2@7e340000 {
+ emmc2: mmc@7e340000 {
compatible = "brcm,bcm2711-emmc2";
reg = <0x0 0x7e340000 0x100>;
interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/arch/arm/boot/dts/bcm283x.dtsi b/arch/arm/boot/dts/bcm283x.dtsi
index b83a864..0f3be55 100644
--- a/arch/arm/boot/dts/bcm283x.dtsi
+++ b/arch/arm/boot/dts/bcm283x.dtsi
@@ -420,7 +420,7 @@
status = "disabled";
};
- sdhci: sdhci@7e300000 {
+ sdhci: mmc@7e300000 {
compatible = "brcm,bcm2835-sdhci";
reg = <0x7e300000 0x100>;
interrupts = <2 30>;
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 1/7] ARM: dts: bcm283x: Fix up MMC node names Stefan Wahren
@ 2021-06-06 12:16 ` Stefan Wahren
2021-06-15 21:17 ` Stefan Wahren
2021-06-22 7:12 ` Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 3/7] ARM: dts: Move BCM2711 RPi specific into separate dtsi Stefan Wahren
` (4 subsequent siblings)
6 siblings, 2 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
Until now all Raspberry Pi boards used the power off function of the SoC.
But the Raspberry Pi 400 uses gpio-poweroff for the whole board which
possibly cannot register the poweroff handler because the it's
already registered by this watchdog driver. So consider the
system-power-controller property for registering, which is already
defined in soc/bcm/brcm,bcm2835-pm.txt .
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/watchdog/bcm2835_wdt.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
index dec6ca0..9490717 100644
--- a/drivers/watchdog/bcm2835_wdt.c
+++ b/drivers/watchdog/bcm2835_wdt.c
@@ -205,9 +205,13 @@ static int bcm2835_wdt_probe(struct platform_device *pdev)
if (err)
return err;
- if (pm_power_off == NULL) {
- pm_power_off = bcm2835_power_off;
- bcm2835_power_off_wdt = wdt;
+ if (of_device_is_system_power_controller(pdev->dev.parent->of_node)) {
+ if (!pm_power_off) {
+ pm_power_off = bcm2835_power_off;
+ bcm2835_power_off_wdt = wdt;
+ } else {
+ dev_info(dev, "Poweroff handler already present!\n");
+ }
}
dev_info(dev, "Broadcom BCM2835 watchdog timer");
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V2 3/7] ARM: dts: Move BCM2711 RPi specific into separate dtsi
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 1/7] ARM: dts: bcm283x: Fix up MMC node names Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property Stefan Wahren
@ 2021-06-06 12:16 ` Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 4/7] dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema Stefan Wahren
` (3 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
There is a lot of Raspberry Pi specific stuff (neither SoC or board
specific) for the BCM2711 which is currently in the RPi 4 B dts. In order
to avoid copy & paste for every new BCM2711 based Raspberry Pi, move it
into a separate dtsi.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 81 +++++------------------------------
arch/arm/boot/dts/bcm2711-rpi.dtsi | 74 ++++++++++++++++++++++++++++++++
2 files changed, 84 insertions(+), 71 deletions(-)
create mode 100644 arch/arm/boot/dts/bcm2711-rpi.dtsi
diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index 3b4ab94..c54854a1 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -1,11 +1,9 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include "bcm2711.dtsi"
-#include "bcm2835-rpi.dtsi"
+#include "bcm2711-rpi.dtsi"
#include "bcm283x-rpi-usb-peripheral.dtsi"
-#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
-
/ {
compatible = "raspberrypi,4-model-b", "brcm,bcm2711";
model = "Raspberry Pi 4 Model B";
@@ -15,19 +13,6 @@
stdout-path = "serial1:115200n8";
};
- /* Will be filled by the bootloader */
- memory@0 {
- device_type = "memory";
- reg = <0 0 0>;
- };
-
- aliases {
- emmc2bus = &emmc2bus;
- ethernet0 = &genet;
- pcie0 = &pcie0;
- blconfig = &blconfig;
- };
-
leds {
act {
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
@@ -79,31 +64,15 @@
status = "okay";
};
-&firmware {
- firmware_clocks: clocks {
- compatible = "raspberrypi,firmware-clocks";
- #clock-cells = <1>;
- };
-
- expgpio: gpio {
- compatible = "raspberrypi,firmware-gpio";
- gpio-controller;
- #gpio-cells = <2>;
- gpio-line-names = "BT_ON",
- "WL_ON",
- "PWR_LED_OFF",
- "GLOBAL_RESET",
- "VDD_SD_IO_SEL",
- "CAM_GPIO",
- "SD_PWR_ON",
- "";
- status = "okay";
- };
-
- reset: reset {
- compatible = "raspberrypi,firmware-reset";
- #reset-cells = <1>;
- };
+&expgpio {
+ gpio-line-names = "BT_ON",
+ "WL_ON",
+ "PWR_LED_OFF",
+ "GLOBAL_RESET",
+ "VDD_SD_IO_SEL",
+ "CAM_GPIO",
+ "SD_PWR_ON",
+ "";
};
&gpio {
@@ -180,23 +149,13 @@
};
&hdmi0 {
- clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
- clock-names = "hdmi", "bvb", "audio", "cec";
- wifi-2.4ghz-coexistence;
status = "okay";
};
&hdmi1 {
- clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
- clock-names = "hdmi", "bvb", "audio", "cec";
- wifi-2.4ghz-coexistence;
status = "okay";
};
-&hvs {
- clocks = <&firmware_clocks 4>;
-};
-
&pixelvalve0 {
status = "okay";
};
@@ -219,22 +178,6 @@
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>;
@@ -309,10 +252,6 @@
status = "okay";
};
-&vchiq {
- interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
-};
-
&vc4 {
status = "okay";
};
diff --git a/arch/arm/boot/dts/bcm2711-rpi.dtsi b/arch/arm/boot/dts/bcm2711-rpi.dtsi
new file mode 100644
index 0000000..ca266c5
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2711-rpi.dtsi
@@ -0,0 +1,74 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "bcm2835-rpi.dtsi"
+
+#include <dt-bindings/reset/raspberrypi,firmware-reset.h>
+
+/ {
+ /* Will be filled by the bootloader */
+ memory@0 {
+ device_type = "memory";
+ reg = <0 0 0>;
+ };
+
+ aliases {
+ emmc2bus = &emmc2bus;
+ ethernet0 = &genet;
+ pcie0 = &pcie0;
+ blconfig = &blconfig;
+ };
+};
+
+&firmware {
+ firmware_clocks: clocks {
+ compatible = "raspberrypi,firmware-clocks";
+ #clock-cells = <1>;
+ };
+
+ expgpio: gpio {
+ compatible = "raspberrypi,firmware-gpio";
+ gpio-controller;
+ #gpio-cells = <2>;
+ status = "okay";
+ };
+
+ reset: reset {
+ compatible = "raspberrypi,firmware-reset";
+ #reset-cells = <1>;
+ };
+};
+
+&hdmi0 {
+ clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 0>, <&clk_27MHz>;
+ clock-names = "hdmi", "bvb", "audio", "cec";
+ wifi-2.4ghz-coexistence;
+};
+
+&hdmi1 {
+ clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
+ clock-names = "hdmi", "bvb", "audio", "cec";
+ wifi-2.4ghz-coexistence;
+};
+
+&hvs {
+ clocks = <&firmware_clocks 4>;
+};
+
+&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";
+ };
+};
+
+&vchiq {
+ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+};
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V2 4/7] dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
` (2 preceding siblings ...)
2021-06-06 12:16 ` [PATCH V2 3/7] ARM: dts: Move BCM2711 RPi specific into separate dtsi Stefan Wahren
@ 2021-06-06 12:16 ` Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 5/7] ARM: dts: bcm283x: Fix up GPIO LED node names Stefan Wahren
` (2 subsequent siblings)
6 siblings, 0 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
Add new Raspberry Pi 400 to DT schema.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Acked-by: Rob Herring <robh@kernel.org>
---
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 812ae8c..230b80d 100644
--- a/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
+++ b/Documentation/devicetree/bindings/arm/bcm/bcm2835.yaml
@@ -18,6 +18,7 @@ properties:
- description: BCM2711 based Boards
items:
- enum:
+ - raspberrypi,400
- raspberrypi,4-model-b
- const: brcm,bcm2711
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V2 5/7] ARM: dts: bcm283x: Fix up GPIO LED node names
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
` (3 preceding siblings ...)
2021-06-06 12:16 ` [PATCH V2 4/7] dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema Stefan Wahren
@ 2021-06-06 12:16 ` Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 6/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 7/7] arm64: dts: broadcom: Add reference to RPi 400 Stefan Wahren
6 siblings, 0 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
Fix the node names for the GPIO LEDs to conform to the standard node
name led-..
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/bcm2711-rpi-4-b.dts | 4 ++--
arch/arm/boot/dts/bcm2835-rpi-a-plus.dts | 4 ++--
arch/arm/boot/dts/bcm2835-rpi-a.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-b-plus.dts | 4 ++--
arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-b.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi | 2 +-
arch/arm/boot/dts/bcm2835-rpi-zero-w.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi-zero.dts | 2 +-
arch/arm/boot/dts/bcm2835-rpi.dtsi | 2 +-
arch/arm/boot/dts/bcm2836-rpi-2-b.dts | 4 ++--
arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts | 4 ++--
arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts | 4 ++--
arch/arm/boot/dts/bcm2837-rpi-3-b.dts | 2 +-
arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi | 2 +-
15 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
index c54854a1..f24bdd0 100644
--- a/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
+++ b/arch/arm/boot/dts/bcm2711-rpi-4-b.dts
@@ -14,11 +14,11 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
};
- pwr {
+ led-pwr {
label = "PWR";
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
default-state = "keep";
diff --git a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
index 6c8ce39..40b9405 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a-plus.dts
@@ -14,11 +14,11 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
};
- pwr {
+ led-pwr {
label = "PWR";
gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
default-state = "keep";
diff --git a/arch/arm/boot/dts/bcm2835-rpi-a.dts b/arch/arm/boot/dts/bcm2835-rpi-a.dts
index 17fdd48..11edb58 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-a.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-a.dts
@@ -14,7 +14,7 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
index b0355c2..1b435c6 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts
@@ -15,11 +15,11 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
};
- pwr {
+ led-pwr {
label = "PWR";
gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
default-state = "keep";
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
index 33b3b5c..a23c25c 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b-rev2.dts
@@ -15,7 +15,7 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-b.dts b/arch/arm/boot/dts/bcm2835-rpi-b.dts
index 2b69957..1b63d6b 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-b.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-b.dts
@@ -15,7 +15,7 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi b/arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi
index 58059c2..e4e6b6ab 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi-cm1.dtsi
@@ -5,7 +5,7 @@
/ {
leds {
- act {
+ led-act {
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
index f65448c..33b2b77 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero-w.dts
@@ -23,7 +23,7 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835-rpi-zero.dts b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
index 6dd93c6..6f9b3a9 100644
--- a/arch/arm/boot/dts/bcm2835-rpi-zero.dts
+++ b/arch/arm/boot/dts/bcm2835-rpi-zero.dts
@@ -18,7 +18,7 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/arch/arm/boot/dts/bcm2835-rpi.dtsi b/arch/arm/boot/dts/bcm2835-rpi.dtsi
index d94357b..87ddcad 100644
--- a/arch/arm/boot/dts/bcm2835-rpi.dtsi
+++ b/arch/arm/boot/dts/bcm2835-rpi.dtsi
@@ -4,7 +4,7 @@
leds {
compatible = "gpio-leds";
- act {
+ led-act {
label = "ACT";
default-state = "keep";
linux,default-trigger = "heartbeat";
diff --git a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
index 0455a68..d8af8ee 100644
--- a/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
+++ b/arch/arm/boot/dts/bcm2836-rpi-2-b.dts
@@ -15,11 +15,11 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 47 GPIO_ACTIVE_HIGH>;
};
- pwr {
+ led-pwr {
label = "PWR";
gpios = <&gpio 35 GPIO_ACTIVE_HIGH>;
default-state = "keep";
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
index 28be033..77099a7 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-a-plus.dts
@@ -19,11 +19,11 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
};
- pwr {
+ led-pwr {
label = "PWR";
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
default-state = "keep";
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
index 3734314..6101026 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b-plus.dts
@@ -20,11 +20,11 @@
};
leds {
- act {
+ led-act {
gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
};
- pwr {
+ led-pwr {
label = "PWR";
gpios = <&expgpio 2 GPIO_ACTIVE_LOW>;
default-state = "keep";
diff --git a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
index 054ecaa..dd4a486 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
+++ b/arch/arm/boot/dts/bcm2837-rpi-3-b.dts
@@ -20,7 +20,7 @@
};
leds {
- act {
+ led-act {
gpios = <&expgpio 2 GPIO_ACTIVE_HIGH>;
};
};
diff --git a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
index 925cb37..828a205 100644
--- a/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
+++ b/arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi
@@ -14,7 +14,7 @@
* Since there is no upstream GPIO driver yet,
* remove the incomplete node.
*/
- /delete-node/ act;
+ /delete-node/ led-act;
};
reg_3v3: fixed-regulator {
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V2 6/7] ARM: dts: Add Raspberry Pi 400 support
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
` (4 preceding siblings ...)
2021-06-06 12:16 ` [PATCH V2 5/7] ARM: dts: bcm283x: Fix up GPIO LED node names Stefan Wahren
@ 2021-06-06 12:16 ` Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 7/7] arm64: dts: broadcom: Add reference to RPi 400 Stefan Wahren
6 siblings, 0 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
The Raspberry Pi 400 is like a Pi 4 B designed into a keyboard. But there
are some minor differences:
- higher CPU clock rate (1.8 GHz)
- different Wifi chip (BCM43456)
- power off is now handled via GPIO
- no ACT LED
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
---
arch/arm/boot/dts/Makefile | 1 +
arch/arm/boot/dts/bcm2711-rpi-400.dts | 45 +++++++++++++++++++++++++++++++++++
2 files changed, 46 insertions(+)
create mode 100644 arch/arm/boot/dts/bcm2711-rpi-400.dts
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f8f09c5..ec00dba 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -88,6 +88,7 @@ dtb-$(CONFIG_ARCH_BCM2835) += \
bcm2837-rpi-3-b.dtb \
bcm2837-rpi-3-b-plus.dtb \
bcm2837-rpi-cm3-io3.dtb \
+ bcm2711-rpi-400.dtb \
bcm2711-rpi-4-b.dtb \
bcm2835-rpi-zero.dtb \
bcm2835-rpi-zero-w.dtb
diff --git a/arch/arm/boot/dts/bcm2711-rpi-400.dts b/arch/arm/boot/dts/bcm2711-rpi-400.dts
new file mode 100644
index 0000000..f4d2fc2
--- /dev/null
+++ b/arch/arm/boot/dts/bcm2711-rpi-400.dts
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+#include "bcm2711-rpi-4-b.dts"
+
+/ {
+ compatible = "raspberrypi,400", "brcm,bcm2711";
+ model = "Raspberry Pi 400";
+
+ chosen {
+ /* 8250 auxiliary UART instead of pl011 */
+ stdout-path = "serial1:115200n8";
+ };
+
+ leds {
+ /delete-node/ led-act;
+
+ led-pwr {
+ gpios = <&gpio 42 GPIO_ACTIVE_HIGH>;
+ };
+ };
+
+ gpio-poweroff {
+ compatible = "gpio-poweroff";
+ gpios = <&expgpio 5 GPIO_ACTIVE_HIGH>;
+ };
+};
+
+&expgpio {
+ gpio-line-names = "BT_ON",
+ "WL_ON",
+ "",
+ "GLOBAL_RESET",
+ "VDD_SD_IO_SEL",
+ "CAM_GPIO",
+ "SD_PWR_ON",
+ "SD_OC_N";
+};
+
+&genet_mdio {
+ clock-frequency = <1950000>;
+};
+
+&pm {
+ /delete-property/ system-power-controller;
+};
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH V2 7/7] arm64: dts: broadcom: Add reference to RPi 400
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
` (5 preceding siblings ...)
2021-06-06 12:16 ` [PATCH V2 6/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
@ 2021-06-06 12:16 ` Stefan Wahren
6 siblings, 0 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-06 12:16 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog, Stefan Wahren
This adds a reference to the dts of the Raspberry Pi 400,
so we don't need to maintain the content in arm64.
Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
---
arch/arm64/boot/dts/broadcom/Makefile | 3 ++-
arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts
diff --git a/arch/arm64/boot/dts/broadcom/Makefile b/arch/arm64/boot/dts/broadcom/Makefile
index 998e240..11eae3e 100644
--- a/arch/arm64/boot/dts/broadcom/Makefile
+++ b/arch/arm64/boot/dts/broadcom/Makefile
@@ -1,5 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-4-b.dtb \
+dtb-$(CONFIG_ARCH_BCM2835) += bcm2711-rpi-400.dtb \
+ bcm2711-rpi-4-b.dtb \
bcm2837-rpi-3-a-plus.dtb \
bcm2837-rpi-3-b.dtb \
bcm2837-rpi-3-b-plus.dtb \
diff --git a/arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts
new file mode 100644
index 0000000..b9000f5
--- /dev/null
+++ b/arch/arm64/boot/dts/broadcom/bcm2711-rpi-400.dts
@@ -0,0 +1,2 @@
+// SPDX-License-Identifier: GPL-2.0
+#include "arm/bcm2711-rpi-400.dts"
--
2.7.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property
2021-06-06 12:16 ` [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property Stefan Wahren
@ 2021-06-15 21:17 ` Stefan Wahren
2021-06-22 7:12 ` Stefan Wahren
1 sibling, 0 replies; 11+ messages in thread
From: Stefan Wahren @ 2021-06-15 21:17 UTC (permalink / raw)
To: Rob Herring, Nicolas Saenz Julienne
Cc: Florian Fainelli, Ray Jui, Scott Branden,
bcm-kernel-feedback-list, Arnd Bergmann, Olof Johansson, soc,
Wim Van Sebroeck, Guenter Roeck, devicetree, linux-rpi-kernel,
linux-arm-kernel, linux-watchdog
Hi Guenther,
Am 06.06.21 um 14:16 schrieb Stefan Wahren:
> Until now all Raspberry Pi boards used the power off function of the SoC.
> But the Raspberry Pi 400 uses gpio-poweroff for the whole board which
> possibly cannot register the poweroff handler because the it's
> already registered by this watchdog driver. So consider the
> system-power-controller property for registering, which is already
> defined in soc/bcm/brcm,bcm2835-pm.txt .
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/bcm2835_wdt.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
all the other patches from this series has been applied. Can this go via
the watchdog-next tree?
Best regards
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property
2021-06-06 12:16 ` [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property Stefan Wahren
2021-06-15 21:17 ` Stefan Wahren
@ 2021-06-22 7:12 ` Stefan Wahren
2021-06-28 16:31 ` Guenter Roeck
1 sibling, 1 reply; 11+ messages in thread
From: Stefan Wahren @ 2021-06-22 7:12 UTC (permalink / raw)
To: Guenter Roeck
Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui,
Scott Branden, bcm-kernel-feedback-list, Arnd Bergmann,
Olof Johansson, soc, Wim Van Sebroeck, devicetree,
linux-arm-kernel, linux-watchdog
Hi Guenter,
Am 06.06.21 um 14:16 schrieb Stefan Wahren:
> Until now all Raspberry Pi boards used the power off function of the SoC.
> But the Raspberry Pi 400 uses gpio-poweroff for the whole board which
> possibly cannot register the poweroff handler because the it's
> already registered by this watchdog driver. So consider the
> system-power-controller property for registering, which is already
> defined in soc/bcm/brcm,bcm2835-pm.txt .
>
> Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/bcm2835_wdt.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
> index dec6ca0..9490717 100644
> --- a/drivers/watchdog/bcm2835_wdt.c
> +++ b/drivers/watchdog/bcm2835_wdt.c
> @@ -205,9 +205,13 @@ static int bcm2835_wdt_probe(struct platform_device *pdev)
> if (err)
> return err;
>
> - if (pm_power_off == NULL) {
> - pm_power_off = bcm2835_power_off;
> - bcm2835_power_off_wdt = wdt;
> + if (of_device_is_system_power_controller(pdev->dev.parent->of_node)) {
> + if (!pm_power_off) {
> + pm_power_off = bcm2835_power_off;
> + bcm2835_power_off_wdt = wdt;
> + } else {
> + dev_info(dev, "Poweroff handler already present!\n");
> + }
> }
>
> dev_info(dev, "Broadcom BCM2835 watchdog timer");
this isn't not applied yet. Can this go via the watchdog-next tree into
5.14?
Best regards
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property
2021-06-22 7:12 ` Stefan Wahren
@ 2021-06-28 16:31 ` Guenter Roeck
0 siblings, 0 replies; 11+ messages in thread
From: Guenter Roeck @ 2021-06-28 16:31 UTC (permalink / raw)
To: Stefan Wahren
Cc: Rob Herring, Nicolas Saenz Julienne, Florian Fainelli, Ray Jui,
Scott Branden, bcm-kernel-feedback-list, Arnd Bergmann,
Olof Johansson, soc, Wim Van Sebroeck, devicetree,
linux-arm-kernel, linux-watchdog
On Tue, Jun 22, 2021 at 09:12:30AM +0200, Stefan Wahren wrote:
> Hi Guenter,
>
> Am 06.06.21 um 14:16 schrieb Stefan Wahren:
> > Until now all Raspberry Pi boards used the power off function of the SoC.
> > But the Raspberry Pi 400 uses gpio-poweroff for the whole board which
> > possibly cannot register the poweroff handler because the it's
> > already registered by this watchdog driver. So consider the
> > system-power-controller property for registering, which is already
> > defined in soc/bcm/brcm,bcm2835-pm.txt .
> >
> > Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
> > Reviewed-by: Nicolas Saenz Julienne <nsaenz@kernel.org>
> > Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> > ---
> > drivers/watchdog/bcm2835_wdt.c | 10 +++++++---
> > 1 file changed, 7 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/watchdog/bcm2835_wdt.c b/drivers/watchdog/bcm2835_wdt.c
> > index dec6ca0..9490717 100644
> > --- a/drivers/watchdog/bcm2835_wdt.c
> > +++ b/drivers/watchdog/bcm2835_wdt.c
> > @@ -205,9 +205,13 @@ static int bcm2835_wdt_probe(struct platform_device *pdev)
> > if (err)
> > return err;
> >
> > - if (pm_power_off == NULL) {
> > - pm_power_off = bcm2835_power_off;
> > - bcm2835_power_off_wdt = wdt;
> > + if (of_device_is_system_power_controller(pdev->dev.parent->of_node)) {
> > + if (!pm_power_off) {
> > + pm_power_off = bcm2835_power_off;
> > + bcm2835_power_off_wdt = wdt;
> > + } else {
> > + dev_info(dev, "Poweroff handler already present!\n");
> > + }
> > }
> >
> > dev_info(dev, "Broadcom BCM2835 watchdog timer");
>
> this isn't not applied yet. Can this go via the watchdog-next tree into
> 5.14?
>
I applied it to my watchdog-next branch; it will be up to Wim to send
it upstream. Note that the patch does not how up in linux-watchdog
patchwork (no idea why, though), which is why it got lost.
Guenter
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-06-28 16:31 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-06 12:16 [PATCH V2 0/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 1/7] ARM: dts: bcm283x: Fix up MMC node names Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 2/7] watchdog: bcm2835_wdt: consider system-power-controller property Stefan Wahren
2021-06-15 21:17 ` Stefan Wahren
2021-06-22 7:12 ` Stefan Wahren
2021-06-28 16:31 ` Guenter Roeck
2021-06-06 12:16 ` [PATCH V2 3/7] ARM: dts: Move BCM2711 RPi specific into separate dtsi Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 4/7] dt-bindings: arm: bcm2835: Add Raspberry Pi 400 to DT schema Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 5/7] ARM: dts: bcm283x: Fix up GPIO LED node names Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 6/7] ARM: dts: Add Raspberry Pi 400 support Stefan Wahren
2021-06-06 12:16 ` [PATCH V2 7/7] arm64: dts: broadcom: Add reference to RPi 400 Stefan Wahren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).