arm64: dts: rockchip: Enable the GPU on quartzpro64
authorDragan Simic <dsimic@manjaro.org>
Mon, 25 Mar 2024 16:19:04 +0000 (17:19 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 27 Mar 2024 10:23:17 +0000 (11:23 +0100)
Following the approach used to enable the Mali GPU on the rk3588-evb1, [1]
do the same for the Pine64 QuartzPro64, which uses nearly identical hardware
design as the RK3588 EVB1.

The slight disadvantage is that the regulator coupling logic requires the
regulators to be always on, which is also noted in the comments.  This is
obviously something to be improved at some point in the future, but should
be fine for now, especially because the QuartzPro64 isn't a battery-powered
board, so low power consumption isn't paramount.

[1] https://lore.kernel.org/linux-rockchip/20240325153850.189128-5-sebastian.reichel@collabora.com/

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/0f3759ee390f245dac447bbee038445ddfecbec0.1711383286.git.dsimic@manjaro.org
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3588-quartzpro64.dts

index 67414d72e2b6ef9308aa357c606f64d652c54075..68d432c61ea52ca350702b5a6b13868aa905442f 100644 (file)
        status = "okay";
 };
 
+&gpu {
+       mali-supply = <&vdd_gpu_s0>;
+       sram-supply = <&vdd_gpu_mem_s0>;
+       status = "okay";
+};
+
 &i2c2 {
        status = "okay";
 
                regulators {
                        vdd_gpu_s0: dcdc-reg1 {
                                regulator-name = "vdd_gpu_s0";
+                               /* regulator coupling requires always-on */
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-enable-ramp-delay = <400>;
                                regulator-min-microvolt = <550000>;
                                regulator-max-microvolt = <950000>;
                                regulator-ramp-delay = <12500>;
+                               regulator-coupled-with = <&vdd_gpu_mem_s0>;
+                               regulator-coupled-max-spread = <10000>;
 
                                regulator-state-mem {
                                        regulator-off-in-suspend;
 
                        vdd_gpu_mem_s0: dcdc-reg5 {
                                regulator-name = "vdd_gpu_mem_s0";
+                               /* regulator coupling requires always-on */
+                               regulator-always-on;
                                regulator-boot-on;
                                regulator-enable-ramp-delay = <400>;
                                regulator-min-microvolt = <675000>;
                                regulator-max-microvolt = <950000>;
                                regulator-ramp-delay = <12500>;
+                               regulator-coupled-with = <&vdd_gpu_s0>;
+                               regulator-coupled-max-spread = <10000>;
 
                                regulator-state-mem {
                                        regulator-off-in-suspend;