@@ -10,8 +10,14 @@ Required properties :
1010- compatible : For Tegra124, must contain "nvidia,tegra124-soctherm".
1111 For Tegra132, must contain "nvidia,tegra132-soctherm".
1212 For Tegra210, must contain "nvidia,tegra210-soctherm".
13- - reg : Should contain 1 entry:
13+ - reg : Should contain at least 2 entries for each entry in reg-names :
1414 - SOCTHERM register set
15+ - Tegra CAR register set: Required for Tegra124 and Tegra210.
16+ - CCROC register set: Required for Tegra132.
17+ - reg-names : Should contain at least 2 entries:
18+ - soctherm-reg
19+ - car-reg
20+ - ccroc-reg
1521- interrupts : Defines the interrupt used by SOCTHERM
1622- clocks : Must contain an entry for each entry in clock-names.
1723 See ../clocks/clock-bindings.txt for details.
@@ -25,17 +31,45 @@ Required properties :
2531- #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description
2632 of this property. See <dt-bindings/thermal/tegra124-soctherm.h> for a
2733 list of valid values when referring to thermal sensors.
34+ - throttle-cfgs: A sub-node which is a container of configuration for each
35+ hardware throttle events. These events can be set as cooling devices.
36+ * throttle events: Sub-nodes must be named as "light" or "heavy".
37+ Properties:
38+ - nvidia,priority: Each throttles has its own throttle settings, so the
39+ SW need to set priorities for various throttle, the HW arbiter can select
40+ the final throttle settings.
41+ Bigger value indicates higher priority, In general, higher priority
42+ translates to lower target frequency. SW needs to ensure that critical
43+ thermal alarms are given higher priority, and ensure that there is
44+ no race if priority of two vectors is set to the same value.
45+ The range of this value is 1~100.
46+ - nvidia,cpu-throt-percent: This property is for Tegra124 and Tegra210.
47+ It is the throttling depth of pulse skippers, it's the percentage
48+ throttling.
49+ - nvidia,cpu-throt-level: This property is only for Tegra132, it is the
50+ level of pulse skippers, which used to throttle clock frequencies. It
51+ indicates cpu clock throttling depth, and the depth can be programmed.
52+ Must set as following values:
53+ TEGRA_SOCTHERM_THROT_LEVEL_LOW, TEGRA_SOCTHERM_THROT_LEVEL_MED
54+ TEGRA_SOCTHERM_THROT_LEVEL_HIGH, TEGRA_SOCTHERM_THROT_LEVEL_NONE
55+ - #cooling-cells: Should be 1. This cooling device only support on/off state.
56+ See ./thermal.txt for a description of this property.
2857
2958Note:
3059- the "critical" type trip points will be set to SOC_THERM hardware as the
3160shut down temperature. Once the temperature of this thermal zone is higher
3261than it, the system will be shutdown or reset by hardware.
62+ - the "hot" type trip points will be set to SOC_THERM hardware as the throttle
63+ temperature. Once the the temperature of this thermal zone is higher
64+ than it, it will trigger the HW throttle event.
3365
3466Example :
3567
3668 soctherm@700e2000 {
3769 compatible = "nvidia,tegra124-soctherm";
38- reg = <0x0 0x700e2000 0x0 0x1000>;
70+ reg = <0x0 0x700e2000 0x0 0x600 /* SOC_THERM reg_base */
71+ 0x0 0x60006000 0x0 0x400 /* CAR reg_base */
72+ reg-names = "soctherm-reg", "car-reg";
3973 interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
4074 clocks = <&tegra_car TEGRA124_CLK_TSENSOR>,
4175 <&tegra_car TEGRA124_CLK_SOC_THERM>;
@@ -44,6 +78,76 @@ Example :
4478 reset-names = "soctherm";
4579
4680 #thermal-sensor-cells = <1>;
81+
82+ throttle-cfgs {
83+ /*
84+ * When the "heavy" cooling device triggered,
85+ * the HW will skip cpu clock's pulse in 85% depth
86+ */
87+ throttle_heavy: heavy {
88+ nvidia,priority = <100>;
89+ nvidia,cpu-throt-percent = <85>;
90+
91+ #cooling-cells = <1>;
92+ };
93+
94+ /*
95+ * When the "light" cooling device triggered,
96+ * the HW will skip cpu clock's pulse in 50% depth
97+ */
98+ throttle_light: light {
99+ nvidia,priority = <80>;
100+ nvidia,cpu-throt-percent = <50>;
101+
102+ #cooling-cells = <1>;
103+ };
104+
105+ /*
106+ * If these two devices are triggered in same time, the HW throttle
107+ * arbiter will select the highest priority as the final throttle
108+ * settings to skip cpu pulse.
109+ */
110+ };
111+ };
112+
113+ Example: referring to Tegra132's "reg", "reg-names" and "throttle-cfgs" :
114+
115+ soctherm@700e2000 {
116+ compatible = "nvidia,tegra132-soctherm";
117+ reg = <0x0 0x700e2000 0x0 0x600 /* SOC_THERM reg_base */
118+ 0x0 0x70040000 0x0 0x200>; /* CCROC reg_base */;
119+ reg-names = "soctherm-reg", "ccroc-reg";
120+
121+ throttle-cfgs {
122+ /*
123+ * When the "heavy" cooling device triggered,
124+ * the HW will skip cpu clock's pulse in HIGH level
125+ */
126+ throttle_heavy: heavy {
127+ nvidia,priority = <100>;
128+ nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_HIGH>;
129+
130+ #cooling-cells = <1>;
131+ };
132+
133+ /*
134+ * When the "light" cooling device triggered,
135+ * the HW will skip cpu clock's pulse in MED level
136+ */
137+ throttle_light: light {
138+ nvidia,priority = <80>;
139+ nvidia,cpu-throt-level = <TEGRA_SOCTHERM_THROT_LEVEL_MED>;
140+
141+ #cooling-cells = <1>;
142+ };
143+
144+ /*
145+ * If these two devices are triggered in same time, the HW throttle
146+ * arbiter will select the highest priority as the final throttle
147+ * settings to skip cpu pulse.
148+ */
149+
150+ };
47151 };
48152
49153Example: referring to thermal sensors :
@@ -62,6 +166,19 @@ Example: referring to thermal sensors :
62166 hysteresis = <1000>;
63167 type = "critical";
64168 };
169+
170+ cpu_throttle_trip: throttle-trip {
171+ temperature = <100000>;
172+ hysteresis = <1000>;
173+ type = "hot";
174+ };
175+ };
176+
177+ cooling-maps {
178+ map0 {
179+ trip = <&cpu_throttle_trip>;
180+ cooling-device = <&throttle_heavy 1 1>;
181+ };
65182 };
66183 };
67184 };
0 commit comments