imx8mm-evk does not boot kernel 5.16

Hi,
I am able to boot Linux 5.15.14 on an imx8mm-evk running U-Boot 2022.01 just fine.
However, if I try to boot a 5.16 kernel, the boot fails in most of the attempts (like in 80% of the boots. It does boot completely in some of the attempts).
Starting kernel ... (hangs here)
Using earlycon I see that it hangs around the imx-sdma driver load: [ 0.681930] imx-sdma 302c0000.dma-controller: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2 [ 0.689628] imx-sdma 302c0000.dma-controller: external firmware not found, using ROM firmware [ 0.689635] imx-sdma 302b0000.dma-controller: external firmware not found, using ROM firmware
Tried to disable the imx-sdma driver and the hang also happens, so it is something else that causes the hang.
If I use U-Boot from NXP the problem does not happen.
I tried to select the imx8m power domain options:
--- a/configs/imx8mm_evk_defconfig +++ b/configs/imx8mm_evk_defconfig @@ -72,6 +72,8 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_POWER_DOMAIN=y +CONFIG_IMX8M_POWER_DOMAIN=y CONFIG_DM_PMIC=y CONFIG_SPL_DM_PMIC_PCA9450=y CONFIG_DM_REGULATOR=y
but it did not help.
The same behavior is seen with the top of tree U-Boot.
Does anyone have any ideas as to what is missing?
Thanks,
Fabio Estevam

Hi Fabio
On Fri, 2022-01-14 at 15:00 -0300, Fabio Estevam wrote:
Hi,
I am able to boot Linux 5.15.14 on an imx8mm-evk running U-Boot 2022.01 just fine.
However, if I try to boot a 5.16 kernel, the boot fails in most of the attempts (like in 80% of the boots. It does boot completely in some of the attempts).
Starting kernel ... (hangs here)
Using earlycon I see that it hangs around the imx-sdma driver load: [ 0.681930] imx-sdma 302c0000.dma-controller: Direct firmware load for imx/sdma/sdma-imx7d.bin failed with error -2 [ 0.689628] imx-sdma 302c0000.dma-controller: external firmware not found, using ROM firmware [ 0.689635] imx-sdma 302b0000.dma-controller: external firmware not found, using ROM firmware
Tried to disable the imx-sdma driver and the hang also happens, so it is something else that causes the hang.
If I use U-Boot from NXP the problem does not happen.
I tried to select the imx8m power domain options:
--- a/configs/imx8mm_evk_defconfig +++ b/configs/imx8mm_evk_defconfig @@ -72,6 +72,8 @@ CONFIG_MII=y CONFIG_PINCTRL=y CONFIG_SPL_PINCTRL=y CONFIG_PINCTRL_IMX8M=y +CONFIG_POWER_DOMAIN=y +CONFIG_IMX8M_POWER_DOMAIN=y CONFIG_DM_PMIC=y CONFIG_SPL_DM_PMIC_PCA9450=y CONFIG_DM_REGULATOR=y
but it did not help.
The same behavior is seen with the top of tree U-Boot.
Does anyone have any ideas as to what is missing?
Strange, remember, I am working on Verdin iMX8M Mini support [1] and run that stuff more or less daily. However, as you can see in that patch series, I build the imx-sdma driver now as a module just like already merged for imx_v6_v7_defconfig. As I also do have an imx8mm-evk laying around somewhere I can give that a try as well. I keep you posted...
[1] https://lore.kernel.org/lkml/20220114141507.395271-1-marcel@ziswiler.com/
Thanks,
Fabio Estevam
Cheers
Marcel

Hi Marcel,
On Fri, Jan 14, 2022 at 3:10 PM Marcel Ziswiler marcel.ziswiler@toradex.com wrote:
Strange, remember, I am working on Verdin iMX8M Mini support [1] and run that stuff more or less daily. However, as you can see in that patch series, I build the imx-sdma driver now as a module just like already merged for imx_v6_v7_defconfig. As I also do have an imx8mm-evk laying around somewhere I can give that a try as well. I keep you posted...
Just noticed that when using the TF-A from NXP: imx-atf branch: imx_5.4.47_2.2.0 the 5.16 kernel boots fine.
When using the mainline TF-A (v2.5 or v2.6) the board hangs with 5.16
Thanks

Hi Fabio
On Fri, 2022-01-14 at 16:44 -0300, Fabio Estevam wrote:
Hi Marcel,
On Fri, Jan 14, 2022 at 3:10 PM Marcel Ziswiler marcel.ziswiler@toradex.com wrote:
Strange, remember, I am working on Verdin iMX8M Mini support [1] and run that stuff more or less daily. However, as you can see in that patch series, I build the imx-sdma driver now as a module just like already merged for imx_v6_v7_defconfig. As I also do have an imx8mm-evk laying around somewhere I can give that a try as well. I keep you posted...
Just noticed that when using the TF-A from NXP: imx-atf branch: imx_5.4.47_2.2.0 the 5.16 kernel boots fine.
I am always using imx_5.4.47_2.3.0 resp. for our board our fork thereof which defaults to a different UART.
When using the mainline TF-A (v2.5 or v2.6) the board hangs with 5.16
I have to admit that I never tried mainline TF-A so far.
Thanks
Thank you.
Cheers
Marcel

On 14.01.22 20:44, Fabio Estevam wrote:
Hi Marcel,
On Fri, Jan 14, 2022 at 3:10 PM Marcel Ziswiler marcel.ziswiler@toradex.com wrote:
Strange, remember, I am working on Verdin iMX8M Mini support [1] and run that stuff more or less daily. However, as you can see in that patch series, I build the imx-sdma driver now as a module just like already merged for imx_v6_v7_defconfig. As I also do have an imx8mm-evk laying around somewhere I can give that a try as well. I keep you posted...
Just noticed that when using the TF-A from NXP: imx-atf branch: imx_5.4.47_2.2.0 the 5.16 kernel boots fine.
When using the mainline TF-A (v2.5 or v2.6) the board hangs with 5.16
I remember having lockup issues with the mainline TF-A and i.MX8MM when it came to power domain handling (with older kernels and preliminary power domain support). I never tracked this down, but switched to the NXP TF-A for the time being.
IIRC the mainline TF-A doesn't enable the USB power domains per default, while the NXP TF-A does and there are probably other differences. With the latest GPCv2 and BLK-CTRL code in the kernel it should work either way, but there still might be some unresolved problems.

On Fri, Jan 14, 2022 at 11:44 AM Fabio Estevam festevam@gmail.com wrote:
Hi Marcel,
On Fri, Jan 14, 2022 at 3:10 PM Marcel Ziswiler marcel.ziswiler@toradex.com wrote:
Strange, remember, I am working on Verdin iMX8M Mini support [1] and run that stuff more or less daily. However, as you can see in that patch series, I build the imx-sdma driver now as a module just like already merged for imx_v6_v7_defconfig. As I also do have an imx8mm-evk laying around somewhere I can give that a try as well. I keep you posted...
Just noticed that when using the TF-A from NXP: imx-atf branch: imx_5.4.47_2.2.0 the 5.16 kernel boots fine.
When using the mainline TF-A (v2.5 or v2.6) the board hangs with 5.16
Interesting. Can you give us a breakdown of pros and cons of using mainline TF-A vs NXP's? I'm not clear if NXP has been actively pushing their changes up or not and haven't had time to follow the commits for either project.
Best regards,
Tim

Hi Tim,
On Mon, Jan 17, 2022 at 2:09 PM Tim Harvey tharvey@gateworks.com wrote:
Interesting. Can you give us a breakdown of pros and cons of using mainline TF-A vs NXP's? I'm not clear if NXP has been actively pushing their changes up or not and haven't had time to follow the commits for either project.
I am not following TF-A i.MX development in upstream, so I cannot comment myself.
Added Jacky on Cc, who is involved with i.MX TF-A development and could probably explain.

Subject: Re: imx8mm-evk does not boot kernel 5.16
Hi Tim,
On Mon, Jan 17, 2022 at 2:09 PM Tim Harvey tharvey@gateworks.com wrote:
Interesting. Can you give us a breakdown of pros and cons of using mainline TF-A vs NXP's? I'm not clear if NXP has been actively pushing their changes up or not and haven't had time to follow the commits for either project.
I will check what's wrong, the mainline TF-A should work before. Although there's some code gap between downstream vs upstream, the basic function should be ok before, and some community guys have used it for their project for a while.
BR Jacky Bai
I am not following TF-A i.MX development in upstream, so I cannot comment myself.
Added Jacky on Cc, who is involved with i.MX TF-A development and could probably explain.
participants (5)
-
Fabio Estevam
-
Frieder Schrempf
-
Jacky Bai
-
Marcel Ziswiler
-
Tim Harvey