Skip to content

Commit d40371a

Browse files
TE-N-ShengjiuWangabelvesa
authored andcommitted
clk: imx: clk-audiomix: Correct parent clock for earc_phy and audpll
According to Reference Manual of i.MX8MP The parent clock of "earc_phy" is "sai_pll_out_div2", The parent clock of "audpll" is "osc_24m". Add CLK_GATE_PARENT() macro for usage of specifying parent clock. Fixes: 6cd95f7 ("clk: imx: imx8mp: Add audiomix block control") Signed-off-by: Shengjiu Wang <[email protected]> Reviewed-by: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent dc4211c commit d40371a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

drivers/clk/imx/clk-imx8mp-audiomix.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,15 @@ static const struct clk_parent_data clk_imx8mp_audiomix_pll_bypass_sels[] = {
156156
PDM_SEL, 2, 0 \
157157
}
158158

159+
#define CLK_GATE_PARENT(gname, cname, pname) \
160+
{ \
161+
gname"_cg", \
162+
IMX8MP_CLK_AUDIOMIX_##cname, \
163+
{ .fw_name = pname, .name = pname }, NULL, 1, \
164+
CLKEN0 + 4 * !!(IMX8MP_CLK_AUDIOMIX_##cname / 32), \
165+
1, IMX8MP_CLK_AUDIOMIX_##cname % 32 \
166+
}
167+
159168
struct clk_imx8mp_audiomix_sel {
160169
const char *name;
161170
int clkid;
@@ -173,14 +182,14 @@ static struct clk_imx8mp_audiomix_sel sels[] = {
173182
CLK_GATE("earc", EARC_IPG),
174183
CLK_GATE("ocrama", OCRAMA_IPG),
175184
CLK_GATE("aud2htx", AUD2HTX_IPG),
176-
CLK_GATE("earc_phy", EARC_PHY),
185+
CLK_GATE_PARENT("earc_phy", EARC_PHY, "sai_pll_out_div2"),
177186
CLK_GATE("sdma2", SDMA2_ROOT),
178187
CLK_GATE("sdma3", SDMA3_ROOT),
179188
CLK_GATE("spba2", SPBA2_ROOT),
180189
CLK_GATE("dsp", DSP_ROOT),
181190
CLK_GATE("dspdbg", DSPDBG_ROOT),
182191
CLK_GATE("edma", EDMA_ROOT),
183-
CLK_GATE("audpll", AUDPLL_ROOT),
192+
CLK_GATE_PARENT("audpll", AUDPLL_ROOT, "osc_24m"),
184193
CLK_GATE("mu2", MU2_ROOT),
185194
CLK_GATE("mu3", MU3_ROOT),
186195
CLK_PDM,

0 commit comments

Comments
 (0)