Changes between Version 21 and Version 22 of newport/powerthermal


Ignore:
Timestamp:
03/29/2022 04:48:07 PM (2 years ago)
Author:
Tim Harvey
Comment:

page clean-up and expand on reading board/cpu temperature

Legend:

Unmodified
Added
Removed
Modified
  • newport/powerthermal

    v21 v22  
    11[[PageOutline]]
    22
     3= See also
     4* [/wiki/venice/thermal Venice Thermal Page]
     5* [/wiki/ventana/thermal_management Ventana Thermal Page]
     6* [/wiki/DVFS Dynamic Voltage and Frequency Scaling of the Processor]
     7* [https://shop.gateworks.com/index.php?route=product/category&path=70_72 Gateworks Shop - Heatsinks ]
     8
    39= Newport Thermal =
    4 
    5  * Please also see [wiki:ventana/thermal_management Very Resourceful Thermal Management Page]
    610
    711== Newport Thermal Ratings ==
     
    4145Note this is only available on [wiki:newport/errata#np3 newer revision Newport boards]
    4246
    43 This requires up to date software (Device Tree, GSC, Kernel, etc)
     47While the CN80XX lacks a functioning internal CPU temperature sensor interface it does have the ability for an external device to monitor its junction temperature via pins on the SoC.
    4448
    45 This is using a MAX6642 temperature sensor over I2C and is exposed through the Linux hwmon interface.
     49Newport boards have a Maxim MAX6642 temperature sensor located right next to the CPU available via I2C that monitors a local temperature sensor (inside its die) as well a remote temperature connected to the CN80XX die temperature.
    4650
    47 Typically the GSC will exist on hwmon0 and the MAX6642 will exist on hwmon1.
     51The Newport BDK (part of the boot firmware) configures the MAX6642 local and remote temperature thresholds for 95C (for 1500MHz CPU) and 100C (for 800/1000/1200 MHz CPU) which are the maximum temperatures for the CPU per Marvell. If the local or remote temperature exceeds this value the MAX6642 will signal an interrupt to the GSC which can be configured to power down the board and enter a 'cooldown period' - See [wiki:gsc#thermal-protection GSC Thermal Protection] for more details
    4852
    49 The MAX6642 has a local and remote temperature, with the remote temperature being the temperature of the CPU. This is typically going to be temp2_input.
     53The CPU temperature is shown by the boot firmware via the serial console on board power-up:
     54{{{#!bash
     55Gateworks Newport SPL (12.7.0-0228336 Sat Mar 19 00:40:54 UTC 2022)
    5056
    51 To read the temperature value, see the below given example, showing a temperature of 97.250C (value returned divided by 1000)
    52 {{{
    53 root@xenial-newport:~# cat /sys/class/hwmon/hwmon1/temp2_input
    54 97250
     57GSC     : v59 0xe619 RST:VIN Thermal Protection Enabled at board temp of 96C
     58Temp    : Board:45C/96C CPU:55C/95C
    5559}}}
     60 * The above indicates the CPU temperature is currently 55C with a limit of 95C and GSC Thermal protection is enabled with a board temp of 96C
    5661
    57 Note that temp2_max is declared as the max value of the CPU rating, as shown in this commit [https://github.com/Gateworks/bdk-newport/commit/4fb971493bf4f74022b7b5fec185914746f315ca here]
    58 
     62A Linux {{{hwmon}}} driver exists which supports reading and configuring the MAX6642 in Linux:
     63{{{#!bash
     64~# DEV=$(for i in $(ls /sys/class/hwmon); do [ "max6642" = $(cat /sys/class/hwmon/$i/name) ] && echo $i; done) # find max6642 device
     65~# ls /sys/class/hwmon/$DEV
     66device   power        temp1_max        temp2_input      uevent
     67name     subsystem    temp1_max_alarm  temp2_max
     68of_node  temp1_input  temp2_fault      temp2_max_alarm
     69~# cat /sys/class/hwmon/$DEV/temp1_input
     7045000
     71~# cat /sys/class/hwmon/$DEV/temp1_max
     7295000
     73~# cat /sys/class/hwmon/$DEV/temp2_input
     7459750
     75~# cat /sys/class/hwmon/$DEV/temp2_max
     7695000
     77~# echo 90000 > /sys/class/hwmon/$DEV/temp2_max # change CPU temp max to 90C
     78~# cat /sys/class/hwmon/$DEV/temp2_max
     7990000
     80}}}
     81 * temp1 on the max6642 is the local temperature and temp2 is the remote temperature (CPU die)
     82 * Linux {{{hwmon}}} devices refer to temperature in decicelcius thus 90C is 90000
    5983
    6084
    6185=== Board Temperature
    62 can be measured through the GSC as shown on the GSC wiki page here: [http://trac.gateworks.com/wiki/gsc#SystemTemperatureandVoltageMonitor Reading Newport Board Temperature]
     86Board temperature is monitored via the [wiki:gsc Gateworks System Controller (GSC)] via a thermister located on the board.
    6387
    64 
    65 
     88A Linux {{{hwmon}}} driver exists which supports reading and configuring the MAX6642 in Linux:
     89{{{#!bash
     90~# DEV=$(for i in $(ls /sys/class/hwmon); do [ "gsc_hwmon" = $(cat /sys/class/hwmon/$i/name) ] && echo $i; done) # find GSC device
     91~# cat /sys/class/hwmon/$DEV/temp1_input
     9248100
     93}}}
     94 * Linux {{{hwmon}}} devices refer to temperature in decicelcius thus 90C is 90000
    6695
    6796== Newport Power Dissipation ==
     
    82111* GW6404 = Quad Core 1.5GHz CN8030, 2GB DDR4, 8GB eMMC, GPS, CAN, SFP
    83112
    84  == Newport Thermal Image ==
     113== Newport Thermal Image ==
    85114
    86115The following image is for the GW6300 board with the stock Gateworks heatsink.
     
    111140[[Image(newport-fan-example.jpg,600px)]]
    112141
     142== Newport Thermal Protection
     143Thermal protection is offered by the GSC (Gateworks System Controller).
     144Please read more on the [wiki:gsc#thermal-protection GSC Wiki Page]
     145
    113146== Troubleshooting ==
    114 
    115147Please review the [wiki:ventana/thermal_management Very Resourceful Thermal Management Page]
    116148