From: Raghav Sharma <raghav.s@samsung.com>
To: krzk@kernel.org, s.nawrocki@samsung.com, cw00.choi@samsung.com,
alim.akhtar@samsung.com, mturquette@baylibre.com,
sboyd@kernel.org, robh@kernel.org, conor+dt@kernel.org,
sunyeal.hong@samsung.com, shin.son@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, chandan.vn@samsung.com,
dev.tailor@samsung.com, karthik.sun@samsung.com,
Raghav Sharma <raghav.s@samsung.com>
Subject: [PATCH v2 2/3] clk: samsung: exynosautov920: add clock support
Date: Mon, 15 Sep 2025 15:24:00 +0530 [thread overview]
Message-ID: <20250915095401.3699849-3-raghav.s@samsung.com> (raw)
In-Reply-To: <20250915095401.3699849-1-raghav.s@samsung.com>
Add support for CMU_M2M which provides clocks to M2M block, and
register the required compatible and cmu_info for the same.
Signed-off-by: Raghav Sharma <raghav.s@samsung.com>
---
drivers/clk/samsung/clk-exynosautov920.c | 45 ++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/drivers/clk/samsung/clk-exynosautov920.c b/drivers/clk/samsung/clk-exynosautov920.c
index 572b6ace14ac..75deec8bece5 100644
--- a/drivers/clk/samsung/clk-exynosautov920.c
+++ b/drivers/clk/samsung/clk-exynosautov920.c
@@ -27,6 +27,7 @@
#define CLKS_NR_HSI0 (CLK_DOUT_HSI0_PCIE_APB + 1)
#define CLKS_NR_HSI1 (CLK_MOUT_HSI1_USBDRD + 1)
#define CLKS_NR_HSI2 (CLK_DOUT_HSI2_ETHERNET_PTP + 1)
+#define CLKS_NR_M2M (CLK_DOUT_M2M_NOCP + 1)
/* ---- CMU_TOP ------------------------------------------------------------ */
@@ -1821,6 +1822,47 @@ static const struct samsung_cmu_info hsi2_cmu_info __initconst = {
.clk_name = "noc",
};
+/* ---- CMU_M2M --------------------------------------------------------- */
+
+/* Register Offset definitions for CMU_M2M (0x1a800000) */
+#define PLL_CON0_MUX_CLKCMU_M2M_JPEG_USER 0x600
+#define PLL_CON0_MUX_CLKCMU_M2M_NOC_USER 0x610
+#define CLK_CON_DIV_DIV_CLK_M2M_NOCP 0x1800
+
+static const unsigned long m2m_clk_regs[] __initconst = {
+ PLL_CON0_MUX_CLKCMU_M2M_JPEG_USER,
+ PLL_CON0_MUX_CLKCMU_M2M_NOC_USER,
+ CLK_CON_DIV_DIV_CLK_M2M_NOCP,
+};
+
+/* List of parent clocks for Muxes in CMU_M2M */
+PNAME(mout_clkcmu_m2m_noc_user_p) = { "oscclk", "dout_clkcmu_m2m_noc" };
+PNAME(mout_clkcmu_m2m_jpeg_user_p) = { "oscclk", "dout_clkcmu_m2m_jpeg" };
+
+static const struct samsung_mux_clock m2m_mux_clks[] __initconst = {
+ MUX(CLK_MOUT_M2M_JPEG_USER, "mout_clkcmu_m2m_jpeg_user",
+ mout_clkcmu_m2m_jpeg_user_p, PLL_CON0_MUX_CLKCMU_M2M_JPEG_USER, 4, 1),
+ MUX(CLK_MOUT_M2M_NOC_USER, "mout_clkcmu_m2m_noc_user",
+ mout_clkcmu_m2m_noc_user_p, PLL_CON0_MUX_CLKCMU_M2M_NOC_USER, 4, 1),
+};
+
+static const struct samsung_div_clock m2m_div_clks[] __initconst = {
+ DIV(CLK_DOUT_M2M_NOCP, "dout_m2m_nocp",
+ "mout_clkcmu_m2m_noc_user", CLK_CON_DIV_DIV_CLK_M2M_NOCP,
+ 0, 3),
+};
+
+static const struct samsung_cmu_info m2m_cmu_info __initconst = {
+ .mux_clks = m2m_mux_clks,
+ .nr_mux_clks = ARRAY_SIZE(m2m_mux_clks),
+ .div_clks = m2m_div_clks,
+ .nr_div_clks = ARRAY_SIZE(m2m_div_clks),
+ .nr_clk_ids = CLKS_NR_M2M,
+ .clk_regs = m2m_clk_regs,
+ .nr_clk_regs = ARRAY_SIZE(m2m_clk_regs),
+ .clk_name = "noc",
+};
+
static int __init exynosautov920_cmu_probe(struct platform_device *pdev)
{
const struct samsung_cmu_info *info;
@@ -1851,6 +1893,9 @@ static const struct of_device_id exynosautov920_cmu_of_match[] = {
}, {
.compatible = "samsung,exynosautov920-cmu-hsi2",
.data = &hsi2_cmu_info,
+ }, {
+ .compatible = "samsung,exynosautov920-cmu-m2m",
+ .data = &m2m_cmu_info,
},
{ }
};
--
2.34.1
next prev parent reply other threads:[~2025-09-15 9:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250915094509epcas5p355b63f77800068afa6b891068080cde7@epcas5p3.samsung.com>
2025-09-15 9:53 ` [PATCH v2 0/3] Add clock support for CMU_M2M Raghav Sharma
[not found] ` <CGME20250915094512epcas5p223e2eb264967508527f478eb2200be83@epcas5p2.samsung.com>
2025-09-15 9:53 ` [PATCH v2 1/3] dt-bindings: clock: exynosautov920: add m2m clock definitions Raghav Sharma
2025-09-18 8:51 ` Alim Akhtar
2025-09-22 16:06 ` Rob Herring (Arm)
2025-10-13 1:01 ` (subset) " Krzysztof Kozlowski
[not found] ` <CGME20250915094515epcas5p3210f5c66a24a7a7f23a04075e7636a89@epcas5p3.samsung.com>
2025-09-15 9:54 ` Raghav Sharma [this message]
2025-09-18 8:54 ` [PATCH v2 2/3] clk: samsung: exynosautov920: add clock support Alim Akhtar
2025-10-13 1:01 ` (subset) " Krzysztof Kozlowski
[not found] ` <CGME20250915094517epcas5p2186fc92cca758b6fe610c0ec91ee51bc@epcas5p2.samsung.com>
2025-09-15 9:54 ` [PATCH v2 3/3] arm64: dts: exynosautov920: add CMU_M2M clock DT nodes Raghav Sharma
2025-09-18 9:02 ` Alim Akhtar
2025-10-13 1:01 ` (subset) " Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250915095401.3699849-3-raghav.s@samsung.com \
--to=raghav.s@samsung.com \
--cc=alim.akhtar@samsung.com \
--cc=chandan.vn@samsung.com \
--cc=conor+dt@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=dev.tailor@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=karthik.sun@samsung.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
--cc=shin.son@samsung.com \
--cc=sunyeal.hong@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®