summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDong Aisheng <aisheng.dong@nxp.com>2017-10-12 19:43:39 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit5b35711d952917e1bae3d32573f15ce8e4fe2fb7 (patch)
treeb93cd2b89c0cc0f6f0671cfa8d8f2d2334402d80 /drivers
parent5d8f1616a9f1d48846d92cbb693b97b0593b16ef (diff)
MLK-16606-1 clk: imx8qm: add M4 I2C clocks
There're two M4 I2C instances in MX8QM. Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/imx/clk-imx8qm.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/clk/imx/clk-imx8qm.c b/drivers/clk/imx/clk-imx8qm.c
index a99176bb027a..ad9099a8930c 100644
--- a/drivers/clk/imx/clk-imx8qm.c
+++ b/drivers/clk/imx/clk-imx8qm.c
@@ -894,6 +894,16 @@ static int imx8qm_clk_probe(struct platform_device *pdev)
clks[IMX8QM_HSIO_SATA_EPCS_RX_CLK] = imx_clk_gate2_scu("hsio_sata_epcs_rx_clk", "dummy", LPCG_ADDR(HSIO_PHY_X1_LPCG), 8, FUNCTION_NAME(PD_HSIO_SATA_0));
clks[IMX8QM_HSIO_SATA_EPCS_TX_CLK] = imx_clk_gate2_scu("hsio_sata_epcs_tx_clk", "dummy", LPCG_ADDR(HSIO_PHY_X1_LPCG), 4, FUNCTION_NAME(PD_HSIO_SATA_0));
+ /* CM40 */
+ clks[IMX8QM_CM40_I2C_DIV] = imx_clk_divider_scu("cm40_i2c_div", SC_R_M4_0_I2C, SC_PM_CLK_PER);
+ clks[IMX8QM_CM40_I2C_CLK] = imx_clk_gate_scu("cm40_i2c_clk", "cm40_i2c_div", SC_R_M4_0_I2C, SC_PM_CLK_PER, (void __iomem *)(CM40_I2C_LPCG), 0, 0);
+ clks[IMX8QM_CM40_I2C_IPG_CLK] = imx_clk_gate2_scu("cm40_i2c_ipg_clk", "ipg_cm40_clk_root", (void __iomem *)(CM40_I2C_LPCG), 16, FUNCTION_NAME(PD_CM40_I2C));
+
+ /* CM41 */
+ clks[IMX8QM_CM41_I2C_DIV] = imx_clk_divider_scu("cm41_i2c_div", SC_R_M4_1_I2C, SC_PM_CLK_PER);
+ clks[IMX8QM_CM41_I2C_CLK] = imx_clk_gate_scu("cm41_i2c_clk", "cm41_i2c_div", SC_R_M4_1_I2C, SC_PM_CLK_PER, (void __iomem *)(CM41_I2C_LPCG), 0, 0);
+ clks[IMX8QM_CM41_I2C_IPG_CLK] = imx_clk_gate2_scu("cm41_i2c_ipg_clk", "ipg_cm41_clk_root", (void __iomem *)(CM41_I2C_LPCG), 16, FUNCTION_NAME(PD_CM41_I2C));
+
for (i = 0; i < ARRAY_SIZE(clks); i++)
if (IS_ERR(clks[i]) && PTR_ERR(clks[i]) != -ENODEV)
pr_err("i.MX8QM clk %d: register failed with %ld\n",