全志平台Tina系统高温关机的设计节点和CPU温度的查看节点

高温关机的设置在设备树里

路径:tina/lichee/linux-4.9/arch/arm64/boot/dts/sunxi对应的设备树文件,如sun50iw11p1.dtsi

temperature = <110000>;一项,单位是千分之一摄氏度,110000的意思就是110摄氏度自动关机

thermal-zones {
1367                         cpu_thermal_zone {
1368                                 polling-delay-passive = <500>;
1369                                 polling-delay = <1000>;
1370                                 thermal-sensors = <&ths 0>;
1371                                 sustainable-power = <800>;
1372                                 k_po = <24>;
1373                                 k_pu = <48>;
1374                                 k_i = <0>;
1375
1376                                 cpu_trips: trips {
1377                                         cpu_threshold: trip-point@0 {
1378                                                 temperature = <70000>;
1379                                                 type = "passive";
1380                                                 hysteresis = <0>;
1381                                         };
1382                                         cpu_target: trip-point@1 {
1383                                                 temperature = <80000>;
1384                                                 type = "passive";
1385                                                 hysteresis = <0>;
1386                                         };
1387                                         cpu_crit: cpu_crit@0 {
1388                                                 temperature = <110000>;
1389                                                 type = "critical";
1390                                                 hysteresis = <0>;
1391                                         };
1392                                 };
1393
1394                                 cooling-maps {
1395                                         map0 {
1396                                                 trip = <&cpu_target>;
1397                                                 cooling-device = <&cpu0
1398                                                 THERMAL_NO_LIMIT
1399                                                 THERMAL_NO_LIMIT>;
1400                                                 contribution = <1024>;
1401                                         };
1402                                 };
1403                         };
1404                 };

查看设备当前温度的节点在:

/sys/devices/virtual/thermal/thermal_zone0/temp

/sys/devices/virtual/thermal/下有几个目录(thermal_zone0),第一个是cpu,第二个是gpu,读温度就是读目录下temp节点

单位也是千分之一摄氏度,读到36984,就是36.984摄氏度

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值