RK3588 热设计调优、调试与安全

RK3588 热设计调优、调试与安全

1. 枚举

1
2
3
4
5
6
7
for z in /sys/class/thermal/thermal_zone*; do
echo "[$z] $(cat "$z/type")"
cat "$z/temp"
done
for c in /sys/class/thermal/cooling_device*; do
echo "[$c] $(cat "$c/type") $(cat "$c/cur_state")/$(cat "$c/max_state")"
done

编号不稳定,按 type识别。

2. 验证配置

1
2
3
zcat /proc/config.gz | grep -E 'THERMAL|ENERGY_MODEL|ROCKCHIP'
dmesg | grep -Ei 'thermal|tsadc|cooling'
cat /sys/class/thermal/thermal_zone*/policy

3. 压力测试

分别和组合加载:

  • CPU little/big;
  • GPU;
  • NPU;
  • VPU/ISP;
  • memory;
    -存储/网络。

记录温度、频率、cooling state、thermal pressure、功耗和吞吐。

4. 2100mW

sustainable-power=2100 是 power allocator模型输入。调优必须基于整机散热器、风道、环境温度和机壳实测,不可照搬 EVB。

5. Polling

20ms passive polling响应快但增加开销。若 TSADC set_trips IRQ可靠,仍需 Core周期用于 policy。调整前测 CPU开销与温度过冲。

6. 温度校验

片上 sensor测 die热点,红外/热电偶测封装/散热器,两者不可直接要求一致。关注:

  • 稳态偏差;
  • 动态滞后;
  • sensor channel相对关系;
  • trim;
    -环境温度。

7. 风扇

确认控制权:

  • generic thermal cooling map;
  • Rockchip system monitor notifier;
  • userspace daemon。

只保留一个主 controller,避免 duty振荡。

8. 常见故障

1
2
3
4
5
6
7
无 zone -> tsadc status/config/probe
固定温度 -> clock/controller/channel
异常负温/高温 -> code/trim/MMIO
不降频 -> cooling map/cdev/policy/EM
频率振荡 -> PID/sustainable power/polling
到 critical不关机 -> trip/mode/poweroff path
重启过早 -> TSHUT阈值/转换/噪声

9. 安全

  • trip/policy/emulation root-only;
    -量产禁用 emul_temp;
    -保留 hardware TSHUT;
  • critical与 TSHUT留足 margin;
    -不要用脚本持续写低温或 state 0;
    -监控 sensor read error;
    -bootloader也应配置早期热保护;
    -验证 suspend/resume后 TSHUT恢复。

10. 建议基线

  1. 保持115°C software critical和120°C TSHUT作为起点;
  2. 按产品认证调整,不以提高阈值解决降频;
  3. 优先改善散热/风扇/OPP模型;
  4. 高环境温度做持续满载;
  5. 模拟风扇停转、散热器异常;
  6. 验证 orderly shutdown和硬件 reset两级保护。

文章互动

阅读 --

留言

0 条留言

正在加载留言…