Skip to content

Commit 67e16ac

Browse files
MrVanabelvesa
authored andcommitted
clk: imx93: add SAI IPG clk
The clk topology is as below: bus_aon_root------>\ /--->SAI IPG -->SAI LPCG gate--> sai[x]_clk_root--->/ \--->SAI MCLK So use shared count as i.MX93 MU_B gate. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Abel Vesa <abel.vesa@linaro.org> Link: https://lore.kernel.org/r/20220830033137.4149542-9-peng.fan@oss.nxp.com
1 parent 92d1496 commit 67e16ac

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

drivers/clk/imx/clk-imx93.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ enum clk_sel {
2828
MAX_SEL
2929
};
3030

31+
static u32 share_count_sai1;
32+
static u32 share_count_sai2;
33+
static u32 share_count_sai3;
3134
static u32 share_count_mub;
3235

3336
static const char *parent_names[MAX_SEL][4] = {
@@ -215,9 +218,12 @@ static const struct imx93_clk_ccgr {
215218
{ IMX93_CLK_USDHC1_GATE, "usdhc1", "usdhc1_root", 0x9380, },
216219
{ IMX93_CLK_USDHC2_GATE, "usdhc2", "usdhc2_root", 0x93c0, },
217220
{ IMX93_CLK_USDHC3_GATE, "usdhc3", "usdhc3_root", 0x9400, },
218-
{ IMX93_CLK_SAI1_GATE, "sai1", "sai1_root", 0x9440, },
219-
{ IMX93_CLK_SAI2_GATE, "sai2", "sai2_root", 0x9480, },
220-
{ IMX93_CLK_SAI3_GATE, "sai3", "sai3_root", 0x94c0, },
221+
{ IMX93_CLK_SAI1_GATE, "sai1", "sai1_root", 0x9440, 0, &share_count_sai1},
222+
{ IMX93_CLK_SAI1_IPG, "sai1_ipg_clk", "bus_aon_root", 0x9440, 0, &share_count_sai1},
223+
{ IMX93_CLK_SAI2_GATE, "sai2", "sai2_root", 0x9480, 0, &share_count_sai2},
224+
{ IMX93_CLK_SAI2_IPG, "sai2_ipg_clk", "bus_wakeup_root", 0x9480, 0, &share_count_sai2},
225+
{ IMX93_CLK_SAI3_GATE, "sai3", "sai3_root", 0x94c0, 0, &share_count_sai3},
226+
{ IMX93_CLK_SAI3_IPG, "sai3_ipg_clk", "bus_wakeup_root", 0x94c0, 0, &share_count_sai3},
221227
{ IMX93_CLK_MIPI_CSI_GATE, "mipi_csi", "media_apb_root", 0x9580, },
222228
{ IMX93_CLK_MIPI_DSI_GATE, "mipi_dsi", "media_apb_root", 0x95c0, },
223229
{ IMX93_CLK_LVDS_GATE, "lvds", "media_ldb_root", 0x9600, },

0 commit comments

Comments
 (0)