Loading Documentation/devicetree/bindings/thermal/tsens.txt 0 → 100644 +46 −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. 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". - 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 and "tsens_tm_physical" for physical address of the TM 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. Example: tsens@fc4a8000 { compatible = "qcom,msm-tsens"; reg = <0xfc4a8000 0x10>, <0xfc4b8000 0x1ff>; reg-names = "tsens_srot_physical", "tsens_tm_physical"; interrupts = <0 184 0>; interrupt-names = "tsens-upper-lower"; }; arch/arm64/boot/dts/qcom/sdm855.dtsi +22 −0 Original line number Diff line number Diff line Loading @@ -1944,6 +1944,28 @@ <DCC_READ 0x0c202244 1 0>; }; tsens0: tsens@c222000 { compatible = "qcom,tsens24xx"; reg = <0xc222000 0x4>, <0xc263000 0x1ff>; reg-names = "tsens_srot_physical", "tsens_tm_physical"; interrupts = <0 506 0>, <0 508 0>; interrupt-names = "tsens-upper-lower", "tsens-critical"; #thermal-sensor-cells = <1>; }; tsens1: tsens@c223000 { compatible = "qcom,tsens24xx"; reg = <0xc223000 0x4>, <0xc265000 0x1ff>; reg-names = "tsens_srot_physical", "tsens_tm_physical"; interrupts = <0 507 0>, <0 509 0>; interrupt-names = "tsens-upper-lower", "tsens-critical"; #thermal-sensor-cells = <1>; }; thermal_zones: thermal-zones { }; }; Loading arch/arm64/configs/sdm855-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ CONFIG_POWER_RESET_XGENE=y CONFIG_POWER_RESET_SYSCON=y CONFIG_THERMAL=y CONFIG_QCOM_SPMI_TEMP_ALARM=y CONFIG_THERMAL_TSENS=y CONFIG_MFD_SPMI_PMIC=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y Loading arch/arm64/configs/sdm855_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -277,6 +277,7 @@ CONFIG_POWER_RESET_XGENE=y CONFIG_POWER_RESET_SYSCON=y CONFIG_THERMAL=y CONFIG_QCOM_SPMI_TEMP_ALARM=y CONFIG_THERMAL_TSENS=y CONFIG_MFD_SPMI_PMIC=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y Loading drivers/thermal/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -460,6 +460,16 @@ config GENERIC_ADC_THERMAL to this driver. This driver reports the temperature by reading ADC channel and converts it to temperature based on lookup table. config THERMAL_TSENS tristate "Qualcomm Technologies Inc. TSENS Temperature driver" depends on THERMAL help This enables the thermal sysfs driver for the TSENS device. It shows up in Sysfs as a thermal zone with multiple trip points. Also able to set threshold temperature for both warm and cool and update thermal userspace client when a threshold is reached. Warm/Cool temperature thresholds can be set independently for each sensor. menu "Qualcomm thermal drivers" depends on (ARCH_QCOM && OF) || COMPILE_TEST source "drivers/thermal/qcom/Kconfig" Loading Loading
Documentation/devicetree/bindings/thermal/tsens.txt 0 → 100644 +46 −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. 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". - 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 and "tsens_tm_physical" for physical address of the TM 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. Example: tsens@fc4a8000 { compatible = "qcom,msm-tsens"; reg = <0xfc4a8000 0x10>, <0xfc4b8000 0x1ff>; reg-names = "tsens_srot_physical", "tsens_tm_physical"; interrupts = <0 184 0>; interrupt-names = "tsens-upper-lower"; };
arch/arm64/boot/dts/qcom/sdm855.dtsi +22 −0 Original line number Diff line number Diff line Loading @@ -1944,6 +1944,28 @@ <DCC_READ 0x0c202244 1 0>; }; tsens0: tsens@c222000 { compatible = "qcom,tsens24xx"; reg = <0xc222000 0x4>, <0xc263000 0x1ff>; reg-names = "tsens_srot_physical", "tsens_tm_physical"; interrupts = <0 506 0>, <0 508 0>; interrupt-names = "tsens-upper-lower", "tsens-critical"; #thermal-sensor-cells = <1>; }; tsens1: tsens@c223000 { compatible = "qcom,tsens24xx"; reg = <0xc223000 0x4>, <0xc265000 0x1ff>; reg-names = "tsens_srot_physical", "tsens_tm_physical"; interrupts = <0 507 0>, <0 509 0>; interrupt-names = "tsens-upper-lower", "tsens-critical"; #thermal-sensor-cells = <1>; }; thermal_zones: thermal-zones { }; }; Loading
arch/arm64/configs/sdm855-perf_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -269,6 +269,7 @@ CONFIG_POWER_RESET_XGENE=y CONFIG_POWER_RESET_SYSCON=y CONFIG_THERMAL=y CONFIG_QCOM_SPMI_TEMP_ALARM=y CONFIG_THERMAL_TSENS=y CONFIG_MFD_SPMI_PMIC=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y Loading
arch/arm64/configs/sdm855_defconfig +1 −0 Original line number Diff line number Diff line Loading @@ -277,6 +277,7 @@ CONFIG_POWER_RESET_XGENE=y CONFIG_POWER_RESET_SYSCON=y CONFIG_THERMAL=y CONFIG_QCOM_SPMI_TEMP_ALARM=y CONFIG_THERMAL_TSENS=y CONFIG_MFD_SPMI_PMIC=y CONFIG_REGULATOR=y CONFIG_REGULATOR_FIXED_VOLTAGE=y Loading
drivers/thermal/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -460,6 +460,16 @@ config GENERIC_ADC_THERMAL to this driver. This driver reports the temperature by reading ADC channel and converts it to temperature based on lookup table. config THERMAL_TSENS tristate "Qualcomm Technologies Inc. TSENS Temperature driver" depends on THERMAL help This enables the thermal sysfs driver for the TSENS device. It shows up in Sysfs as a thermal zone with multiple trip points. Also able to set threshold temperature for both warm and cool and update thermal userspace client when a threshold is reached. Warm/Cool temperature thresholds can be set independently for each sensor. menu "Qualcomm thermal drivers" depends on (ARCH_QCOM && OF) || COMPILE_TEST source "drivers/thermal/qcom/Kconfig" Loading