Date   

Re: #meta-freescale #hardknott Can't remove use-mainline-bsp from MACHINEOVERRIDES #meta-freescale #hardknott

Andrey Zhizhikin
 

Hello Marek,

On Thu, Nov 4, 2021 at 8:24 AM Marek S?omiany <marekslomiany@...> wrote:

Hi,
I'm working on new board based on imx8m mini and in my MACHINEOVERRIDES in when checking `bitbake -e` I have following list:
aarch64:armv8a:use-mainline-bsp:my-machine-name
In machine config file I have following includes:
require conf/machine/include/imx-base.inc
require conf/machine/include/tune-cortexa53.inc
and the overrides config:
MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
Even after removing the dot and trying to specify full list of overrides, I still get use-mainline-bsp on the list, and by that mx8, mx8m and mx8mm are being removed by `MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp`
I have tried to grep through all meta layers I have but got no result.
I have following layers in my bblayers.conf:
meta
meta-poky
meta-yocto-bsp
meta-openembedded/meta-oe
meta-freescale
my-new-layer
What could be appending this use-mainline-bsp to my overrides?
This machine override is added based on the BSP flavor that the distro
layer sets. BSP flavor is defined as either "mainline" which consumes
only OSS components, or "nxp" which adds NXP proprietary components.

It is defined to "mainline" per default in [1], and every distro layer
can set it in order to define which components are required and which
BSP should be built. The definition of BSP flavor is also commented at
the link provided.

meta-freescale-distro layer provides both of BSP flavors, and if like
in you case this layer is not included - BSP flavor is defaulted to
"mainline".

Please note, that MACHINEOVERRIDES like "mx8:mx8m:mx8mm" are
NXP-specific ones, and if you're planning to use Mainline BSP - they
should not be defined explicitly.


Kind regards,
Marek



Link: [1]: https://github.com/Freescale/meta-freescale/blob/75cc53cc480f73d8dc97cf1b52c48fb874d16a97/conf/machine/include/imx-base.inc#L13

--
Regards,
Andrey.


#meta-freescale #hardknott Can't remove use-mainline-bsp from MACHINEOVERRIDES #meta-freescale #hardknott

Marek S?omiany <marekslomiany@...>
 

Hi,
I'm working on new board based on imx8m mini and in my MACHINEOVERRIDES in when checking `bitbake -e` I have following list: 
    aarch64:armv8a:use-mainline-bsp:my-machine-name
In machine config file I have following includes:
    require conf/machine/include/imx-base.inc
    require conf/machine/include/tune-cortexa53.inc
and the overrides config:
    MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
Even after removing the dot and trying to specify full list of overrides, I still get use-mainline-bsp on the list, and by that mx8, mx8m and mx8mm are being removed by `MACHINEOVERRIDES_EXTENDER_FILTER_OUT_use-mainline-bsp`
I have tried to grep through all meta layers I have but got no result.
I have following layers in my bblayers.conf:
    meta
    meta-poky
    meta-yocto-bsp
    meta-openembedded/meta-oe
    meta-freescale
    my-new-layer
What could be appending this use-mainline-bsp to my overrides?

Kind regards,
Marek


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Brian Hutchinson
 

REFERRED_PROVIDER_virtual/kernel = "linux-fslc-imx"Hi Andrey,

On Wed, Oct 27, 2021 at 12:01 PM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> wrote:
Hey Andrey,

On Wed, Oct 27, 2021 at 10:37 AM Andrey Zhizhikin <andrey.z@...> wrote:
Hello Brian,

On Wed, Oct 27, 2021 at 3:24 PM Brian Hutchinson <b.hutchman@...> wrote:
>
> Hi Andrey,
>
>
> On Wed, Oct 27, 2021 at 9:01 AM Andrey Zhizhikin <andrey.z@...> wrote:
>>
>> Hello Brian,
>>
>> On Wed, Oct 27, 2021 at 2:45 PM Brian Hutchinson <b.hutchman@...> wrote:
>> >
>> >
>> >
>> > On Wed, Oct 27, 2021 at 8:18 AM Fabio Estevam <festevam@...> wrote:
>> >>
>> >> Hi Brian,
>> >>
>> >> On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <b.hutchman@...> wrote:
>> >> >
>> >> >
>> >> >
>> >> > On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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.

There are 2 kernel repositories here at play, namely:
- linux-fslc from Freescale GitHub
- linux-imx from CodeAurora

They both stem from stable korg, but using different strategy to evolve.

linux-imx is an NXP kernel fork, which they use to commit their
internal patches on top of some stable release. In case of 5.10 - it
is v5.10.54 from stable korg, which resides on [lf-5.10.y] branch.

linux-fslc is combination of various branches, and if we look at the
5.10 - there is a corresponding branch [5.10.x+fslc], and it is
practically a vanilla 5.10.y kernel from stable korg, with only
handful of patches on top.

If I to examine this like that:
$ git log --oneline --no-merges  stable/linux-5.10.y..5.10.x+fslc | wc -l
9

As one can see, it has only 9 patches on top of stable korg.

What comes in addition inside linux-fslc repository, is the branch
[5.10-2.1.x-imx], which is a combination of [lf-5.10.y] branch from
linux-imx repo and latest stable patch applied on top of it (with
merge conflict resolution, of course).

When examined, it brings the following:
$ git log --oneline  --no-merges stable/linux-5.10.y..5.10-2.1.x-imx  | wc -l
5456

Here we see, that there is a substantial difference in terms of number
of patches applied. It might be a new functionality (like your desired
multi-lane support), but can also contain a code in question, which
might not work for all scenarios you're applying your kernel to.

Hope that clears it a bit, and would help you to drive your decision
further on which kernel to use.

>
> 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?

That is the trick: you most probably used the NXP-based up-merged
branch in your BSP, but now when switched to new Yocto release - you
received a vanilla kernel, which does not have those NXP patches
applied.

So I was in error.  I looked back at the local.conf where our 5.4 kernel came from that we are happy with (and has multi-lane) and it was linux-fslc-imx so I guess it's linux-fslc with some imx releases merged in.

When I switched to 5.10 in hardknott it looks like it pulled in linux-fslc by default which looks pretty vanilla as you mentioned.

So I'll try what you said about "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."

To try and get a linux-fslc-imx 5.10 build and see if it's got multi-lane in it.  I was using hardknott when I originally got 5.10 so don't know if I need to do a repo sync to get newer stuff or checkout master but would only be interested in getting kernel and keeping our Dunfell based rootfs.

I'll go try some stuff.  Thanks for the input and advice.

So I did a repo sync in my hardknott checkout.  Then changed to IMX_DEFAULT_BSP = "nxp" in imx8mm-evk.inc and added PREFERRED_PROVIDER_virtual/kernel = "linux-fslc-imx" in local.conf and kicked off a virtual/kernel build.  Looks like it's pulling down linux-fslc-imx-5.10.69.  So hopefully that's ok, if not I guess I'll have to look at master but I don't want to be too bleeding edge if you know what I mean.

... and it just finished building as I was typing this and it looks like it does have multi-lane support in fsl_sai.c

Again, thanks for the info/ideas.

Regards,

Brian


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Brian Hutchinson
 

Hey Andrey,

On Wed, Oct 27, 2021 at 10:37 AM Andrey Zhizhikin <andrey.z@...> wrote:
Hello Brian,

On Wed, Oct 27, 2021 at 3:24 PM Brian Hutchinson <b.hutchman@...> wrote:
>
> Hi Andrey,
>
>
> On Wed, Oct 27, 2021 at 9:01 AM Andrey Zhizhikin <andrey.z@...> wrote:
>>
>> Hello Brian,
>>
>> On Wed, Oct 27, 2021 at 2:45 PM Brian Hutchinson <b.hutchman@...> wrote:
>> >
>> >
>> >
>> > On Wed, Oct 27, 2021 at 8:18 AM Fabio Estevam <festevam@...> wrote:
>> >>
>> >> Hi Brian,
>> >>
>> >> On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <b.hutchman@...> wrote:
>> >> >
>> >> >
>> >> >
>> >> > On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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.

There are 2 kernel repositories here at play, namely:
- linux-fslc from Freescale GitHub
- linux-imx from CodeAurora

They both stem from stable korg, but using different strategy to evolve.

linux-imx is an NXP kernel fork, which they use to commit their
internal patches on top of some stable release. In case of 5.10 - it
is v5.10.54 from stable korg, which resides on [lf-5.10.y] branch.

linux-fslc is combination of various branches, and if we look at the
5.10 - there is a corresponding branch [5.10.x+fslc], and it is
practically a vanilla 5.10.y kernel from stable korg, with only
handful of patches on top.

If I to examine this like that:
$ git log --oneline --no-merges  stable/linux-5.10.y..5.10.x+fslc | wc -l
9

As one can see, it has only 9 patches on top of stable korg.

What comes in addition inside linux-fslc repository, is the branch
[5.10-2.1.x-imx], which is a combination of [lf-5.10.y] branch from
linux-imx repo and latest stable patch applied on top of it (with
merge conflict resolution, of course).

When examined, it brings the following:
$ git log --oneline  --no-merges stable/linux-5.10.y..5.10-2.1.x-imx  | wc -l
5456

Here we see, that there is a substantial difference in terms of number
of patches applied. It might be a new functionality (like your desired
multi-lane support), but can also contain a code in question, which
might not work for all scenarios you're applying your kernel to.

Hope that clears it a bit, and would help you to drive your decision
further on which kernel to use.

>
> 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?

That is the trick: you most probably used the NXP-based up-merged
branch in your BSP, but now when switched to new Yocto release - you
received a vanilla kernel, which does not have those NXP patches
applied.

So I was in error.  I looked back at the local.conf where our 5.4 kernel came from that we are happy with (and has multi-lane) and it was linux-fslc-imx so I guess it's linux-fslc with some imx releases merged in.

When I switched to 5.10 in hardknott it looks like it pulled in linux-fslc by default which looks pretty vanilla as you mentioned.

So I'll try what you said about "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."

To try and get a linux-fslc-imx 5.10 build and see if it's got multi-lane in it.  I was using hardknott when I originally got 5.10 so don't know if I need to do a repo sync to get newer stuff or checkout master but would only be interested in getting kernel and keeping our Dunfell based rootfs.

I'll go try some stuff.  Thanks for the input and advice.

Regards,

Brian



>
> 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
>


--
Regards,
Andrey.


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Brian Hutchinson
 

Hey Fabio,


On Wed, Oct 27, 2021 at 10:33 AM Fabio Estevam <festevam@...> wrote:
On Wed, Oct 27, 2021 at 9:45 AM Brian Hutchinson <b.hutchman@...> wrote:

> 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;

This property is only found on the NXP vendor kernel, not in the
mainline kernel.

If your kernel has such property, then you are using an NXP-based kernel.

In this case, you could probably use Andrey's suggestion and switch to
the NXP 5.10 kernel.

I went back and looked at my 5.4 kernel that has the multi-lane support.

My local.conf has REFERRED_PROVIDER_virtual/kernel = "linux-fslc-imx"

Regards,

Brian


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Andrey Zhizhikin
 

Hello Brian,

On Wed, Oct 27, 2021 at 3:24 PM Brian Hutchinson <b.hutchman@...> wrote:

Hi Andrey,


On Wed, Oct 27, 2021 at 9:01 AM Andrey Zhizhikin <andrey.z@...> wrote:

Hello Brian,

On Wed, Oct 27, 2021 at 2:45 PM Brian Hutchinson <b.hutchman@...> wrote:



On Wed, Oct 27, 2021 at 8:18 AM Fabio Estevam <festevam@...> wrote:

Hi Brian,

On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <b.hutchman@...> wrote:



On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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.
There are 2 kernel repositories here at play, namely:
- linux-fslc from Freescale GitHub
- linux-imx from CodeAurora

They both stem from stable korg, but using different strategy to evolve.

linux-imx is an NXP kernel fork, which they use to commit their
internal patches on top of some stable release. In case of 5.10 - it
is v5.10.54 from stable korg, which resides on [lf-5.10.y] branch.

linux-fslc is combination of various branches, and if we look at the
5.10 - there is a corresponding branch [5.10.x+fslc], and it is
practically a vanilla 5.10.y kernel from stable korg, with only
handful of patches on top.

If I to examine this like that:
$ git log --oneline --no-merges stable/linux-5.10.y..5.10.x+fslc | wc -l
9

As one can see, it has only 9 patches on top of stable korg.

What comes in addition inside linux-fslc repository, is the branch
[5.10-2.1.x-imx], which is a combination of [lf-5.10.y] branch from
linux-imx repo and latest stable patch applied on top of it (with
merge conflict resolution, of course).

When examined, it brings the following:
$ git log --oneline --no-merges stable/linux-5.10.y..5.10-2.1.x-imx | wc -l
5456

Here we see, that there is a substantial difference in terms of number
of patches applied. It might be a new functionality (like your desired
multi-lane support), but can also contain a code in question, which
might not work for all scenarios you're applying your kernel to.

Hope that clears it a bit, and would help you to drive your decision
further on which kernel to use.


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?
That is the trick: you most probably used the NXP-based up-merged
branch in your BSP, but now when switched to new Yocto release - you
received a vanilla kernel, which does not have those NXP patches
applied.


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

--
Regards,
Andrey.


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Fabio Estevam
 

On Wed, Oct 27, 2021 at 9:45 AM Brian Hutchinson <b.hutchman@...> wrote:

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;
This property is only found on the NXP vendor kernel, not in the
mainline kernel.

If your kernel has such property, then you are using an NXP-based kernel.

In this case, you could probably use Andrey's suggestion and switch to
the NXP 5.10 kernel.


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Brian Hutchinson
 

Hi Andrey,


On Wed, Oct 27, 2021 at 9:01 AM Andrey Zhizhikin <andrey.z@...> wrote:
Hello Brian,

On Wed, Oct 27, 2021 at 2:45 PM Brian Hutchinson <b.hutchman@...> wrote:
>
>
>
> On Wed, Oct 27, 2021 at 8:18 AM Fabio Estevam <festevam@...> wrote:
>>
>> Hi Brian,
>>
>> On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <b.hutchman@...> wrote:
>> >
>> >
>> >
>> > On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Andrey Zhizhikin
 

Hello Brian,

On Wed, Oct 27, 2021 at 2:45 PM Brian Hutchinson <b.hutchman@...> wrote:



On Wed, Oct 27, 2021 at 8:18 AM Fabio Estevam <festevam@...> wrote:

Hi Brian,

On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <b.hutchman@...> wrote:



On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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.

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?


If you look at the linux-imx 5.10 link I posted before ... they do have the multi-lane support I'm looking for (in sounds/soc/fsl/fsl_sai.c) but kinda don't want to switch back to linux-imx. So my ask is how can I get linux-fslc 5.10 with multi-lane support?

Apparently the yocto build has changed again. It used to be linux-imx was built by default, now it looks like linux-fslc is built by default even when I check out NXP's latest harpoon release which was supposed to have 5.10 ... and it does have recipes for 5.10 but 5.4 linux-fslc builds by default so I got some catching up to do to figure out how to select between the various kernels but I'm getting into side issues.

My main need is getting fsl,sai-multi-lane back in linux-fslc 5.10 since we moved away from linux-imx over a year ago.

Hopefully that better explains where I'm coming from and what my issue is.

Regards,

Brian


Link: [1]: https://github.com/Freescale/meta-freescale/blob/348d3a23be97e0d8827d7a4938c85cb6e62f79d5/conf/machine/include/imx-base.inc#L13
Link: [2]: https://github.com/Freescale/meta-freescale/blob/348d3a23be97e0d8827d7a4938c85cb6e62f79d5/conf/machine/include/imx-base.inc#L399
--
Regards,
Andrey.


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Brian Hutchinson
 



On Wed, Oct 27, 2021 at 8:18 AM Fabio Estevam <festevam@...> wrote:
Hi Brian,

On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <b.hutchman@...> wrote:
>
>
>
> On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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.

If you look at the linux-imx 5.10 link I posted before ... they do have the multi-lane support I'm looking for (in sounds/soc/fsl/fsl_sai.c) but kinda don't want to switch back to linux-imx.  So my ask is how can I get linux-fslc 5.10 with multi-lane support?

Apparently the yocto build has changed again.  It used to be linux-imx was built by default, now it looks like linux-fslc is built by default even when I check out NXP's latest harpoon release which was supposed to have 5.10 ... and it does have recipes for 5.10 but 5.4 linux-fslc builds by default so I got some catching up to do to figure out how to select between the various kernels but I'm getting into side issues.

My main need is getting fsl,sai-multi-lane back in linux-fslc 5.10 since we moved away from linux-imx over a year ago.

Hopefully that better explains where I'm coming from and what my issue is.

Regards,

Brian


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Fabio Estevam
 

Hi Brian,

On Tue, Oct 26, 2021 at 11:10 AM Brian Hutchinson <b.hutchman@...> wrote:



On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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/


Re: linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Brian Hutchinson
 



On Tue, Oct 26, 2021 at 10:07 AM Brian Hutchinson via lists.yoctoproject.org <b.hutchman=gmail.com@...> 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


... is the reference I mentioned where I see multi-lane support in linux-imx 5.10.

Regards,

Brian







linux-fsl 5.10 kernels don't appear to have multi-lane in sound/soc/fsl/fsl_sai.c

Brian Hutchinson
 

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



imx 510

Brian Hutchinson
 


Yocto - ModuleNotFoundError: No module named 'Crypto'

Sunidhi Dixit
 

Hello Community,

I am getting one issue  in yocto

I am trying to execute a python script from inside

IMAGE_CMD_tar_append (){

python3 myscript.py

}

getting following errors

from Crypto.PublicKey import RSA
| ModuleNotFoundError: No module named 'Crypto'

 

but if I try same command from command line it works

Please guide!

Thanks


This message contains confidential information and is for the intended recipients. If you are not intended recipients you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender or VOLANSYS (www.volansys.com) therefore does not accept liability for any errors or omissions in the contents of this message.


Re: Linux v5.10 for i.MX8 development

Ankur Tyagi
 

Hello Andrey,

-----Original Message-----
From: Andrey Zhizhikin <andrey.z@...>
Sent: Thursday, 30 September 2021 9:44 PM
To: Ankur Tyagi <Ankur.Tyagi@...>
Cc: meta-freescale@...
Subject: Re: [meta-freescale] Linux v5.10 for i.MX8 development

Hello Ankur,

On Tue, Sep 21, 2021 at 11:43 AM Ankur Tyagi <Ankur.Tyagi@...> wrote:

Hello Andrey,

Hello Ankur,

On Mon, Sep 20, 2021 at 11:30 PM Ankur Tyagi <ankur.tyagi@...> wrote:

Hi,

We are currently using Linux v5.4 for i.MX8 provided by recipe linux-fslc-imx_5.4.bb because as mentioned in recipe as well,
branch "5.4-2.3.x-imx" from repo "linux-fslc" get changes merged from branch "imx_5.4.70_2.3.0" of linux-imx repo
(https://source.codeaurora.org/external/imx/linux-imx/log/?h=imx_5.4.70_2.3.0)

If you're still interested in migrating to the new linux-fslc-imx
kernel, it has been integrated into meta-freescale with this PR:
https://github.com/Freescale/meta-freescale/pull/876

Current recipe now picks up [lf-5.10.52-2.1.0] branch from NXP kernel
repo and has latest stable patch applied.
Thank you so much for your message, indeed interested :-)


Now we are planning to upgrade to Linux v5.10 and here I have few questions:

1. Recipe linux-fslc-lts_5.10.bb doesn't support i.MX8 https://github.com/Freescale/meta-
freescale/blob/325ad529187fb1309b0a889c5196c8df039aeea9/recipes-ke... Neither I can see any merge from NXP linux-imx branch
"lf-5.10.y" into linux-fslc branch "5.10.x+fslc".

When you say that i.MX8 is not supported - to which SoC you're
referring to? Mainline kernel on the [master] branch of this layer
does provide a descent support for all i.MX8M derivatives, but I'm not
entirely sure of the state for i.MX8 family SoC support since I do not
have that HW.
I was referring to COMPATIBLE_MACHINE in linux-fslc-lts_5.10.bb recipe.
It doesn't have mx8 in it (sorry above link is broken)

Can you specify which derivative you're talking about?
We are using i.MX8 Dual core A35

Is there any plan for that merge? If yes, any timeline by which it will happen?
I've looked into updating NXP branch [lf-5.10.y], and it is not
trivial... I'm now short on time to have a full swing of merging the
latest stable update on top of it, but probably would get to this
eventually. If there are any volunteers here that are willing to
undertake this task - this would be really appreciated.

If no, then can I use "imx_v8_defconfig" from linux-imx repo to build kernel using linux-fslc repo?
You can use the `defconfig` file, which is present in the layer to
build [linux-fslc] for i.MX8 machine. It resides in
recipes-kernel/linux/linux-fslc/armv8a/defconfig and is synchronized
with stable kernel release 5.14.

If you however opt-in for [linux-fslc-lts] kernel package, then the
kernel config file would be taken from
recipes-kernel/linux/linux-fslc-lts/armv8a/defconfig, which is also
synchronized with 5.10 from stable.
Thank you for sharing this insight, this is helpful

Are there any specific configuration options you need from
imx_v8_defconfig, which should be present in the defconfig for
mainline recipes?
I haven't done any comparison yet between imx_v8_defconfig from 5.4-2.3.x-imx branch
and mainline defconfig but now I will do that since I know which defconfig is to be used :)

i.MX8 is supported in linux-imx_5.10.bb recipe https://github.com/Freescale/meta-
freescale/blob/325ad529187fb1309b0a889c5196c8df039aeea9/recipes-ke... which is using kernel from branch "lf-5.10.y" provided by
linux-imx repo but this repo is NXP internal and doesn't get updated with stable Linux kernel. It is providing v5.10.35
(https://source.codeaurora.org/external/imx/linux-imx/log/?h=lf-5.10.y)

Correct, but as I've already pointed out - the merge of stable updates
to this kernel base is not trivial... :/

So ideally, just like v5.4 would like to use linux-fslc repo for v5.10 development as well.


Will appreciate any guidance around appropriate repo for v5.10 development for i.MX8
As one of the things to try out: you can switch the BSP flavor to use
"mainline" instead of "nxp", which would take all upstream components
instead of those provided by NXP. Be aware, that if you rely on any
functionality which is present in NXP BSP only (e.g. GPU/VPU) - this
would be unavailable in Mainline BSP.
We don't need GPU/VPU so will try your suggestion to use linux-fslc kernel
and defconfig from linux-fslc-lts/armv8a and see how it goes.

Once again, thanks for your response and suggestions.


thanks
Ankur


--
Regards,
Andrey.
Regards
Ankur
________________________________
This email is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise
us of our error by return e-mail then delete this email and any attached files. You may not copy, disclose or use the contents in any
way. The views expressed in this email may not be those of Gallagher Group Ltd or subsidiary companies thereof.
________________________________


--
Regards,
Andrey.
Regards
Ankur


Re: Linux v5.10 for i.MX8 development

Andrey Zhizhikin
 

Hello Ankur,

On Tue, Sep 21, 2021 at 11:43 AM Ankur Tyagi <Ankur.Tyagi@...> wrote:

Hello Andrey,

Hello Ankur,

On Mon, Sep 20, 2021 at 11:30 PM Ankur Tyagi <ankur.tyagi@...> wrote:

Hi,

We are currently using Linux v5.4 for i.MX8 provided by recipe linux-fslc-imx_5.4.bb because as mentioned in recipe as well, branch "5.4-2.3.x-imx" from repo "linux-fslc" get changes merged from branch "imx_5.4.70_2.3.0" of linux-imx repo (https://source.codeaurora.org/external/imx/linux-imx/log/?h=imx_5.4.70_2.3.0)
If you're still interested in migrating to the new linux-fslc-imx
kernel, it has been integrated into meta-freescale with this PR:
https://github.com/Freescale/meta-freescale/pull/876

Current recipe now picks up [lf-5.10.52-2.1.0] branch from NXP kernel
repo and has latest stable patch applied.


Now we are planning to upgrade to Linux v5.10 and here I have few questions:

1. Recipe linux-fslc-lts_5.10.bb doesn't support i.MX8 https://github.com/Freescale/meta-freescale/blob/325ad529187fb1309b0a889c5196c8df039aeea9/recipes-ke... Neither I can see any merge from NXP linux-imx branch "lf-5.10.y" into linux-fslc branch "5.10.x+fslc".
When you say that i.MX8 is not supported - to which SoC you're
referring to? Mainline kernel on the [master] branch of this layer
does provide a descent support for all i.MX8M derivatives, but I'm not
entirely sure of the state for i.MX8 family SoC support since I do not
have that HW.
I was referring to COMPATIBLE_MACHINE in linux-fslc-lts_5.10.bb recipe.
It doesn't have mx8 in it (sorry above link is broken)

Can you specify which derivative you're talking about?
We are using i.MX8 Dual core A35

Is there any plan for that merge? If yes, any timeline by which it will happen?
I've looked into updating NXP branch [lf-5.10.y], and it is not
trivial... I'm now short on time to have a full swing of merging the
latest stable update on top of it, but probably would get to this
eventually. If there are any volunteers here that are willing to
undertake this task - this would be really appreciated.

If no, then can I use "imx_v8_defconfig" from linux-imx repo to build kernel using linux-fslc repo?
You can use the `defconfig` file, which is present in the layer to
build [linux-fslc] for i.MX8 machine. It resides in
recipes-kernel/linux/linux-fslc/armv8a/defconfig and is synchronized
with stable kernel release 5.14.

If you however opt-in for [linux-fslc-lts] kernel package, then the
kernel config file would be taken from
recipes-kernel/linux/linux-fslc-lts/armv8a/defconfig, which is also
synchronized with 5.10 from stable.
Thank you for sharing this insight, this is helpful

Are there any specific configuration options you need from
imx_v8_defconfig, which should be present in the defconfig for
mainline recipes?
I haven't done any comparison yet between imx_v8_defconfig from 5.4-2.3.x-imx branch
and mainline defconfig but now I will do that since I know which defconfig is to be used :)

i.MX8 is supported in linux-imx_5.10.bb recipe https://github.com/Freescale/meta-freescale/blob/325ad529187fb1309b0a889c5196c8df039aeea9/recipes-ke... which is using kernel from branch "lf-5.10.y" provided by linux-imx repo but this repo is NXP internal and doesn't get updated with stable Linux kernel. It is providing v5.10.35 (https://source.codeaurora.org/external/imx/linux-imx/log/?h=lf-5.10.y)
Correct, but as I've already pointed out - the merge of stable updates
to this kernel base is not trivial... :/

So ideally, just like v5.4 would like to use linux-fslc repo for v5.10 development as well.


Will appreciate any guidance around appropriate repo for v5.10 development for i.MX8
As one of the things to try out: you can switch the BSP flavor to use
"mainline" instead of "nxp", which would take all upstream components
instead of those provided by NXP. Be aware, that if you rely on any
functionality which is present in NXP BSP only (e.g. GPU/VPU) - this
would be unavailable in Mainline BSP.
We don't need GPU/VPU so will try your suggestion to use linux-fslc kernel
and defconfig from linux-fslc-lts/armv8a and see how it goes.

Once again, thanks for your response and suggestions.


thanks
Ankur


--
Regards,
Andrey.
Regards
Ankur
________________________________
This email is confidential and may contain information subject to legal privilege. If you are not the intended recipient please advise us of our error by return e-mail then delete this email and any attached files. You may not copy, disclose or use the contents in any way. The views expressed in this email may not be those of Gallagher Group Ltd or subsidiary companies thereof.
________________________________


--
Regards,
Andrey.


Re: Linux v5.10 for i.MX8 development

Tom Hochstein
 

On Tue, Sep 22, 2021 at 10:25 AM Tim Harvey <tharvey@...> wrote:

Do you have any feedback on the prefix used in the commit messages used in
both uboot-imx repos such as 'MLK', 'MA', 'LFU', 'LF', 'MMFMWK', 'MGS'? An
understanding of those would make it easier for those of us who are working
hard to mainline uboot/linux support.
Hi Tim,

Sure.

MLK - MCU Linux Kernel
MA - MCU Android
LFU - Linux Factory U-boot
LF - Linux Factory
MMFMWK - MultiMedia Framework (guessing on the meaning of FMWK)
MGS - MCU GPU

Tom


Re: Linux v5.10 for i.MX8 development

Tim Harvey
 

On Tue, Sep 21, 2021 at 6:42 PM Tom Hochstein <tom.hochstein@...> wrote:

On Tue, Sep 21, 2021 at 2:10 PM Andrey Zhizhikin <andrey.z@...> wrote:

On Tue, Sep 21, 2021 at 7:11 PM Tim Harvey <tharvey@...> wrote:

Could you explain the difference between NXP's 'lf-' and 'imx-'
branches? I can never understand their branch naming scheme nor their
commit log prefix scheme.
This was always a mystery to me as well... I guess I would need to
make a disclaimer here: I'm neither employed nor affiliated with NXP,
so I cannot answer this. :)

If there is a person from NXP on this list, then perhaps he/she can
comment on this point.
For the 'lf' releases certain shared components like kernel are aligned with other NXP product lines, like QorIQ and s32, not just i.MX.
Tom,

Thanks for this info! Someone else also mentioned to me that the NXP
'lf' releases are typically once every two years vs the 'imx' releases
which are typically quarterly.

Do you have any feedback on the prefix used in the commit messages
used in both uboot-imx repos such as 'MLK', 'MA', 'LFU', 'LF',
'MMFMWK', 'MGS'? An understanding of those would make it easier for
those of us who are working hard to mainline uboot/linux support.

Best regards,

Tim


Re: Linux v5.10 for i.MX8 development

Tom Hochstein
 

On Tue, Sep 21, 2021 at 2:10 PM Andrey Zhizhikin <andrey.z@...> wrote:

On Tue, Sep 21, 2021 at 7:11 PM Tim Harvey <tharvey@...> wrote:

Could you explain the difference between NXP's 'lf-' and 'imx-'
branches? I can never understand their branch naming scheme nor their
commit log prefix scheme.
This was always a mystery to me as well... I guess I would need to
make a disclaimer here: I'm neither employed nor affiliated with NXP,
so I cannot answer this. :)

If there is a person from NXP on this list, then perhaps he/she can
comment on this point.
For the 'lf' releases certain shared components like kernel are aligned with other NXP product lines, like QorIQ and s32, not just i.MX.

Tom

81 - 100 of 24855