Skip to content

Commit 2c1c969

Browse files
Chunyan Zhangbebarino
authored andcommitted
clk: sprd: add mipi_csi_xx gate clocks
mipi_csi_xx clocks are used by camera sensors. Signed-off-by: Chunyan Zhang <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
1 parent d716028 commit 2c1c969

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

drivers/clk/sprd/sc9863a-clk.c

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1615,6 +1615,36 @@ static const struct sprd_clk_desc sc9863a_mm_gate_desc = {
16151615
.hw_clks = &sc9863a_mm_gate_hws,
16161616
};
16171617

1618+
/* camera sensor clocks */
1619+
static SPRD_GATE_CLK_HW(mipi_csi_clk, "mipi-csi-clk", &mahb_ckg_eb.common.hw,
1620+
0x20, BIT(16), 0, SPRD_GATE_NON_AON);
1621+
static SPRD_GATE_CLK_HW(mipi_csi_s_clk, "mipi-csi-s-clk", &mahb_ckg_eb.common.hw,
1622+
0x24, BIT(16), 0, SPRD_GATE_NON_AON);
1623+
static SPRD_GATE_CLK_HW(mipi_csi_m_clk, "mipi-csi-m-clk", &mahb_ckg_eb.common.hw,
1624+
0x28, BIT(16), 0, SPRD_GATE_NON_AON);
1625+
1626+
static struct sprd_clk_common *sc9863a_mm_clk_clks[] = {
1627+
/* address base is 0x60900000 */
1628+
&mipi_csi_clk.common,
1629+
&mipi_csi_s_clk.common,
1630+
&mipi_csi_m_clk.common,
1631+
};
1632+
1633+
static struct clk_hw_onecell_data sc9863a_mm_clk_hws = {
1634+
.hws = {
1635+
[CLK_MIPI_CSI] = &mipi_csi_clk.common.hw,
1636+
[CLK_MIPI_CSI_S] = &mipi_csi_s_clk.common.hw,
1637+
[CLK_MIPI_CSI_M] = &mipi_csi_m_clk.common.hw,
1638+
},
1639+
.num = CLK_MM_CLK_NUM,
1640+
};
1641+
1642+
static const struct sprd_clk_desc sc9863a_mm_clk_desc = {
1643+
.clk_clks = sc9863a_mm_clk_clks,
1644+
.num_clk_clks = ARRAY_SIZE(sc9863a_mm_clk_clks),
1645+
.hw_clks = &sc9863a_mm_clk_hws,
1646+
};
1647+
16181648
static SPRD_SC_GATE_CLK_FW_NAME(sim0_eb, "sim0-eb", "ext-26m", 0x0,
16191649
0x1000, BIT(0), 0, 0);
16201650
static SPRD_SC_GATE_CLK_FW_NAME(iis0_eb, "iis0-eb", "ext-26m", 0x0,
@@ -1737,6 +1767,8 @@ static const struct of_device_id sprd_sc9863a_clk_ids[] = {
17371767
.data = &sc9863a_aonapb_gate_desc },
17381768
{ .compatible = "sprd,sc9863a-mm-gate", /* 0x60800000 */
17391769
.data = &sc9863a_mm_gate_desc },
1770+
{ .compatible = "sprd,sc9863a-mm-clk", /* 0x60900000 */
1771+
.data = &sc9863a_mm_clk_desc },
17401772
{ .compatible = "sprd,sc9863a-apapb-gate", /* 0x71300000 */
17411773
.data = &sc9863a_apapb_gate_desc },
17421774
{ }

0 commit comments

Comments
 (0)