[Letux-kernel] McBSP clocks on OMAP5?
Peter Ujfalusi
peter.ujfalusi at ti.com
Mon Aug 27 14:07:29 CEST 2018
Nikolaus,
On 2018-08-26 09:54, H. Nikolaus Schaller wrote:
> Hi,
>
>> Am 25.08.2018 um 18:29 schrieb H. Nikolaus Schaller <hns at goldelico.com>:
>>
>> Hi,
>> I am trying to set up a simple sound card on the OMAP5
>> using a McBSP like I have it working on OMAP3.
>>
>> But I get this messsage:
>>
>> [ 617.934410] omap_mcbsp_dai_hw_params: not enough bandwidth for desired rate and channels
>> [ 617.955069] omap-mcbsp 40124000.mcbsp: ASoC: can't set 40124000.mcbsp hw params: -22
>>
>> This comes from
>>
>> https://elixir.bootlin.com/linux/v4.18.5/source/sound/soc/omap/omap-mcbsp.c#L368
>>
>> Printing the values reveals:
>>
>> [ 617.946281] in_freq 0 clk_div 0 div 1
>> [ 617.950393] framesize 0 wlen 16 channels 2
>>
>> So this means mcbsp->in_freq == 0 which seems to be wrong.
>>
>> But how do I set it?
>>
>> In omap3.dtsi it appears as if clock is defined:
>>
>> mcbsp1: mcbsp at 48074000 {
>> compatible = "ti,omap3-mcbsp";
>> reg = <0x48074000 0xff>;
>> reg-names = "mpu";
>> interrupts = <16>, /* OCP compliant interrupt */
>> <59>, /* TX interrupt */
>> <60>; /* RX interrupt */
>> interrupt-names = "common", "tx", "rx";
>> ti,buffer-size = <128>;
>> ti,hwmods = "mcbsp1";
>> dmas = <&sdma 31>,
>> <&sdma 32>;
>> dma-names = "tx", "rx";
>> clocks = <&mcbsp1_fck>;
>> clock-names = "fck";
>> status = "disabled";
>> };
>>
>> while for omap5.dtsi there is no clock:
>>
>> mcbsp1: mcbsp at 40122000 {
>> compatible = "ti,omap4-mcbsp";
>> reg = <0x40122000 0xff>, /* MPU private access */
>> <0x49022000 0xff>; /* L3 Interconnect */
>> reg-names = "mpu", "dma";
>> interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
>> interrupt-names = "common";
>> ti,buffer-size = <128>;
>> ti,hwmods = "mcbsp1";
>> dmas = <&sdma 33>,
>> <&sdma 34>;
>> dma-names = "tx", "rx";
>> status = "disabled";
>> };
>>
>> In both cases I have overwritten status = "okay".
>>
>> Any advice?
>
> I have found the issue. I had the wrong dai link definitions for this
> mcbsp, assuming a different codec.
OK, I used to have local patches for enabling McBSP for omap4/5 for DMA
testing, but w/ dummy codec as I don't have anything which can be used.
> There is only one message remaining - after arecord/aplay reports an input/output error:
>
> [ 48.492255] omap-mcbsp 40124000.mcbsp: CLKS: could not clk_set_parent() to prcm_fck
> [ 54.460368] omap-mcbsp 40122000.mcbsp: CLKS: could not clk_set_parent() to prcm_fck
>
> but this may be related to not having activated the pcm master (mcbsp is slave).
Looking at it it does look like that we are missing all the mcbspX_fck
for omap4/5 and even on omap2/3 we should have the pad_fck and prcm_fck
in DT for the McBSP node in the clocks.
>
> BR,
> Nikolaus
>
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
More information about the Letux-kernel
mailing list