Re: [PATCH v2 5/6] arm64: dts: allwinner: a133: Add CPU OPP table
From: Alexander Sverdlin
Date: Wed Nov 18 2026 - 15:15:22 EST
Hi Rajan,
On Wed, 2026-11-18 at 04:52 -0600, Rajan Yadav via B4 Relay wrote:
> From: Rajan Yadav <rajanyadav0307@xxxxxxxxx>
>
> Add the A133 CPU OPPs from the vendor BSP (sun50iw10p1.dtsi), plus
> 1608 MHz for b0 and b1 from the vendor table in the factory firmware of
> the KickPi K5C. There are ten voltage sets, speed0-5 for the a0-a5/a6
> grades and speed6-9 for the "high speed" b0-b3 grades.
> opp-supported-hw selects the frequencies of each grade:
>
> - 1464 MHz only for the a grades
> - 1416 and 1512 MHz only for the b grades
> - 1608 MHz only for b0 and b1, the revision A-E "high speed" grades
> - 408-1320 MHz for all
>
> The highest voltage is 1.18 V, inside the 0.81-1.2 V recommended
> operating range of VDD_CPU in the A133 datasheet (V1.5, table 5-2).
>
> The BSP uses 1008 MHz where the A100 table uses 1080 MHz, at the same
> voltages for a0-a2. U-Boot starts the CPU at 1008 MHz, which mainline
> now reports as an unlisted initial frequency. This table follows the
> BSP.
>
> The BSP table stops at 1512 MHz, although some datasheet versions list
> 1.6 GHz for the A133. The factory firmware of the KickPi K5C (Linux
> 4.9.170, built January 2026) has the same table plus five OPPs:
> 1608 MHz for b0 (1.18 V) and b1 (1.13 V, at most 1.14 V), and 1416 MHz
> for a0-a2. This patch takes the 1608 MHz OPP from it.
>
> The K5C is a b2 part and never uses this OPP. With a test-only change
> that forces the grade, the CPU PLL locked at 1608 MHz and the PMIC was
> set to 1.18 V for b0 and 1.13 V for b1. Forced to b0, two 20-minute
> runs of full load on the K5C without a heatsink reached the 90 C
> passive trip after 10-13 minutes; from then on the temperature stayed
> between 83.5 and 90.4 C.
>
> The table has the A100 compatible as a fallback and the speed bin cell
> first, so a kernel without A133 support selects speed0-2 from the speed
> bin and gets the voltages of the A100 table, with 1008 instead of
> 1080 MHz. It needs the efuse cells added to sun50i-a100.dtsi in the
> previous patch.
>
> A script compared every voltage and the frequency set of every grade
> with both vendor tables. It found no difference to the BSP file other
> than the added 1608 MHz OPP, and no difference to the factory table
> other than its 1416 MHz OPP for a0-a2.
>
> Claude Code (Anthropic) drafted this table and its message from the
> two vendor device trees (numbers only) and wrote the comparison script;
> I reviewed it and tested it on a KickPi K5C.
>
> Suggested-by: Andre Przywara <andre.przywara@xxxxxxx>
> Signed-off-by: Rajan Yadav <rajanyadav0307@xxxxxxxxx>
I've re-tested the whole series on HelperBoard A133
("marking 0x1400, bin 4, revision 6: speed grade 9"),
no 1608MHz for me (as expected):
# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_available_frequencies
408000 600000 816000 1008000 1200000 1320000 1416000 1512000
Reviewed-by: Alexander Sverdlin <alex@xxxxxxxxxxxx>
Tested-by: Alexander Sverdlin <alex@xxxxxxxxxxxx>
> ---
> Changes in v2:
> - Add 1608 MHz for b0 and b1 from the factory firmware table, as Andre
> asked; the commit message describes the source and the K5C tests.
> - Alexander's Reviewed-by and Tested-by for v1 are not carried over
> because of this change. Alexander, could you check whether they
> still apply to this version?
> ---
> .../boot/dts/allwinner/sun50i-a133-cpu-opp.dtsi | 182 +++++++++++++++++++++
> 1 file changed, 182 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a133-cpu-opp.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a133-cpu-opp.dtsi
> new file mode 100644
> index 00000000000..dd5fdeea7ea
> --- /dev/null
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a133-cpu-opp.dtsi
[]
> + opp-1512000000 {
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + opp-hz = /bits/ 64 <1512000000>;
> +
> + opp-microvolt-speed6 = <1180000>;
> + opp-microvolt-speed7 = <1130000 1130000 1140000>;
> + opp-microvolt-speed8 = <1100000>;
> + opp-microvolt-speed9 = <1080000>;
> + opp-supported-hw = <0x3c0>;
> + };
> +
> + opp-1608000000 {
> + clock-latency-ns = <244144>; /* 8 32k periods */
> + opp-hz = /bits/ 64 <1608000000>;
> +
> + opp-microvolt-speed6 = <1180000>;
> + opp-microvolt-speed7 = <1130000 1130000 1140000>;
> + opp-supported-hw = <0xc0>;
> + };
> + };
> +};
[]