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

Commit e991e2ed authored by Maulik Shah's avatar Maulik Shah
Browse files

ARM: dts: msm: Add power management support for msmtitanium



Add support for SPM, LPM, MPM, CPU sleep stats and RPM stats
for msmtitanium.

Change-Id: I7633e73a4edeb558fb2f168a93e5f629a0ed2474
Signed-off-by: default avatarMaulik Shah <mkshah@codeaurora.org>
parent d70d0441
Loading
Loading
Loading
Loading
+13 −8
Original line number Diff line number Diff line
@@ -12,6 +12,11 @@
 */

/ {
	psci {
		compatible = "arm,psci-1.0";
		method = "smc";
	};

	cpus {
		#address-cells = <1>;
		#size-cells = <0>;
@@ -51,7 +56,7 @@
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			reg = <0x0>;
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			qcom,acc = <&acc0>;
			qcom,limits-info = <&mitigation_profile0>;
			next-level-cache = <&L2_0>;
@@ -65,7 +70,7 @@
		CPU1: cpu@1 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			reg = <0x1>;
			qcom,acc = <&acc1>;
			qcom,limits-info = <&mitigation_profile1>;
@@ -75,7 +80,7 @@
		CPU2: cpu@2 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			reg = <0x2>;
			qcom,acc = <&acc2>;
			qcom,limits-info = <&mitigation_profile2>;
@@ -85,7 +90,7 @@
		CPU3: cpu@3 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			reg = <0x3>;
			qcom,acc = <&acc3>;
			qcom,limits-info = <&mitigation_profile3>;
@@ -95,7 +100,7 @@
		CPU4: cpu@100 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			reg = <0x100>;
			qcom,acc = <&acc4>;
			qcom,limits-info = <&mitigation_profile4>;
@@ -110,7 +115,7 @@
		CPU5: cpu@101 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			reg = <0x101>;
			qcom,acc = <&acc5>;
			qcom,limits-info = <&mitigation_profile5>;
@@ -120,7 +125,7 @@
		CPU6: cpu@102 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			reg = <0x102>;
			qcom,acc = <&acc6>;
			qcom,limits-info = <&mitigation_profile6>;
@@ -130,7 +135,7 @@
		CPU7: cpu@103 {
			device_type = "cpu";
			compatible = "arm,cortex-a53";
			enable-method = "qcom,titanium-arm-cortex-acc";
			enable-method = "psci";
			reg = <0x103>;
			qcom,acc = <&acc7>;
			qcom,limits-info = <&mitigation_profile7>;
+446 −0
Original line number Diff line number Diff line
/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

&soc {
	qcom,spm@b1d2000 {
		compatible = "qcom,spm-v2";
		#address-cells = <1>;
		#size-cells = <1>;
		reg = <0xb1d2000 0x1000>;
		reg-names = "saw-base";
		qcom,name = "system-cci";
		qcom,saw2-ver-reg = <0xfd0>;
		qcom,saw2-cfg = <0x14>;
		qcom,saw2-spm-dly= <0x3C102800>;
		qcom,saw2-spm-ctl = <0xe>;
		qcom,cpu-vctl-list = <&CPU0 &CPU1 &CPU2 &CPU3
					&CPU4 &CPU5 &CPU6 &CPU7>;
		qcom,vctl-timeout-us = <50>;
		qcom,vctl-port = <0x0>;
		qcom,phase-port = <0x1>;
		qcom,pfm-port = <0x2>;
	};

	qcom,lpm-levels {
		compatible = "qcom,lpm-levels";
		qcom,use-psci;
		#address-cells = <1>;
		#size-cells = <0>;

		qcom,pm-cluster@0 {
			reg = <0>;
			#address-cells = <1>;
			#size-cells = <0>;
			label = "system";
			qcom,spm-device-names = "cci";
			qcom,default-level=<0>;
			qcom,psci-mode-shift = <8>;
			qcom,psci-mode-mask = <0xf>;

			qcom,pm-cluster-level@0{
				reg = <0>;
				label = "system-active";
				qcom,psci-mode = <0>;
				qcom,latency-us = <750>;
				qcom,ss-power = <575>;
				qcom,energy-overhead = <955000>;
				qcom,time-overhead = <1540>;
			};

			qcom,pm-cluster-level@1{
				reg = <1>;
				label = "system-retention";
				qcom,psci-mode = <1>;
				qcom,latency-us = <820>;
				qcom,ss-power = <560>;
				qcom,energy-overhead = <1135000>;
				qcom,time-overhead = <1800>;
				qcom,min-child-idx = <2>;
			};

			qcom,pm-cluster-level@2{
				reg = <2>;
				label = "system-pc";
				qcom,psci-mode = <3>;
				qcom,latency-us = <11500>;
				qcom,ss-power = <530>;
				qcom,energy-overhead = <2470000>;
				qcom,time-overhead = <3700>;
				qcom,min-child-idx = <3>;
				qcom,notify-rpm;
				qcom,is-reset;
			};

			qcom,pm-cluster@0{
				reg = <0>;
				#address-cells = <1>;
				#size-cells = <0>;
				label = "pwr";
				qcom,spm-device-names = "l2";
				qcom,default-level=<0>;
				qcom,cpu = <&CPU0 &CPU1 &CPU2 &CPU3>;
				qcom,psci-mode-shift = <4>;
				qcom,psci-mode-mask = <0xf>;

				qcom,pm-cluster-level@0{
					reg = <0>;
					label = "pwr-l2-wfi";
					qcom,psci-mode = <1>;
					qcom,latency-us = <365>;
					qcom,ss-power = <610>;
					qcom,energy-overhead = <461276>;
					qcom,time-overhead = <680>;
				};

				qcom,pm-cluster-level@1{
					reg = <1>;
					label = "pwr-l2-retention";
					qcom,psci-mode = <3>;
					qcom,latency-us = <480>;
					qcom,ss-power = <585>;
					qcom,energy-overhead = <530000>;
					qcom,time-overhead = <850>;
					qcom,min-child-idx = <1>;
				};

				qcom,pm-cluster-level@2{
					reg = <2>;
					label = "pwr-l2-gdhs";
					qcom,psci-mode = <4>;
					qcom,latency-us = <600>;
					qcom,ss-power = <583>;
					qcom,energy-overhead = <650000>;
					qcom,time-overhead = <1000>;
					qcom,min-child-idx = <1>;
				};

				qcom,pm-cluster-level@3{
					reg = <3>;
					label = "pwr-l2-pc";
					qcom,psci-mode = <5>;
					qcom,latency-us = <750>;
					qcom,ss-power = <575>;
					qcom,energy-overhead = <955000>;
					qcom,time-overhead = <1540>;
					qcom,min-child-idx = <1>;
					qcom,is-reset;
				};

				qcom,pm-cpu {
					#address-cells = <1>;
					#size-cells = <0>;
					qcom,psci-mode-shift = <0>;
					qcom,psci-mode-mask = <0xf>;

					qcom,pm-cpu-level@0 {
						reg = <0>;
						qcom,spm-cpu-mode = "wfi";
						qcom,psci-cpu-mode = <1>;
						qcom,latency-us = <1>;
						qcom,ss-power = <640>;
						qcom,energy-overhead = <100000>;
						qcom,time-overhead = <60>;
					};

					qcom,pm-cpu-level@1 {
						reg = <1>;
						qcom,spm-cpu-mode = "pc";
						qcom,psci-cpu-mode = <3>;
						qcom,latency-us = <365>;
						qcom,ss-power = <610>;
						qcom,energy-overhead = <461276>;
						qcom,time-overhead = <680>;
						qcom,use-broadcast-timer;
						qcom,is-reset;
					};
				};
			};

			qcom,pm-cluster@1{
				reg = <1>;
				#address-cells = <1>;
				#size-cells = <0>;
				label = "perf";
				qcom,spm-device-names = "l2";
				qcom,default-level=<0>;
				qcom,cpu = <&CPU4 &CPU5 &CPU6 &CPU7>;
				qcom,psci-mode-shift = <4>;
				qcom,psci-mode-mask = <0xf>;

				qcom,pm-cluster-level@0{
					reg = <0>;
					label = "perf-l2-active";
					qcom,psci-mode = <1>;
					qcom,latency-us = <320>;
					qcom,ss-power = <655>;
					qcom,energy-overhead = <458673>;
					qcom,time-overhead = <550>;
				};

				qcom,pm-cluster-level@1{
					reg = <1>;
					label = "perf-l2-retention";
					qcom,psci-mode = <3>;
					qcom,ss-power = <595>;
					qcom,energy-overhead = <550000>;
					qcom,time-overhead = <700>;
					qcom,min-child-idx = <1>;
				};

				qcom,pm-cluster-level@2{
					reg = <2>;
					label = "perf-l2-gdhs";
					qcom,psci-mode = <4>;
					qcom,latency-us = <500>;
					qcom,ss-power = <583>;
					qcom,energy-overhead = <650000>;
					qcom,time-overhead = <900>;
					qcom,min-child-idx = <1>;
				};

				qcom,pm-cluster-level@3{
					reg = <3>;
					label = "perf-l2-pc";
					qcom,psci-mode = <5>;
					qcom,latency-us = <600>;
					qcom,ss-power = <574>;
					qcom,energy-overhead = <970000>;
					qcom,time-overhead = <1260>;
					qcom,min-child-idx = <1>;
					qcom,is-reset;
				};

				qcom,pm-cpu {
					#address-cells = <1>;
					#size-cells = <0>;
					qcom,psci-mode-shift = <0>;
					qcom,psci-mode-mask = <0xf>;

					qcom,pm-cpu-level@0 {
						reg = <0>;
						qcom,spm-cpu-mode = "wfi";
						qcom,psci-cpu-mode = <1>;
						qcom,latency-us = <1>;
						qcom,ss-power = <710>;
						qcom,energy-overhead = <180000>;
						qcom,time-overhead = <20>;
					};

					qcom,pm-cpu-level@1 {
						reg = <1>;
						qcom,spm-cpu-mode = "pc";
						qcom,psci-cpu-mode = <3>;
						qcom,latency-us = <320>;
						qcom,ss-power = <655>;
						qcom,energy-overhead = <458673>;
						qcom,time-overhead = <550>;
						qcom,use-broadcast-timer;
						qcom,is-reset;
					};
				};
			};
		};
	};

	qcom,mpm@601d0 {
		compatible = "qcom,mpm-v2";
		reg = <0x601d4 0x1000>, /* MSM_RPM_MPM_BASE 4K */
		    <0xb011008 0x4>;
		reg-names = "vmpm", "ipc";
		interrupts = <0 171 1>;
		clocks = <&clock_gcc clk_xo_lpm_clk>;
		clock-names = "xo";
		qcom,ipc-bit-offset = <1>;
		qcom,gic-parent = <&intc>;
		qcom,num-mpm-irqs = <96>;
		qcom,gic-map = <2 216>, /* tsens_upper_lower_int */
			<50 172>, /* usb1_hs_async_wakeup_irq */
			<53 104>, /* mdss_irq */
			<62 222>, /* ee0_krait_hlos_spmi_periph_irq */
			<0xff 18>,  /* APC_qgicQTmrSecPhysIrptReq */
			<0xff 19>,  /* APC_qgicQTmrNonSecPhysIrptReq */
			<0xff 20>,  /* qgicQTmrVirtIrptReq */
			<0xff 35>,  /* WDT_barkInt */
			<0xff 39>,  /* arch_mem_timer */
			<0xff 40>,  /* qtmr_phy_irq[0] */
			<0xff 47>,  /* rbif_irq[0] */
			<0xff 56>,  /* q6_wdog_expired_irq */
			<0xff 57>,  /* mss_to_apps_irq(0) */
			<0xff 58>,  /* mss_to_apps_irq(1) */
			<0xff 59>,  /* mss_to_apps_irq(2) */
			<0xff 60>,  /* mss_to_apps_irq(3) */
			<0xff 61>,  /* mss_a2_bam_irq */
			<0xff 65>,  /* o_gc_sys_irq[0] */
			<0xff 74>,  /* smmu_bus_intr[2] */
			<0xff 75>,  /* smmu_bus_intr[3] */
			<0xff 78>,  /* smmu_bus_intr[5] */
			<0xff 79>,  /* smmu_bus_intr[6] */
			<0xff 85>,  /* smmu_bus_intr[31] */
			<0xff 86>,  /* smmu_bus_intr[32] */
			<0xff 90>,  /* smmu_bus_intr[33] */
			<0xff 92>,  /* smmu_bus_intr[34] */
			<0xff 93>,  /* smmu_bus_intr[35] */
			<0xff 97>,  /* smmu_bus_intr[10] */
			<0xff 102>, /* smmu_bus_intr[14] */
			<0xff 108>, /* smmu_bus_intr[36] */
			<0xff 109>, /* smmu_bus_intr[37] */
			<0xff 112>, /* smmu_bus_intr[38] */
			<0xff 131>, /* qup_irq */
			<0xff 140>, /* uart_dm_intr */
			<0xff 142>, /* smmu_bus_intr[47] */
			<0xff 143>, /* smmu_bus_intr[48] */
			<0xff 144>, /* smmu_bus_intr[49] */
			<0xff 145>, /* smmu_bus_intr[50] */
			<0xff 146>, /* smmu_bus_intr[51] */
			<0xff 147>, /* smmu_bus_intr[52] */
			<0xff 148>, /* smmu_bus_intr[53] */
			<0xff 149>, /* smmu_bus_intr[54] */
			<0xff 150>, /* smmu_bus_intr[55] */
			<0xff 151>, /* smmu_bus_intr[56] */
			<0xff 152>, /* smmu_bus_intr[57] */
			<0xff 153>, /* smmu_bus_intr[58] */
			<0xff 155>, /* sdc1_irq(0) */
			<0xff 157>, /* sdc2_irq(0) */
			<0xff 166>, /* usb_hs_irq */
			<0xff 170>, /* sdc1_pwr_cmd_irq */
			<0xff 173>, /* o_wcss_apss_smd_hi */
			<0xff 174>, /* o_wcss_apss_smd_med */
			<0xff 175>, /* o_wcss_apss_smd_low */
			<0xff 176>, /* o_wcss_apss_smsm_irq */
			<0xff 177>, /* o_wcss_apss_wlan_data_xfer_done */
			<0xff 178>, /* o_wcss_apss_wlan_rx_data_avail */
			<0xff 179>, /* o_wcss_apss_asic_intr */
			<0xff 181>, /* o_wcss_apss_wdog_bite_and_reset_rdy */
			<0xff 188>, /* lpass_irq_out_apcs(0) */
			<0xff 189>, /* lpass_irq_out_apcs(1) */
			<0xff 190>, /* lpass_irq_out_apcs(2) */
			<0xff 191>, /* lpass_irq_out_apcs(3) */
			<0xff 192>, /* lpass_irq_out_apcs(4) */
			<0xff 193>, /* lpass_irq_out_apcs(5) */
			<0xff 194>, /* lpass_irq_out_apcs(6) */
			<0xff 195>, /* lpass_irq_out_apcs(7) */
			<0xff 196>, /* lpass_irq_out_apcs(8) */
			<0xff 197>, /* lpass_irq_out_apcs(9) */
			<0xff 198>, /* coresight-tmc-etr interrupt */
			<0xff 200>, /* rpm_ipc(4) */
			<0xff 201>, /* rpm_ipc(5) */
			<0xff 202>, /* rpm_ipc(6) */
			<0xff 203>, /* rpm_ipc(7) */
			<0xff 204>, /* rpm_ipc(24) */
			<0xff 205>, /* rpm_ipc(25) */
			<0xff 206>, /* rpm_ipc(26) */
			<0xff 207>, /* rpm_ipc(27) */
			<0xff 239>, /* crypto_bam_irq[1]*/
			<0xff 240>, /* summary_irq_kpss */
			<0xff 253>, /* sdc2_pwr_cmd_irq */
			<0xff 260>, /* ipa_irq[0] */
			<0xff 263>, /* ipa_bam_irq[2] */
			<0xff 269>, /* rpm_wdog_expired_irq */
			<0xff 270>, /* blsp1_bam_irq[0] */
			<0xff 273>, /* smmu_bus_intr[18] */
			<0xff 274>, /* smmu_bus_intr[19] */
			<0xff 275>, /* rpm_ipc(30) */
			<0xff 276>, /* rpm_ipc(31) */
			<0xff 321>, /* q6ss_irq_out(4) */
			<0xff 322>, /* q6ss_irq_out(5) */
			<0xff 323>, /* q6ss_irq_out(6) */
			<0xff 325>; /* q6ss_wdog_exp_irq */

		qcom,gpio-parent = <&tlmm>;
		qcom,gpio-map = <3  38 >,
			<4  1 >,
			<5  5 >,
			<6  9 >,
			<8  37>,
			<9  36>,
			<10  13>,
			<11  35>,
			<12  17>,
			<13  21>,
			<14  54>,
			<15  34>,
			<16  31>,
			<17  58>,
			<18  28>,
			<19  42>,
			<20  25>,
			<21  12>,
			<22  43>,
			<23  44>,
			<24  45>,
			<25  46>,
			<26  48>,
			<27  65>,
			<28  93>,
			<29  97>,
			<30  63>,
			<31  70>,
			<32  71>,
			<33  72>,
			<34  81>,
			<35  85>,
			<36  90>,
			<50  67>,
			<51  73>,
			<52  74>,
			<53  62>,
			<59  59>,
			<60  60>,
			<61  61>,
			<62  86>,
			<63  87>,
			<64  91>,
			<65  129>,
			<66  130>,
			<67  131>,
			<68  132>,
			<69  133>,
			<70  137>,
			<71  138>,
			<72  139>,
			<73  140>,
			<74  141>;
	};

	qcom,cpu-sleep-status{
		compatible = "qcom,cpu-sleep-status";
	};

	qcom,rpm-log@29dc00 {
		compatible = "qcom,rpm-log";
		reg = <0x29dc00 0x4000>;
		qcom,rpm-addr-phys = <0x200000>;
		qcom,offset-version = <4>;
		qcom,offset-page-buffer-addr = <36>;
		qcom,offset-log-len = <40>;
		qcom,offset-log-len-mask = <44>;
		qcom,offset-page-indices = <56>;
	};

	qcom,rpm-stats@200000 {
		compatible = "qcom,rpm-stats";
		reg = <0x200000 0x1000>,
		      <0x290014 0x4>,
		      <0x29001c 0x4>;
		reg-names = "phys_addr_base", "offset_addr",
						"heap_phys_addrbase";
		qcom,sleep-stats-version = <2>;
	};

	qcom,rpm-master-stats@60150 {
		compatible = "qcom,rpm-master-stats";
		reg = <0x60150 0x5000>;
		qcom,masters = "APSS", "MPSS", "PRONTO", "TZ", "LPASS";
		qcom,master-stats-version = <2>;
		qcom,master-offset = <4096>;
	};
};
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@
#include "msmtitanium-bus.dtsi"
#include "msmtitanium-iommu-domains.dtsi"
#include "msmtitanium-vidc.dtsi"
#include "msmtitanium-pm.dtsi"

&soc {
	#address-cells = <1>;