* RE: [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
@ 2024-03-18 4:39 Amit Singh Tomar
2024-03-18 10:51 ` Andre Przywara
0 siblings, 1 reply; 7+ messages in thread
From: Amit Singh Tomar @ 2024-03-18 4:39 UTC (permalink / raw)
To: Andre Przywara, Yangtao Li, Viresh Kumar, Nishanth Menon,
Stephen Boyd, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, Rafael J . Wysocki
Cc: linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Brandon Cheo Fusi, Martin Botka, Martin Botka
Hi,
-----Original Message-----
From: linux-arm-kernel <linux-arm-kernel-bounces@lists.infradead.org> On Behalf Of Andre Przywara
Sent: Monday, March 18, 2024 6:42 AM
To: Yangtao Li <tiny.windzz@gmail.com>; Viresh Kumar <vireshk@kernel.org>; Nishanth Menon <nm@ti.com>; Stephen Boyd <sboyd@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>; Chen-Yu Tsai <wens@csie.org>; Jernej Skrabec <jernej.skrabec@gmail.com>; Samuel Holland <samuel@sholland.org>; Rafael J . Wysocki <rafael@kernel.org>
Cc: linux-pm@vger.kernel.org; devicetree@vger.kernel.org; linux-sunxi@lists.linux.dev; linux-arm-kernel@lists.infradead.org; Brandon Cheo Fusi <fusibrandon13@gmail.com>; Martin Botka <martin.botka@somainline.org>; Martin Botka <martin.botka1@gmail.com>
Subject: [EXTERNAL] [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
With the DT bindings now describing the format of the CPU OPP tables, we can include the OPP table in each board's .dts file, and specify the CPU power supply.
This allows to enable DVFS, and get up to 50% of performance benefit in the highest OPP, or up to 60% power savings in the lowest OPP, compared to the fixed 1GHz @ 1.0V OPP we are running in by default
at the moment.
[Amit] Could you please elaborate, what test were run to see 50 % performance benefits?
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
.../boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 5 +++++
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 5 +++++
arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts | 5 +++++
.../arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts | 5 +++++ arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 5 +++++
.../boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts | 5 +++++
6 files changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
index 1fed2b46cfe87..86e58d1ed23ea 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -62,6 +63,10 @@ wifi_pwrseq: wifi-pwrseq {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&mmc0 {
vmmc-supply = <®_dldo1>;
/* Card detection pin is not connected */ diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
index b5d713926a341..a360d8567f955 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -6,12 +6,17 @@
/dts-v1/;
#include "sun50i-h616-orangepi-zero.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
/ {
model = "OrangePi Zero2";
compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616"; };
+&cpu0 {
+ cpu-supply = <®_dcdca>;
+};
+
&emac0 {
allwinner,rx-delay-ps = <3100>;
allwinner,tx-delay-ps = <700>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
index 959b6fd18483b..26d25b5b59e0f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -32,6 +33,10 @@ reg_vcc5v: vcc5v {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdca>;
+};
+
&ehci0 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
index 21ca1977055d9..6a4f0da972330 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -53,6 +54,10 @@ reg_vcc3v3: vcc3v3 {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&ehci1 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
index b3b1b8692125f..e1cd7572a14ce 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
@@ -6,12 +6,17 @@
/dts-v1/;
#include "sun50i-h616-orangepi-zero.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
/ {
model = "OrangePi Zero3";
compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618"; };
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&emac0 {
allwinner,tx-delay-ps = <700>;
phy-mode = "rgmii-rxid";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
index 8ea1fd41aebaa..2dd178a164fbe 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -41,6 +42,10 @@ reg_vcc3v3: vcc3v3 {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&ehci0 {
status = "okay";
};
--
2.35.8
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
2024-03-18 4:39 [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards Amit Singh Tomar
@ 2024-03-18 10:51 ` Andre Przywara
2024-03-18 19:11 ` [EXTERNAL] " Amit Singh Tomar
0 siblings, 1 reply; 7+ messages in thread
From: Andre Przywara @ 2024-03-18 10:51 UTC (permalink / raw)
To: Amit Singh Tomar
Cc: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Rafael J . Wysocki,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Brandon Cheo Fusi, Martin Botka, Martin Botka
On Mon, 18 Mar 2024 04:39:46 +0000
Amit Singh Tomar <amitsinght@marvell.com> wrote:
Hi Amit,
can you please try to reply using the standard quoted line prefix ('>'),
and cut the header? I almost missed your question in here.
> Hi,
>
> -----Original Message-----
> From: linux-arm-kernel <linux-arm-kernel-bounces@lists.infradead.org> On Behalf Of Andre Przywara
> Sent: Monday, March 18, 2024 6:42 AM
> To: Yangtao Li <tiny.windzz@gmail.com>; Viresh Kumar <vireshk@kernel.org>; Nishanth Menon <nm@ti.com>; Stephen Boyd <sboyd@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>; Chen-Yu Tsai <wens@csie.org>; Jernej Skrabec <jernej.skrabec@gmail.com>; Samuel Holland <samuel@sholland.org>; Rafael J . Wysocki <rafael@kernel.org>
> Cc: linux-pm@vger.kernel.org; devicetree@vger.kernel.org; linux-sunxi@lists.linux.dev; linux-arm-kernel@lists.infradead.org; Brandon Cheo Fusi <fusibrandon13@gmail.com>; Martin Botka <martin.botka@somainline.org>; Martin Botka <martin.botka1@gmail.com>
> Subject: [EXTERNAL] [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
>
>
> With the DT bindings now describing the format of the CPU OPP tables, we can include the OPP table in each board's .dts file, and specify the CPU power supply.
> This allows to enable DVFS, and get up to 50% of performance benefit in the highest OPP, or up to 60% power savings in the lowest OPP, compared to the fixed 1GHz @ 1.0V OPP we are running in by default
> at the moment.
> [Amit] Could you please elaborate, what test were run to see 50 % performance benefits?
Currently all H616 boards running mainline firmware and kernels run at a
fixed 1GHz CPU clock frequency. If you happen to have a good SoC (bin 1 or
3), this patchset will allow you to run at 1.5 GHz, which is 50% faster.
So anything that scales with CPU frequency should run much quicker.
Cheers,
Andre
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
> .../boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 5 +++++
> arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 5 +++++
> arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts | 5 +++++
> .../arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts | 5 +++++ arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 5 +++++
> .../boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts | 5 +++++
> 6 files changed, 30 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
> index 1fed2b46cfe87..86e58d1ed23ea 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
> @@ -6,6 +6,7 @@
> /dts-v1/;
>
> #include "sun50i-h616.dtsi"
> +#include "sun50i-h616-cpu-opp.dtsi"
>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> @@ -62,6 +63,10 @@ wifi_pwrseq: wifi-pwrseq {
> };
> };
>
> +&cpu0 {
> + cpu-supply = <®_dcdc2>;
> +};
> +
> &mmc0 {
> vmmc-supply = <®_dldo1>;
> /* Card detection pin is not connected */ diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
> index b5d713926a341..a360d8567f955 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
> @@ -6,12 +6,17 @@
> /dts-v1/;
>
> #include "sun50i-h616-orangepi-zero.dtsi"
> +#include "sun50i-h616-cpu-opp.dtsi"
>
> / {
> model = "OrangePi Zero2";
> compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616"; };
>
> +&cpu0 {
> + cpu-supply = <®_dcdca>;
> +};
> +
> &emac0 {
> allwinner,rx-delay-ps = <3100>;
> allwinner,tx-delay-ps = <700>;
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
> index 959b6fd18483b..26d25b5b59e0f 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
> @@ -6,6 +6,7 @@
> /dts-v1/;
>
> #include "sun50i-h616.dtsi"
> +#include "sun50i-h616-cpu-opp.dtsi"
>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> @@ -32,6 +33,10 @@ reg_vcc5v: vcc5v {
> };
> };
>
> +&cpu0 {
> + cpu-supply = <®_dcdca>;
> +};
> +
> &ehci0 {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> index 21ca1977055d9..6a4f0da972330 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
> @@ -6,6 +6,7 @@
> /dts-v1/;
>
> #include "sun50i-h616.dtsi"
> +#include "sun50i-h616-cpu-opp.dtsi"
>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> @@ -53,6 +54,10 @@ reg_vcc3v3: vcc3v3 {
> };
> };
>
> +&cpu0 {
> + cpu-supply = <®_dcdc2>;
> +};
> +
> &ehci1 {
> status = "okay";
> };
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
> index b3b1b8692125f..e1cd7572a14ce 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
> @@ -6,12 +6,17 @@
> /dts-v1/;
>
> #include "sun50i-h616-orangepi-zero.dtsi"
> +#include "sun50i-h616-cpu-opp.dtsi"
>
> / {
> model = "OrangePi Zero3";
> compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618"; };
>
> +&cpu0 {
> + cpu-supply = <®_dcdc2>;
> +};
> +
> &emac0 {
> allwinner,tx-delay-ps = <700>;
> phy-mode = "rgmii-rxid";
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
> index 8ea1fd41aebaa..2dd178a164fbe 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
> @@ -6,6 +6,7 @@
> /dts-v1/;
>
> #include "sun50i-h616.dtsi"
> +#include "sun50i-h616-cpu-opp.dtsi"
>
> #include <dt-bindings/gpio/gpio.h>
> #include <dt-bindings/interrupt-controller/arm-gic.h>
> @@ -41,6 +42,10 @@ reg_vcc3v3: vcc3v3 {
> };
> };
>
> +&cpu0 {
> + cpu-supply = <®_dcdc2>;
> +};
> +
> &ehci0 {
> status = "okay";
> };
> --
> 2.35.8
>
>
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [EXTERNAL] Re: [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
2024-03-18 10:51 ` Andre Przywara
@ 2024-03-18 19:11 ` Amit Singh Tomar
2024-03-18 23:03 ` Andre Przywara
0 siblings, 1 reply; 7+ messages in thread
From: Amit Singh Tomar @ 2024-03-18 19:11 UTC (permalink / raw)
To: Andre Przywara
Cc: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Rafael J . Wysocki,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Brandon Cheo Fusi, Martin Botka, Martin Botka
>>
>> -----Original Message-----
>> From: linux-arm-kernel <linux-arm-kernel-bounces@lists.infradead.org> On Behalf Of Andre Przywara
>> Sent: Monday, March 18, 2024 6:42 AM
>> To: Yangtao Li <tiny.windzz@gmail.com>; Viresh Kumar <vireshk@kernel.org>; Nishanth Menon <nm@ti.com>; Stephen Boyd <sboyd@kernel.org>; Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>; Conor Dooley <conor+dt@kernel.org>; Chen-Yu Tsai <wens@csie.org>; Jernej Skrabec <jernej.skrabec@gmail.com>; Samuel Holland <samuel@sholland.org>; Rafael J . Wysocki <rafael@kernel.org>
>> Cc: linux-pm@vger.kernel.org; devicetree@vger.kernel.org; linux-sunxi@lists.linux.dev; linux-arm-kernel@lists.infradead.org; Brandon Cheo Fusi <fusibrandon13@gmail.com>; Martin Botka <martin.botka@somainline.org>; Martin Botka <martin.botka1@gmail.com>
>> Subject: [EXTERNAL] [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
>>
>>
>> With the DT bindings now describing the format of the CPU OPP tables, we can include the OPP table in each board's .dts file, and specify the CPU power supply.
>> This allows to enable DVFS, and get up to 50% of performance benefit in the highest OPP, or up to 60% power savings in the lowest OPP, compared to the fixed 1GHz @ 1.0V OPP we are running in by default
>> at the moment.
>> [Amit] Could you please elaborate, what test were run to see 50 % performance benefits?
>
> Currently all H616 boards running mainline firmware and kernels run at a
> fixed 1GHz CPU clock frequency. If you happen to have a good SoC (bin 1 or
> 3), this patchset will allow you to run at 1.5 GHz, which is 50% faster.
> So anything that scales with CPU frequency should run much quicker.
>
Okay, it would be interesting to see results of some benchmark here.
Thanks
-Amit
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [EXTERNAL] Re: [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
2024-03-18 19:11 ` [EXTERNAL] " Amit Singh Tomar
@ 2024-03-18 23:03 ` Andre Przywara
2024-03-19 19:27 ` Amit Singh Tomar
0 siblings, 1 reply; 7+ messages in thread
From: Andre Przywara @ 2024-03-18 23:03 UTC (permalink / raw)
To: Amit Singh Tomar
Cc: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Rafael J . Wysocki,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Brandon Cheo Fusi, Martin Botka, Martin Botka
On Tue, 19 Mar 2024 00:41:33 +0530
Amit Singh Tomar <amitsinght@marvell.com> wrote:
Hi,
> >>
> >> With the DT bindings now describing the format of the CPU OPP tables, we can include the OPP table in each board's .dts file, and specify the CPU power supply.
> >> This allows to enable DVFS, and get up to 50% of performance benefit in the highest OPP, or up to 60% power savings in the lowest OPP, compared to the fixed 1GHz @ 1.0V OPP we are running in by default
> >> at the moment.
> >> [Amit] Could you please elaborate, what test were run to see 50 % performance benefits?
> >
> > Currently all H616 boards running mainline firmware and kernels run at a
> > fixed 1GHz CPU clock frequency. If you happen to have a good SoC (bin 1 or
> > 3), this patchset will allow you to run at 1.5 GHz, which is 50% faster.
> > So anything that scales with CPU frequency should run much quicker.
> >
> Okay, it would be interesting to see results of some benchmark here.
But why? This is not a performance optimisation, it's adding a missing
feature, because the CPU was locked to 1 GHz before, for safety
reasons, due to missing thermal and DVFS capability. Now it's able to
run at up to 1.5 GHz, as specified.
If you are upset about the bold claim, I can just remove it from the
commit message, it was just a heads up that we were leaving a lot of
performance on the table at the moment.
Posting absolute performance numbers is a tricky subject, legally, so
please run your own: http://www.netlib.org/benchmark/linpackc.new
$ musl-gcc -s -static -Ofast -o linpack linpack.c -lm -march=native -fno-math-errno -funsafe-math-optimizations
$ gcc --version
gcc (Debian 12.2.0-14) 12.2.0
# echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
# echo 1008000 > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed
$ ./linpack
# echo performance > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
$ ./linpack
$ dc -e '3k $high $low /p'
1.498
Cheers,
Andre
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
2024-03-18 23:03 ` Andre Przywara
@ 2024-03-19 19:27 ` Amit Singh Tomar
2024-03-19 22:48 ` Andre Przywara
0 siblings, 1 reply; 7+ messages in thread
From: Amit Singh Tomar @ 2024-03-19 19:27 UTC (permalink / raw)
To: Andre Przywara
Cc: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Rafael J . Wysocki,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Brandon Cheo Fusi, Martin Botka, Martin Botka
Hi,
>> Okay, it would be interesting to see results of some benchmark here.
>
> But why? This is not a performance optimisation, it's adding a missing
> feature, because the CPU was locked to 1 GHz before, for safety
> reasons, due to missing thermal and DVFS capability. Now it's able to
> run at up to 1.5 GHz, as specified.
I completely understand, it's not intended for performance optimization.
> If you are upset about the bold claim, I can just remove it from the
> commit message, it was just a heads up that we were leaving a lot of
> performance on the table at the moment.
I was merely curious about it, not upset. It could certainly enhance
aspects such as memory bandwidth, but perhaps not to the extent as
suggested. Therefore, rephrasing the commit message should suffice.
Thanks
-Amit
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
2024-03-19 19:27 ` Amit Singh Tomar
@ 2024-03-19 22:48 ` Andre Przywara
0 siblings, 0 replies; 7+ messages in thread
From: Andre Przywara @ 2024-03-19 22:48 UTC (permalink / raw)
To: Amit Singh Tomar
Cc: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Rafael J . Wysocki,
linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
linux-sunxi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
Brandon Cheo Fusi, Martin Botka, Martin Botka
On Wed, 20 Mar 2024 00:57:22 +0530
Amit Singh Tomar <amitsinght@marvell.com> wrote:
Hi,
> >> Okay, it would be interesting to see results of some benchmark here.
> >
> > But why? This is not a performance optimisation, it's adding a missing
> > feature, because the CPU was locked to 1 GHz before, for safety
> > reasons, due to missing thermal and DVFS capability. Now it's able to
> > run at up to 1.5 GHz, as specified.
> I completely understand, it's not intended for performance optimization.
>
> > If you are upset about the bold claim, I can just remove it from the
> > commit message, it was just a heads up that we were leaving a lot of
> > performance on the table at the moment.
> I was merely curious about it, not upset. It could certainly enhance
> aspects such as memory bandwidth,
Of all the things I would expect the memory bandwidth to stay the same,
as the clock rate of the memory controller did not change.
> but perhaps not to the extent as
> suggested. Therefore, rephrasing the commit message should suffice.
I can certainly do that, but you probably missed that small little
number at the end of my benchmark instructions. That tells you that I
indeed measured a 49.8 % performance uplift with the linpack benchmark.
And I would expect anything similarly CPU bound to react in the same
fashion. Please try it yourself, you don't even need this particular
piece of hardware, just some machine with working cpufreq.
Cheers,
Andre
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 0/8] cpufreq: sun50i: Add Allwinner H616 support
@ 2024-03-18 1:12 Andre Przywara
2024-03-18 1:12 ` [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards Andre Przywara
0 siblings, 1 reply; 7+ messages in thread
From: Andre Przywara @ 2024-03-18 1:12 UTC (permalink / raw)
To: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-sunxi, linux-arm-kernel,
Brandon Cheo Fusi, Martin Botka, Martin Botka, Mark Rutland,
Lorenzo Pieralisi, Sudeep Holla
This series adds cpufreq support for the Allwinner H616 SoC.
This v2 is quite some rework compared to Martin's original series from
about half a year ago[1].
The various H616 chips are rated into different speedbins at the factory,
the bin index is then burned into the efuses. This is very similar to the
H6, though the location of the speedbin fuse and its encoding differs.
Also the die revision has a say here, we can derive this from the SoC ID,
already provided by TF-A through the SMCCC SoC ID interface.
On top of that not all chips are qualified to reach the full 1.5GHz,
and the BSP kernel describes different OPPs for each speedbin. This
requires to add support for the opp-supported-hw DT property, to be able
to describe those requirements properly.
Patch 1/8 exports the SoC ID function, so that we can call it from our
driver. Patch 2/8 blocks the affected SoCs from the generic DT cpufreq
driver, patch 3/8 adds the DT binding documentation.
Patch 4/8 refactors the existing speedbin determination for the H6, to
be able to plug in the H616 version later more easily.
Patch 5/8 adds support for the opp-supported-hw property. This is done
in a generic way, so it's usable for other SoCs as well, and the code
will figure out if the current DT requires use of this feature.
Patch 6/8 then eventually adds the H616 bits to the driver, and ties
that to the new compatible string.
Patch 7/8 add the CPU OPP table as a .dtsi to the DT directory, the
values in there were taken from the BSP source.
Patch 8/8 then enables the OPPs for all boards we have DTs for.
Please have a look, especially patch 5/8 might need some discussion.
This is based on v6.8, with the THS series on top, which should reach
mainline in the next days. I plan to send a rebased version after -rc1,
but wanted to start the discussion early.
Cheers,
Andre
[1] https://lore.kernel.org/linux-sunxi/20230904-cpufreq-h616-v1-0-b8842e525c43@somainline.org/T/#u
Andre Przywara (2):
cpufreq: sun50i: Add support for opp_supported_hw
arm64: dts: allwinner: h616: enable DVFS for all boards
Brandon Cheo Fusi (1):
cpufreq: sun50i: Refactor speed bin decoding
Martin Botka (5):
firmware: smccc: Export revision soc_id function
cpufreq: dt-platdev: Blocklist Allwinner H616/618 SoCs
dt-bindings: opp: Describe H616 OPPs and opp-supported-hw
cpufreq: sun50i: Add H616 support
arm64: dts: allwinner: h616: Add CPU OPPs table
.../allwinner,sun50i-h6-operating-points.yaml | 89 +++++----
.../sun50i-h616-bigtreetech-cb1.dtsi | 5 +
.../dts/allwinner/sun50i-h616-cpu-opp.dtsi | 138 +++++++++++++
.../allwinner/sun50i-h616-orangepi-zero2.dts | 5 +
.../dts/allwinner/sun50i-h616-x96-mate.dts | 5 +
.../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 4 +
.../allwinner/sun50i-h618-orangepi-zero2w.dts | 5 +
.../allwinner/sun50i-h618-orangepi-zero3.dts | 5 +
.../sun50i-h618-transpeed-8k618-t.dts | 5 +
drivers/cpufreq/cpufreq-dt-platdev.c | 3 +
drivers/cpufreq/sun50i-cpufreq-nvmem.c | 189 +++++++++++++++---
drivers/firmware/smccc/smccc.c | 1 +
12 files changed, 379 insertions(+), 75 deletions(-)
create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-cpu-opp.dtsi
--
2.35.8
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards
2024-03-18 1:12 [PATCH v2 0/8] cpufreq: sun50i: Add Allwinner H616 support Andre Przywara
@ 2024-03-18 1:12 ` Andre Przywara
0 siblings, 0 replies; 7+ messages in thread
From: Andre Przywara @ 2024-03-18 1:12 UTC (permalink / raw)
To: Yangtao Li, Viresh Kumar, Nishanth Menon, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
Jernej Skrabec, Samuel Holland, Rafael J . Wysocki
Cc: linux-pm, devicetree, linux-sunxi, linux-arm-kernel,
Brandon Cheo Fusi, Martin Botka, Martin Botka
With the DT bindings now describing the format of the CPU OPP tables, we
can include the OPP table in each board's .dts file, and specify the CPU
power supply.
This allows to enable DVFS, and get up to 50% of performance benefit in
the highest OPP, or up to 60% power savings in the lowest OPP, compared
to the fixed 1GHz @ 1.0V OPP we are running in by default at the moment.
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
.../boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi | 5 +++++
arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 5 +++++
arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts | 5 +++++
.../arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts | 5 +++++
arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 5 +++++
.../boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts | 5 +++++
6 files changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
index 1fed2b46cfe87..86e58d1ed23ea 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-bigtreetech-cb1.dtsi
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -62,6 +63,10 @@ wifi_pwrseq: wifi-pwrseq {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&mmc0 {
vmmc-supply = <®_dldo1>;
/* Card detection pin is not connected */
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
index b5d713926a341..a360d8567f955 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
@@ -6,12 +6,17 @@
/dts-v1/;
#include "sun50i-h616-orangepi-zero.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
/ {
model = "OrangePi Zero2";
compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
};
+&cpu0 {
+ cpu-supply = <®_dcdca>;
+};
+
&emac0 {
allwinner,rx-delay-ps = <3100>;
allwinner,tx-delay-ps = <700>;
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
index 959b6fd18483b..26d25b5b59e0f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -32,6 +33,10 @@ reg_vcc5v: vcc5v {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdca>;
+};
+
&ehci0 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
index 21ca1977055d9..6a4f0da972330 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -53,6 +54,10 @@ reg_vcc3v3: vcc3v3 {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&ehci1 {
status = "okay";
};
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
index b3b1b8692125f..e1cd7572a14ce 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
@@ -6,12 +6,17 @@
/dts-v1/;
#include "sun50i-h616-orangepi-zero.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
/ {
model = "OrangePi Zero3";
compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618";
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&emac0 {
allwinner,tx-delay-ps = <700>;
phy-mode = "rgmii-rxid";
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts b/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
index 8ea1fd41aebaa..2dd178a164fbe 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-transpeed-8k618-t.dts
@@ -6,6 +6,7 @@
/dts-v1/;
#include "sun50i-h616.dtsi"
+#include "sun50i-h616-cpu-opp.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -41,6 +42,10 @@ reg_vcc3v3: vcc3v3 {
};
};
+&cpu0 {
+ cpu-supply = <®_dcdc2>;
+};
+
&ehci0 {
status = "okay";
};
--
2.35.8
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-19 22:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-18 4:39 [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards Amit Singh Tomar
2024-03-18 10:51 ` Andre Przywara
2024-03-18 19:11 ` [EXTERNAL] " Amit Singh Tomar
2024-03-18 23:03 ` Andre Przywara
2024-03-19 19:27 ` Amit Singh Tomar
2024-03-19 22:48 ` Andre Przywara
-- strict thread matches above, loose matches on Subject: below --
2024-03-18 1:12 [PATCH v2 0/8] cpufreq: sun50i: Add Allwinner H616 support Andre Przywara
2024-03-18 1:12 ` [PATCH v2 8/8] arm64: dts: allwinner: h616: enable DVFS for all boards Andre Przywara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox