warpme / minimyth2

Distro to make disk-less MythTV appliance
https://github.com/warpme/minimyth2/wiki
69 stars 20 forks source link

About orange pi zero2 thermal! #13

Closed sputnik2019 closed 2 years ago

sputnik2019 commented 2 years ago

we used 5.13 patch,Everything is ok, but the temperature sensor displays abnormal.The sensor display value is fixed and has not been refreshed.We found that the driver said that a register needs to be opened, but we did not find where to set this register.

0571-drivers-thermal-allwinner-add-h616-ths-support.patch +static int sun50i_h616_thermal_init(struct ths_device *tmdev) +{

warpme commented 2 years ago

Hi,

I just burned 11.21.0 and start mm2 on board. after start:

root@Myth-Frontend-020049ec9a1a:~ # sensors
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +55.2°C  (crit = +100.0°C)

gpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +54.8°C  (crit = +100.0°C)

ddr_thermal-virtual-0
Adapter: Virtual device
temp1:        +54.8°C

ve_thermal-virtual-0
Adapter: Virtual device
temp1:        +55.0°C

then i launched hd video playback to create some load on cpu. avg load was 45-55% (this is for 1080i HD TV playback with sw. video decode by ffmpeg). Touching by hand SoC i feel it is quite warm but enough to keep finger in it. sensors are saying:

root@Myth-Frontend-020049ec9a1a:~ # sensors
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +69.9°C  (crit = +100.0°C)

gpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +70.4°C  (crit = +100.0°C)

ddr_thermal-virtual-0
Adapter: Virtual device
temp1:        +70.6°C

ve_thermal-virtual-0
Adapter: Virtual device
temp1:        +70.3°C  

next i stoped playback (so cpu is idle again). After after that i wait 5min to cool-down cpu by mouth blowing on SoC:

root@Myth-Frontend-020049ec9a1a:~ # sensors
cpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +57.0°C  (crit = +100.0°C)

gpu_thermal-virtual-0
Adapter: Virtual device
temp1:        +56.9°C  (crit = +100.0°C)

ddr_thermal-virtual-0
Adapter: Virtual device
temp1:        +57.1°C

ve_thermal-virtual-0
Adapter: Virtual device
temp1:        +57.4°C

For me all this behaves like expected.

I don't have infrared thermometer to validate is temp shown by sensors corresponding to real temp - but code i'm using in ths kernel module uses nvmem calib data + temp calculation formula from h616 manual.

What method of reading temp gives you abnormal results? Also - what exact list of mm2 patches did you apply on 5.13?