[PATCH] arm64: dts: rockchip: Fix vdd_gpu voltage constraints on PinePhone Pro
Adam Pigg
adam at piggz.co.uk
Tue Nov 12 03:56:52 PST 2024
On Sunday 10 November 2024 18:44:31 Greenwich Mean Time Dragan Simic wrote:
> The regulator-{min,max}-microvolt values for the vdd_gpu regulator in the
> PinePhone Pro device dts file are too restrictive, which prevents the
> highest GPU OPP from being used, slowing the GPU down unnecessarily. Let's
> fix that by making the regulator-{min,max}-microvolt values less strict,
> using the voltage range that the Silergy SYR838 chip used for the vdd_gpu
> regulator is actually capable of producing. [1][2]
>
> This also eliminates the following error messages from the kernel log:
>
> core: _opp_supported_by_regulators: OPP minuV: 1100000 maxuV: 1150000, not
> supported by regulator panfrost ff9a0000.gpu: _opp_add: OPP not supported
> by regulators (800000000)
>
> These changes to the regulator-{min,max}-microvolt values make the PinePhone
> Pro device dts consistent with the dts files for other Rockchip
> RK3399-based boards and devices. It's possible to be more strict here, by
> specifying the regulator-{min,max}-microvolt values that don't go outside
> of what the GPU actually may use, as the consumer of the vdd_gpu regulator,
> but those changes are left for a later directory-wide regulator cleanup.
>
Ive tested this on my PPP and can provide the following outputs.
On a device without the patch:
# cat /sys/class/devfreq/ff9a0000.gpu/trans_stat
>From : To
: 200000000 297000000 400000000 500000000 600000000 time(ms)
200000000: 0 0 0 0 12203 5387782
297000000: 8208 0 0 0 2973 2337382
400000000: 784 6283 0 0 439 1859857
500000000: 67 287 1093 0 284 389599
600000000: 3145 4611 6413 1730 0 1748889
Total transition : 48520
And with the patch:
[root at PinePhonePro defaultuser]# cat /sys/class/devfreq/ff9a0000.gpu/trans_stat
From : To
: 200000000 297000000 400000000 500000000 600000000 800000000
time(ms)
200000000: 0 0 0 0 0 364
188911
297000000: 120 0 0 0 0 234
31652
400000000: 77 182 0 0 0 82
32287
500000000: 10 57 56 0 0 57
13376
600000000: 21 14 35 31 0 22
9463
800000000: 137 101 250 148 123 0
97310
Total transition : 2121
[root at PinePhonePro defaultuser]# uptime
11:56:24 up 3:34, 1 users, load average: 2.77, 2.24, 1.70
I havnt noticed any issues, though I havnt done anything more in-depth than
run the compositor and play a youtube video in the browser
> [1]
> https://files.pine64.org/doc/PinePhonePro/PinephonePro-Schematic-V1.0-20211
> 127.pdf [2]
> https://www.t-firefly.com/download/Firefly-RK3399/docs/Chip%20Specification
> s/DC-DC_SYR837_838.pdf
>
> Fixes: 78a21c7d5952 ("arm64: dts: rockchip: Add initial support for Pine64
> PinePhone Pro") Cc: stable at vger.kernel.org
> Signed-off-by: Dragan Simic <dsimic at manjaro.org>
Tested-By: Adam Pigg <adam at piggz.co.uk>
> ---
> arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts index
> 1a44582a49fb..956d64f5b271 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-pinephone-pro.dts
> @@ -410,8 +410,8 @@ vdd_gpu: regulator at 41 {
> pinctrl-names = "default";
> pinctrl-0 = <&vsel2_pin>;
> regulator-name = "vdd_gpu";
> - regulator-min-microvolt = <875000>;
> - regulator-max-microvolt = <975000>;
> + regulator-min-microvolt = <712500>;
> + regulator-max-microvolt = <1500000>;
> regulator-ramp-delay = <1000>;
> regulator-always-on;
> regulator-boot-on;
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.infradead.org/pipermail/linux-rockchip/attachments/20241112/274e6fd8/attachment-0001.sig>
More information about the Linux-rockchip
mailing list