Re: [meta-freescale] linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c
Brian Hutchinson <[email protected]> Wed, 27 Oct 2021 09:23:49 -0400
| Newsgroups | org.yoctoproject.lists.meta-freescale |
|---|---|
| Message-ID | <CAFZh4h-cJ=TQu0H_FEY4Xzx_97P0HF+BaXjJQm1s3+tGMcF8vw@mail.gmail.com> |
Hi Andrey, On Wed, Oct 27, 2021 at 9:01 AM Andrey Zhizhikin <[email protected]> wrote: > Hello Brian, > > On Wed, Oct 27, 2021 at 2:45 PM Brian Hutchinson <[email protected]> > wrote: > > > > > > > > On Wed, Oct 27, 2021 at 8:18 AM Fabio Estevam <[email protected]> > wrote: > >> > >> Hi Brian, > >> > >> On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <[email protected]> > wrote: > >> > > >> > > >> > > >> > On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via > lists.yoctoproject.org <[email protected]> > wrote: > >> >> > >> >> Hi, > >> >> > >> >> First, forgive me for posting a link in an post with no context ... > I hit a wrong button and accidentally sent before ready. > >> >> > >> >> Bottom line up front. How can I get a 5.10 kernel with multi-lane > support for IMX8MM? > >> >> > >> >> We use linux-fsl 5.4 on a IMXMM based board and have recently > stepped up to linux-fsl 5.10 and the sound/fsl/fsl_sai.c has no support for > "multi-lane" anymore which breaks our code. > >> >> > >> >> I figure this is simply a case where things in linux-imx are new and > just not picked up in linux-fslc yet but wondering if it's possible to get > multi-lane support in a 5.10 kernel for the IMX8MM. > >> >> > >> >> I still don't quite fully understand how all the releases work, the > linux-imx releases appear to be for newer boards and don't necessarily > support the older boards from what I'm seeing. > >> >> > >> >> Thanks for any advice/guidance. > >> >> > >> >> Regards, > >> >> > >> >> Brian > >> > > >> > > >> > And that link I accidentally posted by itself > https://source.codeaurora.org/external/imx/linux-imx/tree/sound/soc/fsl/fsl_sai.c?h=lf-5.10.y > >> > > >> > ... is the reference I mentioned where I see multi-lane support in > linux-imx 5.10. > >> > >> With the mainline SAI driver, it is possible to use several channels. > >> Not sure what you mean by "multi-lane" in your use-case. > >> > >> Please check: > >> https://bootlin.com/blog/eight-channels-audio-on-i-mx7-with-pcm3168/ > > > > > > I hoped folks would know what I was talking about without getting too > far into the weeds. But I guess I need to explain more. > > > > The older 5.4 kernels (and even 4 series kernels) had a imx8mm-evk.dts > sai section that looked like this: > > > > &sai1 { > > pinctrl-names = "default"; > > pinctrl-0 = <&pinctrl_sai1>; > > assigned-clocks = <&clk IMX8MM_CLK_SAI1>; > > assigned-clock-parents = <&clk IMX8MM_AUDIO_PLL1_OUT>; > > assigned-clock-rates = <24576000>; > > clocks = <&clk IMX8MM_CLK_SAI1_IPG>, <&clk IMX8MM_CLK_DUMMY>, > > <&clk IMX8MM_CLK_SAI1_ROOT>, <&clk IMX8MM_CLK_DUMMY>, > > <&clk IMX8MM_CLK_DUMMY>, <&clk IMX8MM_AUDIO_PLL1_OUT>, > > <&clk IMX8MM_AUDIO_PLL2_OUT>; > > clock-names = "bus", "mclk0", "mclk1", "mclk2", "mclk3", "pll8k", > "pll11k"; > > fsl,sai-multi-lane; > > fsl,dataline,dsd = <0 0xff 0xff 2 0xff 0x11>; > > fsl,sai-synchronous-rx; > > dmas = <&sdma2 0 25 0>, <&sdma2 1 25 0>; > > #sound-dai-cells = <0>; > > status = "okay"; > > }; > > > > ... which has fsl,sai-multi-lane support. > > > > The current linux-fslc 5.10 kernel does not have fsl,sai-multi-lane > support. > > linux-fslc-imx kernel recipe on the [master] branch on meta-freescale > provides a kernel, which has linux-imx as a base and latest LTS > applied on top. > > Assuming you're building now off the [master] branch and do not set > the IMX_DEFAULT_BSP to any value anywhere in your conf files - you > will be building a Mainline BSP (see [1]), which does select > linux-fslc as a preferred provider for your kernel, see [2]. > > You can try to either switch your BSP to NXP one by setting > IMX_DEFAULT_BSP = "nxp", or switch your kernel provider to > "linux-fslc-imx" one. > I really would like to stick with linux-fslc since that's what we've been using for more than a year now. Kind of scared to switch back to linux-fslc-imx (I'll try to do better with my terminology) but if you guys think that's best then I'll try it. Worried that our custom apps might be impacted by the switch. > As a quick GIT grep in the linux-fslc repo on [5.10-2.1.x-imx] branch: > git grep sai-multi-lane > arch/arm64/boot/dts/freescale/imx8mm-evk-ak4497.dts: fsl,sai-multi-lane; > arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi: fsl,sai-multi-lane; > arch/arm64/boot/dts/freescale/imx8mp-ab2.dts: fsl,sai-multi-lane; > arch/arm64/boot/dts/freescale/imx8mq-evk-ak4497.dts: fsl,sai-multi-lane; > arch/arm64/boot/dts/freescale/imx8mq-evk.dts: fsl,sai-multi-lane; > sound/soc/fsl/fsl_sai.c: if (of_find_property(np, > "fsl,sai-multi-lane", NULL)) > > Guess this is what you're looking for, right? > I'd be ok with doing a build of just the kernel on master branch as long as it supports imx8mm-evk (what our board is based on) but the rest of our rootfs is based on Dunfell release. So if I'm following you correctly, you're saying the linux-fslc repo has imx 5.10 with multi-lane in it. How come linux-fslc 5.10 doesn't have it? Is it a case where imx released it later and hasn't worked it's way into linux-fslc yet? I'd be willing to "try" 5.10.2.1.x-imx just to see if it solves our problem but still would prefer to stick with linux-fslc ... but if that's the only way to get this feature back I guess I'll have to do what I need to do. I still get confused by linux-fslc, linux-imx linux-fslc-imx some. Which one would be the safest (aka most stable) for imx8mm ... and have multi-lane support? Thanks again for putting up with my dumb questions and weird issues. Everything was ok until we had to step up to 5.4 in order to pick up some DSA PTP (1588) patches. Regards, Brian