全志A133 android10 thermal温控策略配置调试

news/2025/2/8 19:48:31 标签: android10, A133, 全志, 温控, thermal

一,功能介绍

Thermal简称热控制系统,其功能是通过temperature sensor(温度传感器)测量当前CPU、GPU等设备的温度值,然后根据此温度值,影响CPU、GPU等设备的调频策略,对CPU、GPU等设备的最大频率进行限制,最终实现对CPU、GPU等设备温度的闭环控制,避免SOC温度过高。


二,DTS配置

源码位置:longan/kernel/linux-4.9/arch/arm64/boot/dts/sunxi/sun50iw10p1.dtsi

thermal-zones {
        cpu_thermal_zone {
                polling-delay-passive = <500>; //温度超过阈值,轮询温度周期(ms)
                polling-delay = <1000>; //温度未超过阈值,轮询温度周期(ms)
                thermal-sensors = <&ths 0>;
                sustainable-power = <1200>; //温度达到预设温度最大值,系统可分配的最大power
                k_po = <66>;
                k_pu = <132>;
                k_i = <0>;

                cpu_trips: trips {
                        cpu_threshold: trip-point@0 {
                                temperature = <70000>; //代表系统温控在70度左右开启
                                type = "passive";
                                hysteresis = <0>;
                        };
                        cpu_target: trip-point@1 {
                                temperature = <90000>; //代表系统最高温度是90度左右
                                type = "passive";
                                hysteresis = <0>;
                        };
                        cpu_crit: cpu_crit@0 {
                                temperature = <110000>; //代表系统到达110度就会过温关机
                                type = "critical";
                                hysteresis = <0>;
                        };
                };
				cooling-maps {
                           map0 {
                                   trip = <&cpu_target>;
                                   cooling-device = <&cpu0
                                   THERMAL_NO_LIMIT
                                   THERMAL_NO_LIMIT>;
                                   contribution = <1024>; //cpu分配功率权重,通过调整cooling device对应的contribution,可以调整降频顺序和降频尺度
                           };
                   /*      map1{
                                   trip = <&cpu_target>;
                                   cooling-device = <&gpu
                                   THERMAL_NO_LIMIT
                                   THERMAL_NO_LIMIT>;
                                   contribution = <1024>;
                           };      */
                   };
           };
           gpu_thermal_zone{
                   polling-delay-passive = <500>;
                   polling-delay = <1000>;
                   thermal-sensors = <&ths 1>;
                   sustainable-power = <1100>;
           };
           ddr_thermal_zone{
                   polling-delay-passive = <0>;
                   polling-delay = <0>;
                   thermal-sensors = <&ths 2>;
           };
   };

temperature: 可根据产品温控规格,适当调整。

  1. 提高该参数,会允许系统在高温情况下运行更快,性能更好。当然,也会让产品的温度更高,所以需要注意,修改该参数后能否满足产品温度要求和高温测试等。
  2. 降低该参数就会在一定程度上降低高温情况下的性能,可以让产品运行在较低的温度。

三,调试方法

1. 查看sensor温度

查看thermal_zone的类型

#cat sys/class/thermal/thermal_zone0/type
cpu_thermal_zon

查看thermal_zone温度

#cat sys/class/thermal/thermal_zone0/temp
36000

温度单位为mC,也就是36摄氏度。

2. 模拟温度

thermal有温度模拟功能,可以通过模拟温度校验温度策略是否符合预期。

设置thermal_zone0的模拟温度
#echo 80000 > /sys/class/thermal/thermal_zone0/emul_temp
关闭thermal_zone0的模拟温度功能
#echo 0 > /sys/class/thermal/thermal_zone0/emul_temp

3. 关闭温控

a. 通过调试节点关闭温控

确认cpu温控thermal_zone0

#cat /sys/class/thermal/thermal_zone0/type
cpu_thermal_zone

关闭温控策略

#echo disabled > /sys/class/thermal/thermal_zone0/mode

接触所有cooling device的限制

#echo 0 > /sys/class/thermal/thermal_zone0/cdev*/cur_state
b. 通过修改dts节点关闭温控

以关闭cpu温控为例,删除cpu_thermal_zone下的其他节点和属性

cpu_thermal_zone{
	polling‑delay‑passive = <0>;
	polling‑delay = <0>;
	thermal‑sensors = <&ths 0>;
};

http://www.niftyadmin.cn/n/5845240.html

相关文章

Python----Python高级(并发编程:协程Coroutines,事件循环,Task对象,协程间通信,协程同步,将协程分布到线程池/进程池中)

一、协程 1.1、协程 协程&#xff0c;Coroutines&#xff0c;也叫作纤程(Fiber) 协程&#xff0c;全称是“协同程序”&#xff0c;用来实现任务协作。是一种在线程中&#xff0c;比线程更加轻量级的存在&#xff0c;由程序员自己写程序来管理。 当出现IO阻塞时&#xff0c;…

了解 ALV 中的 field catalog (ABAP List Viewer)

在 ABAP 中&#xff0c;字段目录是使用 ALV &#xff08;ABAP List Viewer&#xff09; 定义内部表中的数据显示方式的关键元素。它提供对 ALV 中显示的字段的各种属性的控制&#xff0c;例如列标题、对齐方式、可见性、可编辑性等。关键概念&#xff1a; Field Catelog 字段目…

DeepSeek关联WPS使用指南与案例解析

在数字化办公时代&#xff0c;人工智能&#xff08;AI&#xff09;技术正深刻地改变着我们处理文档、分析数据和进行创意表达的方式。DeepSeek作为新兴的AI技术代表&#xff0c;与办公软件巨头WPS的结合&#xff0c;为用户带来了前所未有的高效办公体验。本教程将深入探讨如何将…

基于Flask的全国海底捞门店数据可视化分析系统的设计与实现

【FLask】基于Flask的全国海底捞门店数据可视化分析系统的设计与实现&#xff08;完整系统源码开发笔记详细部署教程&#xff09;✅ 目录 一、项目简介二、项目界面展示三、项目视频展示 一、项目简介 该系统系统采用Python语言结合Flask框架开发&#xff0c;利用Pandas、NumP…

【AI】卷积神经网络CNN

不定期更新&#xff0c;建议关注收藏点赞。 目录 零碎小组件经验总结早期的CNN 最重要的模型架构无非是cnn 或 transformer 零碎小组件 全连接神经网络 目前已经被替代。 每个神经元都有参与&#xff0c;但由于数据中的特征点变化大&#xff0c;全连接神经网络把所有数据特征都…

ASP.NET Core中Filter与Middleware的区别

中间件是ASP.NET Core这个基础提供的功能&#xff0c;而Filter是ASP.NET Core MVC中提供的功能。ASP.NET Core MVC是由MVC中间件提供的框架&#xff0c;而Filter属于MVC中间件提供的功能。 区别 中间件可以处理所有的请求&#xff0c;而Filter只能处理对控制器的请求&#x…

GrassWebProxy

GrassWebProxy第一版&#xff1a; using System; using System.Collections.Generic; using System.Linq; using System.Net.Sockets; using System.Net; using System.Text; using System.Threading; using System.Threading.Tasks; using System.IO; using Newtonsoft.Json;…

机器学习数学基础:14.矩阵的公式

1. 操作顺序可交换 对于矩阵 A A A&#xff0c;若存在两种运算 ? ? ?和 ? ? ?&#xff0c;使得 ( A ? ) ? ( A ? ) ? (A^{?})^{?}\ (A^{?})^{?} (A?)? (A?)?&#xff0c;这意味着这两种运算的顺序可以交换。由此我们得到以下三个重要等式&#xff1a; ( A …