All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] thermal: loongson2: Add support for Loongson-2K0300 SoC
@ 2026-08-04 12:40 Binbin Zhou
  2026-08-04 12:42 ` [PATCH v4 1/5] thermal/drivers/loongson2: Correct thermal sensor registration loop Binbin Zhou
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Binbin Zhou @ 2026-08-04 12:40 UTC (permalink / raw)
  To: Binbin Zhou, Huacai Chen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Yinbo Zhu, zhanghongchen, Rafael J . Wysocki,
	Daniel Lezcano, Zhang Rui, Lukasz Luba, Lee Jones
  Cc: Huacai Chen, devicetree, linux-pm, mfd, Binbin Zhou

Hi all:

This patch series adds thermal zone support for the Loongson-2K0300 SoC.

The Loongson-2K0300's thermal sensor is generally compatible with the
existing Loongson-2K series, but it features several key differences:
1. It has an independent CPU ID register for reading chip version
information.
2. The raw temperature output field has been extended from 8 bits to 11
bits.
3. The temperature calculation formula has been updated to incorporate a
correction factor based on the version information.

To ensure robustness on older hardware revisions, a fallback mechanism
is included: if the calculated temperature falls outside the valid range
(-55 TO 125),  the driver falls back to a simpler calculation and prints
a warning.

The patches have been validated on the Loongson-2K0300 development board.

Thanks.
Binbin

=========
V4:
 - Rebase on linux-mfd/for-mfd-next;
Patch (3/5):
 - Remove the `compatible` adding to the `select` node.

Link to V3:
https://lore.kernel.org/all/cover.1785480242.git.zhoubinbin@loongson.cn/

V3:
Patch (2/5):
 - New patch for moving thermal_ops to chip_data;
Patch (3/5):
 - Correct spelling errors;
Patch (4/5):
 - Add Acked-by from Conor, thanks;
Patch (5/5):
 - Keep loongson2_thermal_data->chip_data as const, and use
   data->flags as the private data.
 - Renmae LOONGSON2_THSENS_OUT_10B_MASK ->
   LOONGSON2_THSENS_OUT_11B_MASK;

Link to V2:
https://lore.kernel.org/all/cover.1784619512.git.zhoubinbin@loongson.cn/

V2:
Patch (1/4):
 - New patch form Sashiko;
Patch (2/4):
 - New patch for adding chipid syscon compatible;
Patch (3/4):
 - Use `loongson,chipid` phandle replace reg property;
Patch (3/4):
 - Refact `calib_offset` calculate routing;
 - Add LS2K0300_OLD_FUSE_FLAG flag.

Link to V1:
https://lore.kernel.org/all/cover.1783670011.git.zhoubinbin@loongson.cn/

Binbin Zhou (5):
  thermal/drivers/loongson2: Correct thermal sensor registration loop
  thermal/drivers/loongson2: Move thermal_ops to chip_data for SoC
    scalability
  dt-bindings: mfd: syscon: Allow syscon compatible for Loongson-2K0300
    chip id
  dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for
    Loongson-2K0300
  thermal/drivers/loongson2: Add support for Loongson-2K0300

 .../devicetree/bindings/mfd/syscon.yaml       |   1 +
 .../thermal/loongson,ls2k-thermal.yaml        |  73 +++++++++---
 drivers/thermal/loongson2_thermal.c           | 110 ++++++++++++++++--
 3 files changed, 156 insertions(+), 28 deletions(-)


base-commit: b1eb3de64d02cec71b419b9918d1697797fa156d
-- 
2.52.0


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-08-05  9:43 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 12:40 [PATCH v4 0/5] thermal: loongson2: Add support for Loongson-2K0300 SoC Binbin Zhou
2026-08-04 12:42 ` [PATCH v4 1/5] thermal/drivers/loongson2: Correct thermal sensor registration loop Binbin Zhou
2026-08-04 13:01   ` sashiko-bot
2026-08-04 12:43 ` [PATCH v4 2/5] thermal/drivers/loongson2: Move thermal_ops to chip_data for SoC scalability Binbin Zhou
2026-08-04 12:55   ` sashiko-bot
2026-08-04 12:43 ` [PATCH v4 3/5] dt-bindings: mfd: syscon: Allow syscon compatible for Loongson-2K0300 chip id Binbin Zhou
2026-08-04 12:46   ` sashiko-bot
2026-08-05  6:59   ` Krzysztof Kozlowski
2026-08-04 12:43 ` [PATCH v4 4/5] dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for Loongson-2K0300 Binbin Zhou
2026-08-04 12:49   ` sashiko-bot
2026-08-04 12:43 ` [PATCH v4 5/5] thermal/drivers/loongson2: Add support " Binbin Zhou
2026-08-04 12:59   ` sashiko-bot
2026-08-05  9:43 ` [PATCH v4 0/5] thermal: loongson2: Add support for Loongson-2K0300 SoC Huacai Chen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.