From nobody Mon Feb 9 10:47:47 2026 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDC774A33; Mon, 19 Jan 2026 02:42:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.3 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768790565; cv=none; b=mWLmAxCkhYR/T6QkNjFKLKRVXbQOcVnSCn2TVzyBm73VQCzZ0lUh/lSp6vQXNWFMVZG4RQ3Sy11vGclYPy6T4UcCPWvsAhSiM+3yOZHGsD1f3T0QvjYhlm032uF7ALMSiTdo9k8GlWehGJ7dexN84r/twtJA6LX0J/G6Eev8jsc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768790565; c=relaxed/simple; bh=jlkmpKuncoyZu/hQowccSdqRI6uAzQEs5bFcVnOzYoo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=RQ199tndU6wokHqU06xXhremnUPcoZ8TRGb8DNEffpdRetwDkTGoULyyEJ1gcH0aY8Mus/xs/zs8CfLTJUCbt59jz8qQxKFFu7cddAsVbpUBzFSAmWaivWrjE6mtbozEjrSiTjvos/Y10bk5fRcg3UkhlbRYlC8XqOBGwWOWyco= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=LTAYb0cZ; arc=none smtp.client-ip=220.197.31.3 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="LTAYb0cZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Date:Subject:MIME-Version:Content-Type: Message-Id:To; bh=mMKteYJ83AABaeoBQ2umjnHT9xppt0usrG+mGsUDZqk=; b=LTAYb0cZbKS1UiogSQortGSlAEh44ZikefZFv+3ZAHwmFe8X0SMITe5VdV8wqP nEM0cdmez+9Td+oPrVm3CeI/U1KP6b9OeGnDHBwVxCm/Z1I8/suB3SYRbGcSTlYy ap046L4ONveohGqxpgitmheJgwoLy2ym7NHIAuX5F7eGk= Received: from [113.54.162.98] (unknown []) by gzsmtp4 (Coremail) with SMTP id PygvCgAXQfnSmW1pNwHHLg--.6S5; Mon, 19 Jan 2026 10:41:32 +0800 (CST) From: Shuwei Wu Date: Mon, 19 Jan 2026 10:41:23 +0800 Subject: [PATCH v3 3/3] riscv: dts: spacemit: Add thermal sensor for K1 SoC Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260119-patchv2-k1-thermal-v3-3-3d82c9ebe8a4@163.com> References: <20260119-patchv2-k1-thermal-v3-0-3d82c9ebe8a4@163.com> In-Reply-To: <20260119-patchv2-k1-thermal-v3-0-3d82c9ebe8a4@163.com> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Shuwei Wu , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1768790485; l=3080; i=shuweiwoo@163.com; s=20251125; h=from:subject:message-id; bh=jlkmpKuncoyZu/hQowccSdqRI6uAzQEs5bFcVnOzYoo=; b=CX+y1cjUVFr7e38iePBSWyN6eKWA31woMuzZvV5KnypFjVVQiUuNerBGLH/Ptk4SqImckRF6t cA0yAeXtF3GCkSHqspQsN5r6wblANQZFBuhftdxyxKOKzAjX6Kwo92p X-Developer-Key: i=shuweiwoo@163.com; a=ed25519; pk=qZs6i2UZnXkmjUrwO5HJxcfpCvgSNrR4dcU5cjtfTSk= X-CM-TRANSID: PygvCgAXQfnSmW1pNwHHLg--.6S5 X-Coremail-Antispam: 1Uf129KBjvJXoWxZrW8Gw45ZFy3Xw4xJr13urg_yoW5XF4xpF ySkws5GFZrJryfXa13CrWDKa98KanYva48Xan7uryrArn0qFZI93y0k3W5tF1kGr4rW34j vr1qy34DuF1qy3DanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0pNFAJkUUUUU= X-CM-SenderInfo: 5vkx4vplzr0qqrwthudrp/xtbC5BxT4WltmdyFLgAA3g Include the Thermal Sensor node in the SpacemiT K1 dtsi with definitions for registers, clocks, and interrupts. Additionally, configure thermal zones for the soc, package, gpu, and clusters to enable temperature monitoring via the thermal framework. Signed-off-by: Shuwei Wu --- Changes in v2: - Update compatible to "spacemit,k1-tsensor" --- arch/riscv/boot/dts/spacemit/k1.dtsi | 101 +++++++++++++++++++++++++++++++= ++++ 1 file changed, 101 insertions(+) diff --git a/arch/riscv/boot/dts/spacemit/k1.dtsi b/arch/riscv/boot/dts/spa= cemit/k1.dtsi index 7818ca4979b6..0fe7396ea6e4 100644 --- a/arch/riscv/boot/dts/spacemit/k1.dtsi +++ b/arch/riscv/boot/dts/spacemit/k1.dtsi @@ -338,6 +338,96 @@ osc_32k: clock-32k { }; }; =20 + thermal-zones { + soc-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&thermal 0>; + + trips { + soc-crit { + temperature =3D <115000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + package-thermal { + polling-delay-passive =3D <0>; + polling-delay =3D <0>; + thermal-sensors =3D <&thermal 1>; + + trips { + package-crit { + temperature =3D <115000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + gpu-thermal { + polling-delay-passive =3D <100>; + polling-delay =3D <0>; + thermal-sensors =3D <&thermal 2>; + + trips { + gpu-alert { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + gpu-crit { + temperature =3D <115000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + cluster0-thermal { + polling-delay-passive =3D <100>; + polling-delay =3D <0>; + thermal-sensors =3D <&thermal 3>; + + trips { + cluster0-alert { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cluster0-crit { + temperature =3D <115000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + + cluster1-thermal { + polling-delay-passive =3D <100>; + polling-delay =3D <0>; + thermal-sensors =3D <&thermal 4>; + + trips { + cluster1-alert { + temperature =3D <85000>; + hysteresis =3D <2000>; + type =3D "passive"; + }; + + cluster1-crit { + temperature =3D <115000>; + hysteresis =3D <0>; + type =3D "critical"; + }; + }; + }; + }; + soc { compatible =3D "simple-bus"; interrupt-parent =3D <&plic>; @@ -434,6 +524,17 @@ syscon_apbc: system-controller@d4015000 { #reset-cells =3D <1>; }; =20 + thermal: thermal@d4018000 { + compatible =3D "spacemit,k1-tsensor"; + reg =3D <0x0 0xd4018000 0x0 0x100>; + clocks =3D <&syscon_apbc CLK_TSEN>, + <&syscon_apbc CLK_TSEN_BUS>; + clock-names =3D "core", "bus"; + interrupts =3D <61>; + resets =3D <&syscon_apbc RESET_TSEN>; + #thermal-sensor-cells =3D <1>; + }; + i2c6: i2c@d4018800 { compatible =3D "spacemit,k1-i2c"; reg =3D <0x0 0xd4018800 0x0 0x38>; --=20 2.52.0