mirror of
https://github.com/AetherDroid/android_kernel_samsung_on5xelte.git
synced 2025-09-06 00:17:46 -04:00
Fixed MTP to work with TWRP
This commit is contained in:
commit
f6dfaef42e
50820 changed files with 20846062 additions and 0 deletions
32
Documentation/devicetree/bindings/thermal/armada-thermal.txt
Normal file
32
Documentation/devicetree/bindings/thermal/armada-thermal.txt
Normal file
|
@ -0,0 +1,32 @@
|
|||
* Marvell Armada 370/375/380/XP thermal management
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible: Should be set to one of the following:
|
||||
marvell,armada370-thermal
|
||||
marvell,armada375-thermal
|
||||
marvell,armada375-z1-thermal
|
||||
marvell,armada380-thermal
|
||||
marvell,armadaxp-thermal
|
||||
|
||||
Note: As the name suggests, "marvell,armada375-z1-thermal"
|
||||
applies for the SoC Z1 stepping only. On such stepping
|
||||
some quirks need to be done and the register offset differs
|
||||
from the one in the A0 stepping.
|
||||
The operating system may auto-detect the SoC stepping and
|
||||
update the compatible and register offsets at runtime.
|
||||
|
||||
- reg: Device's register space.
|
||||
Two entries are expected, see the examples below.
|
||||
The first one is required for the sensor register;
|
||||
the second one is required for the control register
|
||||
to be used for sensor initialization (a.k.a. calibration).
|
||||
|
||||
Example:
|
||||
|
||||
thermal@d0018300 {
|
||||
compatible = "marvell,armada370-thermal";
|
||||
reg = <0xd0018300 0x4
|
||||
0xd0018304 0x4>;
|
||||
status = "okay";
|
||||
};
|
44
Documentation/devicetree/bindings/thermal/db8500-thermal.txt
Normal file
44
Documentation/devicetree/bindings/thermal/db8500-thermal.txt
Normal file
|
@ -0,0 +1,44 @@
|
|||
* ST-Ericsson DB8500 Thermal
|
||||
|
||||
** Thermal node properties:
|
||||
|
||||
- compatible : "stericsson,db8500-thermal";
|
||||
- reg : address range of the thermal sensor registers;
|
||||
- interrupts : interrupts generated from PRCMU;
|
||||
- interrupt-names : "IRQ_HOTMON_LOW" and "IRQ_HOTMON_HIGH";
|
||||
- num-trips : number of total trip points, this is required, set it 0 if none,
|
||||
if greater than 0, the following properties must be defined;
|
||||
- tripN-temp : temperature of trip point N, should be in ascending order;
|
||||
- tripN-type : type of trip point N, should be one of "active" "passive" "hot"
|
||||
"critical";
|
||||
- tripN-cdev-num : number of the cooling devices which can be bound to trip
|
||||
point N, this is required if trip point N is defined, set it 0 if none,
|
||||
otherwise the following cooling device names must be defined;
|
||||
- tripN-cdev-nameM : name of the No. M cooling device of trip point N;
|
||||
|
||||
Usually the num-trips and tripN-*** are separated in board related dts files.
|
||||
|
||||
Example:
|
||||
thermal@801573c0 {
|
||||
compatible = "stericsson,db8500-thermal";
|
||||
reg = <0x801573c0 0x40>;
|
||||
interrupts = <21 0x4>, <22 0x4>;
|
||||
interrupt-names = "IRQ_HOTMON_LOW", "IRQ_HOTMON_HIGH";
|
||||
|
||||
num-trips = <3>;
|
||||
|
||||
trip0-temp = <75000>;
|
||||
trip0-type = "active";
|
||||
trip0-cdev-num = <1>;
|
||||
trip0-cdev-name0 = "thermal-cpufreq-0";
|
||||
|
||||
trip1-temp = <80000>;
|
||||
trip1-type = "active";
|
||||
trip1-cdev-num = <2>;
|
||||
trip1-cdev-name0 = "thermal-cpufreq-0";
|
||||
trip1-cdev-name1 = "thermal-fan";
|
||||
|
||||
trip2-temp = <85000>;
|
||||
trip2-type = "critical";
|
||||
trip2-cdev-num = <0>;
|
||||
}
|
18
Documentation/devicetree/bindings/thermal/dove-thermal.txt
Normal file
18
Documentation/devicetree/bindings/thermal/dove-thermal.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
* Dove Thermal
|
||||
|
||||
This driver is for Dove SoCs which contain a thermal sensor.
|
||||
|
||||
Required properties:
|
||||
- compatible : "marvell,dove-thermal"
|
||||
- reg : Address range of the thermal registers
|
||||
|
||||
The reg properties should contain two ranges. The first is for the
|
||||
three Thermal Manager registers, while the second range contains the
|
||||
Thermal Diode Control Registers.
|
||||
|
||||
Example:
|
||||
|
||||
thermal@10078 {
|
||||
compatible = "marvell,dove-thermal";
|
||||
reg = <0xd001c 0x0c>, <0xd005c 0x08>;
|
||||
};
|
100
Documentation/devicetree/bindings/thermal/exynos-thermal.txt
Normal file
100
Documentation/devicetree/bindings/thermal/exynos-thermal.txt
Normal file
|
@ -0,0 +1,100 @@
|
|||
* Exynos Thermal Management Unit (TMU)
|
||||
|
||||
** Required properties:
|
||||
|
||||
- compatible : One of the following:
|
||||
"samsung,exynos3250-tmu"
|
||||
"samsung,exynos4412-tmu"
|
||||
"samsung,exynos4210-tmu"
|
||||
"samsung,exynos5250-tmu"
|
||||
"samsung,exynos5260-tmu"
|
||||
"samsung,exynos5420-tmu" for TMU channel 0, 1 on Exynos5420
|
||||
"samsung,exynos5420-tmu-ext-triminfo" for TMU channels 2, 3 and 4
|
||||
Exynos5420 (Must pass triminfo base and triminfo clock)
|
||||
"samsung,exynos5440-tmu"
|
||||
- interrupt-parent : The phandle for the interrupt controller
|
||||
- reg : Address range of the thermal registers. For soc's which has multiple
|
||||
instances of TMU and some registers are shared across all TMU's like
|
||||
interrupt related then 2 set of register has to supplied. First set
|
||||
belongs to register set of TMU instance and second set belongs to
|
||||
registers shared with the TMU instance.
|
||||
|
||||
NOTE: On Exynos5420, the TRIMINFO register is misplaced for TMU
|
||||
channels 2, 3 and 4
|
||||
Use "samsung,exynos5420-tmu-ext-triminfo" in cases, there is a misplaced
|
||||
register, also provide clock to access that base.
|
||||
|
||||
TRIMINFO at 0x1006c000 contains data for TMU channel 3
|
||||
TRIMINFO at 0x100a0000 contains data for TMU channel 4
|
||||
TRIMINFO at 0x10068000 contains data for TMU channel 2
|
||||
|
||||
- interrupts : Should contain interrupt for thermal system
|
||||
- clocks : The main clocks for TMU device
|
||||
-- 1. operational clock for TMU channel
|
||||
-- 2. optional clock to access the shared registers of TMU channel
|
||||
- clock-names : Thermal system clock name
|
||||
-- "tmu_apbif" operational clock for current TMU channel
|
||||
-- "tmu_triminfo_apbif" clock to access the shared triminfo register
|
||||
for current TMU channel
|
||||
- vtmu-supply: This entry is optional and provides the regulator node supplying
|
||||
voltage to TMU. If needed this entry can be placed inside
|
||||
board/platform specific dts file.
|
||||
|
||||
Example 1):
|
||||
|
||||
tmu@100C0000 {
|
||||
compatible = "samsung,exynos4412-tmu";
|
||||
interrupt-parent = <&combiner>;
|
||||
reg = <0x100C0000 0x100>;
|
||||
interrupts = <2 4>;
|
||||
clocks = <&clock 383>;
|
||||
clock-names = "tmu_apbif";
|
||||
status = "disabled";
|
||||
vtmu-supply = <&tmu_regulator_node>;
|
||||
};
|
||||
|
||||
Example 2):
|
||||
|
||||
tmuctrl_0: tmuctrl@160118 {
|
||||
compatible = "samsung,exynos5440-tmu";
|
||||
reg = <0x160118 0x230>, <0x160368 0x10>;
|
||||
interrupts = <0 58 0>;
|
||||
clocks = <&clock 21>;
|
||||
clock-names = "tmu_apbif";
|
||||
};
|
||||
|
||||
Example 3): (In case of Exynos5420 "with misplaced TRIMINFO register")
|
||||
tmu_cpu2: tmu@10068000 {
|
||||
compatible = "samsung,exynos5420-tmu-ext-triminfo";
|
||||
reg = <0x10068000 0x100>, <0x1006c000 0x4>;
|
||||
interrupts = <0 184 0>;
|
||||
clocks = <&clock 318>, <&clock 318>;
|
||||
clock-names = "tmu_apbif", "tmu_triminfo_apbif";
|
||||
};
|
||||
|
||||
tmu_cpu3: tmu@1006c000 {
|
||||
compatible = "samsung,exynos5420-tmu-ext-triminfo";
|
||||
reg = <0x1006c000 0x100>, <0x100a0000 0x4>;
|
||||
interrupts = <0 185 0>;
|
||||
clocks = <&clock 318>, <&clock 319>;
|
||||
clock-names = "tmu_apbif", "tmu_triminfo_apbif";
|
||||
};
|
||||
|
||||
tmu_gpu: tmu@100a0000 {
|
||||
compatible = "samsung,exynos5420-tmu-ext-triminfo";
|
||||
reg = <0x100a0000 0x100>, <0x10068000 0x4>;
|
||||
interrupts = <0 215 0>;
|
||||
clocks = <&clock 319>, <&clock 318>;
|
||||
clock-names = "tmu_apbif", "tmu_triminfo_apbif";
|
||||
};
|
||||
|
||||
Note: For multi-instance tmu each instance should have an alias correctly
|
||||
numbered in "aliases" node.
|
||||
|
||||
Example:
|
||||
|
||||
aliases {
|
||||
tmuctrl0 = &tmuctrl_0;
|
||||
tmuctrl1 = &tmuctrl_1;
|
||||
tmuctrl2 = &tmuctrl_2;
|
||||
};
|
24
Documentation/devicetree/bindings/thermal/imx-thermal.txt
Normal file
24
Documentation/devicetree/bindings/thermal/imx-thermal.txt
Normal file
|
@ -0,0 +1,24 @@
|
|||
* Temperature Monitor (TEMPMON) on Freescale i.MX SoCs
|
||||
|
||||
Required properties:
|
||||
- compatible : "fsl,imx6q-tempmon" for i.MX6Q, "fsl,imx6sx-tempmon" for i.MX6SX.
|
||||
i.MX6SX has two more IRQs than i.MX6Q, one is IRQ_LOW and the other is IRQ_PANIC,
|
||||
when temperature is below than low threshold, IRQ_LOW will be triggered, when temperature
|
||||
is higher than panic threshold, system will auto reboot by SRC module.
|
||||
- fsl,tempmon : phandle pointer to system controller that contains TEMPMON
|
||||
control registers, e.g. ANATOP on imx6q.
|
||||
- fsl,tempmon-data : phandle pointer to fuse controller that contains TEMPMON
|
||||
calibration data, e.g. OCOTP on imx6q. The details about calibration data
|
||||
can be found in SoC Reference Manual.
|
||||
|
||||
Optional properties:
|
||||
- clocks : thermal sensor's clock source.
|
||||
|
||||
Example:
|
||||
|
||||
tempmon {
|
||||
compatible = "fsl,imx6q-tempmon";
|
||||
fsl,tempmon = <&anatop>;
|
||||
fsl,tempmon-data = <&ocotp>;
|
||||
clocks = <&clks 172>;
|
||||
};
|
|
@ -0,0 +1,15 @@
|
|||
* Kirkwood Thermal
|
||||
|
||||
This version is for Kirkwood 88F8262 & 88F6283 SoCs. Other kirkwoods
|
||||
don't contain a thermal sensor.
|
||||
|
||||
Required properties:
|
||||
- compatible : "marvell,kirkwood-thermal"
|
||||
- reg : Address range of the thermal registers
|
||||
|
||||
Example:
|
||||
|
||||
thermal@10078 {
|
||||
compatible = "marvell,kirkwood-thermal";
|
||||
reg = <0x10078 0x4>;
|
||||
};
|
38
Documentation/devicetree/bindings/thermal/rcar-thermal.txt
Normal file
38
Documentation/devicetree/bindings/thermal/rcar-thermal.txt
Normal file
|
@ -0,0 +1,38 @@
|
|||
* Renesas R-Car Thermal
|
||||
|
||||
Required properties:
|
||||
- compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal"
|
||||
as fallback.
|
||||
Examples with soctypes are:
|
||||
- "renesas,thermal-r8a73a4" (R-Mobile AP6)
|
||||
- "renesas,thermal-r8a7779" (R-Car H1)
|
||||
- "renesas,thermal-r8a7790" (R-Car H2)
|
||||
- "renesas,thermal-r8a7791" (R-Car M2-W)
|
||||
- "renesas,thermal-r8a7792" (R-Car V2H)
|
||||
- "renesas,thermal-r8a7793" (R-Car M2-N)
|
||||
- "renesas,thermal-r8a7794" (R-Car E2)
|
||||
- reg : Address range of the thermal registers.
|
||||
The 1st reg will be recognized as common register
|
||||
if it has "interrupts".
|
||||
|
||||
Option properties:
|
||||
|
||||
- interrupts : use interrupt
|
||||
|
||||
Example (non interrupt support):
|
||||
|
||||
thermal@ffc48000 {
|
||||
compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
|
||||
reg = <0xffc48000 0x38>;
|
||||
};
|
||||
|
||||
Example (interrupt support):
|
||||
|
||||
thermal@e61f0000 {
|
||||
compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
|
||||
reg = <0xe61f0000 0x14
|
||||
0xe61f0100 0x38
|
||||
0xe61f0200 0x38
|
||||
0xe61f0300 0x38>;
|
||||
interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
|
||||
};
|
14
Documentation/devicetree/bindings/thermal/spear-thermal.txt
Normal file
14
Documentation/devicetree/bindings/thermal/spear-thermal.txt
Normal file
|
@ -0,0 +1,14 @@
|
|||
* SPEAr Thermal
|
||||
|
||||
Required properties:
|
||||
- compatible : "st,thermal-spear1340"
|
||||
- reg : Address range of the thermal registers
|
||||
- st,thermal-flags: flags used to enable thermal sensor
|
||||
|
||||
Example:
|
||||
|
||||
thermal@fc000000 {
|
||||
compatible = "st,thermal-spear1340";
|
||||
reg = <0xfc000000 0x1000>;
|
||||
st,thermal-flags = <0x7000>;
|
||||
};
|
42
Documentation/devicetree/bindings/thermal/st-thermal.txt
Normal file
42
Documentation/devicetree/bindings/thermal/st-thermal.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
Binding for Thermal Sensor driver for STMicroelectronics STi series of SoCs.
|
||||
|
||||
Required parameters:
|
||||
-------------------
|
||||
|
||||
compatible : st,<SoC>-<module>-thermal; should be one of:
|
||||
"st,stih415-sas-thermal",
|
||||
"st,stih415-mpe-thermal",
|
||||
"st,stih416-sas-thermal"
|
||||
"st,stih416-mpe-thermal"
|
||||
"st,stid127-thermal" or
|
||||
"st,stih407-thermal"
|
||||
according to the SoC type (stih415, stih416, stid127, stih407)
|
||||
and module type (sas or mpe). On stid127 & stih407 there is only
|
||||
one die/module, so there is no module type in the compatible
|
||||
string.
|
||||
clock-names : Should be "thermal".
|
||||
See: Documentation/devicetree/bindings/resource-names.txt
|
||||
clocks : Phandle of the clock used by the thermal sensor.
|
||||
See: Documentation/devicetree/bindings/clock/clock-bindings.txt
|
||||
|
||||
Optional parameters:
|
||||
-------------------
|
||||
|
||||
reg : For non-sysconf based sensors, this should be the physical base
|
||||
address and length of the sensor's registers.
|
||||
interrupts : Standard way to define interrupt number.
|
||||
Interrupt is mandatory to be defined when compatible is
|
||||
"stih416-mpe-thermal".
|
||||
NB: For thermal sensor's for which no interrupt has been
|
||||
defined, a polling delay of 1000ms will be used to read the
|
||||
temperature from device.
|
||||
|
||||
Example:
|
||||
|
||||
temp1@fdfe8000 {
|
||||
compatible = "st,stih416-mpe-thermal";
|
||||
reg = <0xfdfe8000 0x10>;
|
||||
clock-names = "thermal";
|
||||
clocks = <&clk_m_mpethsens>;
|
||||
interrupts = <GIC_SPI 23 IRQ_TYPE_NONE>;
|
||||
};
|
595
Documentation/devicetree/bindings/thermal/thermal.txt
Normal file
595
Documentation/devicetree/bindings/thermal/thermal.txt
Normal file
|
@ -0,0 +1,595 @@
|
|||
* Thermal Framework Device Tree descriptor
|
||||
|
||||
This file describes a generic binding to provide a way of
|
||||
defining hardware thermal structure using device tree.
|
||||
A thermal structure includes thermal zones and their components,
|
||||
such as trip points, polling intervals, sensors and cooling devices
|
||||
binding descriptors.
|
||||
|
||||
The target of device tree thermal descriptors is to describe only
|
||||
the hardware thermal aspects. The thermal device tree bindings are
|
||||
not about how the system must control or which algorithm or policy
|
||||
must be taken in place.
|
||||
|
||||
There are five types of nodes involved to describe thermal bindings:
|
||||
- thermal sensors: devices which may be used to take temperature
|
||||
measurements.
|
||||
- cooling devices: devices which may be used to dissipate heat.
|
||||
- trip points: describe key temperatures at which cooling is recommended. The
|
||||
set of points should be chosen based on hardware limits.
|
||||
- cooling maps: used to describe links between trip points and cooling devices;
|
||||
- thermal zones: used to describe thermal data within the hardware;
|
||||
|
||||
The following is a description of each of these node types.
|
||||
|
||||
* Thermal sensor devices
|
||||
|
||||
Thermal sensor devices are nodes providing temperature sensing capabilities on
|
||||
thermal zones. Typical devices are I2C ADC converters and bandgaps. These are
|
||||
nodes providing temperature data to thermal zones. Thermal sensor devices may
|
||||
control one or more internal sensors.
|
||||
|
||||
Required property:
|
||||
- #thermal-sensor-cells: Used to provide sensor device specific information
|
||||
Type: unsigned while referring to it. Typically 0 on thermal sensor
|
||||
Size: one cell nodes with only one sensor, and at least 1 on nodes
|
||||
with several internal sensors, in order
|
||||
to identify uniquely the sensor instances within
|
||||
the IC. See thermal zone binding for more details
|
||||
on how consumers refer to sensor devices.
|
||||
|
||||
* Cooling device nodes
|
||||
|
||||
Cooling devices are nodes providing control on power dissipation. There
|
||||
are essentially two ways to provide control on power dissipation. First
|
||||
is by means of regulating device performance, which is known as passive
|
||||
cooling. A typical passive cooling is a CPU that has dynamic voltage and
|
||||
frequency scaling (DVFS), and uses lower frequencies as cooling states.
|
||||
Second is by means of activating devices in order to remove
|
||||
the dissipated heat, which is known as active cooling, e.g. regulating
|
||||
fan speeds. In both cases, cooling devices shall have a way to determine
|
||||
the state of cooling in which the device is.
|
||||
|
||||
Any cooling device has a range of cooling states (i.e. different levels
|
||||
of heat dissipation). For example a fan's cooling states correspond to
|
||||
the different fan speeds possible. Cooling states are referred to by
|
||||
single unsigned integers, where larger numbers mean greater heat
|
||||
dissipation. The precise set of cooling states associated with a device
|
||||
(as referred to be the cooling-min-state and cooling-max-state
|
||||
properties) should be defined in a particular device's binding.
|
||||
For more examples of cooling devices, refer to the example sections below.
|
||||
|
||||
Required properties:
|
||||
- cooling-min-state: An integer indicating the smallest
|
||||
Type: unsigned cooling state accepted. Typically 0.
|
||||
Size: one cell
|
||||
|
||||
- cooling-max-state: An integer indicating the largest
|
||||
Type: unsigned cooling state accepted.
|
||||
Size: one cell
|
||||
|
||||
- #cooling-cells: Used to provide cooling device specific information
|
||||
Type: unsigned while referring to it. Must be at least 2, in order
|
||||
Size: one cell to specify minimum and maximum cooling state used
|
||||
in the reference. The first cell is the minimum
|
||||
cooling state requested and the second cell is
|
||||
the maximum cooling state requested in the reference.
|
||||
See Cooling device maps section below for more details
|
||||
on how consumers refer to cooling devices.
|
||||
|
||||
* Trip points
|
||||
|
||||
The trip node is a node to describe a point in the temperature domain
|
||||
in which the system takes an action. This node describes just the point,
|
||||
not the action.
|
||||
|
||||
Required properties:
|
||||
- temperature: An integer indicating the trip temperature level,
|
||||
Type: signed in millicelsius.
|
||||
Size: one cell
|
||||
|
||||
- hysteresis: A low hysteresis value on temperature property (above).
|
||||
Type: unsigned This is a relative value, in millicelsius.
|
||||
Size: one cell
|
||||
|
||||
- type: a string containing the trip type. Expected values are:
|
||||
"active": A trip point to enable active cooling
|
||||
"passive": A trip point to enable passive cooling
|
||||
"hot": A trip point to notify emergency
|
||||
"critical": Hardware not reliable.
|
||||
Type: string
|
||||
|
||||
* Cooling device maps
|
||||
|
||||
The cooling device maps node is a node to describe how cooling devices
|
||||
get assigned to trip points of the zone. The cooling devices are expected
|
||||
to be loaded in the target system.
|
||||
|
||||
Required properties:
|
||||
- cooling-device: A phandle of a cooling device with its specifier,
|
||||
Type: phandle + referring to which cooling device is used in this
|
||||
cooling specifier binding. In the cooling specifier, the first cell
|
||||
is the minimum cooling state and the second cell
|
||||
is the maximum cooling state used in this map.
|
||||
- trip: A phandle of a trip point node within the same thermal
|
||||
Type: phandle of zone.
|
||||
trip point node
|
||||
|
||||
Optional property:
|
||||
- contribution: The cooling contribution to the thermal zone of the
|
||||
Type: unsigned referred cooling device at the referred trip point.
|
||||
Size: one cell The contribution is a ratio of the sum
|
||||
of all cooling contributions within a thermal zone.
|
||||
|
||||
Note: Using the THERMAL_NO_LIMIT (-1UL) constant in the cooling-device phandle
|
||||
limit specifier means:
|
||||
(i) - minimum state allowed for minimum cooling state used in the reference.
|
||||
(ii) - maximum state allowed for maximum cooling state used in the reference.
|
||||
Refer to include/dt-bindings/thermal/thermal.h for definition of this constant.
|
||||
|
||||
* Thermal zone nodes
|
||||
|
||||
The thermal zone node is the node containing all the required info
|
||||
for describing a thermal zone, including its cooling device bindings. The
|
||||
thermal zone node must contain, apart from its own properties, one sub-node
|
||||
containing trip nodes and one sub-node containing all the zone cooling maps.
|
||||
|
||||
Required properties:
|
||||
- polling-delay: The maximum number of milliseconds to wait between polls
|
||||
Type: unsigned when checking this thermal zone.
|
||||
Size: one cell
|
||||
|
||||
- polling-delay-passive: The maximum number of milliseconds to wait
|
||||
Type: unsigned between polls when performing passive cooling.
|
||||
Size: one cell
|
||||
|
||||
- thermal-sensors: A list of thermal sensor phandles and sensor specifier
|
||||
Type: list of used while monitoring the thermal zone.
|
||||
phandles + sensor
|
||||
specifier
|
||||
|
||||
- trips: A sub-node which is a container of only trip point nodes
|
||||
Type: sub-node required to describe the thermal zone.
|
||||
|
||||
- cooling-maps: A sub-node which is a container of only cooling device
|
||||
Type: sub-node map nodes, used to describe the relation between trips
|
||||
and cooling devices.
|
||||
|
||||
Optional property:
|
||||
- coefficients: An array of integers (one signed cell) containing
|
||||
Type: array coefficients to compose a linear relation between
|
||||
Elem size: one cell the sensors listed in the thermal-sensors property.
|
||||
Elem type: signed Coefficients defaults to 1, in case this property
|
||||
is not specified. A simple linear polynomial is used:
|
||||
Z = c0 * x0 + c1 + x1 + ... + c(n-1) * x(n-1) + cn.
|
||||
|
||||
The coefficients are ordered and they match with sensors
|
||||
by means of sensor ID. Additional coefficients are
|
||||
interpreted as constant offset.
|
||||
|
||||
Note: The delay properties are bound to the maximum dT/dt (temperature
|
||||
derivative over time) in two situations for a thermal zone:
|
||||
(i) - when passive cooling is activated (polling-delay-passive); and
|
||||
(ii) - when the zone just needs to be monitored (polling-delay) or
|
||||
when active cooling is activated.
|
||||
|
||||
The maximum dT/dt is highly bound to hardware power consumption and dissipation
|
||||
capability. The delays should be chosen to account for said max dT/dt,
|
||||
such that a device does not cross several trip boundaries unexpectedly
|
||||
between polls. Choosing the right polling delays shall avoid having the
|
||||
device in temperature ranges that may damage the silicon structures and
|
||||
reduce silicon lifetime.
|
||||
|
||||
* The thermal-zones node
|
||||
|
||||
The "thermal-zones" node is a container for all thermal zone nodes. It shall
|
||||
contain only sub-nodes describing thermal zones as in the section
|
||||
"Thermal zone nodes". The "thermal-zones" node appears under "/".
|
||||
|
||||
* Examples
|
||||
|
||||
Below are several examples on how to use thermal data descriptors
|
||||
using device tree bindings:
|
||||
|
||||
(a) - CPU thermal zone
|
||||
|
||||
The CPU thermal zone example below describes how to setup one thermal zone
|
||||
using one single sensor as temperature source and many cooling devices and
|
||||
power dissipation control sources.
|
||||
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
cpus {
|
||||
/*
|
||||
* Here is an example of describing a cooling device for a DVFS
|
||||
* capable CPU. The CPU node describes its four OPPs.
|
||||
* The cooling states possible are 0..3, and they are
|
||||
* used as OPP indexes. The minimum cooling state is 0, which means
|
||||
* all four OPPs can be available to the system. The maximum
|
||||
* cooling state is 3, which means only the lowest OPPs (198MHz@0.85V)
|
||||
* can be available in the system.
|
||||
*/
|
||||
cpu0: cpu@0 {
|
||||
...
|
||||
operating-points = <
|
||||
/* kHz uV */
|
||||
970000 1200000
|
||||
792000 1100000
|
||||
396000 950000
|
||||
198000 850000
|
||||
>;
|
||||
cooling-min-state = <0>;
|
||||
cooling-max-state = <3>;
|
||||
#cooling-cells = <2>; /* min followed by max */
|
||||
};
|
||||
...
|
||||
};
|
||||
|
||||
&i2c1 {
|
||||
...
|
||||
/*
|
||||
* A simple fan controller which supports 10 speeds of operation
|
||||
* (represented as 0-9).
|
||||
*/
|
||||
fan0: fan@0x48 {
|
||||
...
|
||||
cooling-min-state = <0>;
|
||||
cooling-max-state = <9>;
|
||||
#cooling-cells = <2>; /* min followed by max */
|
||||
};
|
||||
};
|
||||
|
||||
ocp {
|
||||
...
|
||||
/*
|
||||
* A simple IC with a single bandgap temperature sensor.
|
||||
*/
|
||||
bandgap0: bandgap@0x0000ED00 {
|
||||
...
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
cpu-thermal: cpu-thermal {
|
||||
polling-delay-passive = <250>; /* milliseconds */
|
||||
polling-delay = <1000>; /* milliseconds */
|
||||
|
||||
thermal-sensors = <&bandgap0>;
|
||||
|
||||
trips {
|
||||
cpu-alert0: cpu-alert {
|
||||
temperature = <90000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "active";
|
||||
};
|
||||
cpu-alert1: cpu-alert {
|
||||
temperature = <100000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
cpu-crit: cpu-crit {
|
||||
temperature = <125000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu-alert0>;
|
||||
cooling-device = <&fan0 THERMAL_NO_LIMITS 4>;
|
||||
};
|
||||
map1 {
|
||||
trip = <&cpu-alert1>;
|
||||
cooling-device = <&fan0 5 THERMAL_NO_LIMITS>;
|
||||
};
|
||||
map2 {
|
||||
trip = <&cpu-alert1>;
|
||||
cooling-device =
|
||||
<&cpu0 THERMAL_NO_LIMITS THERMAL_NO_LIMITS>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
In the example above, the ADC sensor (bandgap0) at address 0x0000ED00 is
|
||||
used to monitor the zone 'cpu-thermal' using its sole sensor. A fan
|
||||
device (fan0) is controlled via I2C bus 1, at address 0x48, and has ten
|
||||
different cooling states 0-9. It is used to remove the heat out of
|
||||
the thermal zone 'cpu-thermal' using its cooling states
|
||||
from its minimum to 4, when it reaches trip point 'cpu-alert0'
|
||||
at 90C, as an example of active cooling. The same cooling device is used at
|
||||
'cpu-alert1', but from 5 to its maximum state. The cpu@0 device is also
|
||||
linked to the same thermal zone, 'cpu-thermal', as a passive cooling device,
|
||||
using all its cooling states at trip point 'cpu-alert1',
|
||||
which is a trip point at 100C. On the thermal zone 'cpu-thermal', at the
|
||||
temperature of 125C, represented by the trip point 'cpu-crit', the silicon
|
||||
is not reliable anymore.
|
||||
|
||||
(b) - IC with several internal sensors
|
||||
|
||||
The example below describes how to deploy several thermal zones based off a
|
||||
single sensor IC, assuming it has several internal sensors. This is a common
|
||||
case on SoC designs with several internal IPs that may need different thermal
|
||||
requirements, and thus may have their own sensor to monitor or detect internal
|
||||
hotspots in their silicon.
|
||||
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
ocp {
|
||||
...
|
||||
/*
|
||||
* A simple IC with several bandgap temperature sensors.
|
||||
*/
|
||||
bandgap0: bandgap@0x0000ED00 {
|
||||
...
|
||||
#thermal-sensor-cells = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
cpu-thermal: cpu-thermal {
|
||||
polling-delay-passive = <250>; /* milliseconds */
|
||||
polling-delay = <1000>; /* milliseconds */
|
||||
|
||||
/* sensor ID */
|
||||
thermal-sensors = <&bandgap0 0>;
|
||||
|
||||
trips {
|
||||
/* each zone within the SoC may have its own trips */
|
||||
cpu-alert: cpu-alert {
|
||||
temperature = <100000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
cpu-crit: cpu-crit {
|
||||
temperature = <125000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
/* each zone within the SoC may have its own cooling */
|
||||
...
|
||||
};
|
||||
};
|
||||
|
||||
gpu-thermal: gpu-thermal {
|
||||
polling-delay-passive = <120>; /* milliseconds */
|
||||
polling-delay = <1000>; /* milliseconds */
|
||||
|
||||
/* sensor ID */
|
||||
thermal-sensors = <&bandgap0 1>;
|
||||
|
||||
trips {
|
||||
/* each zone within the SoC may have its own trips */
|
||||
gpu-alert: gpu-alert {
|
||||
temperature = <90000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
gpu-crit: gpu-crit {
|
||||
temperature = <105000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
/* each zone within the SoC may have its own cooling */
|
||||
...
|
||||
};
|
||||
};
|
||||
|
||||
dsp-thermal: dsp-thermal {
|
||||
polling-delay-passive = <50>; /* milliseconds */
|
||||
polling-delay = <1000>; /* milliseconds */
|
||||
|
||||
/* sensor ID */
|
||||
thermal-sensors = <&bandgap0 2>;
|
||||
|
||||
trips {
|
||||
/* each zone within the SoC may have its own trips */
|
||||
dsp-alert: gpu-alert {
|
||||
temperature = <90000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
dsp-crit: gpu-crit {
|
||||
temperature = <135000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
/* each zone within the SoC may have its own cooling */
|
||||
...
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
In the example above, there is one bandgap IC which has the capability to
|
||||
monitor three sensors. The hardware has been designed so that sensors are
|
||||
placed on different places in the DIE to monitor different temperature
|
||||
hotspots: one for CPU thermal zone, one for GPU thermal zone and the
|
||||
other to monitor a DSP thermal zone.
|
||||
|
||||
Thus, there is a need to assign each sensor provided by the bandgap IC
|
||||
to different thermal zones. This is achieved by means of using the
|
||||
#thermal-sensor-cells property and using the first cell of the sensor
|
||||
specifier as sensor ID. In the example, then, <bandgap 0> is used to
|
||||
monitor CPU thermal zone, <bandgap 1> is used to monitor GPU thermal
|
||||
zone and <bandgap 2> is used to monitor DSP thermal zone. Each zone
|
||||
may be uncorrelated, having its own dT/dt requirements, trips
|
||||
and cooling maps.
|
||||
|
||||
|
||||
(c) - Several sensors within one single thermal zone
|
||||
|
||||
The example below illustrates how to use more than one sensor within
|
||||
one thermal zone.
|
||||
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
&i2c1 {
|
||||
...
|
||||
/*
|
||||
* A simple IC with a single temperature sensor.
|
||||
*/
|
||||
adc: sensor@0x49 {
|
||||
...
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
ocp {
|
||||
...
|
||||
/*
|
||||
* A simple IC with a single bandgap temperature sensor.
|
||||
*/
|
||||
bandgap0: bandgap@0x0000ED00 {
|
||||
...
|
||||
#thermal-sensor-cells = <0>;
|
||||
};
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
cpu-thermal: cpu-thermal {
|
||||
polling-delay-passive = <250>; /* milliseconds */
|
||||
polling-delay = <1000>; /* milliseconds */
|
||||
|
||||
thermal-sensors = <&bandgap0>, /* cpu */
|
||||
<&adc>; /* pcb north */
|
||||
|
||||
/* hotspot = 100 * bandgap - 120 * adc + 484 */
|
||||
coefficients = <100 -120 484>;
|
||||
|
||||
trips {
|
||||
...
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
...
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
In some cases, there is a need to use more than one sensor to extrapolate
|
||||
a thermal hotspot in the silicon. The above example illustrates this situation.
|
||||
For instance, it may be the case that a sensor external to CPU IP may be placed
|
||||
close to CPU hotspot and together with internal CPU sensor, it is used
|
||||
to determine the hotspot. Assuming this is the case for the above example,
|
||||
the hypothetical extrapolation rule would be:
|
||||
hotspot = 100 * bandgap - 120 * adc + 484
|
||||
|
||||
In other context, the same idea can be used to add fixed offset. For instance,
|
||||
consider the hotspot extrapolation rule below:
|
||||
hotspot = 1 * adc + 6000
|
||||
|
||||
In the above equation, the hotspot is always 6C higher than what is read
|
||||
from the ADC sensor. The binding would be then:
|
||||
thermal-sensors = <&adc>;
|
||||
|
||||
/* hotspot = 1 * adc + 6000 */
|
||||
coefficients = <1 6000>;
|
||||
|
||||
(d) - Board thermal
|
||||
|
||||
The board thermal example below illustrates how to setup one thermal zone
|
||||
with many sensors and many cooling devices.
|
||||
|
||||
#include <dt-bindings/thermal/thermal.h>
|
||||
|
||||
&i2c1 {
|
||||
...
|
||||
/*
|
||||
* An IC with several temperature sensor.
|
||||
*/
|
||||
adc-dummy: sensor@0x50 {
|
||||
...
|
||||
#thermal-sensor-cells = <1>; /* sensor internal ID */
|
||||
};
|
||||
};
|
||||
|
||||
thermal-zones {
|
||||
batt-thermal {
|
||||
polling-delay-passive = <500>; /* milliseconds */
|
||||
polling-delay = <2500>; /* milliseconds */
|
||||
|
||||
/* sensor ID */
|
||||
thermal-sensors = <&adc-dummy 4>;
|
||||
|
||||
trips {
|
||||
...
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
...
|
||||
};
|
||||
};
|
||||
|
||||
board-thermal: board-thermal {
|
||||
polling-delay-passive = <1000>; /* milliseconds */
|
||||
polling-delay = <2500>; /* milliseconds */
|
||||
|
||||
/* sensor ID */
|
||||
thermal-sensors = <&adc-dummy 0>, /* pcb top edge */
|
||||
<&adc-dummy 1>, /* lcd */
|
||||
<&adc-dymmy 2>; /* back cover */
|
||||
/*
|
||||
* An array of coefficients describing the sensor
|
||||
* linear relation. E.g.:
|
||||
* z = c1*x1 + c2*x2 + c3*x3
|
||||
*/
|
||||
coefficients = <1200 -345 890>;
|
||||
|
||||
trips {
|
||||
/* Trips are based on resulting linear equation */
|
||||
cpu-trip: cpu-trip {
|
||||
temperature = <60000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
gpu-trip: gpu-trip {
|
||||
temperature = <55000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "passive";
|
||||
}
|
||||
lcd-trip: lcp-trip {
|
||||
temperature = <53000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "passive";
|
||||
};
|
||||
crit-trip: crit-trip {
|
||||
temperature = <68000>; /* millicelsius */
|
||||
hysteresis = <2000>; /* millicelsius */
|
||||
type = "critical";
|
||||
};
|
||||
};
|
||||
|
||||
cooling-maps {
|
||||
map0 {
|
||||
trip = <&cpu-trip>;
|
||||
cooling-device = <&cpu0 0 2>;
|
||||
contribution = <55>;
|
||||
};
|
||||
map1 {
|
||||
trip = <&gpu-trip>;
|
||||
cooling-device = <&gpu0 0 2>;
|
||||
contribution = <20>;
|
||||
};
|
||||
map2 {
|
||||
trip = <&lcd-trip>;
|
||||
cooling-device = <&lcd0 5 10>;
|
||||
contribution = <15>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
The above example is a mix of previous examples, a sensor IP with several internal
|
||||
sensors used to monitor different zones, one of them is composed by several sensors and
|
||||
with different cooling devices.
|
74
Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
Normal file
74
Documentation/devicetree/bindings/thermal/ti_soc_thermal.txt
Normal file
|
@ -0,0 +1,74 @@
|
|||
* Texas Instrument OMAP SCM bandgap bindings
|
||||
|
||||
In the System Control Module, OMAP supplies a voltage reference
|
||||
and a temperature sensor feature that are gathered in the band
|
||||
gap voltage and temperature sensor (VBGAPTS) module. The band
|
||||
gap provides current and voltage reference for its internal
|
||||
circuits and other analog IP blocks. The analog-to-digital
|
||||
converter (ADC) produces an output value that is proportional
|
||||
to the silicon temperature.
|
||||
|
||||
Required properties:
|
||||
- compatible : Should be:
|
||||
- "ti,omap4430-bandgap" : for OMAP4430 bandgap
|
||||
- "ti,omap4460-bandgap" : for OMAP4460 bandgap
|
||||
- "ti,omap4470-bandgap" : for OMAP4470 bandgap
|
||||
- "ti,omap5430-bandgap" : for OMAP5430 bandgap
|
||||
- interrupts : this entry should indicate which interrupt line
|
||||
the talert signal is routed to;
|
||||
Specific:
|
||||
- gpios : this entry should be used to inform which GPIO
|
||||
line the tshut signal is routed to. The informed GPIO will
|
||||
be treated as an IRQ;
|
||||
- regs : this entry must also be specified and it is specific
|
||||
to each bandgap version, because the mapping may change from
|
||||
soc to soc, apart of depending on available features.
|
||||
|
||||
Example:
|
||||
OMAP4430:
|
||||
bandgap {
|
||||
reg = <0x4a002260 0x4 0x4a00232C 0x4>;
|
||||
compatible = "ti,omap4430-bandgap";
|
||||
};
|
||||
|
||||
OMAP4460:
|
||||
bandgap {
|
||||
reg = <0x4a002260 0x4
|
||||
0x4a00232C 0x4
|
||||
0x4a002378 0x18>;
|
||||
compatible = "ti,omap4460-bandgap";
|
||||
interrupts = <0 126 4>; /* talert */
|
||||
gpios = <&gpio3 22 0>; /* tshut */
|
||||
};
|
||||
|
||||
OMAP4470:
|
||||
bandgap {
|
||||
reg = <0x4a002260 0x4
|
||||
0x4a00232C 0x4
|
||||
0x4a002378 0x18>;
|
||||
compatible = "ti,omap4470-bandgap";
|
||||
interrupts = <0 126 4>; /* talert */
|
||||
gpios = <&gpio3 22 0>; /* tshut */
|
||||
};
|
||||
|
||||
OMAP5430:
|
||||
bandgap {
|
||||
reg = <0x4a0021e0 0xc
|
||||
0x4a00232c 0xc
|
||||
0x4a002380 0x2c
|
||||
0x4a0023C0 0x3c>;
|
||||
compatible = "ti,omap5430-bandgap";
|
||||
interrupts = <0 126 4>; /* talert */
|
||||
};
|
||||
|
||||
DRA752:
|
||||
bandgap {
|
||||
reg = <0x4a0021e0 0xc
|
||||
0x4a00232c 0xc
|
||||
0x4a002380 0x2c
|
||||
0x4a0023C0 0x3c
|
||||
0x4a002564 0x8
|
||||
0x4a002574 0x50>;
|
||||
compatible = "ti,dra752-bandgap";
|
||||
interrupts = <0 126 4>; /* talert */
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue