* omap mcbsp and prcm_fck
@ 2023-01-17 11:08 Andreas Kemnade
2023-01-19 7:41 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Kemnade @ 2023-01-17 11:08 UTC (permalink / raw)
To: linux-omap, peter.ujfalusi, jarkko.nikula
Hi,
while trying to create a devicetree for a omap4 device, I stumbled upon this:
[ 59.789367] omap-mcbsp 40124000.mcbsp: CLKS: could not clk_get() prcm_fck
But where should prcm_fck come from? The string does not appear in the
devicetree binding documentation. I have seen it only in the omap_hwmod_* stuff
used by omap2/3.
So how to make mcbsp happy?
Regards,
Andreas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: omap mcbsp and prcm_fck
2023-01-17 11:08 omap mcbsp and prcm_fck Andreas Kemnade
@ 2023-01-19 7:41 ` Tony Lindgren
2023-01-19 21:16 ` Andreas Kemnade
0 siblings, 1 reply; 4+ messages in thread
From: Tony Lindgren @ 2023-01-19 7:41 UTC (permalink / raw)
To: Andreas Kemnade; +Cc: linux-omap, peter.ujfalusi, jarkko.nikula
Hi,
* Andreas Kemnade <andreas@kemnade.info> [230117 11:08]:
> Hi,
>
> while trying to create a devicetree for a omap4 device, I stumbled upon this:
>
> [ 59.789367] omap-mcbsp 40124000.mcbsp: CLKS: could not clk_get() prcm_fck
>
> But where should prcm_fck come from? The string does not appear in the
> devicetree binding documentation. I have seen it only in the omap_hwmod_* stuff
> used by omap2/3.
>
> So how to make mcbsp happy?
I think all you need to do is add an entry for prcm_fck to point to
mcbsp4_sync_mux_ck in omap44xx_clks[]. Seems this got dropped with commit
349355ce3a05 ("ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp").
Or patch the driver so it tries to use the dt clock so that the standard
assigned-clocks devicetree property works for a board specific
configuration.
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: omap mcbsp and prcm_fck
2023-01-19 7:41 ` Tony Lindgren
@ 2023-01-19 21:16 ` Andreas Kemnade
2023-01-24 13:25 ` Tony Lindgren
0 siblings, 1 reply; 4+ messages in thread
From: Andreas Kemnade @ 2023-01-19 21:16 UTC (permalink / raw)
To: Tony Lindgren; +Cc: linux-omap, peter.ujfalusi, jarkko.nikula
Hi,
On Thu, 19 Jan 2023 09:41:36 +0200
Tony Lindgren <tony@atomide.com> wrote:
> Hi,
>
> * Andreas Kemnade <andreas@kemnade.info> [230117 11:08]:
> > Hi,
> >
> > while trying to create a devicetree for a omap4 device, I stumbled upon this:
> >
> > [ 59.789367] omap-mcbsp 40124000.mcbsp: CLKS: could not clk_get() prcm_fck
> >
> > But where should prcm_fck come from? The string does not appear in the
> > devicetree binding documentation. I have seen it only in the omap_hwmod_* stuff
> > used by omap2/3.
> >
> > So how to make mcbsp happy?
>
> I think all you need to do is add an entry for prcm_fck to point to
> mcbsp4_sync_mux_ck in omap44xx_clks[]. Seems this got dropped with commit
> 349355ce3a05 ("ARM: OMAP2+: Drop legacy platform data for omap4 mcbsp").
>
> Or patch the driver so it tries to use the dt clock so that the standard
> assigned-clocks devicetree property works for a board specific
> configuration.
>
I tried this hack-fix:
--- a/sound/soc/ti/omap-mcbsp.c
+++ b/sound/soc/ti/omap-mcbsp.c
@@ -64,7 +64,7 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
if (fck_src_id == MCBSP_CLKS_PAD_SRC)
src = "pad_fck";
else if (fck_src_id == MCBSP_CLKS_PRCM_SRC)
- src = "prcm_fck";
+ src = "mcbsp2_sync_mux_ck";
else
return -EINVAL;
Then I stumple upon the next problem:
omap-mcbsp 40124000.mcbsp: CLKS: could not clk_set_parent() to mcbsp2_sync_mux_ck
Regards,
Andreas
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: omap mcbsp and prcm_fck
2023-01-19 21:16 ` Andreas Kemnade
@ 2023-01-24 13:25 ` Tony Lindgren
0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2023-01-24 13:25 UTC (permalink / raw)
To: Andreas Kemnade; +Cc: linux-omap, peter.ujfalusi, jarkko.nikula
Hi,
* Andreas Kemnade <andreas@kemnade.info> [230119 21:16]:
> I tried this hack-fix:
>
> --- a/sound/soc/ti/omap-mcbsp.c
> +++ b/sound/soc/ti/omap-mcbsp.c
> @@ -64,7 +64,7 @@ static int omap2_mcbsp_set_clks_src(struct omap_mcbsp *mcbsp, u8 fck_src_id)
> if (fck_src_id == MCBSP_CLKS_PAD_SRC)
> src = "pad_fck";
> else if (fck_src_id == MCBSP_CLKS_PRCM_SRC)
> - src = "prcm_fck";
> + src = "mcbsp2_sync_mux_ck";
> else
> return -EINVAL;
>
>
> Then I stumple upon the next problem:
> omap-mcbsp 40124000.mcbsp: CLKS: could not clk_set_parent() to mcbsp2_sync_mux_ck
I don't think it's the direct parent here, the clkctrl clock bit 0 has
the clksel parent at bits [25:24], and the clksel internal clock parent
is bits [27:26]. See omap4_func_mcbsp2_gfclk_parents[] and
omap4_mcbsp2_bit_data[].
I'd just use assigned-clock-parents on the internal clock, and possibly
also for the clksel clock in the board specific dts file. This way the
mcbsp driver doing pm_runtime_enable() will enable the clkctrl modulemode
and the rest of the clock configuration should happen automatically.
Regards,
Tony
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-24 13:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-17 11:08 omap mcbsp and prcm_fck Andreas Kemnade
2023-01-19 7:41 ` Tony Lindgren
2023-01-19 21:16 ` Andreas Kemnade
2023-01-24 13:25 ` Tony Lindgren
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox