1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3  Copyright (c) 2022-2023 Huawei Device Co., Ltd.
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8      http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15  -->
16
17<thermal version="0.01" product="lya">
18    <base>
19        <item tag="history_temp_count" value="10"/>
20        <item tag="temperature_query_enum" value="soc,battery,shell,cpu,charger,ambient,ap,pa"/>
21        <item tag="sim_tz" value="1"/>
22    </base>
23
24    <level>
25        <sensor_cluster name="screenoff_charge" sensor="battery">
26            <state screen="0" charge="1"/>
27            <item level="1" threshold="40000" threshold_clr="38000"/>
28            <item level="2" threshold="43000" threshold_clr="41000"/>
29        </sensor_cluster>
30        <sensor_cluster name="base_safe" sensor="battery,charger,cpu,soc">
31            <item level="1" threshold="40000,38000,30000,40000" threshold_clr="38000,36000,28000,38000"/>
32            <item level="2" threshold="43000,41000,32000,42000" threshold_clr="41000,39000,30000,40000"/>
33            <item level="3" threshold="46000,44000,34000,44000" threshold_clr="44000,42000,32000,42000"/>
34            <item level="4" threshold="48000,46000,36000,46000" threshold_clr="46000,44000,34000,44000"/>
35        </sensor_cluster>
36        <sensor_cluster name="warm_5G" sensor="pa" aux_sensor="ambient">
37            <item level="1" threshold="40000" threshold_clr="38000" aux_trigger_range="5000_35000"/>
38            <item level="2" threshold="43000" threshold_clr="41000" aux_trigger_range="5000_35000"/>
39            <item level="3" threshold="45000" threshold_clr="44000" aux_trigger_range="5000_35000"/>
40        </sensor_cluster>
41        <sensor_cluster name="warm_safe" sensor="ap,soc" aux_sensor="ambient,shell">
42            <item level="1" threshold="75000,30000" threshold_clr="71000,28000" aux_trigger_range="0_900000,0_40000"/>
43        </sensor_cluster>
44        <sensor_cluster name="high_safe" sensor="shell">
45            <item level="1" threshold="40000" threshold_clr="38000" temp_rise_rate="1.5"/>
46            <item level="2" threshold="43000" threshold_clr="41000" temp_rise_rate="1.5"/>
47            <item level="3" threshold="46000" threshold_clr="44000" temp_rise_rate="1.5"/>
48            <item level="4" threshold="48000" threshold_clr="47000" temp_rise_rate="1.5"/>
49        </sensor_cluster>
50        <sensor_cluster name="cold_safe" sensor="battery,soc" desc="1">
51            <item level="1" threshold="-9000,-8000" threshold_clr="-6000,-5000"/>
52            <item level="2" threshold="-14000,-13000" threshold_clr="-11000,-10000"/>
53            <item level="3" threshold="-19000,-18000" threshold_clr="-16000,-15000"/>
54            <item level="4" threshold="-21000,-20000" threshold_clr="-20000,-19000"/>
55        </sensor_cluster>
56    </level>
57
58    <state>
59        <item name="scene" param="cam,call,game,test"/>
60        <item name="screen"/>
61        <item name="charge"/>
62    </state>
63
64    <action>
65        <item name="cpu_big"/>
66        <item name="cpu_med"/>
67        <item name="cpu_lit"/>
68        <item name="gpu"/>
69        <item name="boost" event="1"/>
70        <item name="isolate" event="1"/>
71        <item name="lcd"/>
72        <item name="volume" uid="2001,2002"/>
73        <item name="current_sc" protocol="current" param="sc" event="1"/>
74        <item name="current_buck" protocol="current" param="buck" event="1"/>
75        <item name="voltage_sc" protocol="voltage" param="sc" event="1"/>
76        <item name="voltage_buck" protocol="voltage" param="buck" event="1"/>
77        <item name="process_ctrl" param="32,64,128,256" event=""/>
78        <item name="shut_down" event="0"/>
79        <item name="thermallevel" event="1"/>
80        <item name="popup"/>
81        <item name="test"/>
82    </action>
83
84    <policy>
85        <config name="base_safe" level="1">
86            <lcd>1.00</lcd>
87            <lcd scene="cam">0.99</lcd>
88            <lcd scene="call">0.98</lcd>
89            <lcd scene="game">0.97</lcd>
90            <lcd scene="test">0.91</lcd>
91            <cpu_big>1992000</cpu_big>
92            <cpu_med>1991500</cpu_med>
93            <cpu_lit>1991200</cpu_lit>
94            <test>99999</test>
95            <process_ctrl>3</process_ctrl>
96            <cpu_big scene="cam" charge="1">1991800</cpu_big>
97            <cpu_big scene="cam" charge="0">1991600</cpu_big>
98            <gpu screen="0">524288</gpu>
99            <gpu screen="1">512000</gpu>
100            <thermallevel>1</thermallevel>
101            <current_sc>1800</current_sc>
102            <current_sc scene="cam">1200</current_sc>
103            <current_buck>1200</current_buck>
104            <voltage_sc>4000</voltage_sc>
105            <voltage_buck>3000</voltage_buck>
106            <volume>1.0</volume>
107            <boost>1</boost>
108            <isolate>0</isolate>
109        </config>
110        <config name="base_safe" level="2">
111            <lcd>0.90</lcd>
112            <lcd scene="cam">0.89</lcd>
113            <lcd scene="call">0.88</lcd>
114            <lcd scene="game">0.87</lcd>
115            <cpu_big>1991000</cpu_big>
116            <cpu_med>1990500</cpu_med>
117            <cpu_lit>1990200</cpu_lit>
118            <process_ctrl>2</process_ctrl>
119            <cpu_big scene="cam" charge="1">1990800</cpu_big>
120            <cpu_big scene="cam" charge="0">1990600</cpu_big>
121            <gpu screen="0">499712</gpu>
122            <gpu screen="1">487424</gpu>
123            <thermallevel>2</thermallevel>
124            <current_sc>1500</current_sc>
125            <current_sc scene="cam">1000</current_sc>
126            <current_buck>1000</current_buck>
127            <voltage_sc>3000</voltage_sc>
128            <voltage_buck>2000</voltage_buck>
129            <volume>0.8</volume>
130            <boost>1</boost>
131            <isolate>1</isolate>
132        </config>
133        <config name="base_safe" level="3">
134            <lcd>0.80</lcd>
135            <lcd scene="cam">0.79</lcd>
136            <lcd scene="call">0.78</lcd>
137            <lcd scene="game">0.77</lcd>
138            <cpu_big>1990000</cpu_big>
139            <cpu_med>1989500</cpu_med>
140            <cpu_lit>1989200</cpu_lit>
141            <process_ctrl>1</process_ctrl>
142            <cpu_big scene="cam" charge="1">1989800</cpu_big>
143            <cpu_big scene="cam" charge="0">1989600</cpu_big>
144            <gpu screen="0">475136</gpu>
145            <gpu screen="1">462848</gpu>
146            <thermallevel>3</thermallevel>
147            <current_sc>1300</current_sc>
148            <current_sc scene="cam">800</current_sc>
149            <current_buck>800</current_buck>
150            <voltage_sc>2000</voltage_sc>
151            <voltage_buck>1000</voltage_buck>
152            <volume>0.7</volume>
153            <shut_down>1</shut_down>
154            <boost>0</boost>
155            <isolate>2</isolate>
156        </config>
157        <config name="warm_5G" level="1">
158            <lcd>0.70</lcd>
159            <thermallevel>4</thermallevel>
160            <process_ctrl>2</process_ctrl>
161        </config>
162        <config name="warm_5G" level="2">
163            <lcd>0.60</lcd>
164            <process_ctrl>3</process_ctrl>
165            <thermallevel>5</thermallevel>
166        </config>
167        <config name="warm_5G" level="3">
168            <thermallevel>7</thermallevel>
169        </config>
170        <config name="warm_safe" level="1">
171            <process_ctrl screen="1">3</process_ctrl>
172            <shut_down screen="1">1</shut_down>
173            <thermallevel>6</thermallevel>
174        </config>
175        <config name="cold_safe" level="1">
176            <current_sc>1850</current_sc>
177            <thermallevel>0</thermallevel>
178        </config>
179        <config name="cold_safe" level="2">
180            <current_sc>1550</current_sc>
181            <thermallevel>0</thermallevel>
182        </config>
183        <config name="cold_safe" level="3">
184            <current_sc>1150</current_sc>
185            <thermallevel>0</thermallevel>
186        </config>
187    </policy>
188
189    <fan>
190        <sensor_cluster name="fan_fault_detect" sensor="soc,gpu,fan">
191            <item fault="1" threshold="50000,50000,500"/>
192            <item fault="2" threshold="30000,30000,1500"/>
193        </sensor_cluster>
194    </fan>
195
196    <idle name="charging">
197        <thermallevel>1</thermallevel>  <!-- thermal level is equal or less than 1 -->
198        <soc>80</soc> <!-- battery soc is equal or more than 80% -->
199        <charging>1</charging> <!-- battery is charging -->
200        <current>1000</current> <!-- battery charging current is equal or more than 1000mA -->
201    </idle>
202</thermal>
203