From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: <linux-tegra@vger.kernel.org>, <linux-clk@vger.kernel.org>,
<mturquette@baylibre.com>, <sboyd@codeaurora.org>
Subject: Re: [PATCH v2 2/6] clk: tegra: DT align parameter for CVB calculation
Date: Thu, 1 Feb 2018 13:02:19 +0200 [thread overview]
Message-ID: <20180201110219.GC7031@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <98da869b-e3b5-d703-c2bd-c34a081dfbc8@nvidia.com>
On Thu, Feb 01, 2018 at 10:54:15AM +0000, Jon Hunter wrote:
>
> On 01/02/18 10:30, Peter De Schrijver wrote:
> > On Wed, Jan 31, 2018 at 10:43:04AM +0000, Jon Hunter wrote:
> >>
> >> On 24/01/18 12:45, Peter De Schrijver wrote:
> >>> When using a PWM controlled regulator, the voltage step and offset are
> >>> determined by the regulator IC in use. This is specified in DT rather
> >>> than fixed in the CVB table. Hence pass this information to the CVB table
> >>> calculation function. For backwards compatibility the table values are used
> >>> if the corresponding parameter is 0.
> >>>
> >>> Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com>
> >>> ---
> >>> drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 23 +++++++++++++++++++++--
> >>> drivers/clk/tegra/cvb.c | 18 ++++++++++++++----
> >>> drivers/clk/tegra/cvb.h | 5 +++--
> >>> 3 files changed, 38 insertions(+), 8 deletions(-)
> >>>
> >>> diff --git a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
> >>> index 440eb8d..6205ce1 100644
> >>> --- a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
> >>> +++ b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
> >>> @@ -111,6 +111,7 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev)
> >>> struct tegra_dfll_soc_data *soc;
> >>> const struct of_device_id *of_id;
> >>> const struct dfll_fcpu_data *fcpu_data;
> >>> + struct rail_alignment align;
> >>>
> >>> of_id = of_match_device(tegra124_dfll_fcpu_of_match, &pdev->dev);
> >>> fcpu_data = of_id->data;
> >>> @@ -135,12 +136,30 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev)
> >>> return -ENODEV;
> >>> }
> >>>
> >>> + err = of_property_read_u32(pdev->dev.of_node, "nvidia,align-offset-uv",
> >>> + &align.offset_uv);
> >>> + if (err < 0) {
> >>> + dev_err(&pdev->dev,
> >>> + "offset uv not found, default to table value\n");
> >>> + align.offset_uv = 0;
> >>> + }
> >>> +
> >>> + err = of_property_read_u32(pdev->dev.of_node, "nvidia,align-step-uv",
> >>> + &align.step_uv);
> >>> + if (err < 0) {
> >>> + dev_err(&pdev->dev,
> >>> + "step uv not found, default to table value\n");
> >>> + align.step_uv = 0;
> >>> + }
> >>> +
> >>
> >> I am a bit confused by this ...
> >>
> >> 1. Isn't this going to break Tegra124 DFLL support?
> >
> > We fall back to the original behaviour in case the properties are missing, so
> > it should work.
>
> Ah yes. However, on Tegra124 now I see all this prints. Can't we only
> read these properties if using PWM?
>
I think it would make more sense then to get these parameters from the
regulator object in case of i2c. If that works on Tegra124, we can eliminate
using the CVB table align values entirely.
Peter.
WARNING: multiple messages have this Message-ID (diff)
From: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
mturquette-rdvid1DuHRBWk0Htik3J/w@public.gmane.org,
sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org
Subject: Re: [PATCH v2 2/6] clk: tegra: DT align parameter for CVB calculation
Date: Thu, 1 Feb 2018 13:02:19 +0200 [thread overview]
Message-ID: <20180201110219.GC7031@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <98da869b-e3b5-d703-c2bd-c34a081dfbc8-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
On Thu, Feb 01, 2018 at 10:54:15AM +0000, Jon Hunter wrote:
>
> On 01/02/18 10:30, Peter De Schrijver wrote:
> > On Wed, Jan 31, 2018 at 10:43:04AM +0000, Jon Hunter wrote:
> >>
> >> On 24/01/18 12:45, Peter De Schrijver wrote:
> >>> When using a PWM controlled regulator, the voltage step and offset are
> >>> determined by the regulator IC in use. This is specified in DT rather
> >>> than fixed in the CVB table. Hence pass this information to the CVB table
> >>> calculation function. For backwards compatibility the table values are used
> >>> if the corresponding parameter is 0.
> >>>
> >>> Signed-off-by: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >>> ---
> >>> drivers/clk/tegra/clk-tegra124-dfll-fcpu.c | 23 +++++++++++++++++++++--
> >>> drivers/clk/tegra/cvb.c | 18 ++++++++++++++----
> >>> drivers/clk/tegra/cvb.h | 5 +++--
> >>> 3 files changed, 38 insertions(+), 8 deletions(-)
> >>>
> >>> diff --git a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
> >>> index 440eb8d..6205ce1 100644
> >>> --- a/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
> >>> +++ b/drivers/clk/tegra/clk-tegra124-dfll-fcpu.c
> >>> @@ -111,6 +111,7 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev)
> >>> struct tegra_dfll_soc_data *soc;
> >>> const struct of_device_id *of_id;
> >>> const struct dfll_fcpu_data *fcpu_data;
> >>> + struct rail_alignment align;
> >>>
> >>> of_id = of_match_device(tegra124_dfll_fcpu_of_match, &pdev->dev);
> >>> fcpu_data = of_id->data;
> >>> @@ -135,12 +136,30 @@ static int tegra124_dfll_fcpu_probe(struct platform_device *pdev)
> >>> return -ENODEV;
> >>> }
> >>>
> >>> + err = of_property_read_u32(pdev->dev.of_node, "nvidia,align-offset-uv",
> >>> + &align.offset_uv);
> >>> + if (err < 0) {
> >>> + dev_err(&pdev->dev,
> >>> + "offset uv not found, default to table value\n");
> >>> + align.offset_uv = 0;
> >>> + }
> >>> +
> >>> + err = of_property_read_u32(pdev->dev.of_node, "nvidia,align-step-uv",
> >>> + &align.step_uv);
> >>> + if (err < 0) {
> >>> + dev_err(&pdev->dev,
> >>> + "step uv not found, default to table value\n");
> >>> + align.step_uv = 0;
> >>> + }
> >>> +
> >>
> >> I am a bit confused by this ...
> >>
> >> 1. Isn't this going to break Tegra124 DFLL support?
> >
> > We fall back to the original behaviour in case the properties are missing, so
> > it should work.
>
> Ah yes. However, on Tegra124 now I see all this prints. Can't we only
> read these properties if using PWM?
>
I think it would make more sense then to get these parameters from the
regulator object in case of i2c. If that works on Tegra124, we can eliminate
using the CVB table align values entirely.
Peter.
next prev parent reply other threads:[~2018-02-01 11:02 UTC|newest]
Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 12:45 [PATCH v2 0/6] Tegra210 DFLL implementation Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-24 12:45 ` [PATCH v2 1/6] clk: tegra: dfll registration for multiple SoCs Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-31 10:13 ` Jon Hunter
2018-01-31 10:13 ` Jon Hunter
2018-01-24 12:45 ` [PATCH v2 2/6] clk: tegra: DT align parameter for CVB calculation Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-31 10:43 ` Jon Hunter
2018-01-31 10:43 ` Jon Hunter
2018-02-01 10:30 ` Peter De Schrijver
2018-02-01 10:30 ` Peter De Schrijver
2018-02-01 10:54 ` Jon Hunter
2018-02-01 10:54 ` Jon Hunter
2018-02-01 11:02 ` Peter De Schrijver [this message]
2018-02-01 11:02 ` Peter De Schrijver
2018-01-24 12:45 ` [PATCH v2 3/6] clk: tegra: add CVB tables for Tegra210 CPU DFLL Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-31 10:50 ` Jon Hunter
2018-01-31 10:50 ` Jon Hunter
2018-02-01 10:39 ` Peter De Schrijver
2018-02-01 10:39 ` Peter De Schrijver
2018-01-24 12:45 ` [PATCH v2 4/6] clk: tegra: dfll: support PWM regulator control Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-31 11:26 ` Jon Hunter
2018-01-31 11:26 ` Jon Hunter
2018-02-01 10:57 ` Peter De Schrijver
2018-02-01 10:57 ` Peter De Schrijver
2018-01-24 12:45 ` [PATCH v2 5/6] clk: tegra: build clk-dfll.c for Tegra124 and Tegra210 Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-31 11:03 ` Jon Hunter
2018-01-31 11:03 ` Jon Hunter
2018-01-24 12:45 ` [PATCH v2 6/6] cpufreq: tegra124-cpufreq: extend to support Tegra210 Peter De Schrijver
2018-01-24 12:45 ` Peter De Schrijver
2018-01-31 11:06 ` Jon Hunter
2018-01-31 11:06 ` Jon Hunter
2018-02-01 9:25 ` Peter De Schrijver
2018-02-01 9:25 ` Peter De Schrijver
2018-02-01 9:53 ` Jon Hunter
2018-02-01 9:53 ` Jon Hunter
2018-02-01 10:15 ` Peter De Schrijver
2018-02-01 10:15 ` Peter De Schrijver
2018-02-01 10:22 ` Jon Hunter
2018-02-01 10:22 ` Jon Hunter
2018-02-01 10:31 ` Peter De Schrijver
2018-02-01 10:31 ` Peter De Schrijver
2018-02-06 12:27 ` Tuomas Tynkkynen
2018-02-06 12:27 ` Tuomas Tynkkynen
2018-02-06 16:28 ` Peter De Schrijver
2018-02-06 16:28 ` Peter De Schrijver
2018-01-31 11:28 ` [PATCH v2 0/6] Tegra210 DFLL implementation Jon Hunter
2018-01-31 11:28 ` Jon Hunter
2018-02-01 9:30 ` Peter De Schrijver
2018-02-01 9:30 ` Peter De Schrijver
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=20180201110219.GC7031@tbergstrom-lnx.Nvidia.com \
--to=pdeschrijver@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.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.