Changes between Version 4 and Version 5 of ventana/thermal


Ignore:
Timestamp:
01/02/2018 05:57:15 PM (6 years ago)
Author:
Ryan Erbstoesser
Comment:

convert page from html to wiki

Legend:

Unmodified
Added
Removed
Modified
  • ventana/thermal

    v4 v5  
    1 {{{#!html
    2           <div id="wikipage" class="trac-content"><p>
    3 </p><div class="wiki-toc">
    4 <ol>
    5   <li>
    6     <a href="#VentanaThermalInformation">Ventana Thermal Information</a>
    7     <ol>
    8       <li>
    9         <a href="#GateworksSystemControllerGSC">Gateworks System Controller (GSC)</a>
    10       </li>
    11       <li>
    12         <a href="#IMX6SoC">IMX6 SoC</a>
    13         <ol>
    14           <li>
    15             <a href="#LinuxKernelSupport">Linux Kernel Support</a>
    16           </li>
    17           <li>
    18             <a href="#U-BootSupport">U-Boot Support</a>
    19           </li>
    20         </ol>
    21       </li>
    22       <li>
    23         <a href="#VivanteGPUthermalmanagement">Vivante GPU thermal management</a>
    24       </li>
    25     </ol>
    26   </li>
    27 </ol>
    28 </div><p>
    29 </p>
    30 <h1 id="VentanaThermalInformation">Ventana Thermal Information</h1>
    31 <p>
     1[[PageOutline]]
     2= Ventana Thermal Information =
     3
    324See also:
    33 </p>
    34 <ul><li><a class="wiki" href="/wiki/ventana/thermal_management">Very Resourceful Thermal Management Page</a>
    35 </li><li><a class="wiki" href="/wiki/DVFS">Dynamic Voltage and Frequency Scaling of the Processor</a>
    36 </li><li><a class="wiki" href="/wiki/ventana/power">Ventana Power Consumption</a>
    37 </li><li><a class="wiki" href="/wiki/faq#WhyarecertainareasontheboardwarmwithregardstotemperatureWhyismyboardhot">FAQ - Why is my board running hot?</a>
    38 </li></ul><p>
    39 <span class="wikianchor" id="gsc-thermal"></span>
    40 </p>
    41 <h2 id="GateworksSystemControllerGSC">Gateworks System Controller (GSC)</h2>
    42 <p>
     5
     6* [/wiki/ventana/thermal_management Very Resourceful Thermal Management Page]
     7* [/wiki/DVFS Dynamic Voltage and Frequency Scaling of the Processor]
     8* [/wiki/ventana/power Ventana Power Consumption]
     9* [/wiki/faq#WhyarecertainareasontheboardwarmwithregardstotemperatureWhyismyboardhot FAQ - Why is my board running hot?]
     10
     11
     12
     13== Gateworks System Controller (GSC) ==
     14
    4315The Gateworks System Controller has a temperature sensor that measures board temperature as well as a fan controller on some models.
    44 </p>
    45 <p>
     16
    4617For more information:
    47 </p>
    48 <ul><li><a class="wiki" href="/wiki/gsc#hwmon">GSC Thermal sensor</a>
    49 </li><li><a class="wiki" href="/wiki/gsc#fan">GSC Fan Controller</a> - Only available on GW54xx
    50 </li></ul><p>
    51 <span class="wikianchor" id="imx-thermal"></span>
    52 </p>
    53 <h2 id="IMX6SoC">IMX6 SoC</h2>
    54 <p>
     18
     19* [/wiki/gsc#hwmon GSC Thermal sensor]
     20* [/wiki/gsc#fan GSC Fan Controller] - Only available on GW54xx
     21
     22== IMX6 SoC ==
     23
    5524The IMX6 System On Chip has an internal die temperature sensor.
    56 </p>
    57 <p>
     25
    5826There are several temperature grades of IMX6 SoC's that are used across various Gateworks products:
    59 </p>
    60 <ul><li>IMX6Q Automotive: -40C to 125C
    61 </li><li>IMX6DL Industrial: -40C to 105C
    62 </li><li>IMX6S Industrial: -40C to 105C
    63 </li></ul><h3 id="LinuxKernelSupport">Linux Kernel Support</h3>
    64 <p>
     27
     28* IMX6Q Automotive: -40C to 125C
     29* IMX6DL Industrial: -40C to 105C
     30* IMX6S Industrial: -40C to 105C
     31
     32=== Linux Kernel Support ===
     33
    6534The Linux IMX6 cpufreq cooling driver (drivers/thermal/imx_thermal.c) provides several functions:
    66 </p>
    67 <ul><li>display the thermal grade of CPU and min/max temperature
    68 </li><li>thermal sensing of the IMX6 chip
    69 </li><li>automatic CPU frequency throttling based on temperature feedback
    70 </li></ul><p>
     35
     36* display the thermal grade of CPU and min/max temperature
     37* thermal sensing of the IMX6 chip
     38* automatic CPU frequency throttling based on temperature feedback
     39
    7140There is a Linux sysfs API for accessing this information:
    72 </p>
    73 <ul><li>Note in first line, hwmon1 may be hwmon2
    74 <pre class="wiki">cat /sys/class/hwmon/hwmon1/temp1_input # current IMX temp in milicelcius
    75 cat /sys/class/thermal/thermal_zone0/trip_point_0_temp # current passive temp in milicelcius
    76 cat /sys/class/thermal/thermal_zone0/trip_point_1_temp # current critical temp in milicelcius
    77 # set passive/crit to 105C/125C for automotive CPU
    78 echo 105000 &gt; /sys/class/thermal/thermal_zone0/trip_point_0_temp
    79 echo 125000 &gt; /sys/class/thermal/thermal_zone0/trip_point_1_temp
    80 </pre></li></ul><p>
     41
     42* Note in first line, hwmon1 may be hwmon2 
     43
     44{{{
     45cat /sys/class/hwmon/hwmon1/temp1_input # current IMX temp in milicelcius
     46 cat /sys/class/thermal/thermal_zone0/trip_point_0_temp # current passive temp in milicelcius
     47 cat /sys/class/thermal/thermal_zone0/trip_point_1_temp # current critical temp in milicelcius
     48 # set passive/crit to 105C/125C for automotive CPU
     49 echo 105000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp
     50 echo 125000 > /sys/class/thermal/thermal_zone0/trip_point_1_temp
     51}}}
     52
    8153Notes:
    82 </p>
    83 <ul><li>the imx_thermal_zone temp currently starts scaling ARM cpufreq at 85C (until it lowers to 75C) and has a critical temp of 100C. This is really too conservative for the typical IMX6 temperature grades that Gateworks uses
    84 </li><li>there is a 10C hysteresis such that the temperature needs to lower by 10C before the alarm is cancelled
    85 </li><li>the <strong>passive</strong> trip point is a preventative measure before reaching critical that does things to lower temperature such as reducing cpu/gpu frequencies
    86 </li><li>the <strong>critical</strong> trip point should not be exceeded to avoid damaging the CPU and as such when this trip point is reached the Linux shutdown function is called to attempt to gracefully shut down the OS. The default implementation will end up simply resetting the board but before that occurs a usermode helper will exec /sbin/poweroff which the user could implement to do whatever they choose (ie, sync filesystems, use GSC sleep for 'x' seconds, etc).
    87 </li><li>the thresholds for the driver can be adjusted in userspace (see above)
    88 </li><li>Gateworks has <a class="ext-link" href="http://thread.gmane.org/gmane.linux.ports.arm.kernel/409671/focus=411988"><span class="icon">​</span>an upstream Linux patch pending approval</a> that will set the initial setpoints according to the temperature grade of the CPU determined via eFUSE registers. This patch will eventually be rolled into our various kernel support.
    89 </li></ul><h3 id="U-BootSupport">U-Boot Support</h3>
    90 <p>
     54
     55* the imx_thermal_zone temp currently starts scaling ARM cpufreq at 85C (until it lowers to 75C) and has a critical temp of 100C. This is really too conservative for the typical IMX6 temperature grades that Gateworks uses
     56* there is a 10C hysteresis such that the temperature needs to lower by 10C before the alarm is cancelled
     57* the '''passive''' trip point is a preventative measure before reaching critical that does things to lower temperature such as reducing cpu/gpu frequencies
     58* the '''critical''' trip point should not be exceeded to avoid damaging the CPU and as such when this trip point is reached the Linux shutdown function is called to attempt to gracefully shut down the OS. The default implementation will end up simply resetting the board but before that occurs a usermode helper will exec /sbin/poweroff which the user could implement to do whatever they choose (ie, sync filesystems, use GSC sleep for 'x' seconds, etc).
     59* the thresholds for the driver can be adjusted in userspace (see above)
     60* Gateworks has [http://thread.gmane.org/gmane.linux.ports.arm.kernel/409671/focus=411988 <span class="icon">​</span>an upstream Linux patch pending approval] that will set the initial setpoints according to the temperature grade of the CPU determined via eFUSE registers. This patch will eventually be rolled into our various kernel support.
     61
     62=== U-Boot Support ===
     63
    9164The Gateworks Ventana Bootloader driver (drivers/thermal/imx_thermal.c) provides several functions:
    92 </p>
    93 <ul><li>display the thermal grade of CPU and min/max temperature
    94 </li><li>display current temperature of IMX6
    95 </li><li>busyloop if over IMX6 temperature is greater or equal to max temp - 5C
    96 </li></ul><p>
    97 <span class="wikianchor" id="gpu-thermal"></span>
    98 </p>
    99 <h2 id="VivanteGPUthermalmanagement">Vivante GPU thermal management</h2>
    100 <p>
     65
     66* display the thermal grade of CPU and min/max temperature
     67* display current temperature of IMX6
     68* busyloop if over IMX6 temperature is greater or equal to max temp - 5C
     69
     70
     71
     72== Vivante GPU thermal management ==
     73
    10174The Vivante GPU has some frequency scaling based on temperature which enabled by default in the [drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c Vivante driver]. If enabled the driver will scale the GPU frequency down by a specified divisor. By default this is 3/64 for the Gateworks Yocto and Android BSP's.
    102 </p>
    103 <p>
    104 The GPU frequency scaling is triggered by the IMX thermal zone <strong>passive</strong> trip point (see <a class="wiki" href="/wiki/ventana/thermal#imx-thermal">above</a>). Note that because the temperature is triggered by the IMX thermal zone, the ARM cpu frequency will be reduced at the same time.
    105 </p>
    106 <p>
     75
     76The GPU frequency scaling is triggered by the IMX thermal zone '''passive''' trip point (see [/wiki/ventana/thermal#imx-thermal above]). Note that because the temperature is triggered by the IMX thermal zone, the ARM cpu frequency will be reduced at the same time.
     77
    10778The minimum devisor used to reduce GPU frequency by default is 1 (meaning 1/64th frequency scaling which is the maximum amount of frequency reduction possible) you can use the drivers sysfs interface:
    108 </p>
    109 <ul><li>On Yocto v1.8 (3.14.x):
    110 <pre class="wiki">echo 3 &gt; /sys/bus/platform/drivers/galcore/gpu3DMinClock # set GPU freq reduction to 3/64
    111 </pre></li><li>On Yocto v1.6/v1.7 (3.10.17):
    112 <pre class="wiki">echo 3 &gt; /sys/module/galcore/parameters/gpu3DMinClock # set GPU freq reduction to 3/64
    113 </pre></li><li>On Linux 3.10.53 (Yocto master / Android kk)
    114 <pre class="wiki">echo 3 &gt; /sys/bus/platform/drivers/galcore/gpu3DMinClock # set GPU freq reduction to 3/64
    115 </pre></li></ul><p>
     79
     80* On Yocto v1.8 (3.14.x): 
     81{{{
     82echo 3 > /sys/bus/platform/drivers/galcore/gpu3DMinClock # set GPU freq reduction to 3/64
     83}}}
     84* On Yocto v1.6/v1.7 (3.10.17): 
     85{{{
     86echo 3 > /sys/module/galcore/parameters/gpu3DMinClock # set GPU freq reduction to 3/64
     87}}}
     88* On Linux 3.10.53 (Yocto master / Android kk) 
     89{{{
     90echo 3 > /sys/bus/platform/drivers/galcore/gpu3DMinClock # set GPU freq reduction to 3/64
     91}}}
     92
    11693You can change this value from 1 to 64, where 1 is 1/64 frequency (maximum reduction) and 64 is no reduction. Note that depending on what the GPU is being used for, you may want to increase this value. We have found that a value of 3 for example offers adequate cooling without sacrificing significant performance.
    117 </p>
    118 }}}
     94
     95
     96
    11997
    12098