Skip to content

Commit

Permalink
[H5 dev] updated 1.3GHz fixed voltage (1.3v) overclock overlay for ke…
Browse files Browse the repository at this point in the history
…rnel 4.19.y

the new cpu opp table in 4.19 now supports frequencies up to 1.368GHz, so this change
updates the 1.3GHz overclock overlay as appropriate.  overlay name has been changed
to "cpu-clock-1.3GHz-1.3v" as this overlay is only needed for boards that provide a
fixed-voltage GPIO regulator/switcher that operate at 1.1v/1.3v.
  • Loading branch information
5kft committed Nov 17, 2018
1 parent 6d2adad commit 06451d3
Showing 1 changed file with 30 additions and 72 deletions.
102 changes: 30 additions & 72 deletions patch/kernel/sunxi-dev/sunxi-h5-add-gpio-regulator-overclock.patch
Original file line number Diff line number Diff line change
@@ -1,119 +1,77 @@
diff --git a/arch/arm64/boot/dts/allwinner/overlay/Makefile b/arch/arm64/boot/dts/allwinner/overlay/Makefile
index 4c945d8..2833b86 100644
index 3ef0a3737..fb6bee993 100644
--- a/arch/arm64/boot/dts/allwinner/overlay/Makefile
+++ b/arch/arm64/boot/dts/allwinner/overlay/Makefile
@@ -12,6 +12,9 @@ dtbo-$(CONFIG_ARCH_SUNXI) += \
@@ -13,6 +13,8 @@ dtbo-$(CONFIG_ARCH_SUNXI) += \
sun50i-a64-w1-gpio.dtbo \
sun50i-h5-analog-codec.dtbo \
sun50i-h5-cir.dtbo \
+ sun50i-h5-cpu-clock-1.3GHz.dtbo \
+ sun50i-h5-cpu-clock-1.4GHz.dtbo \
+ sun50i-h5-cpu-clock-1.3GHz-1.3v.dtbo \
+ sun50i-h5-gpio-regulator-1.3v.dtbo \
sun50i-h5-i2c0.dtbo \
sun50i-h5-i2c1.dtbo \
sun50i-h5-i2c2.dtbo \
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.3GHz.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.3GHz.dts
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.3GHz-1.3v.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.3GHz-1.3v.dts
new file mode 100644
index 0000000..4ab2633
index 000000000..03cae05bd
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.3GHz.dts
@@ -0,0 +1,40 @@
+// DT overlay for operating points to 1.3GHz
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.3GHz-1.3v.dts
@@ -0,0 +1,61 @@
+// DT overlay for CPU frequency operating points to 1.3GHz at a maximum CPU voltage of 1.3v
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ target = <&cpu_opp_table>;
+ target = <&cpu0_opp_table>;
+
+ __overlay__ {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ // in order to match the H5 DT cooling-maps, replace the latter
+ // part of the OP table with the new frequencies...
+ // in order to match the H5 DT cooling-maps, update the existing OP table in-place
+ // with the new voltages
+
+ // override the "1.056GHz" opp definition with the 1.104GHz clock definition
+ opp@1056000000 {
+ opp-hz = /bits/ 64 <1104000000>;
+ opp-hz = /bits/ 64 <1056000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+ // override the "1.104GHz" opp definition with the 1.200GHz clock definition
+ opp@1104000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+ opp-hz = /bits/ 64 <1104000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+ // override the "1.152GHz" opp definition with the 1.296GHz clock definition
+ opp@1152000000 {
+ opp-hz = /bits/ 64 <1296000000>;
+ opp-hz = /bits/ 64 <1152000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+ };
+ };
+};
+
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.4GHz.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.4GHz.dts
new file mode 100644
index 0000000..6994432
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-cpu-clock-1.4GHz.dts
@@ -0,0 +1,56 @@
+// DT overlay for operating points to 1.4GHz
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ fragment@0 {
+ target = <&cpu_opp_table>;
+
+ __overlay__ {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ // in order to match the H5 DT cooling-maps, replace the latter
+ // part of the OP table with the new frequencies...
+
+ // override the "960MHz" opp definition with the 1.008GHz clock definition
+ opp@960000000 {
+ opp-hz = /bits/ 64 <1008000000>;
+ opp-microvolt = <1200000 1200000 1300000>;
+ opp@1200000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+
+ // override the "1.008GHz" opp definition with the 1.104GHz clock definition
+ opp@1008000000 {
+ opp-hz = /bits/ 64 <1104000000>;
+ opp-microvolt = <1240000 1240000 1400000>;
+ opp@1224000000 {
+ opp-hz = /bits/ 64 <1224000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+ // override the "1.056GHz" opp definition with the 1.200GHz clock definition
+ opp@1056000000 {
+ opp-hz = /bits/ 64 <1200000000>;
+ opp-microvolt = <1290000 1290000 1400000>;
+ opp@1248000000 {
+ opp-hz = /bits/ 64 <1248000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+
+ // override the "1.104GHz" opp definition with the 1.296GHz clock definition
+ opp@1104000000 {
+ opp-hz = /bits/ 64 <1296000000>;
+ opp-microvolt = <1340000 1340000 1400000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+
+ // override the "1.152GHz" opp definition with the 1.392GHz clock definition
+ opp@1152000000 {
+ opp-hz = /bits/ 64 <1392000000>;
+ opp-microvolt = <1400000 1400000 1400000>;
+ opp@1296000000 {
+ opp-hz = /bits/ 64 <1296000000>;
+ opp-microvolt = <1300000 1300000 1300000>;
+ clock-latency-ns = <244144>; /* 8 32k periods */
+ };
+ };
Expand All @@ -122,7 +80,7 @@ index 0000000..6994432
+
diff --git a/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-gpio-regulator-1.3v.dts b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-gpio-regulator-1.3v.dts
new file mode 100644
index 0000000..8d2755c
index 000000000..4bf787c66
--- /dev/null
+++ b/arch/arm64/boot/dts/allwinner/overlay/sun50i-h5-gpio-regulator-1.3v.dts
@@ -0,0 +1,38 @@
Expand Down

0 comments on commit 06451d3

Please sign in to comment.