Skip to content

Commit

Permalink
arm64: dts: allwinner: h616: enable DVFS for all boards
Browse files Browse the repository at this point in the history
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>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
  • Loading branch information
Andre Przywara authored and Viresh Kumar committed Apr 19, 2024
1 parent 3e057e0 commit 09d0aaa
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -62,6 +63,10 @@
};
};

&cpu0 {
cpu-supply = <&reg_dcdc2>;
};

&mmc0 {
vmmc-supply = <&reg_dldo1>;
/* Card detection pin is not connected */
Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <&reg_dcdca>;
};

&emac0 {
allwinner,rx-delay-ps = <3100>;
allwinner,tx-delay-ps = <700>;
Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -32,6 +33,10 @@
};
};

&cpu0 {
cpu-supply = <&reg_dcdca>;
};

&ehci0 {
status = "okay";
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
*/

#include "sun50i-h616.dtsi"
#include "sun50i-h616-cpu-opp.dtsi"

&cpu0 {
cpu-supply = <&reg_dcdc2>;
};

&mmc2 {
pinctrl-names = "default";
Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero2w.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -53,6 +54,10 @@
};
};

&cpu0 {
cpu-supply = <&reg_dcdc2>;
};

&ehci1 {
status = "okay";
};
Expand Down
5 changes: 5 additions & 0 deletions arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <&reg_dcdc2>;
};

&emac0 {
allwinner,tx-delay-ps = <700>;
phy-mode = "rgmii-rxid";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -51,6 +52,10 @@
};
};

&cpu0 {
cpu-supply = <&reg_dcdc2>;
};

&ehci0 {
status = "okay";
};
Expand Down

0 comments on commit 09d0aaa

Please sign in to comment.