SPRACZ5 December   2021 DRA821U , DRA821U-Q1 , DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4VM , TDA4VM-Q1

 

  1.   Trademarks
  2. 1Introduction
  3. 2Enabling Thermal Shutdown Mandatory Step
  4. 3Thermal Mitigation Strategies at a High Level
    1. 3.1 Strategy 1: Auditing the Power Domains That Contribute to the Highest Power Consumption
    2. 3.2 Strategy 2: Disable Loading of Remote Core Firmware
    3. 3.3 Strategy 3: Disabling Modules on TDA4
      1. 3.3.1 Example: Disabling PCIe Instances on 7.3
    4. 3.4 Strategy 4: Dynamic Frequency Scaling (DFS)
    5. 3.5 Strategy 5: How to Reduce Frequency of Other Cores
  5. 4References

Strategy 4: Dynamic Frequency Scaling (DFS)

A simple Linux user space script that can be used to scale A72 frequency dynamically based on temperature polling. This requires additional Linux driver/DTS patches. For more information, go the E2E FAQ at this link: https://e2e.ti.com/support/processors/f/791/t/1060764.

 #!/bin/bash

threshold=80000
safe=79000
interval=1
ht=false
devmem2 0x688040 w 0x80000001

while :
do

t0=`cat /sys/class/thermal/thermal_zone0/temp`
t1=`cat /sys/class/thermal/thermal_zone1/temp`
t2=`cat /sys/class/thermal/thermal_zone2/temp`
t3=`cat /sys/class/thermal/thermal_zone3/temp`
t4=`cat /sys/class/thermal/thermal_zone4/temp`
echo $t0 $t1 $t2 $t3 $t4

if [ $t0 -gt $threshold ] || [ $t1 -gt $threshold ] || [ $t2 -gt $threshold ] || [ $t3 -gt $threshold ] || [ $t4 -gt $threshold ];
then
	if [ "$ht" = false ];
	then
		echo "on die sensor temperature is higher than $threshold so reducing frequency of A72 to 1GHz"
		k3conf set clock 202  2 1000000000
		ht=true
	fi
else
	if [ "$ht" = true ] && [ $t0 -lt $safe ] && [ $t1 -lt $safe ] &&  [ $t2 -lt $safe ] && [ $t3 -lt $safe ] && [ $t4 -lt $safe ];
	then
		echo "All are under safe temp so pushing back A72 frequency to 2GHz"
		k3conf set clock 202  2 2000000000
		ht=false
	fi
fi

sleep $interval
done

Parameters:

  • threshold=80000
  • safe=79000
  • interval=1

Threshold and Safe temperatures are in milli-degree centigrade, they can be adjusted accordingly. The script checks whether or not any of the 5 thermal zones are above 80°C. It also check whether or not the condition holds, then reduces A72 frequency to 1 GHz as a thermal mitigation strategy and keeps it at 1GHz until the SoC cools below 79°C, after which it re-enables the 2GHz(Top frequency).

Other method one can employ is the VTM temperature alert feature demonstrated in the RTOS SDK, CSL folder:

pdk*/packages/ti/csl/example/vtm/vtm_pvt_sensor_temp_alert/vtm_sensor_temp_alert.c

This example demonstrates how to set thermal alerts. One can implement mitigation actions upon receipt of temperature alert interrupts.

For example: Change to A72 or other core's frequency using ti_sci calls.