Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) # SPDX-License-Identifier: (GPL-2.0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) # Copyright 2020 Linaro Ltd.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) %YAML 1.2
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) ---
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml#
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) $schema: http://devicetree.org/meta-schemas/base.yaml#
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) title: Thermal zone binding
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) maintainers:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11)   - Amit Kucheria <amitk@kernel.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) description: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14)   Thermal management is achieved in devicetree by describing the sensor hardware
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)   and the software abstraction of cooling devices and thermal zones required to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16)   take appropriate action to mitigate thermal overloads.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18)   The following node types are used to completely describe a thermal management
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19)   system in devicetree:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20)    - thermal-sensor: device that measures temperature, has SoC-specific bindings
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21)    - cooling-device: device used to dissipate heat either passively or actively
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22)    - thermal-zones: a container of the following node types used to describe all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23)      thermal data for the platform
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25)   This binding describes the thermal-zones.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27)   The polling-delay properties of a thermal-zone are bound to the maximum dT/dt
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28)   (temperature derivative over time) in two situations for a thermal zone:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29)     1. when passive cooling is activated (polling-delay-passive)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30)     2. when the zone just needs to be monitored (polling-delay) or when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31)        active cooling is activated.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33)   The maximum dT/dt is highly bound to hardware power consumption and
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34)   dissipation capability. The delays should be chosen to account for said
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35)   max dT/dt, such that a device does not cross several trip boundaries
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36)   unexpectedly between polls. Choosing the right polling delays shall avoid
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37)   having the device in temperature ranges that may damage the silicon structures
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38)   and reduce silicon lifetime.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41)   $nodename:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42)     const: thermal-zones
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43)     description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44)       A /thermal-zones node is required in order to use the thermal framework to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45)       manage input from the various thermal zones in the system in order to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46)       mitigate thermal overload conditions. It does not represent a real device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47)       in the system, but acts as a container to link a thermal sensor device,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48)       platform-data regarding temperature thresholds and the mitigation actions
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49)       to take when the temperature crosses those thresholds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) patternProperties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52)   "^[a-zA-Z][a-zA-Z0-9\\-]{1,12}-thermal$":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53)     type: object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)     description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55)       Each thermal zone node contains information about how frequently it
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56)       must be checked, the sensor responsible for reporting temperature for
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57)       this zone, one sub-node containing the various trip points for this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58)       zone and one sub-node containing all the zone cooling-maps.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60)     properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61)       polling-delay:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62)         $ref: /schemas/types.yaml#/definitions/uint32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63)         description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64)           The maximum number of milliseconds to wait between polls when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65)           checking this thermal zone. Setting this to 0 disables the polling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66)           timers setup by the thermal framework and assumes that the thermal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67)           sensors in this zone support interrupts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69)       polling-delay-passive:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70)         $ref: /schemas/types.yaml#/definitions/uint32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71)         description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72)           The maximum number of milliseconds to wait between polls when
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73)           checking this thermal zone while doing passive cooling. Setting
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74)           this to 0 disables the polling timers setup by the thermal
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75)           framework and assumes that the thermal sensors in this zone
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76)           support interrupts.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78)       thermal-sensors:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79)         $ref: /schemas/types.yaml#/definitions/phandle-array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80)         maxItems: 1
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81)         description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82)           The thermal sensor phandle and sensor specifier used to monitor this
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83)           thermal zone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85)       coefficients:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86)         $ref: /schemas/types.yaml#/definitions/uint32-array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87)         description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88)           An array of integers containing the coefficients of a linear equation
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89)           that binds all the sensors listed in this thermal zone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91)           The linear equation used is as follows,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92)             z = c0 * x0 + c1 * x1 + ... + c(n-1) * x(n-1) + cn
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93)           where c0, c1, .., cn are the coefficients.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95)           Coefficients default to 1 in case this property is not specified. The
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96)           coefficients are ordered and are matched with sensors by means of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)           sensor ID. Additional coefficients are interpreted as constant offset.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)       sustainable-power:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)         $ref: /schemas/types.yaml#/definitions/uint32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101)         description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102)           An estimate of the sustainable power (in mW) that this thermal zone
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103)           can dissipate at the desired control temperature. For reference, the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)           sustainable power of a 4-inch phone is typically 2000mW, while on a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)           10-inch tablet is around 4500mW.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)       trips:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108)         type: object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109)         description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110)           This node describes a set of points in the temperature domain at
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111)           which the thermal framework needs to take action. The actions to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112)           be taken are defined in another node called cooling-maps.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114)         patternProperties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115)           "^[a-zA-Z][a-zA-Z0-9\\-_]{0,63}$":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116)             type: object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118)             properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119)               temperature:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120)                 $ref: /schemas/types.yaml#/definitions/int32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121)                 minimum: -273000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122)                 maximum: 200000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123)                 description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124)                   An integer expressing the trip temperature in millicelsius.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126)               hysteresis:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127)                 $ref: /schemas/types.yaml#/definitions/uint32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128)                 description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129)                   An unsigned integer expressing the hysteresis delta with
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130)                   respect to the trip temperature property above, also in
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131)                   millicelsius. Any cooling action initiated by the framework is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132)                   maintained until the temperature falls below
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)                   (trip temperature - hysteresis). This potentially prevents a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134)                   situation where the trip gets constantly triggered soon after
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135)                   cooling action is removed.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137)               type:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)                 $ref: /schemas/types.yaml#/definitions/string
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139)                 enum:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140)                   - active   # enable active cooling e.g. fans
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141)                   - passive  # enable passive cooling e.g. throttling cpu
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142)                   - hot      # send notification to driver
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143)                   - critical # send notification to driver, trigger shutdown
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144)                 description: |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145)                   There are four valid trip types: active, passive, hot,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146)                   critical.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148)                   The critical trip type is used to set the maximum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149)                   temperature threshold above which the HW becomes
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150)                   unstable and underlying firmware might even trigger a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151)                   reboot. Hitting the critical threshold triggers a system
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152)                   shutdown.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154)                   The hot trip type can be used to send a notification to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155)                   the thermal driver (if a .notify callback is registered).
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156)                   The action to be taken is left to the driver.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158)                   The passive trip type can be used to slow down HW e.g. run
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159)                   the CPU, GPU, bus at a lower frequency.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161)                   The active trip type can be used to control other HW to
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162)                   help in cooling e.g. fans can be sped up or slowed down
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164)             required:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165)               - temperature
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166)               - hysteresis
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)               - type
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168)             additionalProperties: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170)         additionalProperties: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172)       cooling-maps:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173)         type: object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)         description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175)           This node describes the action to be taken when a thermal zone
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176)           crosses one of the temperature thresholds described in the trips
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177)           node. The action takes the form of a mapping relation between a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178)           trip and the target cooling device state.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180)         patternProperties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181)           "^map[-a-zA-Z0-9]*$":
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)             type: object
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184)             properties:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185)               trip:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186)                 $ref: /schemas/types.yaml#/definitions/phandle
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187)                 description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)                   A phandle of a trip point node within this thermal zone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190)               cooling-device:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191)                 $ref: /schemas/types.yaml#/definitions/phandle-array
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192)                 description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)                   A list of cooling device phandles along with the minimum
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194)                   and maximum cooling state specifiers for each cooling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)                   device. Using the THERMAL_NO_LIMIT (-1UL) constant in the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196)                   cooling-device phandle limit specifier lets the framework
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197)                   use the minimum and maximum cooling state for that cooling
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198)                   device automatically.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200)               contribution:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201)                 $ref: /schemas/types.yaml#/definitions/uint32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202)                 description:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203)                   The cooling contribution to the thermal zone of the referred
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204)                   cooling device at the referred trip point. The contribution is
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205)                   a ratio of the sum of all cooling contributions within a
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)                   thermal zone.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208)             required:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209)               - trip
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210)               - cooling-device
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211)             additionalProperties: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213)     required:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)       - polling-delay
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215)       - polling-delay-passive
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216)       - thermal-sensors
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217)       - trips
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218)     additionalProperties: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) additionalProperties: false
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) examples:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)   - |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224)     #include <dt-bindings/interrupt-controller/arm-gic.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225)     #include <dt-bindings/thermal/thermal.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227)     // Example 1: SDM845 TSENS
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228)     soc {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229)             #address-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)             #size-cells = <2>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232)             /* ... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234)             tsens0: thermal-sensor@c263000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235)                     compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236)                     reg = <0 0x0c263000 0 0x1ff>, /* TM */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237)                           <0 0x0c222000 0 0x1ff>; /* SROT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238)                     #qcom,sensors = <13>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239)                     interrupts = <GIC_SPI 506 IRQ_TYPE_LEVEL_HIGH>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240)                                  <GIC_SPI 508 IRQ_TYPE_LEVEL_HIGH>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241)                     interrupt-names = "uplow", "critical";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242)                     #thermal-sensor-cells = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243)             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245)             tsens1: thermal-sensor@c265000 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246)                     compatible = "qcom,sdm845-tsens", "qcom,tsens-v2";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247)                     reg = <0 0x0c265000 0 0x1ff>, /* TM */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248)                           <0 0x0c223000 0 0x1ff>; /* SROT */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249)                     #qcom,sensors = <8>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250)                     interrupts = <GIC_SPI 507 IRQ_TYPE_LEVEL_HIGH>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251)                                  <GIC_SPI 509 IRQ_TYPE_LEVEL_HIGH>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252)                     interrupt-names = "uplow", "critical";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253)                     #thermal-sensor-cells = <1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254)             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255)     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257)     /* ... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 259)     thermal-zones {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 260)             cpu0-thermal {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 261)                     polling-delay-passive = <250>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 262)                     polling-delay = <1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 263) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 264)                     thermal-sensors = <&tsens0 1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 265) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 266)                     trips {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 267)                             cpu0_alert0: trip-point0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 268)                                     temperature = <90000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 269)                                     hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 270)                                     type = "passive";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 271)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 272) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 273)                             cpu0_alert1: trip-point1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 274)                                     temperature = <95000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 275)                                     hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 276)                                     type = "passive";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 277)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 278) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 279)                             cpu0_crit: cpu_crit {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 280)                                     temperature = <110000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 281)                                     hysteresis = <1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 282)                                     type = "critical";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 283)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 284)                     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 285) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 286)                     cooling-maps {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 287)                             map0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 288)                                     trip = <&cpu0_alert0>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 289)                                     /* Corresponds to 1400MHz in OPP table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 290)                                     cooling-device = <&CPU0 3 3>, <&CPU1 3 3>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 291)                                                      <&CPU2 3 3>, <&CPU3 3 3>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 292)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 293) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 294)                             map1 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 295)                                     trip = <&cpu0_alert1>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 296)                                     /* Corresponds to 1000MHz in OPP table */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 297)                                     cooling-device = <&CPU0 5 5>, <&CPU1 5 5>,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 298)                                                      <&CPU2 5 5>, <&CPU3 5 5>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 299)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 300)                     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 301)             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 302) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 303)             /* ... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 304) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 305)             cluster0-thermal {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 306)                     polling-delay-passive = <250>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 307)                     polling-delay = <1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 308) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 309)                     thermal-sensors = <&tsens0 5>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 310) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 311)                     trips {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 312)                             cluster0_alert0: trip-point0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 313)                                     temperature = <90000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 314)                                     hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 315)                                     type = "hot";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 316)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 317)                             cluster0_crit: cluster0_crit {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 318)                                     temperature = <110000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 319)                                     hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 320)                                     type = "critical";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 321)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 322)                     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 323)             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 324) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 325)             /* ... */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 326) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 327)             gpu-top-thermal {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 328)                     polling-delay-passive = <250>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 329)                     polling-delay = <1000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 330) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 331)                     thermal-sensors = <&tsens0 11>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 332) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 333)                     trips {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 334)                             gpu1_alert0: trip-point0 {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 335)                                     temperature = <90000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 336)                                     hysteresis = <2000>;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 337)                                     type = "hot";
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 338)                             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 339)                     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 340)             };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 341)     };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 342) ...