Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4935607imu; Tue, 29 Jan 2019 09:57:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN4EIb3Ok2V7KfCYUNcA6/BWTwTuZsSHzRnhSSn1BMfHOG235ZC83SsScKu3cY9yNS03QbnH X-Received: by 2002:a65:6684:: with SMTP id b4mr24603921pgw.55.1548784662161; Tue, 29 Jan 2019 09:57:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548784662; cv=none; d=google.com; s=arc-20160816; b=oN+aNM3ZgPqGp8jC6XAF0AXk7nVaC5lcgptw+bz8ADdpzQnLisgIJ9ecC/gy9fabnq SoVSbjG6uzHpI1+ysQCGFwjiPO5J7dBjVgKRkNQZ0EkT2KL91x12llFUKHAWk/c0eN5j 0V/Riq7lC0FmpZSp1OBC5rukLSc4R2SOtniBP25ZDlMnBQ13YTZmK+Qhyq8m4wRd3eEm qcuTrf5Q6fSS7PJB+qTlY+2VJgD3RKxSuzqGkH6wvvEMAYSAuv5/55t4LvvA2ErGhwRj wvBmRNablDNeNeddh1GAQ1th9Se833LkP/6cPD+x3bNI9O7BrtvLgk30LsAgFnOjOmpD KkZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=/B+NB4uqgeDOd3dvQHPUDWOagHz1W+WijPmr921u0mY=; b=B9mN/Tg/8IAiq76rWwEVPBeDvjQu5yW2iWY2lTKY5dF817qtZkgTtTSaXNEzRDarHl HkDeKIvQkoVB6seXOt3ijLAo+12ma06mRyrNiyDpgLdRpw01uWj55iZkfXuM7TF1QJe3 A1HJZKl5ygNYnZTzwGI55JSY0ZLs0vDZwFn1NMtV2QjFoHmgo76hBxzFYLLliXU0ea1y xr2Ta0hFyQpkcoSf8w+nDrihEvOZJ3nq82i9p/9DdhfK7XFi7tdMI3lUOJ1OUWZBktWt tPN0+Sn9MN3FGuyw/IKyqT/peShEiwUKq5891U5V18SZ3pIGBxNvt1ZbsxeGThLERuJ3 NDZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=TSpT+wgl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x66si35940955pfk.73.2019.01.29.09.57.25; Tue, 29 Jan 2019 09:57:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=TSpT+wgl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728409AbfA2Rz2 (ORCPT + 99 others); Tue, 29 Jan 2019 12:55:28 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:45675 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727706AbfA2Rz0 (ORCPT ); Tue, 29 Jan 2019 12:55:26 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20190129175525euoutp011756e31333fe02c5662fc5d162961c52~_Y1H-6FQV0797207972euoutp01B for ; Tue, 29 Jan 2019 17:55:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190129175525euoutp011756e31333fe02c5662fc5d162961c52~_Y1H-6FQV0797207972euoutp01B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1548784525; bh=/B+NB4uqgeDOd3dvQHPUDWOagHz1W+WijPmr921u0mY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TSpT+wglSeiBNGk5eb+LSC6ZTdKnCZtqxsQd2PE/tTrCAkO9mr1EtSr0OkjNCsp9z 3eyHbwgz2Az7KFxwYceBZQCMtzOMWpgKHxRpDNJ8kmfMK31ZfdAzy6kswNgGjpfOGl 3PNgOPgNm3HoToCpQ8HPkyjasfErjXsVAZ/xRAGc= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20190129175524eucas1p1d1408cac43dcc05a0ddd844f4b6d0bd8~_Y1HQX_WV2455524555eucas1p1T; Tue, 29 Jan 2019 17:55:24 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 03.D0.04294.C83905C5; Tue, 29 Jan 2019 17:55:24 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20190129175524eucas1p26604f138793648903533eb367fdfa0e1~_Y1Gh_yjr2848028480eucas1p2y; Tue, 29 Jan 2019 17:55:24 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20190129175523eusmtrp28dd6c5a2b7e3f1a0abf6ee8ed4e3c442~_Y1GTCc-N0424104241eusmtrp2X; Tue, 29 Jan 2019 17:55:23 +0000 (GMT) X-AuditID: cbfec7f4-835ff700000010c6-2c-5c50938c424d Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id D7.09.04284.B83905C5; Tue, 29 Jan 2019 17:55:23 +0000 (GMT) Received: from AMDC3778.DIGITAL.local (unknown [106.120.51.20]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20190129175523eusmtip1537a596492e5a8bc6f25335681391aeb~_Y1FoB6RH2140821408eusmtip1w; Tue, 29 Jan 2019 17:55:23 +0000 (GMT) From: Lukasz Luba To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-samsung-soc@vger.kernel.org Cc: b.zolnierkie@samsung.com, krzk@kernel.org, kgene@kernel.org, cw00.choi@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, s.nawrocki@samsung.com, myungjoo.ham@samsung.com, Lukasz Luba , Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 2/8] clk: samsung: add new clocks for DMC for Exynos5422 SoC Date: Tue, 29 Jan 2019 18:55:08 +0100 Message-Id: <1548784514-26649-3-git-send-email-l.luba@partner.samsung.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548784514-26649-1-git-send-email-l.luba@partner.samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA0VSaUhUURjtzpu3ODT5HLeLmdVQMgVplsSFJIoMhkK0MoISaqzXaK7Nc0md yMRdK9PIVpesRqfJcsWGMjc019HczY0UhNIWlcrKMZ9P69/5zvKdy8elMMkz3IbyDQxhVIEK fykhEpbXzxm2pWZ4eG1vKLdHRbef46h3dgJH2XVtOLo+9glDBsMLErXGTJJoINoWFY/14Ohb 6jCOOvX3CTRztQ6g24ZKAXpWN0SijqYD6P2VfALVTibgyNhTJNxrJv/SF0fKi7VJhLzk0WV5 9edXAvm1Ui2QzxTbeRAnRC5nGX/fMEbluOe0yGdmKBcPbne82DXYiEeDeVkyoChIO8OWHJdk IKIkdD6AcyN3cH6YBXA0IYfkhxkAh6t/LiomS4myRxqMFzQAfv9lJP9F3o7fANxegnaAFdoL XMCCjoKDvW+WAhgdjcGKmDQhJ5jTh+Hjlnckh4X0ZqhvHSM4LKYPwuH0ryTfZgf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tmM/N+9gvLQx+BCjAAejEg8vQ3BAjBBrYllx Ze4hRgkOZiURXsPf/jFCvCmJlVWpRfnxRaU5qcWHGE2BjprILCWanA+M27ySeENTQ3MLS0Nz Y3NjMwslcd7zBpVRQgLpiSWp2ampBalFMH1MHJxSDYyzdVQuz+25dddsf+L2c/5aIQHvz5vo WeWe7xYxSXN8eXT1jJAgA9GSKjWlz8rHFtwRjbZ5asmwf5v+xAOZ/9SrXaKOvC5psrlcsunV x3f3/D6e5fzE8XnnRYUZ6sU9sbULf2a7vFqQKd+1zybc+kjVbI58Kb6ful6Lti3adKPHz3DN iY5PftZKLMUZiYZazEXFiQCrpC9cowIAAA== X-CMS-MailID: 20190129175524eucas1p26604f138793648903533eb367fdfa0e1 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190129175524eucas1p26604f138793648903533eb367fdfa0e1 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190129175524eucas1p26604f138793648903533eb367fdfa0e1 References: <1548784514-26649-1-git-send-email-l.luba@partner.samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch provides support for clocks needed for Dynamic Memory Controller in Exynos5422 SoC. It adds CDREX base register addresses, new DIV, MUX and GATE entries. CC: Sylwester Nawrocki CC: Chanwoo Choi CC: Michael Turquette CC: Stephen Boyd CC: Kukjin Kim CC: Krzysztof Kozlowski CC: linux-samsung-soc@vger.kernel.org CC: linux-clk@vger.kernel.org CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org Signed-off-by: Lukasz Luba --- drivers/clk/samsung/clk-exynos5420.c | 48 +++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c index 34cce3c..3e87421 100644 --- a/drivers/clk/samsung/clk-exynos5420.c +++ b/drivers/clk/samsung/clk-exynos5420.c @@ -132,6 +132,8 @@ #define BPLL_LOCK 0x20010 #define BPLL_CON0 0x20110 #define SRC_CDREX 0x20200 +#define GATE_BUS_CDREX0 0x20700 +#define GATE_BUS_CDREX1 0x20704 #define DIV_CDREX0 0x20500 #define DIV_CDREX1 0x20504 #define KPLL_LOCK 0x28000 @@ -248,6 +250,8 @@ static const unsigned long exynos5x_clk_regs[] __initconst = { DIV_CDREX1, SRC_KFC, DIV_KFC0, + GATE_BUS_CDREX0, + GATE_BUS_CDREX1, }; static const unsigned long exynos5800_clk_regs[] __initconst = { @@ -425,6 +429,10 @@ PNAME(mout_group13_5800_p) = { "dout_osc_div", "mout_sw_aclkfl1_550_cam" }; PNAME(mout_group14_5800_p) = { "dout_aclk550_cam", "dout_sclk_sw" }; PNAME(mout_group15_5800_p) = { "dout_osc_div", "mout_sw_aclk550_cam" }; PNAME(mout_group16_5800_p) = { "dout_osc_div", "mout_mau_epll_clk" }; +PNAME(mout_mx_mspll_ccore_phy_p) = { "sclk_bpll", "mout_dpll_ctrl", + "mout_mpll_ctrl", "ff_dout_spll2", + "mout_sclk_spll"}; + /* fixed rate clocks generated outside the soc */ static struct samsung_fixed_rate_clock @@ -450,7 +458,7 @@ static const struct samsung_fixed_factor_clock static const struct samsung_fixed_factor_clock exynos5800_fixed_factor_clks[] __initconst = { FFACTOR(0, "ff_dout_epll2", "mout_sclk_epll", 1, 2, 0), - FFACTOR(0, "ff_dout_spll2", "mout_sclk_spll", 1, 2, 0), + FFACTOR(CLK_FF_DOUT_SPLL2, "ff_dout_spll2", "mout_sclk_spll", 1, 2, 0), }; static const struct samsung_mux_clock exynos5800_mux_clks[] __initconst = { @@ -472,11 +480,14 @@ static const struct samsung_mux_clock exynos5800_mux_clks[] __initconst = { MUX(0, "mout_aclk300_disp1", mout_group5_5800_p, SRC_TOP2, 24, 2), MUX(0, "mout_aclk300_gscl", mout_group5_5800_p, SRC_TOP2, 28, 2), + MUX(CLK_MOUT_MX_MSPLL_CCORE_PHY, "mout_mx_mspll_ccore_phy", + mout_mx_mspll_ccore_phy_p, SRC_TOP7, 0, 3), + MUX(CLK_MOUT_MX_MSPLL_CCORE, "mout_mx_mspll_ccore", - mout_mx_mspll_ccore_p, SRC_TOP7, 16, 2), + mout_mx_mspll_ccore_p, SRC_TOP7, 16, 3), MUX_F(CLK_MOUT_MAU_EPLL, "mout_mau_epll_clk", mout_mau_epll_clk_5800_p, SRC_TOP7, 20, 2, CLK_SET_RATE_PARENT, 0), - MUX(0, "sclk_bpll", mout_bpll_p, SRC_TOP7, 24, 1), + MUX(CLK_SCLK_BPLL, "sclk_bpll", mout_bpll_p, SRC_TOP7, 24, 1), MUX(0, "mout_epll2", mout_epll2_5800_p, SRC_TOP7, 28, 1), MUX(0, "mout_aclk550_cam", mout_group3_5800_p, SRC_TOP8, 16, 3), @@ -648,7 +659,7 @@ static const struct samsung_mux_clock exynos5x_mux_clks[] __initconst = { MUX(0, "mout_sclk_mpll", mout_mpll_p, SRC_TOP6, 0, 1), MUX(CLK_MOUT_VPLL, "mout_sclk_vpll", mout_vpll_p, SRC_TOP6, 4, 1), - MUX(0, "mout_sclk_spll", mout_spll_p, SRC_TOP6, 8, 1), + MUX(CLK_MOUT_SCLK_SPLL, "mout_sclk_spll", mout_spll_p, SRC_TOP6, 8, 1), MUX(0, "mout_sclk_ipll", mout_ipll_p, SRC_TOP6, 12, 1), MUX(0, "mout_sclk_rpll", mout_rpll_p, SRC_TOP6, 16, 1), MUX_F(CLK_MOUT_EPLL, "mout_sclk_epll", mout_epll_p, SRC_TOP6, 20, 1, @@ -814,9 +825,13 @@ static const struct samsung_div_clock exynos5x_div_clks[] __initconst = { DIV_CDREX0, 16, 3), DIV(CLK_DOUT_CCLK_DREX0, "dout_cclk_drex0", "dout_clk2x_phy0", DIV_CDREX0, 8, 3), + DIV(0, "dout_cclk_drex1", "dout_clk2x_phy0", DIV_CDREX0, 8, 3), DIV(CLK_DOUT_CLK2X_PHY0, "dout_clk2x_phy0", "dout_sclk_cdrex", DIV_CDREX0, 3, 5), + DIV(0, "dout_pclk_drex0", "dout_cclk_drex0", DIV_CDREX0, 28, 3), + DIV(0, "dout_pclk_drex1", "dout_cclk_drex1", DIV_CDREX0, 28, 3), + DIV(CLK_DOUT_PCLK_CORE_MEM, "dout_pclk_core_mem", "mout_mclk_cdrex", DIV_CDREX1, 8, 3), @@ -1170,6 +1185,31 @@ static const struct samsung_gate_clock exynos5x_gate_clks[] __initconst = { GATE_TOP_SCLK_ISP, 12, CLK_SET_RATE_PARENT, 0), GATE(CLK_G3D, "g3d", "mout_user_aclk_g3d", GATE_IP_G3D, 9, 0, 0), + + GATE(CLK_CLKM_PHY0, "clkm_phy0", "dout_sclk_cdrex", + GATE_BUS_CDREX0, 0, 0, 0), + GATE(CLK_CLKM_PHY1, "clkm_phy1", "dout_sclk_cdrex", + GATE_BUS_CDREX0, 1, 0, 0), + GATE(0, "mx_mspll_ccore_phy", "mout_mx_mspll_ccore_phy", + SRC_MASK_TOP7, 0, CLK_IGNORE_UNUSED, 0), + + GATE(CLK_ACLK_PPMU_DREX0_0, "aclk_ppmu_drex0_0", "dout_aclk_cdrex1", + GATE_BUS_CDREX1, 15, CLK_IGNORE_UNUSED, 0), + GATE(CLK_ACLK_PPMU_DREX0_1, "aclk_ppmu_drex0_1", "dout_aclk_cdrex1", + GATE_BUS_CDREX1, 14, CLK_IGNORE_UNUSED, 0), + GATE(CLK_ACLK_PPMU_DREX1_0, "aclk_ppmu_drex1_0", "dout_aclk_cdrex1", + GATE_BUS_CDREX1, 13, CLK_IGNORE_UNUSED, 0), + GATE(CLK_ACLK_PPMU_DREX1_1, "aclk_ppmu_drex1_1", "dout_aclk_cdrex1", + GATE_BUS_CDREX1, 12, CLK_IGNORE_UNUSED, 0), + + GATE(CLK_PCLK_PPMU_DREX0_0, "pclk_ppmu_drex0_0", "dout_pclk_cdrex", + GATE_BUS_CDREX1, 29, CLK_IGNORE_UNUSED, 0), + GATE(CLK_PCLK_PPMU_DREX0_1, "pclk_ppmu_drex0_1", "dout_pclk_cdrex", + GATE_BUS_CDREX1, 28, CLK_IGNORE_UNUSED, 0), + GATE(CLK_PCLK_PPMU_DREX1_0, "pclk_ppmu_drex1_0", "dout_pclk_cdrex", + GATE_BUS_CDREX1, 27, CLK_IGNORE_UNUSED, 0), + GATE(CLK_PCLK_PPMU_DREX1_1, "pclk_ppmu_drex1_1", "dout_pclk_cdrex", + GATE_BUS_CDREX1, 26, CLK_IGNORE_UNUSED, 0), }; static const struct samsung_div_clock exynos5x_disp_div_clks[] __initconst = { -- 2.7.4