All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio Estevam <festevam@gmail.com>
To: Stefan Agner <stefan@agner.ch>, Yongcai Huang <anson.huang@nxp.com>
Cc: rjw@rjwysocki.net, viresh kumar <viresh.kumar@linaro.org>,
	linux-pm@vger.kernel.org,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	max.oss.09@gmail.com, linux-kernel <linux-kernel@vger.kernel.org>,
	Octavian Purdila <octavian.purdila@nxp.com>,
	Fabio Estevam <fabio.estevam@nxp.com>,
	Shawn Guo <shawnguo@kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>,
	NXP Linux Team <linux-imx@nxp.com>
Subject: Re: [PATCH] cpufreq: imx6q: support frequencies >528MHz for i.MX6UL/ULL
Date: Sat, 10 Feb 2018 14:25:37 -0200	[thread overview]
Message-ID: <CAOMZO5CBTTi2QMfM0yDVEMTYm06pGyasUcaLWD8wDHiVi9oshg@mail.gmail.com> (raw)
In-Reply-To: <20180118235836.17393-1-stefan@agner.ch>

Hi Anson,

On Thu, Jan 18, 2018 at 9:58 PM, Stefan Agner <stefan@agner.ch> wrote:
> Depending on SKU i.MX6UL/i.MX6ULL support frequencies up to 900MHz.
> Use PLL1 sys clock for all operating points higher than 528MHz.
>
> Note: For higher operating points VDD_SOC_IN needs to be 125mV
> higher than the ARM set-point (see datasheet). Specifically, the
> i.MX6UL/ULL EVK boards have an external DC regulator which needs
> adjustment. The regulator adjustment is not covered with this
> change.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  drivers/cpufreq/imx6q-cpufreq.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
> index 628fe899cb48..840f6386c780 100644
> --- a/drivers/cpufreq/imx6q-cpufreq.c
> +++ b/drivers/cpufreq/imx6q-cpufreq.c
> @@ -114,12 +114,14 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
>                  */
>                 clk_set_rate(arm_clk, (old_freq >> 1) * 1000);
>                 clk_set_parent(pll1_sw_clk, pll1_sys_clk);
> -               if (freq_hz > clk_get_rate(pll2_pfd2_396m_clk))
> -                       clk_set_parent(secondary_sel_clk, pll2_bus_clk);
> -               else
> -                       clk_set_parent(secondary_sel_clk, pll2_pfd2_396m_clk);
> -               clk_set_parent(step_clk, secondary_sel_clk);
> -               clk_set_parent(pll1_sw_clk, step_clk);
> +               if (freq_hz <= clk_get_rate(pll2_bus_clk)) {
> +                       if (freq_hz > clk_get_rate(pll2_pfd2_396m_clk))
> +                               clk_set_parent(secondary_sel_clk, pll2_bus_clk);
> +                       else
> +                               clk_set_parent(secondary_sel_clk, pll2_pfd2_396m_clk);
> +                       clk_set_parent(step_clk, secondary_sel_clk);
> +                       clk_set_parent(pll1_sw_clk, step_clk);
> +               }
>         } else {
>                 clk_set_parent(step_clk, pll2_pfd2_396m_clk);
>                 clk_set_parent(pll1_sw_clk, step_clk);

Could you please help reviewing this patch?

Thanks

WARNING: multiple messages have this Message-ID (diff)
From: festevam@gmail.com (Fabio Estevam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] cpufreq: imx6q: support frequencies >528MHz for i.MX6UL/ULL
Date: Sat, 10 Feb 2018 14:25:37 -0200	[thread overview]
Message-ID: <CAOMZO5CBTTi2QMfM0yDVEMTYm06pGyasUcaLWD8wDHiVi9oshg@mail.gmail.com> (raw)
In-Reply-To: <20180118235836.17393-1-stefan@agner.ch>

Hi Anson,

On Thu, Jan 18, 2018 at 9:58 PM, Stefan Agner <stefan@agner.ch> wrote:
> Depending on SKU i.MX6UL/i.MX6ULL support frequencies up to 900MHz.
> Use PLL1 sys clock for all operating points higher than 528MHz.
>
> Note: For higher operating points VDD_SOC_IN needs to be 125mV
> higher than the ARM set-point (see datasheet). Specifically, the
> i.MX6UL/ULL EVK boards have an external DC regulator which needs
> adjustment. The regulator adjustment is not covered with this
> change.
>
> Signed-off-by: Stefan Agner <stefan@agner.ch>
> ---
>  drivers/cpufreq/imx6q-cpufreq.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
> index 628fe899cb48..840f6386c780 100644
> --- a/drivers/cpufreq/imx6q-cpufreq.c
> +++ b/drivers/cpufreq/imx6q-cpufreq.c
> @@ -114,12 +114,14 @@ static int imx6q_set_target(struct cpufreq_policy *policy, unsigned int index)
>                  */
>                 clk_set_rate(arm_clk, (old_freq >> 1) * 1000);
>                 clk_set_parent(pll1_sw_clk, pll1_sys_clk);
> -               if (freq_hz > clk_get_rate(pll2_pfd2_396m_clk))
> -                       clk_set_parent(secondary_sel_clk, pll2_bus_clk);
> -               else
> -                       clk_set_parent(secondary_sel_clk, pll2_pfd2_396m_clk);
> -               clk_set_parent(step_clk, secondary_sel_clk);
> -               clk_set_parent(pll1_sw_clk, step_clk);
> +               if (freq_hz <= clk_get_rate(pll2_bus_clk)) {
> +                       if (freq_hz > clk_get_rate(pll2_pfd2_396m_clk))
> +                               clk_set_parent(secondary_sel_clk, pll2_bus_clk);
> +                       else
> +                               clk_set_parent(secondary_sel_clk, pll2_pfd2_396m_clk);
> +                       clk_set_parent(step_clk, secondary_sel_clk);
> +                       clk_set_parent(pll1_sw_clk, step_clk);
> +               }
>         } else {
>                 clk_set_parent(step_clk, pll2_pfd2_396m_clk);
>                 clk_set_parent(pll1_sw_clk, step_clk);

Could you please help reviewing this patch?

Thanks

  parent reply	other threads:[~2018-02-10 16:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-18 23:58 [PATCH] cpufreq: imx6q: support frequencies >528MHz for i.MX6UL/ULL Stefan Agner
2018-01-18 23:58 ` Stefan Agner
2018-02-09 11:52 ` Rafael J. Wysocki
2018-02-09 11:52   ` Rafael J. Wysocki
2018-02-09 12:05   ` Stefan Agner
2018-02-09 12:05     ` Stefan Agner
2018-02-10 16:25 ` Fabio Estevam [this message]
2018-02-10 16:25   ` Fabio Estevam
2018-02-11  1:42   ` Anson Huang
2018-02-11  1:42     ` Anson Huang
2018-02-11 16:17     ` Stefan Agner
2018-02-11 16:17       ` Stefan Agner
2018-02-12  7:24       ` Anson Huang
2018-02-12  7:24         ` Anson Huang
2018-02-12  8:53 ` Viresh Kumar
2018-02-12  8:53   ` Viresh Kumar
2018-02-12 10:18 ` Rafael J. Wysocki
2018-02-12 10:18   ` Rafael J. Wysocki
2018-02-12 12:01   ` Stefan Agner
2018-02-12 12:01     ` Stefan Agner

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=CAOMZO5CBTTi2QMfM0yDVEMTYm06pGyasUcaLWD8wDHiVi9oshg@mail.gmail.com \
    --to=festevam@gmail.com \
    --cc=anson.huang@nxp.com \
    --cc=fabio.estevam@nxp.com \
    --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=marcel.ziswiler@toradex.com \
    --cc=max.oss.09@gmail.com \
    --cc=octavian.purdila@nxp.com \
    --cc=rjw@rjwysocki.net \
    --cc=shawnguo@kernel.org \
    --cc=stefan@agner.ch \
    --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.