From: Mark Rutland <mark.rutland@arm.com>
To: Dawei Chien <dawei.chien@mediatek.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
Daniel Kurtz <djkurtz@chromium.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com,
Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH v2 1/2] thermal: mediatek: Add cpu power cooling model.
Date: Wed, 7 Oct 2015 16:57:45 +0100 [thread overview]
Message-ID: <20151007155745.GD28981@leverpostej> (raw)
In-Reply-To: <1444220561-26139-2-git-send-email-dawei.chien@mediatek.com>
On Wed, Oct 07, 2015 at 08:22:40PM +0800, Dawei Chien wrote:
> From: "Dawei.Chien" <dawei.chien@mediatek.com>
>
> This power model is base on Intelligent Power Allocation (IPA) technical,
> requires that the operating-points of the CPUs are registered using the
> kernel's opp library and the `cpufreq_frequency_table` is assigned to the
> `struct device` of the cpu MT8173.
>
> Signed-off-by: Dawei.Chien <dawei.chien@mediatek.com>
> ---
> This patch is base on
> https://patchwork.kernel.org/patch/7034601/
> ---
> drivers/cpufreq/mt8173-cpufreq.c | 97 +++++++++++++++++++++++++++++++++-----
> 1 file changed, 86 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c
> index 49caed2..9233ec5 100644
> --- a/drivers/cpufreq/mt8173-cpufreq.c
> +++ b/drivers/cpufreq/mt8173-cpufreq.c
> @@ -28,7 +28,8 @@
> #define MAX_VOLT_SHIFT (200000)
> #define MAX_VOLT_LIMIT (1150000)
> #define VOLT_TOL (10000)
> -
> +#define CAPACITANCE_CA53 (263)
> +#define CAPACITANCE_CA57 (530)
> /*
> * The struct mtk_cpu_dvfs_info holds necessary information for doing CPU DVFS
> * on each CPU power/clock domain of Mediatek SoCs. Each CPU cluster in
> @@ -51,6 +52,72 @@ struct mtk_cpu_dvfs_info {
> bool need_voltage_tracking;
> };
>
> +struct mtk_cpu_static_power {
> + unsigned long voltage;
> + unsigned int power;
> +};
> +
> +/* measured by WA program. */
> +static const struct mtk_cpu_static_power mtk_ca53_static_power[] = {
> + {859000, 43},
> + {908000, 52},
> + {983000, 86},
> + {1009000, 123},
> + {1028000, 138},
> + {1083000, 172},
> + {1109000, 180},
> + {1125000, 192},
> +};
> +
> +/* measured by WA program. */
> +static const struct mtk_cpu_static_power mtk_ca57_static_power[] = {
> + {828000, 72},
> + {867000, 90},
> + {927000, 156},
> + {968000, 181},
> + {1007000, 298},
> + {1049000, 435},
> + {1089000, 533},
> + {1125000, 533},
> +};
This should be described in the DT, rather than necessitating tonnes of
these tables in the kernel.
Mark.
WARNING: multiple messages have this Message-ID (diff)
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] thermal: mediatek: Add cpu power cooling model.
Date: Wed, 7 Oct 2015 16:57:45 +0100 [thread overview]
Message-ID: <20151007155745.GD28981@leverpostej> (raw)
In-Reply-To: <1444220561-26139-2-git-send-email-dawei.chien@mediatek.com>
On Wed, Oct 07, 2015 at 08:22:40PM +0800, Dawei Chien wrote:
> From: "Dawei.Chien" <dawei.chien@mediatek.com>
>
> This power model is base on Intelligent Power Allocation (IPA) technical,
> requires that the operating-points of the CPUs are registered using the
> kernel's opp library and the `cpufreq_frequency_table` is assigned to the
> `struct device` of the cpu MT8173.
>
> Signed-off-by: Dawei.Chien <dawei.chien@mediatek.com>
> ---
> This patch is base on
> https://patchwork.kernel.org/patch/7034601/
> ---
> drivers/cpufreq/mt8173-cpufreq.c | 97 +++++++++++++++++++++++++++++++++-----
> 1 file changed, 86 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c
> index 49caed2..9233ec5 100644
> --- a/drivers/cpufreq/mt8173-cpufreq.c
> +++ b/drivers/cpufreq/mt8173-cpufreq.c
> @@ -28,7 +28,8 @@
> #define MAX_VOLT_SHIFT (200000)
> #define MAX_VOLT_LIMIT (1150000)
> #define VOLT_TOL (10000)
> -
> +#define CAPACITANCE_CA53 (263)
> +#define CAPACITANCE_CA57 (530)
> /*
> * The struct mtk_cpu_dvfs_info holds necessary information for doing CPU DVFS
> * on each CPU power/clock domain of Mediatek SoCs. Each CPU cluster in
> @@ -51,6 +52,72 @@ struct mtk_cpu_dvfs_info {
> bool need_voltage_tracking;
> };
>
> +struct mtk_cpu_static_power {
> + unsigned long voltage;
> + unsigned int power;
> +};
> +
> +/* measured by WA program. */
> +static const struct mtk_cpu_static_power mtk_ca53_static_power[] = {
> + {859000, 43},
> + {908000, 52},
> + {983000, 86},
> + {1009000, 123},
> + {1028000, 138},
> + {1083000, 172},
> + {1109000, 180},
> + {1125000, 192},
> +};
> +
> +/* measured by WA program. */
> +static const struct mtk_cpu_static_power mtk_ca57_static_power[] = {
> + {828000, 72},
> + {867000, 90},
> + {927000, 156},
> + {968000, 181},
> + {1007000, 298},
> + {1049000, 435},
> + {1089000, 533},
> + {1125000, 533},
> +};
This should be described in the DT, rather than necessitating tonnes of
these tables in the kernel.
Mark.
next prev parent reply other threads:[~2015-10-07 15:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 12:22 [PATCH v2 0/2] thermal: mediatek: Add cpu power cooling model Dawei Chien
2015-10-07 12:22 ` Dawei Chien
2015-10-07 12:22 ` Dawei Chien
[not found] ` <1444220561-26139-1-git-send-email-dawei.chien-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-10-07 12:22 ` [PATCH v2 1/2] " Dawei Chien
2015-10-07 12:22 ` Dawei Chien
2015-10-07 12:22 ` Dawei Chien
2015-10-07 15:57 ` Mark Rutland [this message]
2015-10-07 15:57 ` Mark Rutland
2015-10-12 17:26 ` Punit Agrawal
2015-10-12 17:26 ` Punit Agrawal
2015-10-12 17:26 ` Punit Agrawal
2015-10-15 11:31 ` dawei chien
2015-10-15 11:31 ` dawei chien
2015-10-15 11:31 ` dawei chien
2015-10-07 12:22 ` [PATCH v2 2/2] arm64: dts: mt8173: Add thermal zone node for mt8173 Dawei Chien
2015-10-07 12:22 ` Dawei Chien
2015-10-07 12:22 ` Dawei Chien
[not found] ` <1444220561-26139-3-git-send-email-dawei.chien-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2015-10-07 17:56 ` kbuild test robot
2015-10-07 17:56 ` kbuild test robot
2015-10-07 17:56 ` kbuild test robot
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=20151007155745.GD28981@leverpostej \
--to=mark.rutland@arm.com \
--cc=daniel.lezcano@linaro.org \
--cc=dawei.chien@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=djkurtz@chromium.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=pawel.moll@arm.com \
--cc=rjw@rjwysocki.net \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=srv_heupstream@mediatek.com \
--cc=viresh.kumar@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.