Give the board CPU DVFS, capped at what its fixed rail allows - #9
Merged
Conversation
rockchip-cpufreq never registered the cpufreq-dt device, so there was no /sys/devices/system/cpu/cpu0/cpufreq and the CPU ran at whatever OPP the bootloader left behind. The driver calls rockchip_init_opp_info() first, and without CONFIG_ROCKCHIP_OPP that is the stub in <soc/rockchip/rockchip_opp_select.h> returning -EOPNOTSUPP. Nothing selects the symbol and rv1106_defconfig does not set it, although Luckfox's own 5.10 defconfig does. The devicetree had its own problem: vdd_arm was described as a PWM-controlled buck on PWM0, which is Rockchip's reference design and not this board. Luckfox fitted a fixed 0.9 V rail instead. Describe that, with min == max because 6.6's of_get_fixed_voltage_config() rejects a fixed regulator with a voltage range. A fixed rail then has to be defended in the OPP table, because the regulator core will not do it. regulator_set_voltage_triplet() falls back to the OPP's u_volt_min, which is 850 mV for every entry including the 1.608 GHz one, and a fixed 0.9 V regulator satisfies that request, so the part would happily run its top bin undervolted. Delete every OPP above 1.2 GHz, the fastest one actually specified at 850 mV, and the PVTPLL properties with them: calibration exists to search for the lowest stable voltage per frequency, and there is nothing here to search. Finally, bind the CPU to the 85 C trip. rv1106.dtsi describes the trip points but no cooling device, so the passive trips did nothing and the only thermal response was the critical trip at 115 C. Co-authored-by: Codesmith <codesmith-bot@users.noreply.github.com>
MrMati
force-pushed
the
cpufreq-fixed-vdd-arm
branch
from
August 1, 2026 11:50
30695a7 to
e01e26c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The board had no
/sys/devices/system/cpu/cpu0/cpufreqat all, and the CPU sat on whatever OPP U-Boot left behind. Three things were wrong, and the first one is the whole reason nothing worked.CONFIG_ROCKCHIP_OPPwas off.rockchip-cpufreqwill not register thecpufreq-dtdevice untilrockchip_init_opp_info()succeeds, and without that symbol it is a stub:That is the
-95the board reported. Nothing in Kconfig selectsROCKCHIP_OPPandrv1106_defconfigdoes not set it, although Luckfox's own 5.10 defconfig does.vdd_armdescribed hardware that is not on this board. It was apwm-regulatoron PWM0, which is Rockchip's reference design; Luckfox fitted a fixed 0.9 V rail instead. It is now aregulator-fixedwithmin == max, because 6.6'sof_get_fixed_voltage_config()rejects a fixed regulator with a voltage range ("Fixed regulator specified with variable voltages") — Luckfox's own800000..1000000node would not probe here.A fixed rail has to be defended in the OPP table. The regulator core will not do it:
regulator_set_voltage_triplet()falls back to the OPP'su_volt_min, which is 850 mV for every entry inrv1106.dtsiincluding the 1.608 GHz one, and a fixed 0.9 V regulator satisfies that request. So the part would have run its top bin undervolted. 1.2 GHz is the fastest OPP actually specified at 850 mV, so the table stops there, and the PVTPLL properties go with it since calibration exists to search for a voltage this board cannot change:Lastly,
rv1106.dtsidescribes trip points but binds no cooling device to them, so the passive trips did nothing and the only thermal response was the critical trip at 115 C.cpu0gets#cooling-cells = <2>and acooling-mapsentry on the 85 C trip, whichstep_wise(already this tree's default governor) drives.Verified by building the kernel and decompiling the DTB: the OPP table ends at
opp-1200000000with no pvtpll properties,vdd_armis fixed at 900000,cpu@0carries#cooling-cells, and the cooling map points at it fromtrip-point-1.make checkpasses. Untested on hardware.Need help on this PR? Tag
@codesmithwith what you need. Autofix is enabled.