From patchwork Sun Oct 20 17:48:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivaylo Ivanov X-Patchwork-Id: 13843177 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 28A36D3C92A for ; Sun, 20 Oct 2024 17:55:46 +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:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Q7M6ABe/6WouilEc7iXWO5GcsNmJOcdEHOWh1MsYJ4c=; b=KTnl7oXHYFGVP/wtqLgbUg822/ 4nPe5pQrPQuTrHyBqiawDOJ7IE3F0YFu9wCoe8VgHV9mX6u0qjtnu+MUQPXVlnvvT5/OTQqH1vmq9 RVg3AZamRta51K1sxz1dbFsGspWxRF40lYVGVTBfupTGTnEleE6qIyGSfem2HWphXfD1xklPP+Gym vgW3kBXlcaQavUT/XK3Ze1yC7p8pAla/fXGynwvnKqLFoRj9xii/sxbZQLZNczrhPiy+H4tdSLGNQ hIKcsKLrhKyOc+JWV8DSl2TaVIKdJrTRe5G7qeuoidKG926rJmlFXz+eWe/DESGcAq4/ru8d64PS3 t00X/28A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2a9O-00000005DGp-32Ys; Sun, 20 Oct 2024 17:55:34 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2a4s-00000005Cps-2zdC for linux-arm-kernel@lists.infradead.org; Sun, 20 Oct 2024 17:50:56 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-4315baec69eso32390135e9.2 for ; Sun, 20 Oct 2024 10:50:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729446653; x=1730051453; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Q7M6ABe/6WouilEc7iXWO5GcsNmJOcdEHOWh1MsYJ4c=; b=N9uQi7IMNFZBoLzPIYzVwNhsLduKnFgM3k13fwuy6YCa1KgVPV1bnidVEMId80fMsw DrXAYWNfDpMkUmP04heUfVJMYTxsXFrJx84pj83GnJ1lFH7/yfaJyiySkcygjK3lvSN8 H7UqczqBYzTCGqDqGIFam37+ARdj9/exrc4gbAdNfDgkGcWnt4l2+Lee8O0TrwIhGiGP S4sx/RsIM1Ughi8b0gaD3AicRnvIJ9NZfGONUEhCa5dFRLdtQFVUU6t5Zs1v3i/cxlmZ a1A33ObIqhFQ/La2mwtmA1Ekd09ydlTVpSeWiOHSyTYL6keOaFQi+g7YRH+mwo35rzSt qIEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729446653; x=1730051453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Q7M6ABe/6WouilEc7iXWO5GcsNmJOcdEHOWh1MsYJ4c=; b=X2aeaaau10mDjpj5rJxcsPoCczwAiJ8Wsz1ZtnHH9YMsKAv6yLDwUsKtZz0GYvmnsu xdssK93J+0SuuJDTIuLgHTZZsbgT4aieG36n5acyD7pdBYSJOW1mo6EbzELEiFYgtUpi TIfcX1+O2zCKhJJBy3JiLXFf9j6sT0Aflc3MgYShJhCudroB0MU/bcbYhaA9Axp1bhK7 vnMMdsW9ZNZ93DuuyAiSG0gokmzhE6r3uwmncCXu2Vz+Qpr3/7TBWkvz1/XdeoEGiOy5 JENBZtYrwU4UxY0NSUxmDpBpDps6Hujbc4duiparsvcvVlpu4oR9LKx1OlujTvlaER+d cKtw== X-Forwarded-Encrypted: i=1; AJvYcCU2tKMA/x3VSY4rMHuhmhnjOkKkSqC6ZAmwfWUnEgqUu/CpX2GlyLsuX3xGnX/MiHPlu+1R60t+ZFSU7mmjjgQL@lists.infradead.org X-Gm-Message-State: AOJu0YxFAWAVAW+5oVbhFbrFdOufKWg0BPj0X3YX+3MWG/EsOR4snO5F hFMC1Q9oPB5ffVi+8bB5ncAzIX2YCjnuZbHSukenYnbJgvbsWuH4 X-Google-Smtp-Source: AGHT+IFfOMZJpQ/zOpQBQA+1zXQEopzsYEMIdXGeOmm98O7VoVNL7THbuFQjybOpMDhz5YIa4VpbXw== X-Received: by 2002:a05:600c:1c1e:b0:431:5f3b:6ae4 with SMTP id 5b1f17b1804b1-4316165c74bmr69591575e9.17.1729446652767; Sun, 20 Oct 2024 10:50:52 -0700 (PDT) Received: from ivaylo-T580.. (91-139-201-119.stz.ddns.bulsat.com. [91.139.201.119]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4316f57f89fsm29794305e9.16.2024.10.20.10.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2024 10:50:51 -0700 (PDT) From: Ivaylo Ivanov To: Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Michael Turquette , Stephen Boyd , Rob Herring , Conor Dooley , Tomasz Figa 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 Subject: [PATCH v1 2/3] clk: samsung: clk-pll: Add support for pll_{1051x,1052x} Date: Sun, 20 Oct 2024 20:48:24 +0300 Message-ID: <20241020174825.375096-3-ivo.ivanov.ivanov1@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241020174825.375096-1-ivo.ivanov.ivanov1@gmail.com> References: <20241020174825.375096-1-ivo.ivanov.ivanov1@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241020_105054_778728_49EDA25D X-CRM114-Status: GOOD ( 13.57 ) 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 These plls are found in the Exynos8895 SoC: - pll1051x: Integer PLL with middle frequency - pll1052x: Integer PLL with low frequency The PLLs are similar enough to pll_0822x, so the same code can handle all. Locktime for 1051x, 1052x is 150 - the same as the pll_0822x lock factor. MDIV, SDIV, PDIV masks and bit shifts are also the same as 0822x. When defining a PLL, the "con" parameter should be set to CON0 register, like this: PLL(pll_1051x, CLK_FOUT_SHARED0_PLL, "fout_shared0_pll", "oscclk", PLL_LOCKTIME_PLL_SHARED0, PLL_CON0_PLL_SHARED0, pll_shared0_rate_table), Signed-off-by: Ivaylo Ivanov --- drivers/clk/samsung/clk-pll.c | 2 ++ drivers/clk/samsung/clk-pll.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c index cca3e6309..be6b51694 100644 --- a/drivers/clk/samsung/clk-pll.c +++ b/drivers/clk/samsung/clk-pll.c @@ -1370,6 +1370,8 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx, break; case pll_1417x: case pll_1418x: + case pll_1051x: + case pll_1052x: case pll_0818x: case pll_0822x: case pll_0516x: diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h index 3481941ba..858ab367e 100644 --- a/drivers/clk/samsung/clk-pll.h +++ b/drivers/clk/samsung/clk-pll.h @@ -43,6 +43,8 @@ enum samsung_pll_type { pll_0517x, pll_0518x, pll_531x, + pll_1051x, + pll_1052x, }; #define PLL_RATE(_fin, _m, _p, _s, _k, _ks) \