Linux Perf Users
 help / color / mirror / Atom feed
From: Harry Bit <idleassetsd@gmail.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Will Deacon <will@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Linus Walleij <linusw@kernel.org>
Cc: Drew Fustini <fustini@kernel.org>,
	Lorenzo Pieralisi <lpieralisi@kernel.org>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-perf-users@vger.kernel.org, soc@lists.linux.dev,
	linux-kernel@vger.kernel.org, Harry Bit <idleassetsd@gmail.com>
Subject: [PATCH v3 7/9] arm64: dts: phytium: add PE2204 SoC and Phytium Pi V2.1 board dts
Date: Fri,  4 Dec 2026 08:59:03 +0800	[thread overview]
Message-ID: <20261204005905.29740-8-idleassetsd@gmail.com> (raw)
In-Reply-To: <20261204005905.29740-1-idleassetsd@gmail.com>

Add minimal bootable Device Tree sources for the Phytium PE2204 (E2000Q)
SoC and Phytium Pi V2.1 (4 GiB) single-board computer, describing the
big.LITTLE FTC664/FTC310 CPU topology, PSCI, one PMU per CPU type using
GICv3 PPI partitions, GICv3/ITS, ARMv8 architected timer, memory layout,
firmware reserved regions, and PL011 UART console with its fixed 100 MHz
clock.

The low RAM bank ends at 0xfb000000 (omitting the top 80 MiB of the
2 GiB window, 0xfb000000-0xffffffff), which is permanently reserved for
resident SCP/TF-A/OP-TEE secure firmware. The two explicit
reserved-memory nodes protect additional resident TF-A/PBF firmware
regions that the vendor U-Boot does not inject dynamically at boot time.

Based on original work by Shaojun Yang <yangshaojun@phytium.com.cn>.

Signed-off-by: Harry Bit <idleassetsd@gmail.com>
---
 arch/arm64/boot/dts/Makefile                  |   1 +
 arch/arm64/boot/dts/phytium/Makefile          |   2 +
 .../boot/dts/phytium/pe2204-phytiumpi-v2.dts  |  51 ++++
 arch/arm64/boot/dts/phytium/pe2204.dtsi       | 238 ++++++++++++++++++
 4 files changed, 292 insertions(+)
 create mode 100644 arch/arm64/boot/dts/phytium/Makefile
 create mode 100644 arch/arm64/boot/dts/phytium/pe2204-phytiumpi-v2.dts
 create mode 100644 arch/arm64/boot/dts/phytium/pe2204.dtsi

diff --git a/arch/arm64/boot/dts/Makefile b/arch/arm64/boot/dts/Makefile
index f2d7cd6eb5..4605ba7f0f 100644
--- a/arch/arm64/boot/dts/Makefile
+++ b/arch/arm64/boot/dts/Makefile
@@ -28,6 +28,7 @@ subdir-y += mediatek
 subdir-y += microchip
 subdir-y += nuvoton
 subdir-y += nvidia
+subdir-y += phytium
 subdir-y += qcom
 subdir-y += realtek
 subdir-y += renesas
diff --git a/arch/arm64/boot/dts/phytium/Makefile b/arch/arm64/boot/dts/phytium/Makefile
new file mode 100644
index 0000000000..a24bc7f0ff
--- /dev/null
+++ b/arch/arm64/boot/dts/phytium/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+dtb-$(CONFIG_ARCH_PHYTIUM) += pe2204-phytiumpi-v2.dtb
diff --git a/arch/arm64/boot/dts/phytium/pe2204-phytiumpi-v2.dts b/arch/arm64/boot/dts/phytium/pe2204-phytiumpi-v2.dts
new file mode 100644
index 0000000000..ba4da6a0ad
--- /dev/null
+++ b/arch/arm64/boot/dts/phytium/pe2204-phytiumpi-v2.dts
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for Phytium Pi V2.1 (CEK8903-E2KQ, PE2204, 4 GiB DDR4)
+ *
+ * Copyright (c) 2023-2024 Phytium Technology Co., Ltd.
+ */
+
+/dts-v1/;
+
+#include "pe2204.dtsi"
+
+/ {
+	model = "Phytium Pi V2.1";
+	compatible = "phytium,pe2204-phytiumpi-v2", "phytium,pe2204";
+
+	aliases {
+		serial1 = &uart1;
+	};
+
+	chosen {
+		stdout-path = "serial1:115200n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x0 0x7b000000>,
+		      <0x20 0x00000000 0x0 0x80000000>;
+	};
+
+	reserved-memory {
+		ranges;
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		/* Resident TF-A / PBF secure boot parameter table */
+		firmware@80000000 {
+			reg = <0x0 0x80000000 0x0 0x10000>;
+			no-map;
+		};
+
+		/* Resident secure monitor / firmware high-memory carveout */
+		firmware@2000020000 {
+			reg = <0x20 0x00020000 0x0 0x1e0000>;
+			no-map;
+		};
+	};
+};
+
+&uart1 {
+	status = "okay";
+};
diff --git a/arch/arm64/boot/dts/phytium/pe2204.dtsi b/arch/arm64/boot/dts/phytium/pe2204.dtsi
new file mode 100644
index 0000000000..e4cfabc632
--- /dev/null
+++ b/arch/arm64/boot/dts/phytium/pe2204.dtsi
@@ -0,0 +1,238 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Include for Phytium PE2204 SoC family
+ *
+ * Copyright (c) 2021-2024 Phytium Technology Co., Ltd.
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+
+/ {
+	interrupt-parent = <&gic>;
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	sysclk_100mhz: clock-100mhz {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <100000000>;
+	};
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		cpu-map {
+			cluster0 {
+				core0 {
+					cpu = <&cpu_b0>;
+				};
+			};
+
+			cluster1 {
+				core0 {
+					cpu = <&cpu_b1>;
+				};
+			};
+
+			cluster2 {
+				core0 {
+					cpu = <&cpu_l0>;
+				};
+
+				core1 {
+					cpu = <&cpu_l1>;
+				};
+			};
+		};
+
+		cpu_b0: cpu@0 {
+			device_type = "cpu";
+			compatible = "phytium,ftc664";
+			reg = <0x0>;
+			enable-method = "psci";
+			capacity-dmips-mhz = <1024>;
+			i-cache-size = <0xc000>;
+			i-cache-line-size = <64>;
+			i-cache-sets = <256>;
+			d-cache-size = <0x8000>;
+			d-cache-line-size = <64>;
+			d-cache-sets = <256>;
+			next-level-cache = <&l2_b0>;
+		};
+
+		cpu_b1: cpu@100 {
+			device_type = "cpu";
+			compatible = "phytium,ftc664";
+			reg = <0x100>;
+			enable-method = "psci";
+			capacity-dmips-mhz = <1024>;
+			i-cache-size = <0xc000>;
+			i-cache-line-size = <64>;
+			i-cache-sets = <256>;
+			d-cache-size = <0x8000>;
+			d-cache-line-size = <64>;
+			d-cache-sets = <256>;
+			next-level-cache = <&l2_b1>;
+		};
+
+		cpu_l0: cpu@200 {
+			device_type = "cpu";
+			compatible = "phytium,ftc310";
+			reg = <0x200>;
+			enable-method = "psci";
+			capacity-dmips-mhz = <516>;
+			i-cache-size = <0x8000>;
+			i-cache-line-size = <64>;
+			i-cache-sets = <256>;
+			d-cache-size = <0x8000>;
+			d-cache-line-size = <64>;
+			d-cache-sets = <128>;
+			next-level-cache = <&l2_little>;
+		};
+
+		cpu_l1: cpu@201 {
+			device_type = "cpu";
+			compatible = "phytium,ftc310";
+			reg = <0x201>;
+			enable-method = "psci";
+			capacity-dmips-mhz = <516>;
+			i-cache-size = <0x8000>;
+			i-cache-line-size = <64>;
+			i-cache-sets = <256>;
+			d-cache-size = <0x8000>;
+			d-cache-line-size = <64>;
+			d-cache-sets = <128>;
+			next-level-cache = <&l2_little>;
+		};
+
+		l2_b0: l2-cache0 {
+			compatible = "cache";
+			cache-level = <2>;
+			cache-unified;
+			cache-size = <0x100000>;
+			cache-line-size = <64>;
+			cache-sets = <1024>;
+		};
+
+		l2_b1: l2-cache1 {
+			compatible = "cache";
+			cache-level = <2>;
+			cache-unified;
+			cache-size = <0x100000>;
+			cache-line-size = <64>;
+			cache-sets = <1024>;
+		};
+
+		l2_little: l2-cache2 {
+			compatible = "cache";
+			cache-level = <2>;
+			cache-unified;
+			cache-size = <0x40000>;
+			cache-line-size = <64>;
+			cache-sets = <256>;
+		};
+	};
+
+	pmu-ftc310 {
+		compatible = "phytium,ftc310-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_partition0>;
+	};
+
+	pmu-ftc664 {
+		compatible = "phytium,ftc664-pmu";
+		interrupts = <GIC_PPI 7 IRQ_TYPE_LEVEL_HIGH &ppi_partition1>;
+	};
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	soc {
+		compatible = "simple-bus";
+		ranges;
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		uart0: serial@2800c000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x0 0x2800c000 0x0 0x1000>;
+			interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&sysclk_100mhz>, <&sysclk_100mhz>;
+			clock-names = "uartclk", "apb_pclk";
+
+			status = "disabled";
+		};
+
+		uart1: serial@2800d000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x0 0x2800d000 0x0 0x1000>;
+			interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&sysclk_100mhz>, <&sysclk_100mhz>;
+			clock-names = "uartclk", "apb_pclk";
+
+			status = "disabled";
+		};
+
+		uart2: serial@2800e000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x0 0x2800e000 0x0 0x1000>;
+			interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&sysclk_100mhz>, <&sysclk_100mhz>;
+			clock-names = "uartclk", "apb_pclk";
+
+			status = "disabled";
+		};
+
+		uart3: serial@2800f000 {
+			compatible = "arm,pl011", "arm,primecell";
+			reg = <0x0 0x2800f000 0x0 0x1000>;
+			interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH 0>;
+			clocks = <&sysclk_100mhz>, <&sysclk_100mhz>;
+			clock-names = "uartclk", "apb_pclk";
+
+			status = "disabled";
+		};
+
+		gic: interrupt-controller@30800000 {
+			compatible = "arm,gic-v3";
+			reg = <0x0 0x30800000 0x0 0x20000>,
+			      <0x0 0x30880000 0x0 0x80000>,
+			      <0x0 0x30840000 0x0 0x10000>,
+			      <0x0 0x30850000 0x0 0x10000>,
+			      <0x0 0x30860000 0x0 0x10000>;
+			ranges;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			interrupt-controller;
+			#interrupt-cells = <4>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH 0>;
+
+			its: msi-controller@30820000 {
+				compatible = "arm,gic-v3-its";
+				reg = <0x0 0x30820000 0x0 0x20000>;
+				msi-controller;
+				#msi-cells = <1>;
+			};
+
+			ppi-partitions {
+				ppi_partition0: interrupt-partition-0 {
+					affinity = <&cpu_l0>, <&cpu_l1>;
+				};
+
+				ppi_partition1: interrupt-partition-1 {
+					affinity = <&cpu_b0>, <&cpu_b1>;
+				};
+			};
+		};
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_PPI 10 IRQ_TYPE_LEVEL_HIGH 0>;
+	};
+};
-- 
2.47.3


  parent reply	other threads:[~2026-12-04  1:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-04  0:58 [PATCH v3 0/9] arm64: phytium: add minimal PE2204 SoC and Phytium Pi V2.1 support Harry Bit
2026-12-04  0:58 ` [PATCH v3 1/9] dt-bindings: vendor-prefixes: add phytium Harry Bit
2026-12-04  0:58 ` [PATCH v3 2/9] dt-bindings: arm: cpus: add Phytium FTC310 and FTC664 Harry Bit
2026-12-04  0:58 ` [PATCH v3 3/9] dt-bindings: arm: pmu: " Harry Bit
2026-12-04  0:59 ` [PATCH v3 4/9] dt-bindings: arm: add Phytium PE2204 platforms Harry Bit
2026-12-04  0:59 ` [PATCH v3 5/9] arm64: Kconfig.platforms: add ARCH_PHYTIUM platform option Harry Bit
2026-12-04  0:59 ` [PATCH v3 6/9] perf: arm_pmuv3: add Phytium FTC310 and FTC664 PMU support Harry Bit
2026-12-04  0:59 ` Harry Bit [this message]
2026-12-04  0:59 ` [PATCH v3 8/9] arm64: defconfig: enable ARCH_PHYTIUM Harry Bit
2026-12-04  0:59 ` [PATCH v3 9/9] MAINTAINERS: add ARM/PHYTIUM ARCHITECTURE entry Harry Bit
2026-12-04  1:07 ` [PATCH v3 0/9] arm64: phytium: add minimal PE2204 SoC and Phytium Pi V2.1 support sashiko-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261204005905.29740-8-idleassetsd@gmail.com \
    --to=idleassetsd@gmail.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fustini@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.org \
    --cc=soc@lists.linux.dev \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox