linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anson Huang <anson.huang@nxp.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	"rui.zhang@intel.com" <rui.zhang@intel.com>,
	"amit.kucheria@verdurent.com" <amit.kucheria@verdurent.com>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: dl-linux-imx <linux-imx@nxp.com>
Subject: RE: [PATCH] thermal: imx8mm: Add get_trend ops
Date: Wed, 27 May 2020 12:26:28 +0000	[thread overview]
Message-ID: <DB3PR0402MB3916978B2D56374FE335E28BF5B10@DB3PR0402MB3916.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <DB3PR0402MB391695A412B26134060D1D1BF5B30@DB3PR0402MB3916.eurprd04.prod.outlook.com>

Hi, Daniel

> Subject: RE: [PATCH] thermal: imx8mm: Add get_trend ops
> 
> Hi, Daniel
> 
> > Subject: Re: [PATCH] thermal: imx8mm: Add get_trend ops
> >
> > On 25/05/2020 04:46, Anson Huang wrote:
> > > Hi, Daniel
> >
> > [ ... ]
> >
> > > 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

      reply	other threads:[~2020-05-27 12:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  2:58 [PATCH] thermal: imx8mm: Add get_trend ops Anson Huang
2020-05-22 17:33 ` Daniel Lezcano
2020-05-23  0:35   ` Anson Huang
2020-05-23 12:33     ` Daniel Lezcano
2020-05-24  0:50       ` Anson Huang
2020-05-25  2:46         ` Anson Huang
2020-05-25 11:04           ` Daniel Lezcano
2020-05-25 15:05             ` Anson Huang
2020-05-27 12:26               ` Anson Huang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB3PR0402MB3916978B2D56374FE335E28BF5B10@DB3PR0402MB3916.eurprd04.prod.outlook.com \
    --to=anson.huang@nxp.com \
    --cc=amit.kucheria@verdurent.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).