From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.216.44 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796394208; b=x8Mr3Xw1B0HdeSfm/yYy1QE1W90wWBYONQdP9HMNYMPG0fxLFXFBfMsu5+4BhFUQeqgD fXgtVYExusLH5WAl/lSAX+V5zF6xHHAWY0qZGCgcBCTQzDfmr/xHuDG2QWGLIzmhyIh2O 0kxxUK/3p/QBJpukBPZU5hQ7X+ugo2w6YAYwpMwDytPN2z4ihl8oItjwIQBlfiSqFSu+k cMSzy/JnXQ1RwYFgzEshRIbYbue0XFIJCq1stSjEwpHpK4BZqkfVDIsvPheMqegT8ktlE gJswIvJXzHd9bBglAHnmuALz+HvjnILAhS162WJNlU4Ig0OEpJqp81SHXjeWYO+EC5w== 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=vvtjx1PsxwdL9SaCT0TADD5i+4SHQIDqjTmJulCcWm78uoGqZkLKvcgb8MU4FU52NIFH OJuTPoub+iKBj8bRISTkEoZ2UtzsJ2egLdFpZbSJ7Ym0rHI14K9ibzhdEdOiio2DAR28N pDyvxzZA9ol6o631LS0HNFx9gREGlcE8p+++iEjlRtxrMYWizweQCNjcWtlmwA92yW9hM sQvFJ8gd6L+rJkdWuU/PC9f/WnDKgWmPXT6/Fc2tc1yYOXLjK9iNZunODBzgbQDpDCmOR mFuXzbtl/3eM/3w2S5hei3bf9pqlHIeIODrS54neOdcsGIWSz3WiXxlGdLTeX7W+Opg== 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.44 Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) (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 F35CE606A322 for ; Fri, 4 Dec 2026 14:23:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org F35CE606A322 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, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=ojQMih4H Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-3b487f44ee0so678497a91.0 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=eom2z5Bw7vefz1AbUwCbMzhpNmoP6PML6E6sXwKtQ+/xPhQMAkSgN7X/Pp1rnFS3zQ HRqXersKMmFaT+6PyN8oYZD1i5a1UFBnfVkmSFI7Ct8fAkpcI6wYx8T24XLVPTnNlnY8 pa4DLVclu9vGTCmtjh3fNuTZ0tEdAGtq25/rthFvzvG70E/KaQ8niC5k+6XGrDRlhU/B L01VIpQFK+4iQoWYodq+hTy7ON+YtGq4mkU79RBoV8jzf2ZrdMz7YtUKmZ0RhU3SEExs 5LHzo9hx1H3hCo78zclavTvEyp98Wni2U9tNwQQFwa4dfNUXJl5me+sdk5/5smnRcJV3 0TSA== X-Forwarded-Encrypted: i=1; AL+hErH16iIDlso/pLz9y8rG227bHI5p8B0DRix0hlx9Hbpjry/vm6UncspDXTsCjKPZkrZdXssiwjKBWvYi@vger.kernel.org X-Gm-Message-State: AB4q+uH4Y8Wql/AiJhuGNl5tNfgeCkjv+JqETxvqeVPvUsVjMvtXJcyo pbMaMghGyjs1MhhCU5FSjvdTszU9IL7LECSKfS4UJTUI77zzLq0nVQca X-Gm-Gg: AZFdTZcfXwnK2pamV63WQ7CNGNvnpEuEMOOyfA3ib3DgfVNsRcjKEPZYIXF4+BHqBu2 IvUNBIZy1M08AHRGRm0w7OCXJuRtHa25pf55uYBRq3d6MejVj70brSkHi626c/7guCmyhJD71ak zy76yWW266ltr42XVWPXaHzO0IH1NeRQkz+CCEO+DtGPkTdGUvcQ+R8S/SgFNgbhWUfgwo000dl ux/nTwnrzM3LkbmKc889f92AZKUr6KEHiOraFUcwG78o84PyzgXzDcDhLeqblrUDuFw+UEgc06O WANcEzHHO6aKKttc/+mFSCvuXFOyesHDVsV1by/eTlVfRa8wNTzDdpHTwW8rM+LtUZXmq29WMFk nX0aYhvuWyFEarHLYLk2GmTDdPwETnwzjxoOC4EDutHZAkzCXQA/9wTEl03cokP2UoxV9Krip84 XK1UtnNsONUBlDH8AVkSOk2hw3Rcx6LHV/C2nS4iPyuJoAAiESG4bt520KBX1i+jVMLBgmfAlpv DzxvQmmD3dFyO/QJrsXm9ZkRvl0ch+GqfvuGOV9BHHG9pF0Tt7U7z7GE4qOw0v2t0yOWlbusJQ6 eDvUPObbKpr2MTq9euMBSwOYCinK7V/x 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: devicetree@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