Bug 1466991 - Frequency scaling and thermal zones do not work for iMX6 SOC
Frequency scaling and thermal zones do not work for iMX6 SOC
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Robinson
Fedora Extras Quality Assurance
:
Depends On:
Blocks: ARMTracker
  Show dependency treegraph
 
Reported: 2017-07-01 04:20 EDT by billiboy
Modified: 2018-03-05 12:14 EST (History)
8 users (show)

See Also:
Fixed In Version: kernel-4.15.2-300.fc27
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-05 12:14:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description billiboy 2017-07-01 04:20:41 EDT
Description of problem:

Frequency scaling and thermal zones do not work for iMX6 SOC

Version-Release number of selected component (if applicable):

current fedora stock kernel

How reproducible:

Always with fedora stock kernel

Steps to Reproduce:

Boot fedora on iMX6 SOC device

Actual results:
ls /sys/devices/system/cpu/cpufreq/
 ==> empty directory

start tmon
 ==> No thermal zones found, exit

Expected results:
populated directories:
/sys/devices/system/cpu/cpufreq/policy0
 affected_cpus
 cpuinfo_cur_freq
 cpuinfo_max_freq
 cpuinfo_min_freq
 cpuinfo_transition_latency
 related_cpus
 scaling_available_frequencies
 scaling_available_governors
 scaling_cur_freq
 scaling_driver
 scaling_governor
 scaling_max_freq
 scaling_min_freq
 scaling_setspeed
/sys/devices/system/cpu/cpufreq/policy0/stats
 reset
 time_in_state
 total_trans
 trans_table

proper tmon status:
TMON v1.0

+----------------------------------------------------THERMAL ZONES(SENSORS)----+
|Thermal Zones:                 imx_therm00                                    |
|Trip Points:                   CP                                             |
+------------------------------------------------------------------------------+
+--------------------------------------------------------- COOLING DEVICES ----+
|ID  Cooling Dev   Cur    Max   Thermal Zone Binding                           |
|00 thermal-cpuf     0      2   ||||||||||||                                   |
|01   134000.gpu     0      6   ||||||||||||                                   |
|02   130000.gpu     0      6   ||||||||||||                                   |
|03  2204000.gpu     0      6   ||||||||||||                                   |
+------------------------------------------------------------------------------+
+------------------------------------------------------------------------------+
|                         10        20        30        40 ...      100  ...   |
|imx_th 0:[ 36][>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>      ... P95  C100 ...   |
+------------------------------------------------------------------------------+
+---------------------------------------------------------------- CONTROLS ----+
|PID gain: kp=0.36 ki=5.00 kd=0.19 Output 0.00                                 |
|Target Temp: 65.0C, Zone: 0, Control Device: None                             |
+------------------------------------------------------------------------------+

Additional info:

Building the fedora kernel source package with CONFIG_ARM_IMX6Q_CPUFREQ=y, CONFIG_IMX_THERMAL=y, CONFIG_NVMEM=y, CONFIG_NVMEM_IMX_OCOTP=y, i.e flipping the modules to build-in make it work for me. cat /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state reports proper frequency state usage and the by fuses provided trip points get used.
Comment 1 Peter Robinson 2017-09-19 12:20:43 EDT
> Additional info:
> 
> Building the fedora kernel source package with CONFIG_ARM_IMX6Q_CPUFREQ=y,
> CONFIG_IMX_THERMAL=y, CONFIG_NVMEM=y, CONFIG_NVMEM_IMX_OCOTP=y, i.e flipping
> the modules to build-in make it work for me. cat
> /sys/devices/system/cpu/cpufreq/policy0/stats/time_in_state reports proper
> frequency state usage and the by fuses provided trip points get used.

Which shouldn't be the case, it should work when built modular. We can't build everything in for a distro kernel or else we'd not have enough memory to run. This really needs to be fixed upstream
Comment 2 Peter Robinson 2018-02-10 13:20:52 EST
This will be fixed in 4.15.3+
Comment 3 Peter Robinson 2018-02-14 06:23:25 EST
Fixed in https://bodhi.fedoraproject.org/updates/FEDORA-2018-380eff4288

Note You need to log in before you can comment on or make changes to this bug.