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

Commit 83e230bf authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ARM: dts: msm: Add TSENS node support for lahaina"

parents bc055b05 48914a6d
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
Qualcomm Technologies, Inc. TSENS driver

Temperature sensor (TSENS) driver supports reading temperature from sensors
across the MSM. The driver defaults to support a 12 bit ADC.

The driver uses the Thermal sysfs framework to provide thermal
clients the ability to read from supported on-die temperature sensors,
set temperature thresholds for cool/warm thresholds and receive notification
on temperature threshold events.

TSENS node

Required properties:
- compatible : should be "qcom,msm8996-tsens" for 8996 TSENS driver.
	       should be "qcom,msm8953-tsens" for 8953 TSENS driver.
	       should be "qcom,msm8998-tsens" for 8998 TSENS driver.
	       should be "qcom,msmhamster-tsens" for hamster TSENS driver.
	       should be "qcom,sdm660-tsens" for 660 TSENS driver.
	       should be "qcom,sdm630-tsens" for 630 TSENS driver.
	       should be "qcom,sdm845-tsens" for SDM845 TSENS driver.
	       should be "qcom,tsens24xx" for 2.4 TSENS controller.
	       should be "qcom,msm8937-tsens" for 8937 TSENS driver.
	       should be "qcom,qcs405-tsens" for QCS405 TSENS driver.
	       should be "qcom,sm6150-tsens" for 6150 TSENS driver.
	       should be "qcom,tsens26xx" for 2.6 TSENS controller.

	       The compatible property is used to identify the respective controller to use
	       for the corresponding SoC.
- reg : offset and length of the TSENS registers with associated property in reg-names
	as "tsens_srot_physical" for TSENS SROT physical address region. TSENS TM
	physical address region as "tsens_tm_physical", and "tsens_eeprom_physical" for the
	TSENS calibration fuse register region.
- reg-names : resource names used for the physical address of the TSENS
	      registers. Should be "tsens_srot_physical" for physical address of the TSENS
	      SROT region, "tsens_tm_physical" for physical address of the TM region and
		  "tsens_eeprom_physical" for the TSENS calibration fuse register region.
- interrupts : TSENS interrupt to notify Upper/Lower and Critical temperature threshold.
- interrupt-names: Should be "tsens-upper-lower" for temperature threshold.
		   Add "tsens-critical" for Critical temperature threshold notification
		   in addition to "tsens-upper-lower" for 8996 TSENS since
		   8996 supports Upper/Lower and Critical temperature threshold.
- tsens-reinit-wa : To support the re-initialization of tsens controller from
			trustzone
Example:

tsens@fc4a8000 {
	compatible = "qcom,msm-tsens";
	reg = <0xfc4a8000 0x10>,
		<0xfc4b8000 0x1ff>;
	reg-names = "tsens_srot_physical",
		    "tsens_tm_physical",
			"tsens_eeprom_physical",
	interrupts = <0 184 0>;
	interrupt-names = "tsens-upper-lower";
};
+613 −0
Original line number Diff line number Diff line
#include <dt-bindings/thermal/thermal.h>

&thermal_zones {
	aoss-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 0>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-0-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 1>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-0-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 2>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-0-2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 3>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-0-3-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 4>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpuss-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 5>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpuss-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 6>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 7>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 8>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 9>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-3-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 10>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-4-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 11>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-5-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 12>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-6-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 13>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	cpu-1-7-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens0 14>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	aoss-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 0>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	gpuss-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 1>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	gpuss-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 2>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	nspss-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 3>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	nspss-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 4>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	nspss-2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 5>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	video-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 6>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	ddr-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 7>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdmss-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 8>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdmss-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 9>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdmss-2-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 10>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	mdmss-3-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 11>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	camera-0-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 12>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};

	camera-1-usr {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&tsens1 13>;
		wake-capable-sensor;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};

			reset-mon-cfg {
				temperature = <115000>;
				hysteresis = <5000>;
				type = "passive";
			};
		};
	};
};
+28 −0
Original line number Diff line number Diff line
@@ -2151,6 +2151,34 @@
		qcom,wakeup-enable;
	};

	tsens0:tsens@c222000 {
		compatible = "qcom,tsens24xx";
		reg = <0x0C222000 0x8>,
		      <0x0C263000 0x1ff>;
		reg-names = "tsens_srot_physical",
			"tsens_tm_physical";
		interrupts-extended = <&pdc 26 IRQ_TYPE_LEVEL_HIGH>,
			<&pdc 28 IRQ_TYPE_LEVEL_HIGH>,
			<&pdc 20 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "tsens-upper-lower", "tsens-critical",
				"tsens-0C";
		#thermal-sensor-cells = <1>;
	};

	tsens1:tsens@c223000 {
		compatible = "qcom,tsens24xx";
		reg = <0x0C223000 0x8>,
			<0x0C265000 0x1ff>;
		reg-names = "tsens_srot_physical",
			"tsens_tm_physical";
		interrupts-extended = <&pdc 27 IRQ_TYPE_LEVEL_HIGH>,
			<&pdc 29 IRQ_TYPE_LEVEL_HIGH>,
			<&pdc 21 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "tsens-upper-lower", "tsens-critical",
				"tsens-0C";
		#thermal-sensor-cells = <1>;
	};

	qcom,glink {
		compatible = "qcom,glink";
		#address-cells = <1>;