Thread (9 messages) 9 messages, 2 authors, 2020-05-27

RE: [PATCH] thermal: imx8mm: Add get_trend ops

From: Anson Huang <hidden>
Date: 2020-05-27 12:26:34
Also in: linux-pm, lkml

Hi, Daniel
Subject: RE: [PATCH] thermal: imx8mm: Add get_trend ops

Hi, Daniel
quoted
Subject: Re: [PATCH] thermal: imx8mm: Add get_trend ops

On 25/05/2020 04:46, Anson Huang wrote:
quoted
Hi, Daniel
[ ... ]
quoted
I tried modifying the min/max to '2' in cooling map, it works that
whenever cooling action is needed, the max cooling action will be
applied. But I also noticed some behaviors which NOT as expected:
After looking further into the min/max setting in cooling map, it looks like NOT
suitable for our i.MX platforms, although OPP table is defined in DT, but the OPP
table is a full list of all available set points, and chips with different fuse settings
will ONLY enable some of set points in the OPP table, that introduces the trouble
of calculating the max state of cpufreq cooling, for example, on i.MX8MM, there are
3 set points defined in OPP table, but if the chip is with speed_grading fuse set to
1.6GHz, then ONLY 1.2GHz/1.6GHz are available for cpufreq, so the real max state
for cpufreq cooling is '1' actually, so how do I handle such scenario?

If thermal_zone_bind_cooling_device() can support parsing other macro new definition
like 'THERMAL_MAX_STATE' in DT, then in thermal_core.c, it can get real max state via
cdev->ops->get_max_state(cdev, &max_state) and set to lower/upper state, that will help
a lot for the case of our i.MX platforms. Do you have any suggestion?

122                 opp-1200000000 {
123                         opp-hz = /bits/ 64 <1200000000>;
124                         opp-microvolt = <850000>;
125                         opp-supported-hw = <0xe>, <0x7>;
126                         clock-latency-ns = <150000>;
127                         opp-suspend;
128                 };
129
130                 opp-1600000000 {
131                         opp-hz = /bits/ 64 <1600000000>;
132                         opp-microvolt = <900000>;
133                         opp-supported-hw = <0xc>, <0x7>;
134                         clock-latency-ns = <150000>;
135                         opp-suspend;
136                 };
137
138                 opp-1800000000 {
139                         opp-hz = /bits/ 64 <1800000000>;
140                         opp-microvolt = <1000000>;
141                         opp-supported-hw = <0x8>, <0x3>;
142                         clock-latency-ns = <150000>;
143                         opp-suspend;
144                 };

Thanks,
Anson
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help