diff mbox series

[v1,4/4] arm64: dts: rockchip: rk3588-evb1: Enable GPU

Message ID 20240325153850.189128-5-sebastian.reichel@collabora.com (mailing list archive)
State New
Headers show
Series RK3588 GPU support | expand

Commit Message

Sebastian Reichel March 25, 2024, 3:37 p.m. UTC
From: Boris Brezillon <boris.brezillon@collabora.com>

Enable the Mali GPU in the RK3588 EVB1.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

Boris Brezillon March 25, 2024, 3:53 p.m. UTC | #1
On Mon, 25 Mar 2024 16:37:21 +0100
Sebastian Reichel <sebastian.reichel@collabora.com> wrote:

> From: Boris Brezillon <boris.brezillon@collabora.com>
> 
> Enable the Mali GPU in the RK3588 EVB1.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
> index de30c2632b8e..b51a17b404f3 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
> @@ -281,6 +281,12 @@ &gmac0_rgmii_clk
>  	status = "okay";
>  };
>  
> +&gpu {
> +	mali-supply = <&vdd_gpu_s0>;
> +	sram-supply = <&vdd_gpu_mem_s0>;
> +	status = "okay";
> +};
> +
>  &i2c2 {
>  	status = "okay";
>  
> @@ -484,12 +490,15 @@ rk806_dvs3_null: dvs3-null-pins {
>  
>  		regulators {
>  			vdd_gpu_s0: dcdc-reg1 {
> +				regulator-always-on;

IIRC, this is only needed because of some bug in the power-domain
driver (or elsewhere). Is there any other reason to flag those as
always-on? I mean, it's working but probably not ideal from a PM
standpoint, as that means the regulators will stay on even when the GPU
is idle.

>  				regulator-boot-on;
>  				regulator-min-microvolt = <550000>;
>  				regulator-max-microvolt = <950000>;
>  				regulator-ramp-delay = <12500>;
>  				regulator-name = "vdd_gpu_s0";
>  				regulator-enable-ramp-delay = <400>;
> +				regulator-coupled-with = <&vdd_gpu_mem_s0>;
> +				regulator-coupled-max-spread = <10000>;
>  				regulator-state-mem {
>  					regulator-off-in-suspend;
>  				};
> @@ -534,12 +543,15 @@ regulator-state-mem {
>  			};
>  
>  			vdd_gpu_mem_s0: dcdc-reg5 {
> +				regulator-always-on;
>  				regulator-boot-on;
>  				regulator-min-microvolt = <675000>;
>  				regulator-max-microvolt = <950000>;
>  				regulator-ramp-delay = <12500>;
>  				regulator-enable-ramp-delay = <400>;
>  				regulator-name = "vdd_gpu_mem_s0";
> +				regulator-coupled-with = <&vdd_gpu_s0>;
> +				regulator-coupled-max-spread = <10000>;
>  				regulator-state-mem {
>  					regulator-off-in-suspend;
>  				};
Sebastian Reichel March 25, 2024, 4:06 p.m. UTC | #2
Hi,

On Mon, Mar 25, 2024 at 04:53:08PM +0100, Boris Brezillon wrote:
> [...]
> > @@ -484,12 +490,15 @@ rk806_dvs3_null: dvs3-null-pins {
> >  
> >  		regulators {
> >  			vdd_gpu_s0: dcdc-reg1 {
> > +				regulator-always-on;
> 
> IIRC, this is only needed because of some bug in the power-domain
> driver (or elsewhere). Is there any other reason to flag those as
> always-on? I mean, it's working but probably not ideal from a PM
> standpoint, as that means the regulators will stay on even when the GPU
> is idle.

EVB1 needs it for the generic coupler infrastructure. The Linux
coupler code cannot handle non always-on regulators at the moment.
That's something, which could be improved, but I think for now we
can just make the regulator always-on for the EVB1. The EVB1 is not
running from a battery anyways.

Greetings

-- Sebastian
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
index de30c2632b8e..b51a17b404f3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts
@@ -281,6 +281,12 @@  &gmac0_rgmii_clk
 	status = "okay";
 };
 
+&gpu {
+	mali-supply = <&vdd_gpu_s0>;
+	sram-supply = <&vdd_gpu_mem_s0>;
+	status = "okay";
+};
+
 &i2c2 {
 	status = "okay";
 
@@ -484,12 +490,15 @@  rk806_dvs3_null: dvs3-null-pins {
 
 		regulators {
 			vdd_gpu_s0: dcdc-reg1 {
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-min-microvolt = <550000>;
 				regulator-max-microvolt = <950000>;
 				regulator-ramp-delay = <12500>;
 				regulator-name = "vdd_gpu_s0";
 				regulator-enable-ramp-delay = <400>;
+				regulator-coupled-with = <&vdd_gpu_mem_s0>;
+				regulator-coupled-max-spread = <10000>;
 				regulator-state-mem {
 					regulator-off-in-suspend;
 				};
@@ -534,12 +543,15 @@  regulator-state-mem {
 			};
 
 			vdd_gpu_mem_s0: dcdc-reg5 {
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-min-microvolt = <675000>;
 				regulator-max-microvolt = <950000>;
 				regulator-ramp-delay = <12500>;
 				regulator-enable-ramp-delay = <400>;
 				regulator-name = "vdd_gpu_mem_s0";
+				regulator-coupled-with = <&vdd_gpu_s0>;
+				regulator-coupled-max-spread = <10000>;
 				regulator-state-mem {
 					regulator-off-in-suspend;
 				};