全志平台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摄氏度

你可能感兴趣的:(全志-Tina,全志-FAQ,全志-量产方法&问题)