mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
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>
This commit is contained in:
parent
db1cc4902f
commit
efa45bcc73
|
|
@ -29,6 +29,7 @@
|
|||
#define CLKS_NR_HSI2 (CLK_DOUT_HSI2_ETHERNET_PTP + 1)
|
||||
#define CLKS_NR_M2M (CLK_DOUT_M2M_NOCP + 1)
|
||||
#define CLKS_NR_MFC (CLK_DOUT_MFC_NOCP + 1)
|
||||
#define CLKS_NR_MFD (CLK_DOUT_MFD_NOCP + 1)
|
||||
|
||||
/* ---- CMU_TOP ------------------------------------------------------------ */
|
||||
|
||||
|
|
@ -1905,6 +1906,42 @@ static const struct samsung_cmu_info mfc_cmu_info __initconst = {
|
|||
.clk_name = "noc",
|
||||
};
|
||||
|
||||
/* ---- CMU_MFD --------------------------------------------------------- */
|
||||
|
||||
/* Register Offset definitions for CMU_MFD (0x19e00000) */
|
||||
#define PLL_CON0_MUX_CLKCMU_MFD_NOC_USER 0x600
|
||||
#define CLK_CON_DIV_DIV_CLK_MFD_NOCP 0x1800
|
||||
|
||||
static const unsigned long mfd_clk_regs[] __initconst = {
|
||||
PLL_CON0_MUX_CLKCMU_MFD_NOC_USER,
|
||||
CLK_CON_DIV_DIV_CLK_MFD_NOCP,
|
||||
};
|
||||
|
||||
/* List of parent clocks for Muxes in CMU_MFD */
|
||||
PNAME(mout_clkcmu_mfd_noc_user_p) = { "oscclk", "dout_clkcmu_mfd_noc" };
|
||||
|
||||
static const struct samsung_mux_clock mfd_mux_clks[] __initconst = {
|
||||
MUX(CLK_MOUT_MFD_NOC_USER, "mout_clkcmu_mfd_noc_user",
|
||||
mout_clkcmu_mfd_noc_user_p, PLL_CON0_MUX_CLKCMU_MFD_NOC_USER, 4, 1),
|
||||
};
|
||||
|
||||
static const struct samsung_div_clock mfd_div_clks[] __initconst = {
|
||||
DIV(CLK_DOUT_MFD_NOCP, "dout_mfd_nocp",
|
||||
"mout_clkcmu_mfd_noc_user", CLK_CON_DIV_DIV_CLK_MFD_NOCP,
|
||||
0, 3),
|
||||
};
|
||||
|
||||
static const struct samsung_cmu_info mfd_cmu_info __initconst = {
|
||||
.mux_clks = mfd_mux_clks,
|
||||
.nr_mux_clks = ARRAY_SIZE(mfd_mux_clks),
|
||||
.div_clks = mfd_div_clks,
|
||||
.nr_div_clks = ARRAY_SIZE(mfd_div_clks),
|
||||
.nr_clk_ids = CLKS_NR_MFD,
|
||||
.clk_regs = mfd_clk_regs,
|
||||
.nr_clk_regs = ARRAY_SIZE(mfd_clk_regs),
|
||||
.clk_name = "noc",
|
||||
};
|
||||
|
||||
static int __init exynosautov920_cmu_probe(struct platform_device *pdev)
|
||||
{
|
||||
const struct samsung_cmu_info *info;
|
||||
|
|
@ -1941,6 +1978,9 @@ static const struct of_device_id exynosautov920_cmu_of_match[] = {
|
|||
}, {
|
||||
.compatible = "samsung,exynosautov920-cmu-mfc",
|
||||
.data = &mfc_cmu_info,
|
||||
}, {
|
||||
.compatible = "samsung,exynosautov920-cmu-mfd",
|
||||
.data = &mfd_cmu_info,
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user