Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 Nov 2018 22:35:24 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r341268 - in head/sys: dts/arm64/overlays modules/dtb/allwinner
Message-ID:  <201811292235.wATMZOrJ020514@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Thu Nov 29 22:35:23 2018
New Revision: 341268
URL: https://svnweb.freebsd.org/changeset/base/341268

Log:
  arm64: allwinner: Add a dtbo to have cpu operating points
  
  This enables cpufreq on A64 boards.
  
  MFC after:	1 month

Added:
  head/sys/dts/arm64/overlays/sun50i-a64-opp.dtso   (contents, props changed)
Modified:
  head/sys/modules/dtb/allwinner/Makefile

Added: head/sys/dts/arm64/overlays/sun50i-a64-opp.dtso
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/dts/arm64/overlays/sun50i-a64-opp.dtso	Thu Nov 29 22:35:23 2018	(r341268)
@@ -0,0 +1,72 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+	compatible = "allwinner,sun50i-a64";
+};
+
+&{/} {
+	cpu0_opp_table: opp_table0 {
+		compatible = "operating-points-v2";
+		opp-shared;
+
+		opp-648000000 {
+			opp-hz = /bits/ 64 <648000000>;
+			opp-microvolt = <1040000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+		opp-816000000 {
+			opp-hz = /bits/ 64 <816000000>;
+			opp-microvolt = <1100000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+		opp-912000000 {
+			opp-hz = /bits/ 64 <912000000>;
+			opp-microvolt = <1120000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+		opp-960000000 {
+			opp-hz = /bits/ 64 <960000000>;
+			opp-microvolt = <1160000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+		opp-1008000000 {
+			opp-hz = /bits/ 64 <1008000000>;
+			opp-microvolt = <1200000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+		opp-1056000000 {
+			opp-hz = /bits/ 64 <1056000000>;
+			opp-microvolt = <1240000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+		opp-1104000000 {
+			opp-hz = /bits/ 64 <1104000000>;
+			opp-microvolt = <1260000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+		opp-1152000000 {
+			opp-hz = /bits/ 64 <1152000000>;
+			opp-microvolt = <1300000>;
+			clock-latency-ns = <244144>; /* 8 32k periods */
+		};
+	};
+};
+
+&{/cpus/cpu@0} {
+	operating-points-v2 = <&cpu0_opp_table>;
+	clocks = <&ccu 1>;
+	cpu-supply = <&reg_dcdc2>;
+};
+
+&{/cpus/cpu@1} {
+	operating-points-v2 = <&cpu0_opp_table>;
+};
+
+&{/cpus/cpu@2} {
+	operating-points-v2 = <&cpu0_opp_table>;
+};
+
+&{/cpus/cpu@3} {
+	operating-points-v2 = <&cpu0_opp_table>;
+};

Modified: head/sys/modules/dtb/allwinner/Makefile
==============================================================================
--- head/sys/modules/dtb/allwinner/Makefile	Thu Nov 29 22:00:20 2018	(r341267)
+++ head/sys/modules/dtb/allwinner/Makefile	Thu Nov 29 22:35:23 2018	(r341268)
@@ -44,7 +44,8 @@ DTS=	\
 	allwinner/sun50i-a64-sopine-baseboard.dts \
 	allwinner/sun50i-h5-orangepi-pc2.dts
 
-DTSO=	sun50i-a64-sid.dtso \
+DTSO=	sun50i-a64-opp.dtso \
+	sun50i-a64-sid.dtso \
 	sun50i-a64-ths.dtso \
 	sun50i-a64-timer.dtso
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811292235.wATMZOrJ020514>