[PATCH RFC 18/19] riscv: dts: Add Waveshare ESP32-P4-Module-DEV-KIT

Vítor Hugo Silva vitorhg20080 at gmail.com
Wed Nov 25 15:30:19 PST 2026


Add the initial ESP32-P4 SoC description for the CLIC, CLINT,
interrupt matrix and UART0. Describe the board's 32 MiB of PSRAM and
the 40 MHz clock used by UART0.

Build the board DTB when ESP32-P4 CLIC support is enabled. The initial
device tree supports booting to a UART shell on the Waveshare board.
Use UART0 as the default console at 115200 baud.

Describe both HP harts in the ESP32-P4 SoC device tree.
The initial Linux support runs on the boot hart only.

Select the revision 3.x interrupt matrix on the Waveshare board.

The CLINT timebase follows the CPU's clock. The firmware must populate
/cpus/timebase-frequency with the actual rate before booting Linux.

AI assisted with formatting the DTS and validating the resulting DTB.

Link: https://docs.waveshare.com/ESP32-P4-Module-DEV-KIT
Signed-off-by: Vítor Hugo Silva <vitorhg20080 at gmail.com>
---
 arch/riscv/boot/dts/Makefile                  |  1 +
 arch/riscv/boot/dts/espressif/Makefile        |  2 +
 .../esp32p4-waveshare-module-dev-kit.dts      | 46 +++++++++++++
 arch/riscv/boot/dts/espressif/esp32p4.dtsi    | 64 +++++++++++++++++++
 4 files changed, 113 insertions(+)
 create mode 100644 arch/riscv/boot/dts/espressif/Makefile
 create mode 100644 arch/riscv/boot/dts/espressif/esp32p4-waveshare-module-dev-kit.dts
 create mode 100644 arch/riscv/boot/dts/espressif/esp32p4.dtsi

diff --git a/arch/riscv/boot/dts/Makefile b/arch/riscv/boot/dts/Makefile
index 69d8751fb17c..fa0f23de2616 100644
--- a/arch/riscv/boot/dts/Makefile
+++ b/arch/riscv/boot/dts/Makefile
@@ -3,6 +3,7 @@ subdir-y += allwinner
 subdir-y += andes
 subdir-y += anlogic
 subdir-y += canaan
+subdir-y += espressif
 subdir-y += eswin
 subdir-y += microchip
 subdir-y += renesas
diff --git a/arch/riscv/boot/dts/espressif/Makefile b/arch/riscv/boot/dts/espressif/Makefile
new file mode 100644
index 000000000000..fd89616862fb
--- /dev/null
+++ b/arch/riscv/boot/dts/espressif/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_RISCV_ESP32P4_CLIC) += esp32p4-waveshare-module-dev-kit.dtb
diff --git a/arch/riscv/boot/dts/espressif/esp32p4-waveshare-module-dev-kit.dts b/arch/riscv/boot/dts/espressif/esp32p4-waveshare-module-dev-kit.dts
new file mode 100644
index 000000000000..bdef328e19ef
--- /dev/null
+++ b/arch/riscv/boot/dts/espressif/esp32p4-waveshare-module-dev-kit.dts
@@ -0,0 +1,46 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/dts-v1/;
+
+#include "esp32p4.dtsi"
+
+/ {
+	model = "Waveshare ESP32-P4-Module-DEV-KIT";
+	compatible = "waveshare,esp32-p4-module-dev-kit", "esp,esp32p4";
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	xtal40m: clock-40000000 {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <40000000>;
+	};
+
+	memory at 48000000 {
+		device_type = "memory";
+		reg = <0x48000000 0x02000000>;
+	};
+};
+
+&clic {
+	compatible = "esp,esp32p4-v3-clic";
+};
+
+&intmtx0 {
+	compatible = "esp,esp32p4-v3-intmtx";
+
+	status = "okay";
+};
+
+&uart0 {
+	clocks = <&xtal40m>;
+
+	status = "okay";
+};
diff --git a/arch/riscv/boot/dts/espressif/esp32p4.dtsi b/arch/riscv/boot/dts/espressif/esp32p4.dtsi
new file mode 100644
index 000000000000..211eef62b52e
--- /dev/null
+++ b/arch/riscv/boot/dts/espressif/esp32p4.dtsi
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+#include <dt-bindings/interrupt-controller/irq.h>
+
+/ {
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		/* Firmware supplies the timebase-frequency before boot. */
+
+		cpu at 0 {
+			device_type = "cpu";
+			compatible = "esp,esp32p4-hp", "riscv";
+			reg = <0>;
+			mmu-type = "riscv,none";
+			riscv,isa-base = "rv32i";
+			riscv,isa-extensions = "i", "m", "a", "f", "c",
+					       "zicsr", "zifencei";
+		};
+
+		cpu at 1 {
+			device_type = "cpu";
+			compatible = "esp,esp32p4-hp", "riscv";
+			reg = <1>;
+			mmu-type = "riscv,none";
+			riscv,isa-base = "rv32i";
+			riscv,isa-extensions = "i", "m", "a", "f", "c",
+					       "zicsr", "zifencei";
+		};
+	};
+
+	clic: interrupt-controller at 20800000 {
+		compatible = "esp,esp32p4-clic";
+		reg = <0x20800000 0x10000>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+	};
+
+	intmtx0: interrupt-controller at 500d6000 {
+		compatible = "esp,esp32p4-intmtx";
+		reg = <0x500d6000 0x400>;
+		interrupt-controller;
+		#interrupt-cells = <2>;
+		#address-cells = <0>;
+		interrupt-parent = <&clic>;
+
+		status = "disabled";
+	};
+
+	uart0: serial at 500ca000 {
+		compatible = "esp,esp32p4-uart";
+		reg = <0x500ca000 0x1000>;
+		interrupts-extended = <&intmtx0 31 IRQ_TYPE_LEVEL_HIGH>;
+
+		status = "disabled";
+	};
+
+	timer at 20000000 {
+		compatible = "esp,esp32p4-clint";
+		reg = <0x20000000 0x10000>;
+		interrupts-extended = <&clic 3 IRQ_TYPE_LEVEL_HIGH>,
+				      <&clic 7 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
-- 
2.56.1




More information about the linux-riscv mailing list