From patchwork Thu Jun 8 14:17:13 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: 9775603 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 53BA9603B4 for ; Thu, 8 Jun 2017 14:17:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45EDB28557 for ; Thu, 8 Jun 2017 14:17:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AE382856A; Thu, 8 Jun 2017 14:17:37 +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=unavailable 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 DD3E828557 for ; Thu, 8 Jun 2017 14:17:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751633AbdFHORg (ORCPT ); Thu, 8 Jun 2017 10:17:36 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:11353 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbdFHORf (ORCPT ); Thu, 8 Jun 2017 10:17:35 -0400 Received: from epcas1p3.samsung.com (unknown [182.195.41.47]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20170608141732epoutp04f1bf009021cfa567526dfcb0f91f5141~GKzmvfDPP0344303443epoutp04j; Thu, 8 Jun 2017 14:17:32 +0000 (GMT) Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20170608141731epcas1p2c543e061bd056340022d3e694b95ae76~GKzlmrU6O1083410834epcas1p2-; Thu, 8 Jun 2017 14:17:31 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 69.16.03717.B7C59395; Thu, 8 Jun 2017 23:17:31 +0900 (KST) Received: from epsmgms2p1.samsung.com (unknown [182.195.42.79]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20170608141730epcas1p19ca02cb0fd55506f88fcd68414fde70d~GKzklIhqp2532725327epcas1p1t; Thu, 8 Jun 2017 14:17:30 +0000 (GMT) X-AuditID: b6c32a39-f790c6d000000e85-75-59395c7b0832 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 18.DF.02179.A7C59395; Thu, 8 Jun 2017 23:17:30 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OR800JEXFORBW80@mmp1.samsung.com>; Thu, 08 Jun 2017 23:17:30 +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 3/3] clk: samsung: exynos542x: Add EPLL rate table Date: Thu, 08 Jun 2017 16:17:13 +0200 Message-id: <1496931433-5712-3-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1496931433-5712-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrLIsWRmVeSWpSXmKPExsWy7bCmrm51jGWkwZmFGhYbZ6xntbj+5Tmr xfnzG9gtPvbcY7WYcX4fk8XhN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K9R/sYQWwRAQeJXccmM4HYzALFEm97b7KC2MICThI7v21lAbFZBFQlPl55AzaHV8BV 4t2ze2wQy+QkTh6bDFbPKeAmcfT1ERaIXa4Sk9samCYw8i5gZFjFyJVaUJybnltsVGC4iREY mNsOa/nvYPxxNvoQowAHoxIPb0KEZaQQa2JZcWXuIUYJDmYlEd6jBkAh3pTEyqrUovz4otKc 1OJDjKZAp0xklhJNzgdGTV5JvKGJpZGJgZmZoZGBsZmSOO+EwC8RQgLpiSWp2ampBalFMH1M HJxSDYyzLY7OTp06rXzmX7azBzY3pq5vOXeD/d2h17mson9F+y4Xi/zam7O202v/MbYYaxH+ 825LbJ2d/37MZzywdIHk6SkC75JLZLReRPI73thY9sKrqPvi+VqFRTOk3z5W2J6w+ROHqZEp w7QbswP0rpZv1vZd6jvvt/pezTNnONrFlnjoL+J3ytmnxFKckWioxVxUnAgAfmwUCWICAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170608141730epcas1p19ca02cb0fd55506f88fcd68414fde70d X-Msg-Generator: CA X-Sender-IP: 182.195.42.79 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: 101P X-CMS-RootMailID: 20170608141730epcas1p19ca02cb0fd55506f88fcd68414fde70d X-RootMTR: 20170608141730epcas1p19ca02cb0fd55506f88fcd68414fde70d References: <1496931433-5712-1-git-send-email-s.nawrocki@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 a multiple of various audio sampling rates. Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sylwester Nawrocki --- drivers/clk/samsung/clk-exynos5420.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) +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), + 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), + 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 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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), };