forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 748e4f3d702def1a4bff191e0cf93b6a05340f01
kernel/Documentation/devicetree/bindings/thermal/nvidia,tegra124-soctherm.txt
....@@ -28,9 +28,10 @@
2828 See ../reset/reset.txt for details.
2929 - reset-names : Must include the following entries:
3030 - soctherm
31
-- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description
32
- of this property. See <dt-bindings/thermal/tegra124-soctherm.h> for a
33
- list of valid values when referring to thermal sensors.
31
+- #thermal-sensor-cells : Should be 1. For a description of this property, see
32
+ Documentation/devicetree/bindings/thermal/thermal-sensor.yaml.
33
+ See <dt-bindings/thermal/tegra124-soctherm.h> for a list of valid values
34
+ when referring to thermal sensors.
3435 - throttle-cfgs: A sub-node which is a container of configuration for each
3536 hardware throttle events. These events can be set as cooling devices.
3637 * throttle events: Sub-nodes must be named as "light" or "heavy".
....@@ -52,13 +53,48 @@
5253 Must set as following values:
5354 TEGRA_SOCTHERM_THROT_LEVEL_LOW, TEGRA_SOCTHERM_THROT_LEVEL_MED
5455 TEGRA_SOCTHERM_THROT_LEVEL_HIGH, TEGRA_SOCTHERM_THROT_LEVEL_NONE
56
+ - nvidia,gpu-throt-level: This property is for Tegra124 and Tegra210.
57
+ It is the level of pulse skippers, which used to throttle clock
58
+ frequencies. It indicates gpu clock throttling depth and can be
59
+ programmed to any of the following values which represent a throttling
60
+ percentage:
61
+ TEGRA_SOCTHERM_THROT_LEVEL_NONE (0%)
62
+ TEGRA_SOCTHERM_THROT_LEVEL_LOW (50%),
63
+ TEGRA_SOCTHERM_THROT_LEVEL_MED (75%),
64
+ TEGRA_SOCTHERM_THROT_LEVEL_HIGH (85%).
5565 - #cooling-cells: Should be 1. This cooling device only support on/off state.
56
- See ./thermal.txt for a description of this property.
66
+ For a description of this property see:
67
+ Documentation/devicetree/bindings/thermal/thermal-cooling-devices.yaml
68
+
69
+ Optional properties: The following properties are T210 specific and
70
+ valid only for OCx throttle events.
71
+ - nvidia,count-threshold: Specifies the number of OC events that are
72
+ required for triggering an interrupt. Interrupts are not triggered if
73
+ the property is missing. A value of 0 will interrupt on every OC alarm.
74
+ - nvidia,polarity-active-low: Configures the polarity of the OC alaram
75
+ signal. If present, this means assert low, otherwise assert high.
76
+ - nvidia,alarm-filter: Number of clocks to filter event. When the filter
77
+ expires (which means the OC event has not occurred for a long time),
78
+ the counter is cleared and filter is rearmed. Default value is 0.
79
+ - nvidia,throttle-period-us: Specifies the number of uSec for which
80
+ throttling is engaged after the OC event is deasserted. Default value
81
+ is 0.
82
+
83
+Optional properties:
84
+- nvidia,thermtrips : When present, this property specifies the temperature at
85
+ which the soctherm hardware will assert the thermal trigger signal to the
86
+ Power Management IC, which can be configured to reset or shutdown the device.
87
+ It is an array of pairs where each pair represents a tsensor id followed by a
88
+ temperature in milli Celcius. In the absence of this property the critical
89
+ trip point will be used for thermtrip temperature.
5790
5891 Note:
59
-- the "critical" type trip points will be set to SOC_THERM hardware as the
60
-shut down temperature. Once the temperature of this thermal zone is higher
61
-than it, the system will be shutdown or reset by hardware.
92
+- the "critical" type trip points will be used to set the temperature at which
93
+the SOC_THERM hardware will assert a thermal trigger if the "nvidia,thermtrips"
94
+property is missing. When the thermtrips property is present, the breach of a
95
+critical trip point is reported back to the thermal framework to implement
96
+software shutdown.
97
+
6298 - the "hot" type trip points will be set to SOC_THERM hardware as the throttle
6399 temperature. Once the the temperature of this thermal zone is higher
64100 than it, it will trigger the HW throttle event.
....@@ -79,25 +115,32 @@
79115
80116 #thermal-sensor-cells = <1>;
81117
118
+ nvidia,thermtrips = <TEGRA124_SOCTHERM_SENSOR_CPU 102500
119
+ TEGRA124_SOCTHERM_SENSOR_GPU 103000>;
120
+
82121 throttle-cfgs {
83122 /*
84123 * When the "heavy" cooling device triggered,
85
- * the HW will skip cpu clock's pulse in 85% depth
124
+ * the HW will skip cpu clock's pulse in 85% depth,
125
+ * skip gpu clock's pulse in 85% level
86126 */
87127 throttle_heavy: heavy {
88128 nvidia,priority = <100>;
89129 nvidia,cpu-throt-percent = <85>;
130
+ nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
90131
91132 #cooling-cells = <1>;
92133 };
93134
94135 /*
95136 * When the "light" cooling device triggered,
96
- * the HW will skip cpu clock's pulse in 50% depth
137
+ * the HW will skip cpu clock's pulse in 50% depth,
138
+ * skip gpu clock's pulse in 50% level
97139 */
98140 throttle_light: light {
99141 nvidia,priority = <80>;
100142 nvidia,cpu-throt-percent = <50>;
143
+ nvidia,gpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_LOW>;
101144
102145 #cooling-cells = <1>;
103146 };
....@@ -107,6 +150,17 @@
107150 * arbiter will select the highest priority as the final throttle
108151 * settings to skip cpu pulse.
109152 */
153
+
154
+ throttle_oc1: oc1 {
155
+ nvidia,priority = <50>;
156
+ nvidia,polarity-active-low;
157
+ nvidia,count-threshold = <100>;
158
+ nvidia,alarm-filter = <5100000>;
159
+ nvidia,throttle-period-us = <0>;
160
+ nvidia,cpu-throt-percent = <75>;
161
+ nvidia,gpu-throt-level =
162
+ <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
163
+ };
110164 };
111165 };
112166