wiki:ventana/thermal

Version 1 (modified by trac, 7 years ago) ( diff )

--

Ventana Thermal Information

See also:

Gateworks System Controller (GSC)

The Gateworks System Controller has a temperature sensor that measures board temperature as well as a fan controller on some models.

For more information:

IMX6 SoC

The IMX6 System On Chip has an internal die temperature sensor.

There are several temperature grades of IMX6 SoC's that are used across various Gateworks products:

  • IMX6Q Automotive: -40C to 125C
  • IMX6DL Industrial: -40C to 105C
  • IMX6S Industrial: -40C to 105C

Linux Kernel Support

The Linux IMX6 cpufreq cooling driver (drivers/thermal/imx_thermal.c) provides several functions:

  • display the thermal grade of CPU and min/max temperature
  • thermal sensing of the IMX6 chip
  • automatic CPU frequency throttling based on temperature feedback

There is a Linux sysfs API for accessing this information:

  • Note in first line, hwmon1 may be hwmon2
    cat /sys/class/hwmon/hwmon1/temp1_input # current IMX temp in milicelcius
    cat /sys/class/thermal/thermal_zone0/trip_point_0_temp # current passive temp in milicelcius
    cat /sys/class/thermal/thermal_zone0/trip_point_1_temp # current critical temp in milicelcius
    # set passive/crit to 105C/125C for automotive CPU
    echo 105000 > /sys/class/thermal/thermal_zone0/trip_point_0_temp
    echo 125000 > /sys/class/thermal/thermal_zone0/trip_point_1_temp
    

Notes:

  • 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
  • there is a 10C hysteresis such that the temperature needs to lower by 10C before the alarm is cancelled
  • the passive trip point is a preventative measure before reaching critical that does things to lower temperature such as reducing cpu/gpu frequencies
  • 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).
  • the thresholds for the driver can be adjusted in userspace (see above)
  • Gateworks has 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.

U-Boot Support

The Gateworks Ventana Bootloader driver (drivers/thermal/imx_thermal.c) provides several functions:

  • display the thermal grade of CPU and min/max temperature
  • display current temperature of IMX6
  • busyloop if over IMX6 temperature is greater or equal to max temp - 5C

Vivante GPU thermal management

The 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.

The GPU frequency scaling is triggered by the IMX thermal zone passive trip point (see above). Note that because the temperature is triggered by the IMX thermal zone, the ARM cpu frequency will be reduced at the same time.

The 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:

  • On Yocto v1.8 (3.14.x):
    echo 3 > /sys/bus/platform/drivers/galcore/gpu3DMinClock # set GPU freq reduction to 3/64
    
  • On Yocto v1.6/v1.7 (3.10.17):
    echo 3 > /sys/module/galcore/parameters/gpu3DMinClock # set GPU freq reduction to 3/64
    
  • On Linux 3.10.53 (Yocto master / Android kk)
    echo 3 > /sys/bus/platform/drivers/galcore/gpu3DMinClock # set GPU freq reduction to 3/64
    

You 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.

Attachments (5)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.