From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3286CA601D for ; Fri, 9 Oct 2026 11:44:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: Content-Transfer-Encoding:MIME-Version:In-Reply-To:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+NP2Sc9QfAH27QKUaoXkjp0qHnyNnKKBhYsb0OsmWbM=; b=BAfEEeF5Kpse2EfNHPLWGGOdjM Va0Wvfq6QUJVgW/vWLhyjp2iK2bFyf+QKYvO+mthou5qBCJf+eCqs1Hiiv+cRzFFTpaNfJiCH7Ysk bB7l+t3OwlzIe6js7SXay0CG5oRf4bRcX2n5S0w0NkGHxl6cQHb/KRuPaD/50PWZ4FEXYNtyZr1b+ QEco/2UtqU32XuaYRGSHBoJKFvvleH3x6DWIa9DUncJfzRr03dMAQBxiIWLI3/qqU3rr8Jhi2lISt XH4mNs5eMNysdeyyoZokclauecsDTMBNhvuZYmckGJWwxotxmTWa8x8pGW/jpETYytSOzkDPiiQd8 /bgpZ7Ag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xF91C-00000006CZI-20uh; Fri, 09 Oct 2026 11:44:06 +0000 Received: from mailout3.samsung.com ([203.254.224.33]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xF90z-00000006CPo-2c9S for linux-arm-kernel@lists.infradead.org; Fri, 09 Oct 2026 11:43:55 +0000 Received: from epcas5p1.samsung.com (unknown [182.195.41.39]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20261009114350epoutp03092d157300b8a6c7202cb0202a2b41d3~c2c3u0wGZ2238322383epoutp03- for ; Fri, 9 Oct 2026 11:43:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout3.samsung.com 20261009114350epoutp03092d157300b8a6c7202cb0202a2b41d3~c2c3u0wGZ2238322383epoutp03- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1791546230; bh=+NP2Sc9QfAH27QKUaoXkjp0qHnyNnKKBhYsb0OsmWbM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Yij9UykDRIcPHYTJCrnldU7fGXh0mwu9A6/D/SCvWjDiR3FIZ39S9gpY80cUoUMEf 2fIiTnoRcRL9iB+/0mQ6/GUmXfJCy7a6oO+ZISuBtmayE0Vgo1iM16dunElOT2aD+G atyzT7qLbZxqpxhn7BQU0Fr9EUVgx2h4wHTCA034= Received: from epsnrtp04.localdomain (unknown [182.195.42.156]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPS id 20261009114349epcas5p23a674e72edae1e2d4b9fddf0c5b1d97c~c2c3UlB5l2795927959epcas5p2_; Fri, 9 Oct 2026 11:43:49 +0000 (GMT) Received: from epcas5p3.samsung.com (unknown [182.195.38.86]) by epsnrtp04.localdomain (Postfix) with ESMTP id 4j1Q444jV0z6B9m7; Fri, 9 Oct 2026 11:43:48 +0000 (GMT) Received: from epsmtip2.samsung.com (unknown [182.195.34.31]) by epcas5p2.samsung.com (KnoxPortal) with ESMTPA id 20261009114348epcas5p209346244d44e4578aa27c061b5fdebd7~c2c1zCo3C3018230182epcas5p2n; Fri, 9 Oct 2026 11:43:48 +0000 (GMT) Received: from bose.samsungds.net (unknown [107.108.83.9]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20261009114345epsmtip22cfc3abc8c2326817ee7f09b183dc469~c2czbzTT60638806388epsmtip2T; Fri, 9 Oct 2026 11:43:45 +0000 (GMT) From: Raghav Sharma To: krzk@kernel.org, s.nawrocki@samsung.com, cw00.choi@samsung.com, peter.griffin@linaro.org, alim.akhtar@samsung.com, sboyd@kernel.org, bmasney+clk@redhat.com, jbrunet+clk@baylibre.com, robh@kernel.org, conor+dt@kernel.org, raghav.s@samsung.com Cc: linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, is.gandhi@samsung.com, ts.amit@samsung.com, pokala.reddy@samsung.com Subject: [PATCH v2 06/14] clk: samsung: clk-pll: Add support for pll_4313 Date: Fri, 9 Oct 2026 17:31:29 +0530 Message-Id: <20261009120137.2801911-7-raghav.s@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261009120137.2801911-1-raghav.s@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CMS-MailID: 20261009114348epcas5p209346244d44e4578aa27c061b5fdebd7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" CMS-TYPE: 105P cpgsPolicy: CPGSC10-543,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20261009114348epcas5p209346244d44e4578aa27c061b5fdebd7 References: <20261009120137.2801911-1-raghav.s@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261009_044354_030380_13FA43E6 X-CRM114-Status: GOOD ( 17.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Alim Akhtar PLLs 4313 are found in the Exynos8855 SoC and it is similar to pll_531x except for CON8 offset, so re-using code for pll_4313 Signed-off-by: Alim Akhtar Signed-off-by: Raghav Sharma --- drivers/clk/samsung/clk-pll.c | 11 ++++++++++- drivers/clk/samsung/clk-pll.h | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c index 3d837bd74355..7b0756127306 100644 --- a/drivers/clk/samsung/clk-pll.c +++ b/drivers/clk/samsung/clk-pll.c @@ -1306,7 +1306,15 @@ static unsigned long samsung_pll531x_recalc_rate(struct clk_hw *hw, u64 mdiv, fout = parent_rate; pll_con0 = readl_relaxed(pll->con_reg); - pll_con8 = readl_relaxed(pll->con_reg + 20); + if (pll->type == pll_4313) { + /* Offset for PLL_CON8 which hold FDIV different for PLL_4313 + * which is PLL_LOCKTIME_OFFSET - 0x4 + */ + pll_con8 = readl_relaxed(pll->lock_reg - 4); + } else { + pll_con8 = readl_relaxed(pll->con_reg + 20); + } + mdiv = (pll_con0 >> PLL531X_MDIV_SHIFT) & PLL531X_MDIV_MASK; pdiv = (pll_con0 >> PLL531X_PDIV_SHIFT) & PLL531X_PDIV_MASK; sdiv = (pll_con0 >> PLL531X_SDIV_SHIFT) & PLL531X_SDIV_MASK; @@ -1729,6 +1737,7 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx, case pll_309: case pll_531x: case pll_4311: + case pll_4313: init.ops = &samsung_pll531x_clk_ops; break; case pll_1031x: diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h index 2457cf47c109..4825e1f5b9db 100644 --- a/drivers/clk/samsung/clk-pll.h +++ b/drivers/clk/samsung/clk-pll.h @@ -49,6 +49,7 @@ enum samsung_pll_type { pll_0718x, pll_0732x, pll_4311, + pll_4313, pll_1017x, pll_1031x, pll_a9fracm, -- 2.34.1