虚拟温区、通用 ADC 与其它 Thermal 驱动
1. rk_virtual_thermal
Rockchip厂商虚拟温区用于组合/转换多个温度来源或提供平台逻辑。主 defconfig未显式启用 RK_VIRTUAL_THERMAL,不能默认认为 RK3588运行时存在。
2. Generic ADC thermal
thermal-generic-adc.c:
1 | IIO channel |
适合 NTC/外部模拟 sensor。精度依赖电阻、电压基准和转换表。
3. Thermal MMIO
读取单个 MMIO/shared memory温度值并按 DT scale暴露,适合 firmware共享寄存器。必须验证 endian、单位和更新原子性。
4. SCMI
固件提供的 temperature sensors通常通过 SCMI sensor/thermal相关层接入。采样率和 trip编程受 firmware能力限制。
5. PMIC alarm
部分 PMIC thermal driver只提供离散 warning/critical alarm,不一定有连续精确温度;zone语义依设备能力。
6. SoC driver分类
- bandgap/TSADC直接 MMIO;
- firmware/mailbox;
- ACPI;
- PMIC;
- ADC;
- virtual/composite。
它们共享 Thermal Core但寄存器与 calibration完全不同。
7. HWMON传感器
某些外部温度 hwmon driver设置 HWMON_C_REGISTER_TZ,由 hwmon core按 OF引用注册 thermal sensor。无需再写第二个 thermal driver。
8. Composite策略
聚合 max/weighted温度可能隐藏局部热点或增加噪声。若硬件有多个独立 critical sensors,应保留每个局部 critical zone,不只依赖平均值。
9. 选择
1 | RK3588 die sensor -> rockchip TSADC |
10. 构建
本目录约132个文件,大部分是其它 SoC。判断实际启用必须同时看 Kconfig、compatible、最终 DT和 probe日志。
正在加载留言…