From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F679606A32D for ; Fri, 4 Dec 2026 01:00:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=0DYdfkQk; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=hTuHc3oa DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=yOOclrbPHj15GPlltqYGlmiE+MMUrC6KAbtavq7ejyQ=; b=0DYdfkQkpA8jBk IGKDIbSi/TliUNLMEcJjTAq7V5Cps/FMEjZ9J3kUsHjwqDCyU35cRuqGjjTav17gBCzIr78D6c2SX PZkUV74InZPz0uiwOGliBH39GlHUgFnbfn7FQGBVXRHztaiszZPT4OQ2+NAaev/aY33++z2zWOI5v ZTb/s2O4KS5UuoD4SKctY91hLZbYwvJlY6On9RFgZxGl8DOeyNQB2+IVuA9yrJd0uE09pZ8dxwSK/ 7930TxZR/POUyt1HYkMHYq8jJyYpf9lqM5h7KsSNcPZ8clZCHXP2zIg4I4DmmQw1efF/yBX2lP1YZ WcYVKUBgJylGh4DpLGWw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZHeo-0000000GIPH-1Dxa; Fri, 04 Dec 2026 01:00:14 +0000 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZHej-0000000GIMZ-42Ys for linux-arm-kernel@lists.infradead.org; Fri, 04 Dec 2026 01:00:12 +0000 Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2f0621eec70so1421125ad.2 for ; Thu, 03 Dec 2026 17:00:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796346009; x=1796950809; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yOOclrbPHj15GPlltqYGlmiE+MMUrC6KAbtavq7ejyQ=; b=hTuHc3oaUKi4zMOe9b5kLkt0m1p8d63VpA9In//7OEFviRQ2jIsholTrwtTMkE5R8/ uqb6+HrqxWw+/gNbTPAPeOs6sKVOZmWl6Igo9rnkfyRyvcBFtG1VhSGBzwINbesvpuUu 0Oz3Ar8Np2XU3BJ41RjJMHqpSYJ4m4/eimimtfurGYyiCExesrJBm5ft5GVsNp8Yj/dQ g61DRtych+CyIIEpkrcBGSplT8gS/uGhbNUqVTTTwL4etkZWDObU8ZqjnAQpLzhB79nb tkFeproVK1NUW9ppZC+Vg0AyXjhxzokmcOy/TX1VIueYWxHh8wADX9TOZWxOKd57dZRB wsBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796346009; x=1796950809; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=yOOclrbPHj15GPlltqYGlmiE+MMUrC6KAbtavq7ejyQ=; b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mavz74bOm+m9r3p2VFBQajcllfiY2r57+wUsfb8M8xMIEe1ik 1f78bX5hqgsPO3Udi+0A8aP8mzw0ndxvgB2YbhRyPkmTVfs+37L+mTVTHx362XTVvIphSY/iNA5 TuYQ/gRmG/CejM82/TfxlxgoBuxnBOF40sAzOQ== X-Received: by 2002:a17:903:2ca:b0:2f0:96e5:1850 with SMTP id d9443c01a7336-2f1ba231ff9mr2882845ad.58.1796346008891; Thu, 03 Dec 2026 17:00:08 -0800 (PST) Received: from m3pro ([36.110.14.169]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2f1b7940772sm2148285ad.48.2026.12.03.17.00.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Dec 2026 17:00:08 -0800 (PST) From: Harry Bit To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Will Deacon , Mark Rutland , Catalin Marinas , Arnd Bergmann , Alexandre Belloni , Linus Walleij Cc: Drew Fustini , Lorenzo Pieralisi , 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 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 Message-ID: <20261204005905.29740-8-idleassetsd@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20261204005905.29740-1-idleassetsd@gmail.com> References: <20261204005905.29740-1-idleassetsd@gmail.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261203_170010_946118_99A40D56 X-CRM114-Status: GOOD ( 15.85 ) X-Spam-Score: -2.1 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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 . Signed-off-by: Harry Bit --- 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 + +/ { + 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 = ; + }; + + pmu-ftc664 { + compatible = "phytium,ftc664-pmu"; + interrupts = ; + }; + + 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 = ; + 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 = ; + 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 = ; + 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 = ; + 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 = ; + + 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 = , + , + , + ; + }; +}; -- 2.47.3