LoongArch architecture development
 help / color / mirror / Atom feed
* [PATCH 0/2] thermal: loongson2: Add support for Loongson-2K0300 SoC
@ 2026-07-10  8:24 Binbin Zhou
  2026-07-10  8:24 ` [PATCH 1/2] dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for Loongson-2K0300 Binbin Zhou
  2026-07-10  8:25 ` [PATCH 2/2] thermal/drivers/loongson2: Add thermal driver support " Binbin Zhou
  0 siblings, 2 replies; 6+ messages in thread
From: Binbin Zhou @ 2026-07-10  8:24 UTC (permalink / raw)
  To: Binbin Zhou, Huacai Chen, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Rafael J . Wysocki, Daniel Lezcano, Zhang Rui,
	Lukasz Luba
  Cc: Huacai Chen, Xuerui Wang, loongarch, devicetree, linux-pm,
	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

Binbin Zhou (2):
  dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for
    Loongson-2K0300
  thermal/drivers/loongson2: Add thermal driver support for
    Loongson-2K0300

 .../thermal/loongson,ls2k-thermal.yaml        | 68 +++++++++++----
 drivers/thermal/loongson2_thermal.c           | 83 +++++++++++++++++--
 2 files changed, 127 insertions(+), 24 deletions(-)


base-commit: 795f1b1a91ae13ebc012a364075e42f486a1cafe
-- 
2.52.0


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

end of thread, other threads:[~2026-07-10 16:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10  8:24 [PATCH 0/2] thermal: loongson2: Add support for Loongson-2K0300 SoC Binbin Zhou
2026-07-10  8:24 ` [PATCH 1/2] dt-bindings: thermal: loongson,ls2k-thermal: Add compatible for Loongson-2K0300 Binbin Zhou
2026-07-10 16:21   ` Conor Dooley
2026-07-10 16:24     ` Conor Dooley
2026-07-10  8:25 ` [PATCH 2/2] thermal/drivers/loongson2: Add thermal driver support " Binbin Zhou
2026-07-10 14:32   ` Huacai Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox