From patchwork Fri Jun 9 10:38:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9777993 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 99DDD60350 for ; Fri, 9 Jun 2017 10:39:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AE7B28437 for ; Fri, 9 Jun 2017 10:39:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F8D228609; Fri, 9 Jun 2017 10:39:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ED44628437 for ; Fri, 9 Jun 2017 10:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751611AbdFIKjB (ORCPT ); Fri, 9 Jun 2017 06:39:01 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:12064 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbdFIKjA (ORCPT ); Fri, 9 Jun 2017 06:39:00 -0400 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20170609103858epoutp027260fa7f7a0c8839a08a0332c86ce587~GbeC7sDtn0447604476epoutp02E; Fri, 9 Jun 2017 10:38:58 +0000 (GMT) Received: from epsmges5p1.samsung.com (unknown [182.195.42.44]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20170609103857epcas5p3c3f42468308c3a718e85401c6d7d539e~GbeCqjGvD1548015480epcas5p3_; Fri, 9 Jun 2017 10:38:57 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p1.samsung.com (EPCPMTA) with SMTP id 39.41.20983.1CA7A395; Fri, 9 Jun 2017 19:38:57 +0900 (KST) Received: from epsmgms2p2.samsung.com (unknown [182.195.42.80]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20170609103856epcas5p32a847b79d540f4b2105990f499b3f59e~GbeBao-fJ1548115481epcas5p34; Fri, 9 Jun 2017 10:38:56 +0000 (GMT) X-AuditID: b6c32a2c-f79be6d0000051f7-3c-593a7ac16d91 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 52.F1.02294.0CA7A395; Fri, 9 Jun 2017 19:38:56 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ORA004HJ0897X10@mmp2.samsung.com>; Fri, 09 Jun 2017 19:38:56 +0900 (KST) From: Sylwester Nawrocki To: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org Cc: cw00.choi@samsung.com, krzk@kernel.org, b.zolnierkie@samsung.com, Sylwester Nawrocki Subject: [PATCH v2 3/3] clk: samsung: exynos542x: Add EPLL rate table Date: Fri, 09 Jun 2017 12:38:31 +0200 Message-id: <1497004711-24052-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1497004711-24052-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsWy7bCmpu7BKqtIg83ztCw2zljPanH9y3NW i/PnN7BbfOy5x2ox4/w+JovDb9pZHd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s AoYSvUf7GEFsEQEHiV3HJoPFmQWKJd723mQFsYUFXCXede8Bi7MIqEocv/QVzOYVcJO4OPso C8QyOYmTxyaD1XMKuEs8nTqbEWKxm8Tt9sNsExh5FzAyrGLkSi0ozk3PLTYqMNrECAzMbYe1 AnYwNp2LPsQowMGoxMM7ockyUog1say4MvcQowQHs5IIb0GxVaQQb0piZVVqUX58UWlOavEh RlOgUyYyS4km5wOjJq8k3tDE0sjEwMzM0MjA2ExJnHdC4JcIIYH0xJLU7NTUgtQimD4mDk6p BsaYS9ZGfTvY42sNN3+0lgj8Nl/em1tavUy7dMa7vy89j3Y5cpQXdPI87/7oVTVx0uu1DqEc ajXzi/YkO+7TO/bg9PsNi+y8jorLLu1zNLq94Its0S61DyGPlr8V9r39LO7z02m8n+dMCv/d /1x888Ku4y1PD7erp3XNnJLQlbZ15UXG4gfc8dZKLMUZiYZazEXFiQDN+TNxYgIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170609103856epcas5p32a847b79d540f4b2105990f499b3f59e X-Msg-Generator: CA X-Sender-IP: 182.195.42.80 X-Local-Sender: =?UTF-8?B?U3lsd2VzdGVyIE5hd3JvY2tpG1NSUE9MLUtlcm5lbCAoVFAp?= =?UTF-8?B?G+yCvOyEseyghOyekBtTZW5pb3IgU29mdHdhcmUgRW5naW5lZXI=?= X-Global-Sender: =?UTF-8?B?U3lsd2VzdGVyIE5hd3JvY2tpG1NSUE9MLUtlcm5lbCAoVFAp?= =?UTF-8?B?G1NhbXN1bmcgRWxlY3Ryb25pY3MbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 105P X-CMS-RootMailID: 20170609103856epcas5p32a847b79d540f4b2105990f499b3f59e X-RootMTR: 20170609103856epcas5p32a847b79d540f4b2105990f499b3f59e References: <1497004711-24052-1-git-send-email-s.nawrocki@samsung.com> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A specific clock rate table is added for EPLL so it is possible to set frequency of the EPLL output clock as multiple of various audio sampling rates. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki Reviewed-by: Chanwoo Choi --- Changes since v1: - fixed coefficient for 400 MHZ rate - dropped 45158400 Hz rate entry --- drivers/clk/samsung/clk-exynos5420.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index 6f1d6c0..0748a0b 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -1280,6 +1280,21 @@ static void __init exynos5420_clk_sleep_init(void) {} PLL_35XX_RATE(200000000, 200, 3, 3), }; +static const struct samsung_pll_rate_table exynos5420_epll_24mhz_tbl[] = { + PLL_36XX_RATE(600000000U, 100, 2, 1, 0), + 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(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 +1302,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 +1417,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; }