Page MenuHomeFreeBSD

cpufreq for rpi3
ClosedPublic

Authored by jiashiun_gmail.com on Feb 16 2017, 7:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 1:47 PM
Unknown Object (File)
Tue, Apr 16, 1:33 PM
Unknown Object (File)
Tue, Apr 16, 1:15 PM
Unknown Object (File)
Tue, Apr 16, 10:41 AM
Unknown Object (File)
Tue, Apr 16, 10:17 AM
Unknown Object (File)
Feb 23 2024, 6:15 AM
Unknown Object (File)
Jan 11 2024, 10:32 AM
Unknown Object (File)
Dec 22 2023, 4:00 PM

Details

Summary

RPi3 cpufreq is more like that on RPi2. Setting arm frequency above min (say, "sysctl hw.cpufreq.arm_freq=600000001") turns on turbo mode, and the firmware automatically raises voltage, sets frequency to max 1200MHz, and throttle when overheat, etc.

Swap if/else parts and use SOC_BCM2835 def so RPi3 can share the same cpufreq logic as RPi2, instead of falling to that for RPi.

Test Plan

Tested on RPi & RPi2 to make sure behavior was not changed.
Tested on RPi3 to get correct voltage report from verbose boot.

@@ -236,8 +236,8 @@
bcm2835_cpufreq0: Boot settings:
bcm2835_cpufreq0: current ARM 600MHz, Core 250MHz, SDRAM 400MHz, Turbo OFF
bcm2835_cpufreq0: max/min ARM 1200/600MHz, Core 400/250MHz, SDRAM 450/400MHz
-bcm2835_cpufreq0: current Core 30001200mV, SDRAM_C 30001200mV, SDRAM_I 30001200mV, SDRAM_P 30001200mV
-bcm2835_cpufreq0: max/min Core 32344950/30001200mV, SDRAM_C 30001200/30001200mV, SDRAM_I 30001200/30001200mV, SDRAM_P 30001200/30001200mV
+bcm2835_cpufreq0: current Core 1200mV, SDRAM_C 1200mV, SDRAM_I 1200mV, SDRAM_P 1200mV
+bcm2835_cpufreq0: max/min Core 1293/1200mV, SDRAM_C 1200/1200mV, SDRAM_I 1200/1200mV, SDRAM_P 1200/1200mV
bcm2835_cpufreq0: Temperature 51.5C
Release APs
mmc0: setting bus width to 4 bits

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jiashiun_gmail.com retitled this revision from to cpufreq for rpi3.
jiashiun_gmail.com updated this object.
jiashiun_gmail.com edited the test plan for this revision. (Show Details)
jiashiun_gmail.com set the repository for this revision to rS FreeBSD src repository - subversion.
gonzo edited edge metadata.

Looks good

This revision is now accepted and ready to land.Feb 17 2017, 7:42 PM

Hi Brad,

would you mind help to review, and possibly commit it?

This revision was automatically updated to reflect the committed changes.

Committed. Sorry for delay.