From: vladimir_zapolskiy@mentor.com (Vladimir Zapolskiy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 03/16] clk: tegra: Add closed loop support for the DFLL
Date: Fri, 24 Oct 2014 18:13:30 +0300 [thread overview]
Message-ID: <544A6C9A.9050404@mentor.com> (raw)
In-Reply-To: <1414161563-16812-4-git-send-email-mikko.perttunen@kapsi.fi>
On 24.10.2014 17:39, Mikko Perttunen wrote:
> From: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
>
> With closed loop support, the clock rate of the DFLL can be adjusted.
>
> The oscillator itself in the DFLL is a free-running oscillator whose
> rate is directly determined the supply voltage. However, the DFLL
> module contains logic to compare the DFLL output rate to a fixed
> reference clock (51 MHz) and make a decision to either lower or raise
> the DFLL supply voltage. The DFLL module can then autonomously change
> the supply voltage by communicating with an off-chip PMIC via either I2C
> or PWM signals. This driver currently supports only I2C.
>
> Signed-off-by: Tuomas Tynkkynen <ttynkkynen@nvidia.com>
> Signed-off-by: Mikko Perttunen <mikko.perttunen@kapsi.fi>
> ---
> drivers/clk/tegra/clk-dfll.c | 657 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 654 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/tegra/clk-dfll.c b/drivers/clk/tegra/clk-dfll.c
> index 358c5d4..e71f4fb 100644
> --- a/drivers/clk/tegra/clk-dfll.c
> +++ b/drivers/clk/tegra/clk-dfll.c
[snip]
> +/**
> * dfll_fetch_common_params - read DFLL parameters from the device tree
> * @td: DFLL instance
> *
> @@ -923,6 +1563,13 @@ static int dfll_fetch_common_params(struct tegra_dfll *td)
> bool ok = true;
>
> ok &= read_dt_param(td, "nvidia,droop-ctrl", &td->droop_ctrl);
> + ok &= read_dt_param(td, "nvidia,sample-rate", &td->sample_rate);
> + ok &= read_dt_param(td, "nvidia,force-mode", &td->force_mode);
> + ok &= read_dt_param(td, "nvidia,cf", &td->cf);
> + ok &= read_dt_param(td, "nvidia,ci", &td->ci);
> + ok &= read_dt_param(td, "nvidia,cg", &td->cg);
> + td->cg_scale = of_property_read_bool(td->dev->of_node,
> + "nvidia,cg-scale");
Oh, I see here you exploit read_dt_param() intensively.
> if (of_property_read_string(td->dev->of_node, "clock-output-names",
> &td->output_clock_name)) {
> @@ -978,6 +1625,10 @@ int tegra_dfll_register(struct platform_device *pdev,
> return ret;
> }
>
> + ret = dfll_fetch_i2c_params(td);
> + if (ret)
> + return ret;
> +
> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> if (!mem) {
> dev_err(td->dev, "no control register resource\n");
>
--
With best wishes,
Vladimir
next prev parent reply other threads:[~2014-10-24 15:13 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-24 14:39 [PATCH v5 00/16] Tegra124 CL-DVFS / DFLL clocksource + cpufreq Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 01/16] clk: tegra: Add binding for the Tegra124 DFLL clocksource Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 02/16] clk: tegra: Add library for the DFLL clock source (open-loop mode) Mikko Perttunen
2014-10-24 15:08 ` Vladimir Zapolskiy
2014-10-27 9:36 ` Mikko Perttunen
2014-10-31 11:16 ` [PATCH v6 " Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 03/16] clk: tegra: Add closed loop support for the DFLL Mikko Perttunen
2014-10-24 15:13 ` Vladimir Zapolskiy [this message]
2014-10-31 11:18 ` [PATCH v6 " Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 04/16] clk: tegra: Add functions for parsing CVB tables Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 05/16] clk: tegra: Add DFLL DVCO reset control for Tegra124 Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 06/16] clk: tegra: Add Tegra124 DFLL clocksource platform driver Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 07/16] clk: tegra: Save/restore CCLKG_BURST_POLICY on suspend Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 08/16] clk: tegra: Add the DFLL as a possible parent of the cclk_g clock Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 09/16] ARM: tegra: Add the DFLL to Tegra124 device tree Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 10/16] ARM: tegra: Enable the DFLL on the Jetson TK1 Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 11/16] cpufreq: tegra124: Add device tree bindings Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 12/16] cpufreq: tegra: Rename tegra-cpufreq to tegra20-cpufreq Mikko Perttunen
2014-11-10 4:52 ` Viresh Kumar
2014-11-10 11:40 ` Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 13/16] cpufreq: Add cpufreq driver for Tegra124 Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 14/16] ARM: tegra: Add entries for cpufreq on Tegra124 Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 15/16] ARM: tegra: Add CPU regulator to the Jetson TK1 device tree Mikko Perttunen
2014-10-24 14:39 ` [PATCH v5 16/16] ARM: tegra: enable Tegra124 cpufreq driver by default Mikko Perttunen
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=544A6C9A.9050404@mentor.com \
--to=vladimir_zapolskiy@mentor.com \
--cc=linux-arm-kernel@lists.infradead.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).