Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6ea8228 authored by Rohit Gupta's avatar Rohit Gupta
Browse files

ARM: dts: msm: Replace devbw freq tables with OPP tables for SM8150



The devfreq devbw framework has switched from parsing frequency
tables to parsing OPP tables. So replace all the devbw frequency
tables with OPP tables.

Change-Id: I7568306ca8ca5fe32488c011d0d77c17d6502013
Signed-off-by: default avatarRohit Gupta <rohgup@codeaurora.org>
parent 1383baad
Loading
Loading
Loading
Loading
+1 −14
Original line number Diff line number Diff line
@@ -26,20 +26,7 @@
		compatible = "qcom,devbw";
		governor = "bw_vbif";
		qcom,src-dst-ports = <26 512>;
		qcom,bw-tbl =
			<     0 /*  off     */ >,
			<   381 /*  100 MHz */ >,
			<   572 /*  150 MHz */ >,
			<   762 /*  200 MHz */ >,
			<  1144 /*  300 MHz */ >,
			<  1571 /*  412 MHz */ >,
			<  2086 /*  547 MHz */ >,
			<  2597 /*  681 MHz */ >,
			<  2929 /*  768 MHz */ >,
			<  3879 /*  1017 MHz */ >,
			<  4943 /*  1296 MHz */ >,
			<  5931 /*  1555 MHz */ >,
			<  6881 /*  1804 MHz */ >;
		operating-points-v2 = <&suspendable_ddr_bw_opp_table>;
	};

	gpu_opp_table: gpu-opp-table {
+59 −84
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <dt-bindings/msm/msm-bus-ids.h>

#define MHZ_TO_MBPS(mhz, w) ((mhz * 1000000 * w) / (1024 * 1024))
#define BW_OPP_ENTRY(mhz, w) opp-mhz {opp-hz = /bits/ 64 <MHZ_TO_MBPS(mhz, w)>;}

/ {
	model = "Qualcomm Technologies, Inc. SM8150";
@@ -910,19 +911,23 @@
		reg-names = "lagg-base";
	};

	llcc_bw_opp_table: llcc-bw-opp-table {
		compatible = "operating-points-v2";
		BW_OPP_ENTRY( 150, 16); /*  2288 MB/s */
		BW_OPP_ENTRY( 200, 16); /*  3051 MB/s */
		BW_OPP_ENTRY( 403, 16); /*  6149 MB/s */
		BW_OPP_ENTRY( 533, 16); /*  8132 MB/s */
		BW_OPP_ENTRY( 666, 16); /* 10162 MB/s */
		BW_OPP_ENTRY( 777, 16); /* 11856 MB/s */
	};

	cpu_cpu_llcc_bw: qcom,cpu-cpu-llcc-bw {
		compatible = "qcom,devbw";
		governor = "performance";
		qcom,src-dst-ports =
			<MSM_BUS_MASTER_AMPSS_M0 MSM_BUS_SLAVE_LLCC>;
		qcom,active-only;
		qcom,bw-tbl =
			< MHZ_TO_MBPS(150, 16) >, /*  2288 MB/s */
			< MHZ_TO_MBPS(200, 16) >, /*  4577 MB/s */
			< MHZ_TO_MBPS(403, 16) >, /*  6149 MB/s */
			< MHZ_TO_MBPS(533, 16) >, /*  8132 MB/s */
			< MHZ_TO_MBPS(666, 16) >, /* 10162 MB/s */
			< MHZ_TO_MBPS(777, 16) >; /* 11856 MB/s */
		operating-points-v2 = <&llcc_bw_opp_table>;
	};

	cpu_cpu_llcc_bwmon: qcom,cpu-cpu-llcc-bwmon@90b6400 {
@@ -936,24 +941,28 @@
		qcom,count-unit = <0x10000>;
	};

	ddr_bw_opp_table: ddr-bw-opp-table {
		compatible = "operating-points-v2";
		BW_OPP_ENTRY( 200, 4); /*  762 MB/s */
		BW_OPP_ENTRY( 300, 4); /* 1144 MB/s */
		BW_OPP_ENTRY( 451, 4); /* 1720 MB/s */
		BW_OPP_ENTRY( 547, 4); /* 2086 MB/s */
		BW_OPP_ENTRY( 681, 4); /* 2597 MB/s */
		BW_OPP_ENTRY( 768, 4); /* 2929 MB/s */
		BW_OPP_ENTRY(1017, 4); /* 3879 MB/s */
		BW_OPP_ENTRY(1296, 4); /* 4943 MB/s */
		BW_OPP_ENTRY(1555, 4); /* 5931 MB/s */
		BW_OPP_ENTRY(1804, 4); /* 6881 MB/s */
		BW_OPP_ENTRY(2092, 4); /* 7980 MB/s */
	};

	cpu_llcc_ddr_bw: qcom,cpu-llcc-ddr-bw {
		compatible = "qcom,devbw";
		governor = "performance";
		qcom,src-dst-ports =
			<MSM_BUS_MASTER_LLCC MSM_BUS_SLAVE_EBI_CH0>;
		qcom,active-only;
		qcom,bw-tbl =
			< MHZ_TO_MBPS( 200, 4) >, /* 762 MB/s */
			< MHZ_TO_MBPS( 300, 4) >, /* 1144 MB/s */
			< MHZ_TO_MBPS( 451, 4) >, /* 1720 MB/s */
			< MHZ_TO_MBPS( 547, 4) >, /* 2086 MB/s */
			< MHZ_TO_MBPS( 681, 4) >, /* 2597 MB/s */
			< MHZ_TO_MBPS( 768, 4) >, /* 2929 MB/s */
			< MHZ_TO_MBPS(1017, 4) >, /* 3879 MB/s */
			< MHZ_TO_MBPS(1296, 4) >, /* 4943 MB/s */
			< MHZ_TO_MBPS(1555, 4) >, /* 5931 MB/s */
			< MHZ_TO_MBPS(1804, 4) >, /* 6881 MB/s */
			< MHZ_TO_MBPS(2092, 4) >; /* 7980 MB/s */
		operating-points-v2 = <&ddr_bw_opp_table>;
	};

	cpu_llcc_ddr_bwmon: qcom,cpu-llcc-ddr-bwmon@90cd000 {
@@ -966,23 +975,27 @@
		qcom,count-unit = <0x10000>;
	};

	suspendable_ddr_bw_opp_table: suspendable-ddr-bw-opp-table {
		compatible = "operating-points-v2";
		BW_OPP_ENTRY(   0, 4); /*    0 MB/s */
		BW_OPP_ENTRY( 200, 4); /*  762 MB/s */
		BW_OPP_ENTRY( 300, 4); /* 1144 MB/s */
		BW_OPP_ENTRY( 451, 4); /* 1720 MB/s */
		BW_OPP_ENTRY( 547, 4); /* 2086 MB/s */
		BW_OPP_ENTRY( 681, 4); /* 2597 MB/s */
		BW_OPP_ENTRY( 768, 4); /* 2929 MB/s */
		BW_OPP_ENTRY(1017, 4); /* 3879 MB/s */
		BW_OPP_ENTRY(1296, 4); /* 4943 MB/s */
		BW_OPP_ENTRY(1555, 4); /* 5931 MB/s */
		BW_OPP_ENTRY(1804, 4); /* 6881 MB/s */
		BW_OPP_ENTRY(2092, 4); /* 7980 MB/s */
	};

	npu_npu_ddr_bw: qcom,npu-npu-ddr-bw {
		compatible = "qcom,devbw";
		governor = "performance";
		qcom,src-dst-ports = <MSM_BUS_MASTER_NPU MSM_BUS_SLAVE_EBI_CH0>;
		qcom,bw-tbl =
			< MHZ_TO_MBPS(   0, 4) >, /* 0 MB/s */
			< MHZ_TO_MBPS( 200, 4) >, /* 762 MB/s */
			< MHZ_TO_MBPS( 300, 4) >, /* 1144 MB/s */
			< MHZ_TO_MBPS( 451, 4) >, /* 1720 MB/s */
			< MHZ_TO_MBPS( 547, 4) >, /* 2086 MB/s */
			< MHZ_TO_MBPS( 681, 4) >, /* 2597 MB/s */
			< MHZ_TO_MBPS( 768, 4) >, /* 2929 MB/s */
			< MHZ_TO_MBPS(1017, 4) >, /* 3879 MB/s */
			< MHZ_TO_MBPS(1296, 4) >, /* 4943 MB/s */
			< MHZ_TO_MBPS(1555, 4) >, /* 5931 MB/s */
			< MHZ_TO_MBPS(1804, 4) >, /* 6881 MB/s */
			< MHZ_TO_MBPS(2092, 4) >; /* 7980 MB/s */
		operating-points-v2 = <&suspendable_ddr_bw_opp_table>;
	};

	npu_npu_ddr_bwmon: qcom,npu-npu-ddr-bwmon@9960300 {
@@ -1051,13 +1064,7 @@
		qcom,src-dst-ports =
			<MSM_BUS_MASTER_AMPSS_M0 MSM_BUS_SLAVE_LLCC>;
		qcom,active-only;
		qcom,bw-tbl =
			< MHZ_TO_MBPS(150, 16) >, /*  2288 MB/s */
			< MHZ_TO_MBPS(200, 16) >, /*  4577 MB/s */
			< MHZ_TO_MBPS(403, 16) >, /*  6149 MB/s */
			< MHZ_TO_MBPS(533, 16) >, /*  8132 MB/s */
			< MHZ_TO_MBPS(666, 16) >, /* 10162 MB/s */
			< MHZ_TO_MBPS(777, 16) >; /* 11856 MB/s */
		operating-points-v2 = <&llcc_bw_opp_table>;
	};

	cpu0_cpu_llcc_latmon: qcom,cpu0-cpu-llcc-latmon {
@@ -1080,13 +1087,7 @@
		qcom,src-dst-ports =
			<MSM_BUS_MASTER_AMPSS_M0 MSM_BUS_SLAVE_LLCC>;
		qcom,active-only;
		qcom,bw-tbl =
			< MHZ_TO_MBPS(150, 16) >, /*  2288 MB/s */
			< MHZ_TO_MBPS(200, 16) >, /*  4577 MB/s */
			< MHZ_TO_MBPS(403, 16) >, /*  6149 MB/s */
			< MHZ_TO_MBPS(533, 16) >, /*  8132 MB/s */
			< MHZ_TO_MBPS(666, 16) >, /* 10162 MB/s */
			< MHZ_TO_MBPS(777, 16) >; /* 11856 MB/s */
		operating-points-v2 = <&llcc_bw_opp_table>;
	};

	cpu4_cpu_llcc_latmon: qcom,cpu4-cpu-llcc-latmon {
@@ -1109,18 +1110,7 @@
		qcom,src-dst-ports =
			<MSM_BUS_MASTER_LLCC MSM_BUS_SLAVE_EBI_CH0>;
		qcom,active-only;
		qcom,bw-tbl =
			< MHZ_TO_MBPS( 200, 4) >, /* 762 MB/s */
			< MHZ_TO_MBPS( 300, 4) >, /* 1144 MB/s */
			< MHZ_TO_MBPS( 451, 4) >, /* 1720 MB/s */
			< MHZ_TO_MBPS( 547, 4) >, /* 2086 MB/s */
			< MHZ_TO_MBPS( 681, 4) >, /* 2597 MB/s */
			< MHZ_TO_MBPS( 768, 4) >, /* 2929 MB/s */
			< MHZ_TO_MBPS(1017, 4) >, /* 3879 MB/s */
			< MHZ_TO_MBPS(1296, 4) >, /* 4943 MB/s */
			< MHZ_TO_MBPS(1555, 4) >, /* 5931 MB/s */
			< MHZ_TO_MBPS(1804, 4) >, /* 6881 MB/s */
			< MHZ_TO_MBPS(2092, 4) >; /* 7980 MB/s */
		operating-points-v2 = <&ddr_bw_opp_table>;
	};

	cpu0_llcc_ddr_latmon: qcom,cpu0-llcc-ddr-latmon {
@@ -1143,18 +1133,7 @@
		qcom,src-dst-ports =
			<MSM_BUS_MASTER_LLCC MSM_BUS_SLAVE_EBI_CH0>;
		qcom,active-only;
		qcom,bw-tbl =
			< MHZ_TO_MBPS( 200, 4) >, /* 762 MB/s */
			< MHZ_TO_MBPS( 300, 4) >, /* 1144 MB/s */
			< MHZ_TO_MBPS( 451, 4) >, /* 1720 MB/s */
			< MHZ_TO_MBPS( 547, 4) >, /* 2086 MB/s */
			< MHZ_TO_MBPS( 681, 4) >, /* 2597 MB/s */
			< MHZ_TO_MBPS( 768, 4) >, /* 2929 MB/s */
			< MHZ_TO_MBPS(1017, 4) >, /* 3879 MB/s */
			< MHZ_TO_MBPS(1296, 4) >, /* 4943 MB/s */
			< MHZ_TO_MBPS(1555, 4) >, /* 5931 MB/s */
			< MHZ_TO_MBPS(1804, 4) >, /* 6881 MB/s */
			< MHZ_TO_MBPS(2092, 4) >; /* 7980 MB/s */
		operating-points-v2 = <&ddr_bw_opp_table>;
	};

	cpu4_llcc_ddr_latmon: qcom,cpu4-llcc-ddr-latmon {
@@ -1178,18 +1157,7 @@
		qcom,src-dst-ports =
			<MSM_BUS_MASTER_LLCC MSM_BUS_SLAVE_EBI_CH0>;
		qcom,active-only;
		qcom,bw-tbl =
			< MHZ_TO_MBPS( 200, 4) >, /* 762 MB/s */
			< MHZ_TO_MBPS( 300, 4) >, /* 1144 MB/s */
			< MHZ_TO_MBPS( 451, 4) >, /* 1720 MB/s */
			< MHZ_TO_MBPS( 547, 4) >, /* 2086 MB/s */
			< MHZ_TO_MBPS( 681, 4) >, /* 2597 MB/s */
			< MHZ_TO_MBPS( 768, 4) >, /* 2929 MB/s */
			< MHZ_TO_MBPS(1017, 4) >, /* 3879 MB/s */
			< MHZ_TO_MBPS(1296, 4) >, /* 4943 MB/s */
			< MHZ_TO_MBPS(1555, 4) >, /* 5931 MB/s */
			< MHZ_TO_MBPS(1804, 4) >, /* 6881 MB/s */
			< MHZ_TO_MBPS(2092, 4) >; /* 7980 MB/s */
		operating-points-v2 = <&ddr_bw_opp_table>;
	};

	cpu4_computemon: qcom,cpu4-computemon {
@@ -1271,13 +1239,20 @@
		clock-frequency = <32768>;
	};

	keepalive_opp_table: keepalive-opp-table {
		compatible = "operating-points-v2";
		opp-1 {
			opp-hz = /bits/ 64 < 1 >;
		};
	};

	snoc_cnoc_keepalive: qcom,snoc_cnoc_keepalive {
		compatible = "qcom,devbw";
		governor = "powersave";
		qcom,src-dst-ports = <1 627>;
		qcom,active-only;
		status = "ok";
		qcom,bw-tbl = < 1 >;
		operating-points-v2 = <&keepalive_opp_table>;
	};

	cdsp_keepalive: qcom,cdsp_keepalive {
@@ -1286,7 +1261,7 @@
		qcom,src-dst-ports = <154 10070>;
		qcom,active-only;
		status = "ok";
		qcom,bw-tbl = < 1 >;
		operating-points-v2 = <&keepalive_opp_table>;
	};

	clock_rpmh: qcom,rpmhclk {