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

Commit 43d3398f authored by Asha Magadi Venkateshamurthy's avatar Asha Magadi Venkateshamurthy
Browse files

ARM: dts: msm: Adding adc and vadc thermal nodes for MSM8905



Adding adc and vadc thermal sensors for MSM8905 QRD after poritng to
kernel 4.9.

Change-Id: I170ea8adff64e66d927e37f9489f46ac15906b6b
Signed-off-by: default avatarAsha Magadi Venkateshamurthy <amagad@codeaurora.org>
parent 48fec5f5
Loading
Loading
Loading
Loading
+34 −31
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@
			reg = <0x3100 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts = <0x0 0x31 0x0 0x0>;
			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
			interrupt-names = "eoc-int-en-set";
			qcom,adc-bit-resolution = <15>;
			qcom,adc-vdd-reference = <1800>;
@@ -142,9 +142,9 @@
			reg = <0x3400 0x100>;
			#address-cells = <1>;
			#size-cells = <0>;
			interrupts =	<0x0 0x34 0x0 0x0>,
					<0x0 0x34 0x3 0x0>,
					<0x0 0x34 0x4 0x0>;
			interrupts =	<0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x34 0x3 IRQ_TYPE_EDGE_RISING>,
					<0x0 0x34 0x4 IRQ_TYPE_EDGE_RISING>;
			interrupt-names =	"eoc-int-en-set",
						"high-thr-en-set",
						"low-thr-en-set";
@@ -198,6 +198,7 @@
			qcom,tchg-mins = <232>;
			qcom,chg-vadc = <&pm8909_vadc>;
			qcom,chg-adc_tm = <&pm8909_adc_tm>;
			#cooling-cells = <2>;

			status = "okay";

@@ -244,6 +245,7 @@
			qcom,channel-num = <8>;
			qcom,threshold-set = <0>;
			qcom,temp_alarm-vadc = <&pm8909_vadc>;
			#thermal-sensor-cells = <0>;
		};

		pm8909_bms: qcom,vmbms {
@@ -298,33 +300,6 @@
		};
	};


	pm8909_temp_alarm: pm8909_tz {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8909_tz>;
		wake-capable-sensor;

		trips {
			pm8909_trip0: pm8909-trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};
			pm8909_trip1: pm8909-trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};
			pm8909_trip2: pm8909-trip2 {
				temperature = <145000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};

	pm8909_1: qcom,pm8909@1 {
		compatible ="qcom,spmi-pmic";
		reg = <0x1 0>;
@@ -576,3 +551,31 @@
		};
	};
};

&thermal_zones {
	pm8909_temp_alarm: pm8909_tz {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8909_tz>;
		wake-capable-sensor;

		trips {
			pm8909_trip0: pm8909-trip0 {
				temperature = <105000>;
				hysteresis = <0>;
				type = "passive";
			};
			pm8909_trip1: pm8909-trip1 {
				temperature = <125000>;
				hysteresis = <0>;
				type = "passive";
			};
			pm8909_trip2: pm8909-trip2 {
				temperature = <145000>;
				hysteresis = <0>;
				type = "critical";
			};
		};
	};
};
+140 −6
Original line number Diff line number Diff line
@@ -133,11 +133,6 @@
		};
	};
};
&pm8909_vadc {
	chan@30 {
		qcom,scale-function = <6>;
	};
};

&spmi_bus {
	qcom,pm8909@0 {
@@ -213,6 +208,7 @@
};

&pm8909_vadc {
	#thermal-sensor-cells = <1>;
	chan@30 {
		qcom,scale-function = <12>;
	};
@@ -226,7 +222,7 @@
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
		/*qcom,vadc-thermal-node;*/
		qcom,vadc-thermal-node;
	};
};

@@ -367,6 +363,144 @@
		};
	};
};
&thermal_zones {
	xo-therm-buf-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8909_vadc 0x3c>;
		thermal-governor = "user_space";
		wake-capable-sensor;

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	xo-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8909_vadc 0x32>;
		thermal-governor = "user_space";
		wake-capable-sensor;

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	pa-therm0-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8909_vadc 0x36>;
		thermal-governor = "user_space";
		wake-capable-sensor;

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	case-therm-adc {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-sensors = <&pm8909_vadc 0x13>;
		thermal-governor = "user_space";
		wake-capable-sensor;

		trips {
			active-config0 {
				temperature = <65000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};

	case-therm-adc-step {
		polling-delay-passive = <1000>;
		polling-delay = <10000>;
		thermal-governor = "step_wise";
		thermal-sensors = <&pm8909_vadc 0x13>;
		wake-capable-sensor;
		trips {
			cpu_trip: cpu-trip {
				temperature = <40000>;
				hysteresis = <0>;
				type = "passive";
			};
			modem_trip0: modem-trip0 {
				temperature = <42000>;
				hysteresis = <4000>;
				type = "passive";
			};
			batt_trip0: batt-trip0 {
				temperature = <44000>;
				hysteresis = <4000>;
				type = "passive";
			};
			modem_trip1: modem-trip1 {
				temperature = <46000>;
				hysteresis = <4000>;
				type = "passive";
			};
			batt_trip1: batt-trip1 {
				temperature = <47000>;
				hysteresis = <3000>;
				type = "passive";
			};
			cpu1_hotplug_trip: cpu1-hotplug-trip {
				temperature = <55000>;
				hysteresis = <4000>;
				type = "passive";
			};
		};
		cooling-maps {
			skin_cpu0{
				trip = <&cpu_trip>;
				cooling-device =
					<&CPU0 THERMAL_NO_LIMIT 2>;
			};
			skin_cpu1{
				trip = <&cpu_trip>;
				cooling-device =
					<&CPU1 THERMAL_NO_LIMIT 2>;
			};
			modem_lvl1 {
				trip = <&modem_trip0>;
				cooling-device = <&modem_pa 1 1>;
			};
			modem_lvl2 {
				trip = <&modem_trip1>;
				cooling-device = <&modem_pa 2 2>;
			};
			hotplug_cpu1_cdev {
				trip = <&cpu1_hotplug_trip>;
				cooling-device = <&CPU1 THERMAL_MAX_LIMIT
							THERMAL_MAX_LIMIT>;
			};
			battery_lvl1 {
				trip = <&batt_trip0>;
				cooling-device = <&pm8909_chg 1 1>;
			};
			battery_lvl2 {
				trip = <&batt_trip1>;
				cooling-device = <&pm8909_chg 2 2>;
			};
		};
	};
};

&pm8909_1 {
	pmic_analog_codec: analog-codec@f100 {
+22 −0
Original line number Diff line number Diff line
@@ -20,3 +20,25 @@
	/* Disable GPU snapshot dumping */
	qcom,snapshot-size = <0>;
};

&thermal_zones {
	pop-mem-step {
		status = "disabled";
	};

	cpu0-2-step {
		trips {
			cpu0-2-step-trip {
				temperature = <80000>;
			};
		};
	};

	cpu1-3-step {
		trips {
			cpu1-3-step-trip {
				temperature = <80000>;
			};
		};
	};
};
+4 −3
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
};

&pm8909_vadc {
	#thermal-sensor-cells = <1>;
	chan@0 {
		label = "usb_in";
		reg = <0>;
@@ -117,7 +118,7 @@
		qcom,scale-function = <2>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
		/* qcom,vadc-thermal-node; */
		qcom,vadc-thermal-node;
	};

	chan@32 {
@@ -129,7 +130,7 @@
		qcom,scale-function = <4>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
		/* qcom,vadc-thermal-node; */
		qcom,vadc-thermal-node;
	};

	chan@3c {
@@ -141,7 +142,7 @@
		qcom,scale-function = <4>;
		qcom,hw-settle-time = <2>;
		qcom,fast-avg-setup = <0>;
		/* qcom,vadc-thermal-node; */
		qcom,vadc-thermal-node;
	};
};