Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: sprd: add mipi_csi_xx gate clocks

mipi_csi_xx clocks are used by camera sensors.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Link: https://lkml.kernel.org/r/20200527053638.31439-5-zhang.lyra@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Chunyan Zhang and committed by
Stephen Boyd
2c1c9696 d7160288

+32
+32
drivers/clk/sprd/sc9863a-clk.c
··· 1615 1615 .hw_clks = &sc9863a_mm_gate_hws, 1616 1616 }; 1617 1617 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 + 1618 1648 static SPRD_SC_GATE_CLK_FW_NAME(sim0_eb, "sim0-eb", "ext-26m", 0x0, 1619 1649 0x1000, BIT(0), 0, 0); 1620 1650 static SPRD_SC_GATE_CLK_FW_NAME(iis0_eb, "iis0-eb", "ext-26m", 0x0, ··· 1767 1737 .data = &sc9863a_aonapb_gate_desc }, 1768 1738 { .compatible = "sprd,sc9863a-mm-gate", /* 0x60800000 */ 1769 1739 .data = &sc9863a_mm_gate_desc }, 1740 + { .compatible = "sprd,sc9863a-mm-clk", /* 0x60900000 */ 1741 + .data = &sc9863a_mm_clk_desc }, 1770 1742 { .compatible = "sprd,sc9863a-apapb-gate", /* 0x71300000 */ 1771 1743 .data = &sc9863a_apapb_gate_desc }, 1772 1744 { }