Skip to content

Commit 25e4766

Browse files
Raghav Sharmakrzk
authored andcommitted
clk: samsung: exynosautov920: add block mfc clock support
Add support for CMU_MFC which provides clocks to MFC block, and register the required compatible and cmu_info for the same. Signed-off-by: Raghav Sharma <raghav.s@samsung.com> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
1 parent ac5d829 commit 25e4766

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

drivers/clk/samsung/clk-exynosautov920.c

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#define CLKS_NR_HSI1 (CLK_MOUT_HSI1_USBDRD + 1)
2929
#define CLKS_NR_HSI2 (CLK_DOUT_HSI2_ETHERNET_PTP + 1)
3030
#define CLKS_NR_M2M (CLK_DOUT_M2M_NOCP + 1)
31+
#define CLKS_NR_MFC (CLK_DOUT_MFC_NOCP + 1)
3132

3233
/* ---- CMU_TOP ------------------------------------------------------------ */
3334

@@ -1863,6 +1864,47 @@ static const struct samsung_cmu_info m2m_cmu_info __initconst = {
18631864
.clk_name = "noc",
18641865
};
18651866

1867+
/* ---- CMU_MFC --------------------------------------------------------- */
1868+
1869+
/* Register Offset definitions for CMU_MFC (0x19c00000) */
1870+
#define PLL_CON0_MUX_CLKCMU_MFC_MFC_USER 0x600
1871+
#define PLL_CON0_MUX_CLKCMU_MFC_WFD_USER 0x610
1872+
#define CLK_CON_DIV_DIV_CLK_MFC_NOCP 0x1800
1873+
1874+
static const unsigned long mfc_clk_regs[] __initconst = {
1875+
PLL_CON0_MUX_CLKCMU_MFC_MFC_USER,
1876+
PLL_CON0_MUX_CLKCMU_MFC_WFD_USER,
1877+
CLK_CON_DIV_DIV_CLK_MFC_NOCP,
1878+
};
1879+
1880+
/* List of parent clocks for Muxes in CMU_MFC */
1881+
PNAME(mout_clkcmu_mfc_mfc_user_p) = { "oscclk", "dout_clkcmu_mfc_mfc" };
1882+
PNAME(mout_clkcmu_mfc_wfd_user_p) = { "oscclk", "dout_clkcmu_mfc_wfd" };
1883+
1884+
static const struct samsung_mux_clock mfc_mux_clks[] __initconst = {
1885+
MUX(CLK_MOUT_MFC_MFC_USER, "mout_clkcmu_mfc_mfc_user",
1886+
mout_clkcmu_mfc_mfc_user_p, PLL_CON0_MUX_CLKCMU_MFC_MFC_USER, 4, 1),
1887+
MUX(CLK_MOUT_MFC_WFD_USER, "mout_clkcmu_mfc_wfd_user",
1888+
mout_clkcmu_mfc_wfd_user_p, PLL_CON0_MUX_CLKCMU_MFC_WFD_USER, 4, 1),
1889+
};
1890+
1891+
static const struct samsung_div_clock mfc_div_clks[] __initconst = {
1892+
DIV(CLK_DOUT_MFC_NOCP, "dout_mfc_nocp",
1893+
"mout_clkcmu_mfc_mfc_user", CLK_CON_DIV_DIV_CLK_MFC_NOCP,
1894+
0, 3),
1895+
};
1896+
1897+
static const struct samsung_cmu_info mfc_cmu_info __initconst = {
1898+
.mux_clks = mfc_mux_clks,
1899+
.nr_mux_clks = ARRAY_SIZE(mfc_mux_clks),
1900+
.div_clks = mfc_div_clks,
1901+
.nr_div_clks = ARRAY_SIZE(mfc_div_clks),
1902+
.nr_clk_ids = CLKS_NR_MFC,
1903+
.clk_regs = mfc_clk_regs,
1904+
.nr_clk_regs = ARRAY_SIZE(mfc_clk_regs),
1905+
.clk_name = "noc",
1906+
};
1907+
18661908
static int __init exynosautov920_cmu_probe(struct platform_device *pdev)
18671909
{
18681910
const struct samsung_cmu_info *info;
@@ -1896,6 +1938,9 @@ static const struct of_device_id exynosautov920_cmu_of_match[] = {
18961938
}, {
18971939
.compatible = "samsung,exynosautov920-cmu-m2m",
18981940
.data = &m2m_cmu_info,
1941+
}, {
1942+
.compatible = "samsung,exynosautov920-cmu-mfc",
1943+
.data = &mfc_cmu_info,
18991944
},
19001945
{ }
19011946
};

0 commit comments

Comments
 (0)