From: Chanwoo Choi <cw00.choi@samsung.com>
To: Sylwester Nawrocki <s.nawrocki@samsung.com>,
linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org
Cc: krzk@kernel.org, b.zolnierkie@samsung.com
Subject: Re: [PATCH 3/3] clk: samsung: exynos542x: Add EPLL rate table
Date: Fri, 09 Jun 2017 12:59:23 +0900 [thread overview]
Message-ID: <593A1D1B.6000808@samsung.com> (raw)
In-Reply-To: <1496931433-5712-3-git-send-email-s.nawrocki@samsung.com>
Hi Sylwester,
On 2017년 06월 08일 23:17, Sylwester Nawrocki wrote:
> A specific clock rate table is added for EPLL so it is possible
> to set frequency of the EPLL output clock as a multiple of various
> audio sampling rates.
>
> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
> drivers/clk/samsung/clk-exynos5420.c | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
> index 6f1d6c0..0ba71bf 100644
> --- a/drivers/clk/samsung/clk-exynos5420.c
> +++ b/drivers/clk/samsung/clk-exynos5420.c
> @@ -1280,2 +1280,2 @@ static void __init exynos5420_clk_sleep_init(void) {}
> PLL_35XX_RATE(200000000, 200, 3, 3),
> };
>
I got a following frequency(Recalc rate) value.
I think there are two much different value for 400000000U and 45158400U.
fin_pll Recalc rate mdiv pdiv sdiv kdiv
24000000 600000000 100 2 1 0
24000000 400000000 200 3 2 0
24000000 394784008.5 197 3 2 25690
24000000 361267219 301 5 2 3671
24000000 200000000 200 3 3 0
24000000 196607995.7 197 3 3 -25690
24000000 180633609.5 301 5 3 3671
24000000 131072007.3 131 3 3 4719
24000000 100000000 200 3 4 0
24000000 65536003.66 131 3 4 4719
24000000 49348001.07 197 3 5 25690
24000000 180633609.5 301 5 3 3671
24000000 32768001.83 131 3 5 4719
> +static const struct samsung_pll_rate_table exynos5420_epll_24mhz_tbl[] = {
> + PLL_36XX_RATE(600000000U, 100, 2, 1, 0),
> + PLL_36XX_RATE(400000000U, 200, 2, 2, 0),
For 400MHz, pdiv is 3 instead of 2 as following:
PLL_36XX_RATE(400000000U, 200, 3, 2, 0),
> + PLL_36XX_RATE(393216000U, 197, 3, 2, 25690),
> + PLL_36XX_RATE(361267200U, 301, 5, 2, 3671),
> + PLL_36XX_RATE(200000000U, 200, 3, 3, 0),
> + PLL_36XX_RATE(196608000U, 197, 3, 3, -25690),
> + PLL_36XX_RATE(180633600U, 301, 5, 3, 3671),
> + PLL_36XX_RATE(131072000U, 131, 3, 3, 4719),
> + PLL_36XX_RATE(100000000U, 200, 3, 4, 0),
> + PLL_36XX_RATE(65536000U, 131, 3, 4, 4719),
> + PLL_36XX_RATE(49152000U, 197, 3, 5, 25690),
> + PLL_36XX_RATE(45158400U, 301, 5, 3, 3671),
I got the fout value (180633609) instead of 45158400U
when I used the M(301) P(5) S(3) K(3671).
fin_pll Recalc rate mdiv pdiv sdiv kdiv
24000000 180633609 301 5 3 3671
> + PLL_36XX_RATE(32768000U, 131, 3, 5, 4719),
> +};
> +
> static struct samsung_pll_clock exynos5x_plls[nr_plls] __initdata = {
> [apll] = PLL(pll_2550, CLK_FOUT_APLL, "fout_apll", "fin_pll", APLL_LOCK,
> APLL_CON0, NULL),
> @@ -1287,7 +1303,7 @@ static void __init exynos5420_clk_sleep_init(void) {}
> CPLL_CON0, NULL),
> [dpll] = PLL(pll_2550, CLK_FOUT_DPLL, "fout_dpll", "fin_pll", DPLL_LOCK,
> DPLL_CON0, NULL),
> - [epll] = PLL(pll_2650, CLK_FOUT_EPLL, "fout_epll", "fin_pll", EPLL_LOCK,
> + [epll] = PLL(pll_36xx, CLK_FOUT_EPLL, "fout_epll", "fin_pll", EPLL_LOCK,
> EPLL_CON0, NULL),
> [rpll] = PLL(pll_2650, CLK_FOUT_RPLL, "fout_rpll", "fin_pll", RPLL_LOCK,
> RPLL_CON0, NULL),
> @@ -1402,7 +1418,7 @@ static void __init exynos5x_clk_init(struct device_node *np,
>
> if (_get_rate("fin_pll") == 24 * MHZ) {
> exynos5x_plls[apll].rate_table = exynos5420_pll2550x_24mhz_tbl;
> - exynos5x_plls[epll].rate_table = exynos5420_pll2550x_24mhz_tbl;
> + exynos5x_plls[epll].rate_table = exynos5420_epll_24mhz_tbl;
> exynos5x_plls[kpll].rate_table = exynos5420_pll2550x_24mhz_tbl;
> exynos5x_plls[bpll].rate_table = exynos5420_pll2550x_24mhz_tbl;
> }
> --
> 1.9.1
>
>
>
--
Best Regards,
Chanwoo Choi
Samsung Electronics
next prev parent reply other threads:[~2017-06-09 3:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170608141722epcas5p2310095ad549f30841430f5cc3e364908@epcas5p2.samsung.com>
2017-06-08 14:17 ` [PATCH 1/3] clk: samsung: Add enable/disable operation for PLL36XX clocks Sylwester Nawrocki
2017-06-08 14:17 ` [PATCH 2/3] clk: samsung: Add missing exynos5420 audio related clocks Sylwester Nawrocki
2017-06-08 17:05 ` Krzysztof Kozlowski
2017-06-09 2:26 ` Chanwoo Choi
2017-06-08 14:17 ` [PATCH 3/3] clk: samsung: exynos542x: Add EPLL rate table Sylwester Nawrocki
2017-06-09 3:59 ` Chanwoo Choi [this message]
2017-06-09 10:32 ` Sylwester Nawrocki
2017-06-08 17:04 ` [PATCH 1/3] clk: samsung: Add enable/disable operation for PLL36XX clocks Krzysztof Kozlowski
2017-06-09 10:19 ` Sylwester Nawrocki
2017-06-09 1:59 ` Chanwoo Choi
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=593A1D1B.6000808@samsung.com \
--to=cw00.choi@samsung.com \
--cc=b.zolnierkie@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=s.nawrocki@samsung.com \
/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.