27 Jan, 2020
4 commits
-
This patch adds the support for allwinner thermal sensor, within
allwinner SoC. It will register sensors for thermal framework
and use device tree to bind cooling device.Signed-off-by: Yangtao Li
Signed-off-by: Ondrej Jirman
Signed-off-by: Vasily Khoruzhick
Acked-by: Maxime Ripard
Signed-off-by: Daniel Lezcano
Link: https://lore.kernel.org/r/20191219172823.1652600-2-anarsoul@gmail.com -
As we introduced the idle injection cooling device called
cpuidle_cooling, let's be consistent and rename the cpu_cooling to
cpufreq_cooling as this one mitigates with OPPs changes.Signed-off-by: Daniel Lezcano
Acked-by: Viresh Kumar
Reviewed-by: Amit Kucheria
Link: https://lore.kernel.org/r/20191219225317.17158-3-daniel.lezcano@linaro.org -
The cpu idle cooling device offers a new method to cool down a CPU by
injecting idle cycles at runtime.It has some similarities with the intel power clamp driver but it is
actually designed to be more generic and relying on the idle injection
powercap framework.The idle injection duration is fixed while the running duration is
variable. That allows to have control on the device reactivity for the
user experience.An idle state powering down the CPU or the cluster will allow to drop
the static leakage, thus restoring the heat capacity of the SoC. It
can be set with a trip point between the hot and the critical points,
giving the opportunity to prevent a hard reset of the system when the
cpufreq cooling fails to cool down the CPU.With more sophisticated boards having a per core sensor, the idle
cooling device allows to cool down a single core without throttling
the compute capacity of several cpus belonging to the same clock line,
so it could be used in collaboration with the cpufreq cooling device.Signed-off-by: Daniel Lezcano
Acked-by: Viresh Kumar
Link: https://lore.kernel.org/r/20191219225317.17158-2-daniel.lezcano@linaro.org -
The next changes will add a new way to cool down a CPU by injecting
idle cycles. With the current configuration, a CPU cooling device is
the cpufreq cooling device. As we want to add a new CPU cooling
device, let's convert the CPU cooling to a choice giving a list of CPU
cooling devices. At this point, there is obviously only one CPU
cooling device.There is no functional changes.
Signed-off-by: Daniel Lezcano
Acked-by: Viresh Kumar
Link: https://lore.kernel.org/r/20191204153930.9128-1-daniel.lezcano@linaro.org
07 Nov, 2019
1 commit
-
Amlogic G12A and G12B SoCs integrate two thermal sensors
with the same design. One is located close to the DDR controller
and the other one is located close to the PLLs (between the CPU and GPU).The calibration data for each of the thermal sensors instance is stored
in a different location within the AO region.Implement reading the temperature from each thermal sensor.
The IP block has more functionality, which may be added to this driver
in the future:
- chip reset when the temperature exceeds a configurable threshold
- up to four interrupts when the temperature has risen above a
configurable threshold
- up to four interrupts when the temperature has fallen below a
configurable thresholdTested-by: Christian Hewitt
Tested-by: Kevin Hilman
Reviewed-by: Amit Kucheria
Signed-off-by: Guillaume La Roque
Signed-off-by: Daniel Lezcano
Link: https://lore.kernel.org/r/20191004090114.30694-3-glaroque@baylibre.com
14 May, 2019
1 commit
-
This is a generic thermal driver for simple MMIO sensors, of which
amazon,al-thermal is one.This device uses a single MMIO transaction to read the temperature and
report it to the thermal subsystem.Signed-off-by: Talel Shenhar
Reviewed-by: David Woodhouse
Reviewed-by: Daniel Lezcano
Signed-off-by: Eduardo Valentin
07 Dec, 2018
2 commits
-
This cleans up the directory a bit allowing just one place to look for
thermal related drivers for QCOM platforms instead of being scattered in
the root directory and the qcom/ subdirectory. Compile-tested with
ARCH=arm64 defconfig and the driver explicitly enabled with menuconfig.Signed-off-by: Amit Kucheria
Acked-by: Daniel Lezcano
Signed-off-by: Zhang Rui -
This cleans up the directory a bit, now that we have several other
platforms using platform-specific sub-directories. Compile-tested with
ARCH=x86 defconfig and the drivers explicitly enabled with menuconfig.Signed-off-by: Amit Kucheria
Acked-by: Daniel Lezcano
Signed-off-by: Zhang Rui
26 Oct, 2018
1 commit
-
Add support for DTS thermal sensor that can be
found on some STM32 platforms.This driver is based on OF and works in interrupt
mode.It offers two temperature trip points:
passive and critical. The first is intended for
passive cooling notification while the second is
used for over-temperature reset.Signed-off-by: David Hernandez Sanchez
Signed-off-by: Eduardo Valentin
17 Nov, 2017
1 commit
-
Pull ARM SoC driver updates from Arnd Bergmann:
"This branch contains platform-related driver updates for ARM and
ARM64, these are the areas that bring the changes:New drivers:
- driver support for Renesas R-Car V3M (R8A77970)
- power management support for Amlogic GX
- a new driver for the Tegra BPMP thermal sensor
- a new bus driver for Technologic Systems NBUS
Changes for subsystems that prefer to merge through arm-soc:
- the usual updates for reset controller drivers from Philipp Zabel,
with five added drivers for SoCs in the arc, meson, socfpa,
uniphier and mediatek families- updates to the ARM SCPI and PSCI frameworks, from Sudeep Holla,
Heiner Kallweit and Lorenzo PieralisiChanges specific to some ARM-based SoC
- the Freescale/NXP DPAA QBMan drivers from PowerPC can now work on
ARM as well- several changes for power management on Broadcom SoCs
- various improvements on Qualcomm, Broadcom, Amlogic, Atmel,
Mediatek- minor Cleanups for Samsung, TI OMAP SoCs"
[ NOTE! This doesn't work without the previous ARM SoC device-tree pull,
because the R8A77970 driver is missing a header file that came from
that pull.The fact that this got merged afterwards only fixes it at this point,
and bisection of that driver will fail if/when you walk into the
history of that driver. - Linus ]* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (96 commits)
soc: amlogic: meson-gx-pwrc-vpu: fix power-off when powered by bootloader
bus: add driver for the Technologic Systems NBUS
memory: omap-gpmc: Remove deprecated gpmc_update_nand_reg()
soc: qcom: remove unused label
soc: amlogic: gx pm domain: add PM and OF dependencies
drivers/firmware: psci_checker: Add missing destroy_timer_on_stack()
dt-bindings: power: add amlogic meson power domain bindings
soc: amlogic: add Meson GX VPU Domains driver
soc: qcom: Remote filesystem memory driver
dt-binding: soc: qcom: Add binding for rmtfs memory
of: reserved_mem: Accessor for acquiring reserved_mem
of/platform: Generalize /reserved-memory handling
soc: mediatek: pwrap: fix fatal compiler error
soc: mediatek: pwrap: fix compiler errors
arm64: mediatek: cleanup message for platform selection
soc: Allow test-building of MediaTek drivers
soc: mediatek: place Kconfig for all SoC drivers under menu
soc: mediatek: pwrap: add support for MT7622 SoC
soc: mediatek: pwrap: add common way for setup CS timing extenstion
soc: mediatek: pwrap: add MediaTek MT6380 as one slave of pwrap
..
02 Nov, 2017
1 commit
-
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.By default all files without license information are under the default
license of the kernel, which is GPL version 2.Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if
Reviewed-by: Philippe Ombredanne
Reviewed-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
19 Oct, 2017
1 commit
-
On Tegra186, the BPMP (Boot and Power Management Processor) exposes an
interface to thermal sensors on the system-on-chip. This driver
implements access to the interface. It supports reading the
temperature, setting trip points and receiving notification of a
tripped trip point.Signed-off-by: Mikko Perttunen
Acked-by: Zhang Rui
Signed-off-by: Thierry Reding
11 Aug, 2017
1 commit
-
Add a thermal driver for on-chip PVT (Process, Voltage and Temperature)
monitoring unit implemented on UniPhier SoCs. This driver supports
temperature monitoring and alert function.Signed-off-by: Kunihiko Hayashi
Signed-off-by: Zhang Rui
13 May, 2017
1 commit
-
Pull thermal management updates from Zhang Rui:
- Fix a problem where orderly_shutdown() is called for multiple times
due to multiple critical overheating events raised in a short period
by platform thermal driver. (Keerthy)- Introduce a backup thermal shutdown mechanism, which invokes
kernel_power_off()/emergency_restart() directly, after
orderly_shutdown() being issued for certain amount of time(specified
via Kconfig). This is useful in certain conditions that userspace may
be unable to power off the system in a clean manner and leaves the
system in a critical state, like in the middle of driver probing
phase. (Keerthy)- Introduce a new interface in thermal devfreq_cooling code so that the
driver can provide more precise data regarding actual power to the
thermal governor every time the power budget is calculated. (Lukasz
Luba)- Introduce BCM 2835 soc thermal driver and northstar thermal driver,
within a new sub-folder. (Rafał Miłecki)- Introduce DA9062/61 thermal driver. (Steve Twiss)
- Remove non-DT booting on TI-SoC driver. Also add support to fetching
coefficients from DT. (Keerthy)- Refactorf RCAR Gen3 thermal driver. (Niklas Söderlund)
- Small fix on MTK and intel-soc-dts thermal driver. (Dawei Chien,
Brian Bian)* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (25 commits)
thermal: core: Add a back up thermal shutdown mechanism
thermal: core: Allow orderly_poweroff to be called only once
Thermal: Intel SoC DTS: Change interrupt request behavior
trace: thermal: add another parameter 'power' to the tracing function
thermal: devfreq_cooling: add new interface for direct power read
thermal: devfreq_cooling: refactor code and add get_voltage function
thermal: mt8173: minor mtk_thermal.c cleanups
thermal: bcm2835: move to the broadcom subdirectory
thermal: broadcom: ns: specify myself as MODULE_AUTHOR
thermal: da9062/61: Thermal junction temperature monitoring driver
Documentation: devicetree: thermal: da9062/61 TJUNC temperature binding
thermal: broadcom: add Northstar thermal driver
dt-bindings: thermal: add support for Broadcom's Northstar thermal
thermal: bcm2835: add thermal driver for bcm2835 SoC
dt-bindings: Add thermal zone to bcm2835-thermal example
thermal: rcar_gen3_thermal: add suspend and resume support
thermal: rcar_gen3_thermal: store device match data in private structure
thermal: rcar_gen3_thermal: enable hardware interrupts for trip points
thermal: rcar_gen3_thermal: record and check number of TSCs found
thermal: rcar_gen3_thermal: check that TSC exists before memory allocation
...
23 Apr, 2017
1 commit
-
We already have 2 Broadcom drivers and at least 1 more is coming. This
made us create broadcom subdirectory where bcm2835 should be moves now.Acked-by: Florian Fainelli
Signed-off-by: Rafał Miłecki
Signed-off-by: Eduardo Valentin
07 Apr, 2017
2 commits
-
Add junction temperature monitoring supervisor device driver, compatible
with the DA9062 and DA9061 PMICs. A MODULE_DEVICE_TABLE() macro is added.If the PMIC's internal junction temperature rises above T_WARN (125 degC)
an interrupt is issued. This T_WARN level is defined as the
THERMAL_TRIP_HOT trip-wire inside the device driver.The thermal triggering mechanism is interrupt based and happens when the
temperature rises above a given threshold level. The component cannot
return an exact temperature, it only has knowledge if the temperature is
above or below a given threshold value. A status bit must be polled to
detect when the temperature falls below that threshold level again. A
kernel work queue is configured to repeatedly poll and detect when the
temperature falls below this trip-wire, between 1 and 10 second intervals
(defaulting at 3 seconds).This scheme is provided as an example. It would be expected that any
final implementation will also include a notify() function and any of these
settings could be altered to match the application where appropriate.When over-temperature is reached, the interrupt from the DA9061/2 will be
repeatedly triggered. The IRQ is therefore disabled when the first
over-temperature event happens and the status bit is polled using a
work-queue until it becomes false.This strategy is designed to allow the periodic transmission of uevents
(HOT trip point) as the first level of temperature supervision method. It
is intended for non-invasive temperature control, where the necessary
measures for cooling the system down are left to the host software. Once
the temperature falls again, the IRQ is re-enabled so a new critical
over-temperature event can be detected.Reviewed-by: Lukasz Luba
Signed-off-by: Steve Twiss
Signed-off-by: Eduardo Valentin -
Northstar is a SoC family commonly used in home routers. This commit
adds a driver for checking CPU temperature. As Northstar Plus seems to
also have this IP block this new symbol gets ARCH_BCM_IPROC dependency.Signed-off-by: Rafał Miłecki
Signed-off-by: Jon Mason
Signed-off-by: Eduardo Valentin
02 Apr, 2017
1 commit
-
Add basic thermal driver for bcm2835 SoC.
This driver currently make sure that tsense HW block is set up
correctly.Tested-by: Rafał Miłecki
Signed-off-by: Martin Sperl
Signed-off-by: Stefan Wahren
Acked-by: Eric Anholt
Acked-by: Eduardo Valentin
Signed-off-by: Eduardo Valentin
16 Mar, 2017
1 commit
-
The best place to register the CPU cooling device is from the cpufreq
driver as we would know if all the resources are already available or
not. That's what is done for the cpufreq-dt.c driver as well.The cpu-cooling driver for dbx500 platform was just (un)registering
with the thermal framework and that can be handled easily by the cpufreq
driver as well and in proper sequence as well.Get rid of the cooling driver and its its users and manage everything
from the cpufreq driver instead.Signed-off-by: Viresh Kumar
Tested-by: Linus Walleij
Signed-off-by: Rafael J. Wysocki
19 Feb, 2017
1 commit
-
This patch adds thermal driver for ZTE's zx2967 family.
Signed-off-by: Baoyou Xie
Reviewed-by: Mathieu Poirier
Signed-off-by: Eduardo Valentin
20 Jan, 2017
1 commit
-
Add support for R-Car Gen3 thermal sensors. Polling only for now,
interrupts will be added incrementally. Same goes for reading fuses.
This is documented already, but no hardware available for now.Signed-off-by: Hien Dang
Signed-off-by: Thao Nguyen
Signed-off-by: Khiem Nguyen
Signed-off-by: Wolfram Sang
[Niklas: document and rework temperature calculation]
Signed-off-by: Niklas Söderlund
Signed-off-by: Eduardo Valentin
23 Nov, 2016
2 commits
-
Here we have a simple code organization. This patch moves
functions that do not need to handle thermal core internal
data structure to thermal_helpers.c file.Cc: Zhang Rui
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui -
This is a code reorganization, simply to concentrate
the code handling sysfs in a specific file: thermal_sysfs.c.Right now, moving only the sysfs entries of thermal_zone_device.
Cc: Zhang Rui
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui
27 Sep, 2016
4 commits
-
…-hw-throttle' into next
-
Maxim Semiconductor Max77620 supports alarm interrupts when
its die temperature crosses 120C and 140C. These threshold
temperatures are not configurable.Add thermal driver to register PMIC die temperature as thermal
zone sensor and capture the die temperature warning interrupts
to notifying the client.Signed-off-by: Laxman Dewangan
Signed-off-by: Zhang Rui -
This driver add thermal management support by enabling TMU (Thermal
Monitoring Unit) on QorIQ platform.It's based on thermal of framework:
- Trip points defined in device tree.
- Cpufreq as cooling device registered in qoriq cpufreq driver.Signed-off-by: Jia Hongtao
Signed-off-by: Zhang Rui -
TSENS is Qualcomms' thermal temperature sensor device. It
supports reading temperatures from multiple thermal sensors
present on various QCOM SoCs.
Calibration data is generally read from a non-volatile memory
(eeprom) device.Add a skeleton driver with all the necessary abstractions so
a variety of qcom device families which support TSENS can
add driver extensions.Also add the required device tree bindings which can be used
to describe the TSENS device in DT.Signed-off-by: Rajendra Nayak
Reviewed-by: Lina Iyer
Signed-off-by: Eduardo Valentin
Signed-off-by: Zhang Rui
06 Sep, 2016
1 commit
-
This change adds support for Intel BXT Whiskey Cove PMIC thermal
driver which is intended to handle the alert interrupts triggered
upon thermal trip point cross and notify the thermal framework
appropriately with the zone, temp, crossed trip and event details.Signed-off-by: Yegnesh S Iyer
Signed-off-by: Bin Gao
Signed-off-by: Zhang Rui
17 May, 2016
3 commits
-
In some of platform, thermal sensors like NCT thermistors are
connected to the one of ADC channel. The temperature is read by
reading the voltage across the sensor resistance via ADC. Lookup
table for ADC read value to temperature is referred to get
temperature. ADC is read via IIO framework.Add support for thermal sensor driver which read the voltage across
sensor resistance from ADC through IIO framework.Acked-by: Jonathan Cameron
Signed-off-by: Laxman Dewangan
Signed-off-by: Eduardo Valentin -
The Tango thermal driver provides support for the primitive temperature
sensor embedded in Tango chips since the SMP8758.This sensor only generates a 1-bit signal to indicate whether the die
temperature exceeds a programmable threshold.Signed-off-by: Marc Gonzalez
Signed-off-by: Eduardo Valentin -
Move Tegra soctherm driver to tegra directory, it's easy to maintain
and add more new function support for Tegra platforms.
This will also help to split soctherm driver into common parts and
chip specific data related parts.Signed-off-by: Wei Ni
Signed-off-by: Eduardo Valentin
18 Feb, 2016
1 commit
-
This adds support for the Mediatek thermal controller found on MT8173
and likely other SoCs.
The controller is a bit special. It does not have its own ADC, instead
it controls the on-SoC AUXADC via AHB bus accesses. For this reason
we need the physical address of the AUXADC. Also it controls a mux
using AHB bus accesses, so we need the APMIXEDSYS physical address aswell.Signed-off-by: Sascha Hauer
Signed-off-by: Eduardo Valentin
31 Oct, 2015
1 commit
-
Add a generic thermal cooling device for devfreq, that is similar to
cpu_cooling.The device must use devfreq. In order to use the power extension of the
cooling device, it must have registered its OPPs using the OPP library.Cc: Zhang Rui
Cc: Eduardo Valentin
Signed-off-by: Javi Merino
Signed-off-by: Ørjan Eide
Signed-off-by: Eduardo Valentin
04 Aug, 2015
1 commit
-
This change adds a thermal driver for Wildcat Point platform controller
hub. This driver register PCH thermal sensor as a thermal zone and
associate critical and hot trips if present.Signed-off-by: Tushar Dave
Reviewed-by: Pandruvada, Srinivas
Signed-off-by: Zhang Rui
11 Jun, 2015
1 commit
04 Jun, 2015
1 commit
-
This patch adds the support for hisilicon thermal sensor, within
hisilicon SoC. there will register sensors for thermal framework
and use device tree to bind cooling device.Signed-off-by: Leo Yan
Signed-off-by: kongxinwei
Signed-off-by: Eduardo Valentin
05 May, 2015
2 commits
-
The power allocator governor is a thermal governor that controls system
and device power allocation to control temperature. Conceptually, the
implementation divides the sustainable power of a thermal zone among
all the heat sources in that zone.This governor relies on "power actors", entities that represent heat
sources. They can report current and maximum power consumption and
can set a given maximum power consumption, usually via a cooling
device.The governor uses a Proportional Integral Derivative (PID) controller
driven by the temperature of the thermal zone. The output of the
controller is a power budget that is then allocated to each power
actor that can have bearing on the temperature we are trying to
control. It decides how much power to give each cooling device based
on the performance they are requesting. The PID controller ensures
that the total power budget does not exceed the control temperature.Cc: Zhang Rui
Cc: Eduardo Valentin
Signed-off-by: Punit Agrawal
Signed-off-by: Javi Merino
Signed-off-by: Eduardo Valentin -
Add support for the temperature alarm peripheral found inside
Qualcomm plug-and-play (QPNP) PMIC chips. The temperature alarm
peripheral outputs a pulse on an interrupt line whenever the
thermal over temperature stage value changes.Register a thermal sensor. The temperature reported by this thermal
sensor device should reflect the actual PMIC die temperature if an
ADC is present on the given PMIC. If no ADC is present, then the
reported temperature should be estimated from the over temperature
stage value.Cc: David Collins
Signed-off-by: Ivan T. Ivanov
Signed-off-by: Eduardo Valentin
01 May, 2015
2 commits
-
In Intel Quark SoC X1000, there is one on-die digital temperature sensor(DTS).
The DTS offers both hot & critical trip points.However, in current distribution of UEFI BIOS for Quark platform, only
critical trip point is configured to be 105 degree Celsius (based on Quark
SW ver1.0.1 and hot trip point is not used due to lack of IRQ.There is no active cooling device for Quark SoC, so Quark SoC thermal
management logic expects Linux distro to orderly power-off when temperature
of the DTS exceeds the configured critical trip point.Kernel param "polling_delay" in milliseconds is used to control the frequency
the DTS temperature is read by thermal framework. It defaults to 2-second.
To change it, use kernel boot param "intel_quark_dts_thermal.polling_delay=X".User interacts with Quark SoC DTS thermal driver through sysfs via:
/sys/class/thermal/thermal_zone0/For example:
- to read DTS temperature
$ cat temp
- to read critical trip point
$ cat trip_point_0_temp
- to read trip point type
$ cat trip_point_0_type
- to emulate temperature raise to test orderly shutdown by Linux distro
$ echo 105 > emul_tempTested-by: Bryan O'Donoghue
Signed-off-by: Ong Boon Leong
Reviewed-by: Bryan O'Donoghue
Reviewed-by: Kweh, Hock Leong
Signed-off-by: Zhang Rui -
This is becoming a common feature for Intel SoCs to expose the additional
digital temperature sensors (DTSs) using side band interface (IOSF). This
change remove common IOSF DTS handler function from the existing driver
intel_soc_dts_thermal.c and creates a stand alone module, which can
be selected from the SoC specific drivers. In this way there is less
code duplication.Signed-off-by: Srinivas Pandruvada