linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/4] RK3588 GPU support
@ 2024-03-25 15:37 Sebastian Reichel
  2024-03-25 15:37 ` [PATCH v1 1/4] arm64: defconfig: support Mali CSF-based GPUs Sebastian Reichel
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Sebastian Reichel @ 2024-03-25 15:37 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Boris Brezillon,
	devicetree, linux-kernel, Sebastian Reichel, kernel

Hi,

Panthor has landed in drm-misc-next including the DT bindings, so
let's add the necessary DT changes to support the GPU on RK3588.
This adds support at SoC level and support for the EVB1 as well as
the Rock 5B, which covers both variants found in RK3588 boards:

1. Having dedicated regulators for GPU core and GPU memory. This is
   handled by coupling both regulators.
2. Having a shared regulator for GPU core and GPU memory.

I prepared a branch with just the GPU DT changes (and the panthor driver
changes) based on Heiko's for-next branch:

https://gitlab.collabora.com/hardware-enablement/rockchip-3588/linux/-/commits/rk3588-gpu

Greetings,

-- Sebastian

Boris Brezillon (3):
  arm64: dts: rockchip: rk3588: Add GPU nodes
  arm64: dts: rockchip: rk3588-rock5b: Enable GPU
  arm64: dts: rockchip: rk3588-evb1: Enable GPU

Sebastian Reichel (1):
  arm64: defconfig: support Mali CSF-based GPUs

 .../boot/dts/rockchip/rk3588-evb1-v10.dts     | 12 ++++
 .../boot/dts/rockchip/rk3588-rock-5b.dts      |  6 ++
 arch/arm64/boot/dts/rockchip/rk3588s.dtsi     | 56 +++++++++++++++++++
 arch/arm64/configs/defconfig                  |  1 +
 4 files changed, 75 insertions(+)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v1 1/4] arm64: defconfig: support Mali CSF-based GPUs
  2024-03-25 15:37 [PATCH v1 0/4] RK3588 GPU support Sebastian Reichel
@ 2024-03-25 15:37 ` Sebastian Reichel
  2024-03-25 15:37 ` [PATCH v1 2/4] arm64: dts: rockchip: rk3588: Add GPU nodes Sebastian Reichel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2024-03-25 15:37 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Boris Brezillon,
	devicetree, linux-kernel, Sebastian Reichel, kernel

Enable support for Mali CSF-based GPUs, which is found on recent
ARM SoCs, such as Rockchip or Mediatek.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 2c30d617e180..65e33174f813 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -907,6 +907,7 @@ CONFIG_DRM_MESON=m
 CONFIG_DRM_PL111=m
 CONFIG_DRM_LIMA=m
 CONFIG_DRM_PANFROST=m
+CONFIG_DRM_PANTHOR=m
 CONFIG_DRM_TIDSS=m
 CONFIG_DRM_POWERVR=m
 CONFIG_FB=y
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v1 2/4] arm64: dts: rockchip: rk3588: Add GPU nodes
  2024-03-25 15:37 [PATCH v1 0/4] RK3588 GPU support Sebastian Reichel
  2024-03-25 15:37 ` [PATCH v1 1/4] arm64: defconfig: support Mali CSF-based GPUs Sebastian Reichel
@ 2024-03-25 15:37 ` Sebastian Reichel
  2024-03-25 15:37 ` [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU Sebastian Reichel
  2024-03-25 15:37 ` [PATCH v1 4/4] arm64: dts: rockchip: rk3588-evb1: " Sebastian Reichel
  3 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2024-03-25 15:37 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Boris Brezillon,
	devicetree, linux-kernel, kernel, Sebastian Reichel

From: Boris Brezillon <boris.brezillon@collabora.com>

Add Mali GPU Node to the RK3588 SoC DT including GPU clock
operating points

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

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index 87b83c87bd55..89d40cff635f 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -501,6 +501,62 @@ usb_host2_xhci: usb@fcd00000 {
 		status = "disabled";
 	};
 
+	gpu: gpu@fb000000 {
+		compatible = "rockchip,rk3588-mali", "arm,mali-valhall-csf";
+		reg = <0x0 0xfb000000 0x0 0x200000>;
+		#cooling-cells = <2>;
+		assigned-clocks = <&scmi_clk SCMI_CLK_GPU>;
+		assigned-clock-rates = <200000000>;
+		clocks = <&cru CLK_GPU>, <&cru CLK_GPU_COREGROUP>,
+			 <&cru CLK_GPU_STACKS>;
+		clock-names = "core", "coregroup", "stacks";
+		dynamic-power-coefficient = <2982>;
+		interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH 0>,
+			     <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH 0>;
+		interrupt-names = "job", "mmu", "gpu";
+		operating-points-v2 = <&gpu_opp_table>;
+		power-domains = <&power RK3588_PD_GPU>;
+		status = "disabled";
+
+		gpu_opp_table: opp-table {
+			compatible = "operating-points-v2";
+
+			opp-300000000 {
+				opp-hz = /bits/ 64 <300000000>;
+				opp-microvolt = <675000 675000 850000>;
+			};
+			opp-400000000 {
+				opp-hz = /bits/ 64 <400000000>;
+				opp-microvolt = <675000 675000 850000>;
+			};
+			opp-500000000 {
+				opp-hz = /bits/ 64 <500000000>;
+				opp-microvolt = <675000 675000 850000>;
+			};
+			opp-600000000 {
+				opp-hz = /bits/ 64 <600000000>;
+				opp-microvolt = <675000 675000 850000>;
+			};
+			opp-700000000 {
+				opp-hz = /bits/ 64 <700000000>;
+				opp-microvolt = <700000 700000 850000>;
+			};
+			opp-800000000 {
+				opp-hz = /bits/ 64 <800000000>;
+				opp-microvolt = <750000 750000 850000>;
+			};
+			opp-900000000 {
+				opp-hz = /bits/ 64 <900000000>;
+				opp-microvolt = <800000 800000 850000>;
+			};
+			opp-1000000000 {
+				opp-hz = /bits/ 64 <1000000000>;
+				opp-microvolt = <850000 850000 850000>;
+			};
+		};
+	};
+
 	pmu1grf: syscon@fd58a000 {
 		compatible = "rockchip,rk3588-pmugrf", "syscon", "simple-mfd";
 		reg = <0x0 0xfd58a000 0x0 0x10000>;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU
  2024-03-25 15:37 [PATCH v1 0/4] RK3588 GPU support Sebastian Reichel
  2024-03-25 15:37 ` [PATCH v1 1/4] arm64: defconfig: support Mali CSF-based GPUs Sebastian Reichel
  2024-03-25 15:37 ` [PATCH v1 2/4] arm64: dts: rockchip: rk3588: Add GPU nodes Sebastian Reichel
@ 2024-03-25 15:37 ` Sebastian Reichel
  2024-03-25 15:44   ` Boris Brezillon
  2024-03-25 15:37 ` [PATCH v1 4/4] arm64: dts: rockchip: rk3588-evb1: " Sebastian Reichel
  3 siblings, 1 reply; 10+ messages in thread
From: Sebastian Reichel @ 2024-03-25 15:37 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Boris Brezillon,
	devicetree, linux-kernel, kernel, Sebastian Reichel

From: Boris Brezillon <boris.brezillon@collabora.com>

Enable the Mali GPU in the Rock 5B.

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

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
index 1fe8b2a0ed75..096ee7a98b89 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -180,6 +180,11 @@ &cpu_l3 {
 	cpu-supply = <&vdd_cpu_lit_s0>;
 };
 
+&gpu {
+	mali-supply = <&vdd_gpu_s0>;
+	status = "okay";
+};
+
 &i2c0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&i2c0m2_xfer>;
@@ -470,6 +475,7 @@ rk806_dvs3_null: dvs3-null-pins {
 
 		regulators {
 			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
+				regulator-always-on;
 				regulator-boot-on;
 				regulator-min-microvolt = <550000>;
 				regulator-max-microvolt = <950000>;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v1 4/4] arm64: dts: rockchip: rk3588-evb1: Enable GPU
  2024-03-25 15:37 [PATCH v1 0/4] RK3588 GPU support Sebastian Reichel
                   ` (2 preceding siblings ...)
  2024-03-25 15:37 ` [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU Sebastian Reichel
@ 2024-03-25 15:37 ` Sebastian Reichel
  2024-03-25 15:53   ` Boris Brezillon
  3 siblings, 1 reply; 10+ messages in thread
From: Sebastian Reichel @ 2024-03-25 15:37 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Boris Brezillon,
	devicetree, linux-kernel, kernel, Sebastian Reichel

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;
 				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;
 				};
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU
  2024-03-25 15:37 ` [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU Sebastian Reichel
@ 2024-03-25 15:44   ` Boris Brezillon
  2024-03-25 15:58     ` Sebastian Reichel
  0 siblings, 1 reply; 10+ messages in thread
From: Boris Brezillon @ 2024-03-25 15:44 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Heiko Stuebner, linux-rockchip, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-kernel, kernel

On Mon, 25 Mar 2024 16:37:20 +0100
Sebastian Reichel <sebastian.reichel@collabora.com> wrote:

> From: Boris Brezillon <boris.brezillon@collabora.com>
> 
> Enable the Mali GPU in the Rock 5B.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>

I don't remember writing this patch ;-), maybe I screwed authorship at
some point, dunno.

> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> index 1fe8b2a0ed75..096ee7a98b89 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> @@ -180,6 +180,11 @@ &cpu_l3 {
>  	cpu-supply = <&vdd_cpu_lit_s0>;
>  };
>  
> +&gpu {
> +	mali-supply = <&vdd_gpu_s0>;
> +	status = "okay";
> +};
> +
>  &i2c0 {
>  	pinctrl-names = "default";
>  	pinctrl-0 = <&i2c0m2_xfer>;
> @@ -470,6 +475,7 @@ rk806_dvs3_null: dvs3-null-pins {
>  
>  		regulators {
>  			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
> +				regulator-always-on;

Hm, should we mention why the regulator is always on here?

>  				regulator-boot-on;
>  				regulator-min-microvolt = <550000>;
>  				regulator-max-microvolt = <950000>;


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 4/4] arm64: dts: rockchip: rk3588-evb1: Enable GPU
  2024-03-25 15:37 ` [PATCH v1 4/4] arm64: dts: rockchip: rk3588-evb1: " Sebastian Reichel
@ 2024-03-25 15:53   ` Boris Brezillon
  2024-03-25 16:06     ` Sebastian Reichel
  0 siblings, 1 reply; 10+ messages in thread
From: Boris Brezillon @ 2024-03-25 15:53 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Heiko Stuebner, linux-rockchip, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-kernel, kernel

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;
>  				};


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU
  2024-03-25 15:44   ` Boris Brezillon
@ 2024-03-25 15:58     ` Sebastian Reichel
  2024-03-25 17:01       ` Boris Brezillon
  0 siblings, 1 reply; 10+ messages in thread
From: Sebastian Reichel @ 2024-03-25 15:58 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Heiko Stuebner, linux-rockchip, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-kernel, kernel

[-- Attachment #1: Type: text/plain, Size: 1748 bytes --]

Hi,

On Mon, Mar 25, 2024 at 04:44:41PM +0100, Boris Brezillon wrote:
> On Mon, 25 Mar 2024 16:37:20 +0100
> Sebastian Reichel <sebastian.reichel@collabora.com> wrote:
> 
> > From: Boris Brezillon <boris.brezillon@collabora.com>
> > 
> > Enable the Mali GPU in the Rock 5B.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> 
> I don't remember writing this patch ;-), maybe I screwed authorship at
> some point, dunno.

mh, I cherry-picked the DT patches from your branch before
cleaning them up.

> > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > ---
> >  arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > index 1fe8b2a0ed75..096ee7a98b89 100644
> > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > @@ -180,6 +180,11 @@ &cpu_l3 {
> >  	cpu-supply = <&vdd_cpu_lit_s0>;
> >  };
> >  
> > +&gpu {
> > +	mali-supply = <&vdd_gpu_s0>;
> > +	status = "okay";
> > +};
> > +
> >  &i2c0 {
> >  	pinctrl-names = "default";
> >  	pinctrl-0 = <&i2c0m2_xfer>;
> > @@ -470,6 +475,7 @@ rk806_dvs3_null: dvs3-null-pins {
> >  
> >  		regulators {
> >  			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
> > +				regulator-always-on;
> 
> Hm, should we mention why the regulator is always on here?

In case of the EVB1 it's needed because the generic coupler driver
cannot handle regulators that are not always on. I'm not sure why
it was added for the Rock 5B. I will check if it works without that
flag.

Greetings,

-- Sebastian

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 4/4] arm64: dts: rockchip: rk3588-evb1: Enable GPU
  2024-03-25 15:53   ` Boris Brezillon
@ 2024-03-25 16:06     ` Sebastian Reichel
  0 siblings, 0 replies; 10+ messages in thread
From: Sebastian Reichel @ 2024-03-25 16:06 UTC (permalink / raw)
  To: Boris Brezillon
  Cc: Heiko Stuebner, linux-rockchip, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-kernel, kernel

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU
  2024-03-25 15:58     ` Sebastian Reichel
@ 2024-03-25 17:01       ` Boris Brezillon
  0 siblings, 0 replies; 10+ messages in thread
From: Boris Brezillon @ 2024-03-25 17:01 UTC (permalink / raw)
  To: Sebastian Reichel
  Cc: Heiko Stuebner, linux-rockchip, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, devicetree, linux-kernel, kernel

On Mon, 25 Mar 2024 16:58:47 +0100
Sebastian Reichel <sebastian.reichel@collabora.com> wrote:

> Hi,
> 
> On Mon, Mar 25, 2024 at 04:44:41PM +0100, Boris Brezillon wrote:
> > On Mon, 25 Mar 2024 16:37:20 +0100
> > Sebastian Reichel <sebastian.reichel@collabora.com> wrote:
> >   
> > > From: Boris Brezillon <boris.brezillon@collabora.com>
> > > 
> > > Enable the Mali GPU in the Rock 5B.
> > > 
> > > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>  
> > 
> > I don't remember writing this patch ;-), maybe I screwed authorship at
> > some point, dunno.  
> 
> mh, I cherry-picked the DT patches from your branch before
> cleaning them up.

Yep,  I probably wrote this patch and asked someone else to test. I
couldn't find any traces of this patch where I'm not flagged as the
author in any of my local branches.

> 
> > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> > > ---
> > >  arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts | 6 ++++++
> > >  1 file changed, 6 insertions(+)
> > > 
> > > diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > index 1fe8b2a0ed75..096ee7a98b89 100644
> > > --- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > +++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
> > > @@ -180,6 +180,11 @@ &cpu_l3 {
> > >  	cpu-supply = <&vdd_cpu_lit_s0>;
> > >  };
> > >  
> > > +&gpu {
> > > +	mali-supply = <&vdd_gpu_s0>;
> > > +	status = "okay";
> > > +};
> > > +
> > >  &i2c0 {
> > >  	pinctrl-names = "default";
> > >  	pinctrl-0 = <&i2c0m2_xfer>;
> > > @@ -470,6 +475,7 @@ rk806_dvs3_null: dvs3-null-pins {
> > >  
> > >  		regulators {
> > >  			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
> > > +				regulator-always-on;  
> > 
> > Hm, should we mention why the regulator is always on here?  
> 
> In case of the EVB1 it's needed because the generic coupler driver
> cannot handle regulators that are not always on.

Ah, okay. I thought I added that for a different reason.

> I'm not sure why
> it was added for the Rock 5B. I will check if it works without that
> flag.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-03-25 17:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 15:37 [PATCH v1 0/4] RK3588 GPU support Sebastian Reichel
2024-03-25 15:37 ` [PATCH v1 1/4] arm64: defconfig: support Mali CSF-based GPUs Sebastian Reichel
2024-03-25 15:37 ` [PATCH v1 2/4] arm64: dts: rockchip: rk3588: Add GPU nodes Sebastian Reichel
2024-03-25 15:37 ` [PATCH v1 3/4] arm64: dts: rockchip: rk3588-rock5b: Enable GPU Sebastian Reichel
2024-03-25 15:44   ` Boris Brezillon
2024-03-25 15:58     ` Sebastian Reichel
2024-03-25 17:01       ` Boris Brezillon
2024-03-25 15:37 ` [PATCH v1 4/4] arm64: dts: rockchip: rk3588-evb1: " Sebastian Reichel
2024-03-25 15:53   ` Boris Brezillon
2024-03-25 16:06     ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).