Re: [PATCH v1 4/4] arm64: dts: allwinner: t527-orangepi-4a: add GPU OPP table

From: Chen-Yu Tsai

Date: Tue Jul 28 2026 - 14:27:10 EST


On Mon, Jul 20, 2026 at 5:13 AM Juan Manuel López Carrillo
<juanmanuellopezcarrillo@xxxxxxxxx> wrote:
>
> Add the Mali-G57 operating points from the vendor BSP universal table
> (150/200/300/400/600 MHz) so panfrost devfreq can scale the GPU
> instead of running at the boot clock.
>
> All operating points use 920 mV: the BSP table specifies 900 mV for
> every universal OPP, but on this board the GPU rail (AXP717 DCDC2,
> vdd-gpu-sys) is a fixed 920 mV supply, so the OPP voltage states the
> actual rail value and voltage transitions are no-ops. The higher
> speed-bin points of the BSP (648-792 MHz) are not included: they are
> gated by a SID efuse bin and need pll-gpu as a live parent.
>
> Depends on the sun55i-a523 GPU clock divider fix (the OPP rates are
> only produced correctly with the cycle-masking divider model);
> validated on hardware with the Mali cycle counter: 149/199/300/399/597
> MHz measured under load, thermal-emulation throttling included.
>
> Signed-off-by: Juan Manuel López Carrillo <juanmanuellopezcarrillo@xxxxxxxxx>
> ---
> .../dts/allwinner/sun55i-t527-orangepi-4a.dts | 30 +++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> index 055be86e5..0fd73a1bb 100644
> --- a/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun55i-t527-orangepi-4a.dts
> @@ -30,6 +30,35 @@ ext_osc32k: ext-osc32k-clk {
> clock-output-names = "ext_osc32k";
> };
>
> + gpu_opp_table: opp-table-gpu {

The table should be in the .dtsi file. The OPP table reflects the
requirements of the SoC, not the board. Any board specific adjustments
are done later.

> + compatible = "operating-points-v2";
> +
> + opp-150000000 {
> + opp-hz = /bits/ 64 <150000000>;
> + opp-microvolt = <920000>;

Please use the <min nominal max> variant to specify a voltage range.
The minimum and nominal voltages should be the one from the BSP table.
You can set the maximum arbitrarily, but 920 mV should be fine to cover
this board.

> + };
> +
> + opp-200000000 {
> + opp-hz = /bits/ 64 <200000000>;
> + opp-microvolt = <920000>;
> + };
> +
> + opp-300000000 {
> + opp-hz = /bits/ 64 <300000000>;
> + opp-microvolt = <920000>;
> + };
> +
> + opp-400000000 {
> + opp-hz = /bits/ 64 <400000000>;
> + opp-microvolt = <920000>;
> + };
> +
> + opp-600000000 {
> + opp-hz = /bits/ 64 <600000000>;
> + opp-microvolt = <920000>;
> + };
> + };
> +
> leds {
> compatible = "gpio-leds";
>
> @@ -116,6 +145,7 @@ &gmac1 {
>
> &gpu {
> mali-supply = <&reg_dcdc2>;
> + operating-points-v2 = <&gpu_opp_table>;

Same here. This should be in the .dtsi file. It should be fine to add it
right now since all boards have the supply added.


ChenYu

> status = "okay";
> };
>
> --
> 2.47.3
>