linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel
@ 2021-02-25 13:33 Heiko Stuebner
  2021-02-25 13:33 ` [PATCH 2/3] arm64: dts: rockchip: used range'd gpu opps on rk3399 Heiko Stuebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Heiko Stuebner @ 2021-02-25 13:33 UTC (permalink / raw)
  To: heiko
  Cc: Heiko Stuebner, linux-kernel, linux-rockchip, finley.xiao,
	cmuellner, linux-arm-kernel

From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>

The vendor-kernel did increase the minimum voltage for some low frequency
opps to 825mV citing stability reasons. So do that in mainline as well
and also use the ranged notation the vendor-kernel switched to, to give
a bit more flexibility for different regulator setups.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 32 ++++++++++----------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
index d6f1095abb04..20b0d60f7ee3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
@@ -10,28 +10,28 @@ cluster0_opp: opp-table0 {
 
 		opp00 {
 			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 			clock-latency-ns = <40000>;
 		};
 		opp01 {
 			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 		};
 		opp02 {
 			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <850000>;
+			opp-microvolt = <850000 850000 1250000>;
 		};
 		opp03 {
 			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <925000>;
+			opp-microvolt = <925000 925000 1250000>;
 		};
 		opp04 {
 			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <1000000>;
+			opp-microvolt = <1000000 1000000 1250000>;
 		};
 		opp05 {
 			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1125000>;
+			opp-microvolt = <1125000 1125000 1250000>;
 		};
 	};
 
@@ -41,36 +41,36 @@ cluster1_opp: opp-table1 {
 
 		opp00 {
 			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 			clock-latency-ns = <40000>;
 		};
 		opp01 {
 			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000 825000 1250000>;
 		};
 		opp02 {
 			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1250000>;
 		};
 		opp03 {
 			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <875000>;
+			opp-microvolt = <875000 875000 1250000>;
 		};
 		opp04 {
 			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <950000>;
+			opp-microvolt = <950000 950000 1250000>;
 		};
 		opp05 {
 			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1025000>;
+			opp-microvolt = <1025000 1025000 1250000>;
 		};
 		opp06 {
 			opp-hz = /bits/ 64 <1608000000>;
-			opp-microvolt = <1100000>;
+			opp-microvolt = <1100000 1100000 1250000>;
 		};
 		opp07 {
 			opp-hz = /bits/ 64 <1800000000>;
-			opp-microvolt = <1200000>;
+			opp-microvolt = <1200000 1200000 1250000>;
 		};
 	};
 
@@ -79,11 +79,11 @@ gpu_opp_table: opp-table2 {
 
 		opp00 {
 			opp-hz = /bits/ 64 <200000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000>;
 		};
 		opp01 {
 			opp-hz = /bits/ 64 <297000000>;
-			opp-microvolt = <800000>;
+			opp-microvolt = <825000>;
 		};
 		opp02 {
 			opp-hz = /bits/ 64 <400000000>;
-- 
2.29.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 2/3] arm64: dts: rockchip: used range'd gpu opps on rk3399
  2021-02-25 13:33 [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel Heiko Stuebner
@ 2021-02-25 13:33 ` Heiko Stuebner
  2021-02-25 13:33 ` [PATCH 3/3] arm64: dts: rockchip: drop separate opp table on rk3399-puma Heiko Stuebner
  2021-03-21 20:14 ` [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2021-02-25 13:33 UTC (permalink / raw)
  To: heiko
  Cc: Heiko Stuebner, linux-kernel, linux-rockchip, finley.xiao,
	cmuellner, linux-arm-kernel

From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>

Similar to the cpu opps, also use opps with a range on the gpu.
(min, preferred, max). The voltage just needs to be higher than
the minimum and this allows the regulator more freedom if it
can't provide the exact voltage specified, but just say 5mV higher,
as can be seen on rk3399-puma which fails to scale panfrost voltages
nearly completely.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
index 20b0d60f7ee3..da41cd81ebb7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi
@@ -79,27 +79,27 @@ gpu_opp_table: opp-table2 {
 
 		opp00 {
 			opp-hz = /bits/ 64 <200000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1150000>;
 		};
 		opp01 {
 			opp-hz = /bits/ 64 <297000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1150000>;
 		};
 		opp02 {
 			opp-hz = /bits/ 64 <400000000>;
-			opp-microvolt = <825000>;
+			opp-microvolt = <825000 825000 1150000>;
 		};
 		opp03 {
 			opp-hz = /bits/ 64 <500000000>;
-			opp-microvolt = <875000>;
+			opp-microvolt = <875000 875000 1150000>;
 		};
 		opp04 {
 			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <925000>;
+			opp-microvolt = <925000 925000 1150000>;
 		};
 		opp05 {
 			opp-hz = /bits/ 64 <800000000>;
-			opp-microvolt = <1100000>;
+			opp-microvolt = <1100000 1100000 1150000>;
 		};
 	};
 };
-- 
2.29.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* [PATCH 3/3] arm64: dts: rockchip: drop separate opp table on rk3399-puma
  2021-02-25 13:33 [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel Heiko Stuebner
  2021-02-25 13:33 ` [PATCH 2/3] arm64: dts: rockchip: used range'd gpu opps on rk3399 Heiko Stuebner
@ 2021-02-25 13:33 ` Heiko Stuebner
  2021-03-21 20:14 ` [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2021-02-25 13:33 UTC (permalink / raw)
  To: heiko
  Cc: Heiko Stuebner, linux-kernel, linux-rockchip, finley.xiao,
	cmuellner, linux-arm-kernel

From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>

We're using OPPs with a range now, so the fact that the cpu regulator
on puma can't provide the needed 5mV steps requested in the minimal
voltage values can be handled automatically by the opp framework.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
---
 arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi | 51 -------------------
 1 file changed, 51 deletions(-)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
index 4660416c8f38..6ae9032d85f4 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
@@ -21,57 +21,6 @@ module_led: led-0 {
 		};
 	};
 
-	/*
-	 * Overwrite the opp-table for CPUB as this board uses a different
-	 * regulator (FAN53555) that only allows 10mV steps and therefore
-	 * can't reach the operation point target voltages from rk3399-opp.dtsi
-	 */
-	/delete-node/ opp-table1;
-	cluster1_opp: opp-table1 {
-		compatible = "operating-points-v2";
-		opp-shared;
-
-		opp00 {
-			opp-hz = /bits/ 64 <408000000>;
-			opp-microvolt = <800000>;
-			clock-latency-ns = <40000>;
-		};
-		opp01 {
-			opp-hz = /bits/ 64 <600000000>;
-			opp-microvolt = <800000>;
-		};
-		opp02 {
-			opp-hz = /bits/ 64 <816000000>;
-			opp-microvolt = <830000>;
-			opp-suspend;
-		};
-		opp03 {
-			opp-hz = /bits/ 64 <1008000000>;
-			opp-microvolt = <880000>;
-		};
-		opp04 {
-			opp-hz = /bits/ 64 <1200000000>;
-			opp-microvolt = <950000>;
-		};
-		opp05 {
-			opp-hz = /bits/ 64 <1416000000>;
-			opp-microvolt = <1030000>;
-		};
-		opp06 {
-			opp-hz = /bits/ 64 <1608000000>;
-			opp-microvolt = <1100000>;
-		};
-		opp07 {
-			opp-hz = /bits/ 64 <1800000000>;
-			opp-microvolt = <1200000>;
-		};
-		opp08 {
-			opp-hz = /bits/ 64 <1992000000>;
-			opp-microvolt = <1230000>;
-			turbo-mode;
-		};
-	};
-
 	clkin_gmac: external-gmac-clock {
 		compatible = "fixed-clock";
 		clock-frequency = <125000000>;
-- 
2.29.2


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

* Re: [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel
  2021-02-25 13:33 [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel Heiko Stuebner
  2021-02-25 13:33 ` [PATCH 2/3] arm64: dts: rockchip: used range'd gpu opps on rk3399 Heiko Stuebner
  2021-02-25 13:33 ` [PATCH 3/3] arm64: dts: rockchip: drop separate opp table on rk3399-puma Heiko Stuebner
@ 2021-03-21 20:14 ` Heiko Stuebner
  2 siblings, 0 replies; 4+ messages in thread
From: Heiko Stuebner @ 2021-03-21 20:14 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: linux-rockchip, Heiko Stuebner, linux-kernel, cmuellner,
	finley.xiao, linux-arm-kernel

On Thu, 25 Feb 2021 14:33:20 +0100, Heiko Stuebner wrote:
> The vendor-kernel did increase the minimum voltage for some low frequency
> opps to 825mV citing stability reasons. So do that in mainline as well
> and also use the ranged notation the vendor-kernel switched to, to give
> a bit more flexibility for different regulator setups.

Applied, thanks!

[1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel
      commit: 6daae8ff20b8e9d67c282ba37c63e1a7ee3c2206
[2/3] arm64: dts: rockchip: used range'd gpu opps on rk3399
      commit: 6d5989a36e60614e12949c6c2dac368b380bf2ca
[3/3] arm64: dts: rockchip: drop separate opp table on rk3399-puma
      commit: b417764daa2d7e1325fe926144ffcb4b2bbd8d25

Best regards,
-- 
Heiko Stuebner <heiko@sntech.de>

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

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

end of thread, other threads:[~2021-03-21 20:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-25 13:33 [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel Heiko Stuebner
2021-02-25 13:33 ` [PATCH 2/3] arm64: dts: rockchip: used range'd gpu opps on rk3399 Heiko Stuebner
2021-02-25 13:33 ` [PATCH 3/3] arm64: dts: rockchip: drop separate opp table on rk3399-puma Heiko Stuebner
2021-03-21 20:14 ` [PATCH 1/3] arm64: dts: rockchip: synchronize rk3399 opps with vendor kernel Heiko Stuebner

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).