Skip to content

Commit efa45bc

Browse files
Raghav Sharmakrzk
authored andcommitted
clk: samsung: exynosautov920: add clock support
Add support for CMU_MFD which provides clocks to MFD block, and register the required compatible and cmu_info for the same. Signed-off-by: Raghav Sharma <raghav.s@samsung.com> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com> Link: https://patch.msgid.link/20251119114744.1914416-3-raghav.s@samsung.com Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
1 parent db1cc49 commit efa45bc

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

drivers/clk/samsung/clk-exynosautov920.c

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#define CLKS_NR_HSI2 (CLK_DOUT_HSI2_ETHERNET_PTP + 1)
3030
#define CLKS_NR_M2M (CLK_DOUT_M2M_NOCP + 1)
3131
#define CLKS_NR_MFC (CLK_DOUT_MFC_NOCP + 1)
32+
#define CLKS_NR_MFD (CLK_DOUT_MFD_NOCP + 1)
3233

3334
/* ---- CMU_TOP ------------------------------------------------------------ */
3435

@@ -1905,6 +1906,42 @@ static const struct samsung_cmu_info mfc_cmu_info __initconst = {
19051906
.clk_name = "noc",
19061907
};
19071908

1909+
/* ---- CMU_MFD --------------------------------------------------------- */
1910+
1911+
/* Register Offset definitions for CMU_MFD (0x19e00000) */
1912+
#define PLL_CON0_MUX_CLKCMU_MFD_NOC_USER 0x600
1913+
#define CLK_CON_DIV_DIV_CLK_MFD_NOCP 0x1800
1914+
1915+
static const unsigned long mfd_clk_regs[] __initconst = {
1916+
PLL_CON0_MUX_CLKCMU_MFD_NOC_USER,
1917+
CLK_CON_DIV_DIV_CLK_MFD_NOCP,
1918+
};
1919+
1920+
/* List of parent clocks for Muxes in CMU_MFD */
1921+
PNAME(mout_clkcmu_mfd_noc_user_p) = { "oscclk", "dout_clkcmu_mfd_noc" };
1922+
1923+
static const struct samsung_mux_clock mfd_mux_clks[] __initconst = {
1924+
MUX(CLK_MOUT_MFD_NOC_USER, "mout_clkcmu_mfd_noc_user",
1925+
mout_clkcmu_mfd_noc_user_p, PLL_CON0_MUX_CLKCMU_MFD_NOC_USER, 4, 1),
1926+
};
1927+
1928+
static const struct samsung_div_clock mfd_div_clks[] __initconst = {
1929+
DIV(CLK_DOUT_MFD_NOCP, "dout_mfd_nocp",
1930+
"mout_clkcmu_mfd_noc_user", CLK_CON_DIV_DIV_CLK_MFD_NOCP,
1931+
0, 3),
1932+
};
1933+
1934+
static const struct samsung_cmu_info mfd_cmu_info __initconst = {
1935+
.mux_clks = mfd_mux_clks,
1936+
.nr_mux_clks = ARRAY_SIZE(mfd_mux_clks),
1937+
.div_clks = mfd_div_clks,
1938+
.nr_div_clks = ARRAY_SIZE(mfd_div_clks),
1939+
.nr_clk_ids = CLKS_NR_MFD,
1940+
.clk_regs = mfd_clk_regs,
1941+
.nr_clk_regs = ARRAY_SIZE(mfd_clk_regs),
1942+
.clk_name = "noc",
1943+
};
1944+
19081945
static int __init exynosautov920_cmu_probe(struct platform_device *pdev)
19091946
{
19101947
const struct samsung_cmu_info *info;
@@ -1941,6 +1978,9 @@ static const struct of_device_id exynosautov920_cmu_of_match[] = {
19411978
}, {
19421979
.compatible = "samsung,exynosautov920-cmu-mfc",
19431980
.data = &mfc_cmu_info,
1981+
}, {
1982+
.compatible = "samsung,exynosautov920-cmu-mfd",
1983+
.data = &mfd_cmu_info,
19441984
},
19451985
{ }
19461986
};

0 commit comments

Comments
 (0)