Rockchip RK3588 obtains real-time temperature of the chip

The chip of RK3588 has 7 TS-ADC channels corresponding to the chip center position and A76_ 0/1、A76_ 2/3、DSU 、A55_ 0/1/2/3、PD_ CENTER、 NPU、GPU。
Real time chip temperature can be obtained through the following command:

Unit: 0.001 degrees Celsius

Chip center position temperature: soc thermal

root@linaro-alip:/#  cat /sys/class/thermal/thermal_zone0/temp

CPU Big Core A76_ 0/1 refers to the temperature of CPU4 and CPU5:

root@linaro-alip:/# cat /sys/class/thermal/thermal_zone1/temp

CPU Big Core A76_ 2/3 refers to the temperature of CPU6 and CPU7:

root@linaro-alip:/# cat /sys/class/thermal/thermal_zone2/temp

CPU Small Core A55_ 0/12/3 refers to the temperature of CPU0, CPU1, CPU2, and CPU3

root@linaro-alip:/# cat /sys/class/thermal/thermal_zone3/temp

PD_ Temperature of the center:

root@linaro-alip:/# cat /sys/class/thermal/thermal_zone4/temp

GPU temperature

root@linaro-alip:/# cat /sys/class/thermal/thermal_zone5/temp

Temperature of NPU

root@linaro-alip:/# cat /sys/class/thermal/thermal_zone6/temp

Unable to obtain the temperature of power management chip rk806-1,However, we have set a temperature threshold for PMU over temperature shutdown_ temperture_ threshold = <160>;

diff --git a/drivers/mfd/rk806-core.c b/drivers/mfd/rk806-core.c
index 5421ac95578f..366ccd7b913c 100644
--- a/drivers/mfd/rk806-core.c
+++ b/drivers/mfd/rk806-core.c
@@ -685,7 +685,7 @@ static int rk806_init(struct rk806 *rk806)
        struct rk806_platform_data *pdata;
        int vb_uv_sel;
+        int val=-1;
        pdata = rk806->pdata;

        if (pdata->force_shutdown_enable) {
@@ -697,9 +697,25 @@ static int rk806_init(struct rk806 *rk806)
                rk806_field_write(rk806, VB_UV_SEL, vb_uv_sel);

-       if (pdata->hotdie_temperture_threshold >= 160)
-               rk806_field_write(rk806, TSD_TEMP, TSD_TEMP_160);
+       if (pdata->shutdown_temperture_threshold >= 160)
+               rk806_field_write(rk806, TSD_TEMP, TSD_TEMP_160);
+        switch(pdata->hotdie_temperture_threshold){
+            case 85:
+              val=0x00;
+            break;
+            case 95:
+              val=0x01;
+            break;
+            case 105:
+              val=0x02;
+            break;
+            case 115:
+            default:
+              val=0x03;
+            break;
+        }
+        if (val>=0)
+           rk806_field_write(rk806, HOTDIE_TMP, val);
        /* When the slave chip goes through a shutdown process, it will automatically trigger a restart */
        rk806_field_write(rk806, SLAVE_RESTART_FUN, 0x01);
        /* Digital output 2MHz clock force enable */

Above this temperature, RK806 turns off the output.

The above lifespan chart refers to the lifespan that has been operating at this temperature, and the temperature will affect the lifespan of the main control. Under normal circumstances, exceeding the temperature control threshold will lower the frequency to limit the frequency of the CPU. The temperature is fluctuating, and the frequency is also fluctuating. It will not work continuously at this high temperature. Raising the threshold will theoretically have a limited impact on the lifespan.

160 degrees Celsius, exceeding this temperature, RK806 turns off the output.

Life assessment method: According to HTOL 125 ℃ 1V 1000 hour PASS, apply 0.95V using parameters provided by Samsung γ Estimated life time at different junction temperatures with v=45 and Ea=0.7

cat /sys/class/thermal/thermal_zone*/temp
get all temp

Thermal Management
For reliability and operability concerns, the absolute maximum junction temperature has to
be below 125℃.
2. Package Thermal Characteristics
provides the thermal resistance characteristics for the package used on the SoC.
The resulting simulation data for reference only, please prevail in kind test.