Add thermal zone configuration for CPU monitoring#88
Merged
Atomique13 merged 10 commits intomainfrom Apr 5, 2026
Merged
Conversation
✅ Build ArtifactsBranch:
|
Enable the full thermal monitoring stack for the R528/T113-S3 SoC alongside the existing CONFIG_SUN8I_THERMAL=y driver config: CONFIG_THERMAL=y — base thermal framework CONFIG_THERMAL_OF=y — device-tree thermal zone parsing CONFIG_THERMAL_GOV_STEP_WISE=y — step-wise governor for passive trips CONFIG_THERMAL_HWMON=y — expose sensor readings via /sys/class/hwmon These are explicitly set even though multi_v7_defconfig enables them by default, to document the dependency and protect against future size-reduction changes inadvertently disabling them. CONFIG_CPU_THERMAL is deliberately NOT enabled. The DTS thermal zone has no cooling-maps, so the 85°C passive trip is monitoring-only — no cooling device is bound. Enabling CPU throttling (cpufreq cooling) risks breaking Klipper's real-time stepper motor timing under sustained load. Trip point summary: 85°C passive — thermal alert (monitoring only, no throttling) 100°C critical — emergency shutdown Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Build ArtifactsBranch:
|
Two fixes for thermal monitoring on R528/T113-S3:
1. Fix corrupt patch (0003-thermal-sun8i-add-sun20i-d1-ths-support.patch)
The patch was generated against a different kernel version and had
wrong hunk line numbers:
Hunk 1: -671,6 +671,17 -> -606,6 +606,18 (line 671 vs actual 606;
+17 vs actual +18 lines)
Hunk 2: -681,6 +692,7 -> -614,6 +626,7
Also corrected the stat (12 -> 13 insertions) and removed the stale
index blob hash line. Verified with 'git apply --check' against the
extracted linux-6.6.85 source.
2. Add CONFIG_NVMEM_SUNXI_SID=y to fragment.cfg
The sun8i_thermal driver requires the Allwinner SID (eFuse) NVMEM
driver to read factory calibration data at probe time. Without it,
the driver fails silently and /sys/class/thermal + /sys/class/hwmon
remain empty. Despite multi_v7_defconfig enabling it, the final
.config showed it disabled — making it explicit here fixes the gap.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
✅ Build ArtifactsBranch:
|
✅ Build ArtifactsBranch:
|
pdscomp
added a commit
that referenced
this pull request
Apr 6, 2026
* Add thermal zone configuration for CPU monitoring
* Add thermal sensor configuration
* Add support for sun20i-d1 thermal block in the kernel
* fix: normalize patch file line endings to LF
* fix: recreate patch file with clean encoding
* kernel: add explicit thermal framework configs for R528 THS monitoring
Enable the full thermal monitoring stack for the R528/T113-S3 SoC alongside
the existing CONFIG_SUN8I_THERMAL=y driver config:
CONFIG_THERMAL=y — base thermal framework
CONFIG_THERMAL_OF=y — device-tree thermal zone parsing
CONFIG_THERMAL_GOV_STEP_WISE=y — step-wise governor for passive trips
CONFIG_THERMAL_HWMON=y — expose sensor readings via /sys/class/hwmon
These are explicitly set even though multi_v7_defconfig enables them by
default, to document the dependency and protect against future size-reduction
changes inadvertently disabling them.
CONFIG_CPU_THERMAL is deliberately NOT enabled. The DTS thermal zone has no
cooling-maps, so the 85°C passive trip is monitoring-only — no cooling device
is bound. Enabling CPU throttling (cpufreq cooling) risks breaking Klipper's
real-time stepper motor timing under sustained load.
Trip point summary:
85°C passive — thermal alert (monitoring only, no throttling)
100°C critical — emergency shutdown
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* kernel: fix thermal patch line numbers and add NVMEM_SUNXI_SID
Two fixes for thermal monitoring on R528/T113-S3:
1. Fix corrupt patch (0003-thermal-sun8i-add-sun20i-d1-ths-support.patch)
The patch was generated against a different kernel version and had
wrong hunk line numbers:
Hunk 1: -671,6 +671,17 -> -606,6 +606,18 (line 671 vs actual 606;
+17 vs actual +18 lines)
Hunk 2: -681,6 +692,7 -> -614,6 +626,7
Also corrected the stat (12 -> 13 insertions) and removed the stale
index blob hash line. Verified with 'git apply --check' against the
extracted linux-6.6.85 source.
2. Add CONFIG_NVMEM_SUNXI_SID=y to fragment.cfg
The sun8i_thermal driver requires the Allwinner SID (eFuse) NVMEM
driver to read factory calibration data at probe time. Without it,
the driver fails silently and /sys/class/thermal + /sys/class/hwmon
remain empty. Despite multi_v7_defconfig enabling it, the final
.config showed it disabled — making it explicit here fixes the gap.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* klipper: add host/toolboard temperature monitoring
* klipper: normalize temperature sensor section names
* gitignore: add Yocto build artifacts to ignore list
---------
Co-authored-by: Paul Swenson <pdscomp@gmail.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Ubuntu <ubuntu@ubuntu-2204.linuxvmimages.local>
Co-authored-by: Atomique13 <contact@zatom.cc>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds full CPU thermal monitoring for the Elegoo Centauri Carbon 1 (R528/T113-S3 SoC) using the on-chip Thermal Hardware Sensor (THS) block.
Changes
Device Tree (
elegoo-centauri-carbon1.dts)thsthermal sensor node at0x02009400with compatibleallwinner,sun20i-d1-thscpu-thermalthermal zone bound to the THS sensor, with two trip points:Kernel Backport Patch (
0003-thermal-sun8i-add-sun20i-d1-ths-support.patch)Backports
sun20i-d1-thssupport to thesun8i_thermaldriver in Linux 6.6.85. The R528/T113-S3 uses the same THS IP block as the Allwinner D1/T113 line (sun20i-d1-ths), which is natively supported upstream in later kernels. The patch adds:sun20i_d1_thschip description struct (1 sensor,sun50i_h6-compatible calibration/init/irq)allwinner,sun20i-d1-thsKernel Config (
fragment.cfg)Adds explicit thermal framework configuration alongside the existing
CONFIG_SUN8I_THERMAL=ydriver config:CONFIG_THERMAL=yCONFIG_THERMAL_OF=yCONFIG_THERMAL_GOV_STEP_WISE=ytype = "passive"trip points)CONFIG_THERMAL_HWMON=y/sys/class/hwmonfor monitoring toolsCONFIG_SUN8I_THERMAL=yThese are explicitly set even though
multi_v7_defconfigenables them by default, to document the dependency and protect against future size-reduction changes inadvertently disabling them.Why No CPU Throttling
CONFIG_CPU_THERMAL(CPU frequency cooling) is intentionally not enabled. The DTS thermal zone has nocooling-maps, so no cooling device is bound to the 85°C passive trip — it fires as a monitoring event only. Enabling CPU frequency throttling would risk breaking Klipper's real-time stepper motor timing under sustained thermal load. Critical shutdown at 100°C is the safety backstop.Testing
After this PR, CPU temperature is readable via:
cat /sys/class/thermal/thermal_zone0/temp # e.g. 42000 = 42.0°C cat /sys/class/hwmon/hwmon0/temp1_input