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

Commit c971aa36 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull thermal updates from Zhang Rui:

 - fix resources release in error paths when registering thermal zone.
   (Christophe Jaillet)

 - introduce a new thermal driver for on-chip PVT (Process, Voltage and
   Temperature) monitoring unit implemented on UniPhier SoCs. This
   driver supports temperature monitoring and alert function. (Kunihiko
   Hayashi)

 - Add support for mt2712 chip in the mtk_thermal driver. (Louis Yu)

 - Add support for RK3328 SOC in rockchip_thermal driver. (Rocky Hao)

 - cleanup a couple of platform thermal drivers to constify
   thermal_zone_of_device_ops structures. (Julia Lawall)

 - a couple of fixes in int340x and intel_pch_thermal thermal driver.
   (Arvind Yadav, Sumeet Pawnikar, Brian Bian, Ed Swierk, Zhang Rui)

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (27 commits)
  Thermal: int3406_thermal: fix thermal sysfs I/F
  thermal: mediatek: minor mtk_thermal.c cleanups
  thermal: mediatek: extend calibration data for mt2712 chip
  thermal: mediatek: add Mediatek thermal driver for mt2712
  dt-bindings: thermal: Add binding document for Mediatek thermal controller
  thermal: intel_pch_thermal: Fix enable check on Broadwell-DE
  thermal: rockchip: Support the RK3328 SOC in thermal driver
  dt-bindings: rockchip-thermal: Support the RK3328 SoC compatible
  thermal: bcm2835: constify thermal_zone_of_device_ops structures
  thermal: exynos: constify thermal_zone_of_device_ops structures
  thermal: zx2967: constify thermal_zone_of_device_ops structures
  thermal: rcar_gen3_thermal: constify thermal_zone_of_device_ops structures
  thermal: qoriq: constify thermal_zone_of_device_ops structures
  thermal: hisilicon: constify thermal_zone_of_device_ops structures
  thermal: core: Fix resources release in error paths in thermal_zone_device_register()
  thermal: core: Use the new 'thermal_zone_destroy_device_groups()' helper function
  thermal: core: Add some new helper functions to free resources
  thermal: int3400_thermal: process "thermal table changed" event
  thermal: uniphier: add UniPhier thermal driver
  dt-bindings: thermal: add binding documentation for UniPhier thermal monitor
  ...
parents 8e7757d8 b32b5e14
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ Required properties:
- compatible:
  - "mediatek,mt8173-thermal" : For MT8173 family of SoCs
  - "mediatek,mt2701-thermal" : For MT2701 family of SoCs
  - "mediatek,mt2712-thermal" : For MT2712 family of SoCs
- reg: Address range of the thermal controller
- interrupts: IRQ for the thermal controller
- clocks, clock-names: Clocks needed for the thermal controller. required
+1 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ Required properties:
- compatible : should be "rockchip,<name>-tsadc"
   "rockchip,rk3228-tsadc": found on RK3228 SoCs
   "rockchip,rk3288-tsadc": found on RK3288 SoCs
   "rockchip,rk3328-tsadc": found on RK3328 SoCs
   "rockchip,rk3368-tsadc": found on RK3368 SoCs
   "rockchip,rk3399-tsadc": found on RK3399 SoCs
- reg : physical base address of the controller and length of memory mapped
+64 −0
Original line number Diff line number Diff line
* UniPhier Thermal bindings

This describes the devicetree bindings for thermal monitor supported by
PVT(Process, Voltage and Temperature) monitoring unit implemented on Socionext
UniPhier SoCs.

Required properties:
- compatible :
  - "socionext,uniphier-pxs2-thermal" : For UniPhier PXs2 SoC
  - "socionext,uniphier-ld20-thermal" : For UniPhier LD20 SoC
- interrupts : IRQ for the temperature alarm
- #thermal-sensor-cells : Should be 0. See ./thermal.txt for details.

Optional properties:
- socionext,tmod-calibration: A pair of calibrated values referred from PVT,
                              in case that the values aren't set on SoC,
                              like a reference board.

Example:

	sysctrl@61840000 {
		compatible = "socionext,uniphier-ld20-sysctrl",
			     "simple-mfd", "syscon";
		reg = <0x61840000 0x10000>;
		...
		pvtctl: pvtctl {
			compatible = "socionext,uniphier-ld20-thermal";
			interrupts = <0 3 1>;
			#thermal-sensor-cells = <0>;
		};
		...
	};

	thermal-zones {
		cpu_thermal {
			polling-delay-passive = <250>;	/* 250ms */
			polling-delay = <1000>;		/* 1000ms */
			thermal-sensors = <&pvtctl>;

			trips {
				cpu_crit: cpu_crit {
					temperature = <110000>;	/* 110C */
					hysteresis = <2000>;
					type = "critical";
				};
				cpu_alert: cpu_alert {
					temperature = <100000>;	/* 100C */
					hysteresis = <2000>;
					type = "passive";
				};
			};

			cooling-maps {
				map0 {
					trip = <&cpu_alert>;
					cooling-device = <&cpu0 (-1) (-1)>;
				};
				map1 {
					trip = <&cpu_alert>;
					cooling-device = <&cpu2 (-1) (-1)>;
				};
			};
		};
	};
+10 −2
Original line number Diff line number Diff line
@@ -342,7 +342,7 @@ config X86_PKG_TEMP_THERMAL

config INTEL_SOC_DTS_IOSF_CORE
	tristate
	depends on X86
	depends on X86 && PCI
	select IOSF_MBI
	help
	  This is becoming a common feature for Intel SoCs to expose the additional
@@ -352,7 +352,7 @@ config INTEL_SOC_DTS_IOSF_CORE

config INTEL_SOC_DTS_THERMAL
	tristate "Intel SoCs DTS thermal driver"
	depends on X86
	depends on X86 && PCI
	select INTEL_SOC_DTS_IOSF_CORE
	select THERMAL_WRITABLE_TRIPS
	help
@@ -473,4 +473,12 @@ config ZX2967_THERMAL
	  the primitive temperature sensor embedded in zx2967 SoCs.
	  This sensor generates the real time die temperature.

config UNIPHIER_THERMAL
	tristate "Socionext UniPhier thermal driver"
	depends on ARCH_UNIPHIER || COMPILE_TEST
	depends on THERMAL_OF && MFD_SYSCON
	help
	  Enable this to plug in UniPhier on-chip PVT thermal driver into the
	  thermal framework. The driver supports CPU thermal zone temperature
	  reporting and a couple of trip points.
endif
+1 −0
Original line number Diff line number Diff line
@@ -59,3 +59,4 @@ obj-$(CONFIG_HISI_THERMAL) += hisi_thermal.o
obj-$(CONFIG_MTK_THERMAL)	+= mtk_thermal.o
obj-$(CONFIG_GENERIC_ADC_THERMAL)	+= thermal-generic-adc.o
obj-$(CONFIG_ZX2967_THERMAL)	+= zx2967_thermal.o
obj-$(CONFIG_UNIPHIER_THERMAL)	+= uniphier_thermal.o
Loading