cpufreq: sun50i: Handle boards with the allwinner,sun50i-a133 compatible
Subsystems (3)
PATCH 1/1 cpufreq: sun50i: Handle boards with the allwinner,sun50i-a133 compatible
The Teclast P80 uses "allwinner,sun50i-a133" as its only SoC compatible, as documented in the arm/sunxi.yaml binding. Neither the sun50i cpufreq driver nor the cpufreq-dt-platdev blocklist lists it. cpufreq-dt then probes on its own, finds only opp-microvolt-speedN properties and fails:
cpu cpu0: opp_parse_microvolt: opp-microvolt missing although OPP managing regulators cpu cpu0: _of_add_opp_table_v2: Failed to add OPP, -22
cpu cpu0: OPP table can't be empty
so the board runs without CPU frequency scaling.
Add the compatible to both lists.
Tested on a KickPi K5C (A133) with its root compatible changed to "allwinner,sun50i-a133" only: on v7.4-rc1 cpufreq fails as above, with this change the sun50i driver probes and the A100 speed1 OPPs are used. v6.18 fails the same way, also with "kickpi,k5c" listed first.
Claude Code (Anthropic) drafted this change and its message from my test logs; I reviewed and tested it.
---
This fixes the Teclast P80 support added in v7.4-rc1, so I think it can go in as a fix for 7.4. I do not have a Teclast P80; I reproduced the failure on a KickPi K5C as described above. A series with A133 speed grade support, which Andre asked for, follows separately.
--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 + 2 files changed, 2 insertions(+)
drivers/cpufreq/cpufreq-dt-platdev.c +1 -0
@@ -110,6 +110,7 @@ static const struct of_device_id blocklist[] __initconst = { { .compatible = "airoha,en7581", }, { .compatible = "allwinner,sun50i-a100" }, + { .compatible = "allwinner,sun50i-a133", }, { .compatible = "allwinner,sun50i-h6", }, { .compatible = "allwinner,sun50i-h616", }, { .compatible = "allwinner,sun50i-h618", },
drivers/cpufreq/sun50i-cpufreq-nvmem.c +1 -0
@@ -324,6 +324,7 @@ static struct platform_driver sun50i_cpufreq_driver = {static const struct of_device_id sun50i_cpufreq_match_list[] = { { .compatible ="allwinner,sun50i-h6" }, { .compatible ="allwinner,sun50i-a100" }, + { .compatible ="allwinner,sun50i-a133" }, { .compatible ="allwinner,sun50i-h616" }, { .compatible ="allwinner,sun50i-h618" }, { .compatible ="allwinner,sun50i-h700" },
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261104-a133-fix-e77378091de4
Best regards,
Signature · 1 line
Rajan Yadav <[email protected]>
Quoted 54 lines · On 04-11-26, 22:07, Rajan Yadav via B4 Relay wrote:
From: Rajan Yadav <[email protected]>
The Teclast P80 uses "allwinner,sun50i-a133" as its only SoC compatible, as documented in the
arm/sunxi.yamlbinding. Neither the sun50i cpufreq driver nor the cpufreq-dt-platdev blocklist lists it. cpufreq-dt then probes on its own, finds only opp-microvolt-speedN properties and fails:cpu cpu0:
opp_parse_microvolt: opp-microvolt missing although OPP managing regulators cpu cpu0:_of_add_opp_table_v2: Failed to add OPP, -22
cpu cpu0: OPP table can't be emptyso the board runs without CPU frequency scaling.
Add the compatible to both lists.
Tested on a KickPi K5C (A133) with its root compatible changed to "allwinner,sun50i-a133" only: on v7.4-rc1 cpufreq fails as above, with this change the sun50i driver probes and the A100 speed1 OPPs are used. v6.18 fails the same way, also with "kickpi,k5c" listed first.
Claude Code (Anthropic) drafted this change and its message from my test logs; I reviewed and tested it.
Fixes 60b064eb82e6 ("arm64: dts: allwinner: A133: add basic support for Teclast P80 tablet")Signed-off-by Rajan Yadav <[email protected]>---
This fixes the Teclast P80 support added in v7.4-rc1, so I think it can go in as a fix for 7.4. I do not have a Teclast P80; I reproduced the failure on a KickPi K5C as described above. A series with A133 speed grade support, which Andre asked for, follows separately.--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + drivers/cpufreq/sun50i-cpufreq-nvmem.c | 1 + 2 files changed, 2 insertions(+)drivers/cpufreq/cpufreq-dt-platdev.c +1
-0@@ -110,6 +110,7 @@ static const struct of_device_id blocklist[] __initconst = { { .compatible = "airoha,en7581", }, { .compatible = "allwinner,sun50i-a100" }, + { .compatible = "allwinner,sun50i-a133", }, { .compatible = "allwinner,sun50i-h6", }, { .compatible = "allwinner,sun50i-h616", }, { .compatible = "allwinner,sun50i-h618", },drivers/cpufreq/sun50i-cpufreq-nvmem.c +0
-0
drivers/cpufreq/sun50i-cpufreq-nvmem.c static struct platform_driver sun50i_cpufreq_driver = { · line 330
Quoted 7 lines
drivers/cpufreq/sun50i-cpufreq-nvmem.c +1
-0@@ -324,6 +324,7 @@ static struct platform_driver sun50i_cpufreq_driver = {static const struct of_device_id sun50i_cpufreq_match_list[] = { { .compatible ="allwinner,sun50i-h6" }, { .compatible ="allwinner,sun50i-a100" }, + { .compatible ="allwinner,sun50i-a133" }, { .compatible ="allwinner,sun50i-h616" }, { .compatible ="allwinner,sun50i-h618" }, { .compatible ="allwinner,sun50i-h700" },
Applied. Thanks.
Signature · 1 line
viresh