SPRACZ5 December 2021 DRA821U , DRA821U-Q1 , DRA829J , DRA829J-Q1 , DRA829V , DRA829V-Q1 , TDA4VM , TDA4VM-Q1
All trademarks are the property of their respective owners.
This application report is applicable for J7ES/TDA4VM and derivatives. Before reading further, it is important to highlight the difference between TDA4 Silicon Revision 1.1 and 1.0 with regard to thermal sensors:
It is recommended to use Silicon Revision 1.1 for further experiments, however if for some reason you need to use Silicon Revision 1.0, be aware of the Errata i2128 — "VTM: VTM Temperature Monitors (TEMPSENSORs) should Use a Software Trimming Method", details can be found in J721E DRA829/TDA4VM Processors Silicon Revision 1.1/1.0. Based on the silicon revisions the method employed to read on-die temperatures differ.
DIE ID is useful to get the device-specific details, this is used by TI for further analysis. This is one of the first bits of information that need to be collected. Use the following commands from Linux command line to read the DIE ID Registers:
echo `devmem2 0x43000020 w | tail -n1`
echo `devmem2 0x43000024 w | tail -n1`
echo `devmem2 0x43000028 w | tail -n1`
echo `devmem2 0x4300002c w | tail -n1`
CTRLMMR_WKUP_RESET_SRC_STAT Register For Cold boot, the value of this register is 0x0 (1st fresh boot). In the event of TSHUT, then the next boot in Linux:
devmem2 0x43000050 w
Read at address 0x43000050 (0xffff86750050): 0x01000000
So bit24 is set corresponding to THERMAL_RST indicating the reset due to TSHUT.
This kicks in at the very end when temperature is close to max thresholds of the SoC.
This needs one time register programming to be done. Below is the complete programming sequence that can be done from the Linux user space in absence of thermal driver:
devmem2 0x42050010 w 0x2e60305
The above table gives ADC code Vs Temperature in centigrade for few temperatures. In case other temperatures are needed, use Table 5-1897 equation to get the alert threshold values for a particular temperature.
For more information, see the Temperature Translation table in the DRA829/TDA4VM/AM752x Technical Reference Manual
Please use Silicon Revision 1.1 since Silicon Revision 1.0 has PVT sensor accuracy issue and the shutdown might happen at an offset of ± 20C.
Enable the individual sensors maxtemp_alert bit (Note: bit 4 (CONT) and bit 6 (CLRZ) are already set so keeping them set):
devmem2 0x42050300 w 0x850
devmem2 0x42050320 w 0x850
devmem2 0x42050340 w 0x850
devmem2 0x42050360 w 0x850
devmem2 0x42050380 w 0x850
The global max temp alert generation bit to 1.
devmem2 0x4205000c w 0x1