From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.48 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796394208; b=3SXRonGBR0hytn0Bxmm/YZeC+NpEHBK0BCo78nTcGq78NpU7eg2KPjwTNta/mzQ94bkv +BL2iCoLDCBPkD67zrBtZSodgyrzb9+R+NX3Z7qgtWfXeyoLBr3XC41+So6RKAzBnavzk +crWFpYshEq7+eI3D+m2sBpzfo7sY3LXRKEFun22WdiRIJf8zofgYJdkPxacx5IukGXa/ FKy3qD1+h8GBUUKBmGrpNL0s3bafRbZ9jw1pDHhlDkE4KPKEmT5Xp5VdWCERmhWT8lb1U MFqssId7XdlICIYo03KiTsWUDpwK5Zxy0P+IFeegWfcS+lJVvLCSSv1yj5gzdCwTbfA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796394208; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:MIME-Version: Content-Transfer-Encoding; bh=kW0CCa2N8r1womBNpVEzxGc8jEcZJARh8+J1RKwkTbE=; b=QfRRTDvGzdCQEgdQMaN4P+Jt/LZAGJQfTcnkqgMKca5habqQ8W8KxtmS2kcJqGu7THSa 5slcMAeb1hexhgdY5oYOuxLV2Z1f+8M+V2zlSYhB053cunEN67ue66hkjGQqIEVdaIwd2 ZNehqIQJkZXI1Oenvltt7FW0+P28t8gfPxuMn8xxW6oeiFVV4DgVfgAZYz57Rlq9qIYKQ HkwEnOD0lovJNY8eGN0XtjvtNkcgUjB13v0BD/TWlfNpmUIXaF+uT7MzocdKjcHGXtTRo n9hiFFXWXhRM9tsuvH9L+xBtRFUhy55AOjfw4MykC9KqGyq+3kwONjNYjlnWXKyScBQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ojQMih4H; arc=none smtp.remote-ip=209.85.216.48 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 09A11606A32C for ; Fri, 4 Dec 2026 14:23:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 09A11606A32C Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ojQMih4H Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-3b413d04c93so657805a91.1 for ; Fri, 04 Dec 2026 06:23:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796394207; x=1796999007; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=kW0CCa2N8r1womBNpVEzxGc8jEcZJARh8+J1RKwkTbE=; b=ojQMih4HLEVptcEFvvxkW8GhRwOMIHFHeceuMw5yGJbQX4qF9zRE8vWO8d8gE5V6d8 1GGW6iUh4ULdp6HibYYwcwli8oyJXV9nNJk81bDM2wpIa7qEn/aoop/jup/dvJ3iQyJP ZmxOXey7g9BOaI8sZJAlodUj6DD1407DUuATu73x3epUqVCmv5WF0Lhpcad0pGkvL/7N X4jedUfI+xAzdBYxya40nXCNpqD1ZV9AI5SO66KM7BnjzsElrVl6XfrH0mD7qEnwfBPf VCEX3oKIF+pQE3yio1mUcjwWchTbw8kaVKFv2RSTD0vOhQ+adkRrK3JFpX7eqcmbC26m zreg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796394207; x=1796999007; h=content-transfer-encoding:mime-version: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=kW0CCa2N8r1womBNpVEzxGc8jEcZJARh8+J1RKwkTbE=; b=MfXC+y+2EZhsp3xhaPqTYN24m9JYsVXhZg0Y7AxoDUjIbw67QwZQoI0YXYP66y6v17 JefVl0XLV9LfD3kxXVzknzNznOdhKoC72oFGAceFUTXnCD7aZyEaK4z50L8UpJ4BEMLv BrMsdDrEauA5NxKOqKe23FhsJLHq6PsRGaVAJQCEtMDRiNCGzAHnRAMbZv8ByDncjfSO +790zdlf/BdxOkmJAizUUudzNUx0Lmrs4O3iHX+gHO54J1e4Tf2BzA5p5ZIjWa5k+/Ds p2yI/xSdhZNArdfkmcb2j/awt3b7DRx27j0DLqP/Eo+JFPmlYgWtkug5otURi69G2vFT L9eA== X-Forwarded-Encrypted: i=1; AL+hErF95aX3sAzo8PHwHWIQTwxuHXOspOi3QO1IrluA2y+jIrgJH6EIRsGnL5/8jPA5D6Tgr7N+8TOFO6+IvpU=@vger.kernel.org X-Gm-Message-State: AB4q+uHe6jEDd/Exf7sqhh9QgaMQykvuoHrsHJQKlD8sNc+fK25cDHgK 96ihblvTN87cqcOVokypUA3uqaGOMpdOcK3bH7lABgEOXYxva0Vp37Py X-Gm-Gg: AZFdTZdPcrqXdU0IlCj/EO8JKaqHgZwoR58T7Dk+8IislkIWQvVQ0FFOwnzscZeMWZW DEp4ySHTLDh2CROheLDid8cxZCb33SFR+z4iNE1M+rYxZqZMFR5Bw96EMBk/LfBd2lokzIB2Jop xvdwpO2ntm7CsZIcSlYdwtPmQlHZBQy7Zff3vUae9QUfW3nn+GhKmeFg0ALrze698Xn7Vdayd7C fFTGdeyfkd65LIy9P2ie/CsD2kn3aooHu4wbnDb2CoPN12EWIdjzkZlrI809QPhtNm5u5Plv//c 7z9phivknhkOaPm/52EIr1n6YLSSCsRx/+TlRPzjPfFR4fH6O+l794JpRIOay3qbk2B4Ztl0K0k 1qn/hWBD+twB7xiToqZK/lXBeWzV7E5JrKKTyHzoCsxkhuW4b7+JELmitZjWuOKvCTKtfeodjd9 twi1+qUAGPfHx02B/mPE11CnZSjFOAaeuvyG0cm14NlzIJYUF5n7jIIHigKF23WadLl6fhxG6bt ExsP6zBQMtjhjyy8z4aPjqqKqs8pOOQB9/FSQ5JvflYxYJapf6+w0w5JWi77msLZX4mAs+EuUFz 9b5m28cFkJbgCYcyh5n2Dp69FZs9pBfK X-Received: by 2002:a17:90b:2b8f:b0:3b5:67cd:80a7 with SMTP id 98e67ed59e1d1-3b5e0653b5fmr1771805a91.17.1796394207101; Fri, 04 Dec 2026 06:23:27 -0800 (PST) Received: from duge-G3-3500.lan ([138.199.21.246]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5dfeb6e33sm1698969a91.3.2026.12.04.06.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 06:23:26 -0800 (PST) From: Jiayu Du To: daniel.lezcano@kernel.org, rafael@kernel.org Cc: rui.zhang@intel.com, lukasz.luba@arm.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, dlan@kernel.org, troy.mitchell@linux.spacemit.com, pjw@kernel.org, palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr, p.zabel@pengutronix.de, me@ziyao.cc, linux.amoon@gmail.com, shuwei.wu@mailbox.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-riscv@lists.infradead.org, spacemit@lists.linux.dev, linux-kernel@vger.kernel.org, ipedrosa@redhat.com, aurelien@aurel32.net, srini@kernel.org, Jiayu Du Subject: [RFC PATCH 0/3] Add polling temperature monitoring for SpacemiT K3 Date: Fri, 4 Dec 2026 22:23:09 +0800 Message-ID: <20261204142313.137015-1-duge1256@gmail.com> X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit This series adds polling temperature monitoring for the SpacemiT K3 SoC. It exposes seven on-die sensors for the SoC, VPU, GPU and four CPU clusters through the thermal and hwmon interfaces. It does not add thermal trips, cooling maps or interrupt-driven updates. This series depends on the K3 eFuse v4 series [1], which provides the NVMEM driver and the primary and backup voltage reference calibration cells. Tested on a SpacemiT K3 COM260 Kit after a cold boot. All seven channels reported temperatures through both the thermal and hwmon interfaces. The test kernel also included the separate SoC information patches, which are not required by this series. TSEN CFG bits 25/26 still need clarification. After enabling the sensors, the downstream driver [2] sets both bits, reads back CFG, clears both bits and reads it back again. This RFC leaves those bits unchanged. I have asked SpacemiT what these bits control, whether this sequence is required, and whether there are any timing or readback requirements. I am waiting for their reply. Feedback on the initialization sequence and testing on other K3 boards, including the Pico-ITX, would be welcome. [1] https://lore.kernel.org/all/20261129144250.3212056-1-duge1256@gmail.com/ [2] https://github.com/spacemit-com/linux-6.18/blob/k3-br-v1.0.y/drivers/thermal/k3-thermal.c#L242-L251 Jiayu Du (3): dt-bindings: thermal: Add SpacemiT K3 temperature sensor thermal/drivers/spacemit/k3: Add temperature sensor support riscv: dts: spacemit: Describe K3 temperature monitoring .../bindings/thermal/spacemit,k3-tsensor.yaml | 82 +++++++ MAINTAINERS | 6 + arch/riscv/boot/dts/spacemit/k3.dtsi | 51 ++++ drivers/thermal/spacemit/Kconfig | 11 + drivers/thermal/spacemit/Makefile | 1 + drivers/thermal/spacemit/k3_tsensor.c | 224 ++++++++++++++++++ 6 files changed, 375 insertions(+) create mode 100644 Documentation/devicetree/bindings/thermal/spacemit,k3-tsensor.yaml create mode 100644 drivers/thermal/spacemit/k3_tsensor.c base-commit: d6bcfc94eb4da6e089c5473970cd96727292fd97 prerequisite-patch-id: 46efc135593cf02c0fe0e4ecee64414c6a0bf4ae prerequisite-patch-id: 90781adce6b9f5e27c5460e3e49b0fa28455fcd9 prerequisite-patch-id: 54588ceef7a5671170d430e464d41ea2cb1cca01 -- 2.43.0