Colibri imx6ull sdma firmware with kernel 4.14

Dear community, we are moving from kernel 4.9 to kernel 4.14 (the 2.0-imx-next branch) with BSP 2.8.

When I try to use a uart with the new kernel I encounter the following error:

[   16.255365] imx-sdma 20ec000.sdma: sdma firmware not ready!
[   16.260989] imx-uart 21e8000.serial: Prepare for the RX slave dma failed!
[   16.293074] imx-sdma 20ec000.sdma: sdma firmware not ready!
[   16.298702] imx-uart 21e8000.serial: We cannot prepare for the TX slave dma!

Looking at the dmesg I see this:

[    0.219506] imx-sdma 20ec000.sdma: external firmware not found, using ROM firmware

So I try to load the firmware as a module changing the CONFIG_IMX_SDMA=m in defconfig and adding the linux-firmware-imx-sdma-imx6q.

Now it works, but this slow down the boot process, my question is: it is possible to add the sdma firmware in kernel 4.14 as in kernel 4.9? What are the changes to do?

Best,
Stefano.

Hi @Stefano

Thanks for writing to the Toradex Community!

we are moving from kernel 4.9 to kernel 4.14 (the 2.0-imx-next branch) with BSP 2.8.

Could you install the regular Bsp 3.0b2 image?

Now it works, but this slow down the boot process, my question is: it is possible to add the sdma firmware in kernel 4.14 as in kernel 4.9?

How much difference in time did you measure?

Best regards,
Jaski

Hi @jaski.tx ,

Thank you for your answer.

Could you install the regular Bsp 3.0b2 image?

We don’t plan to move the entire BSP, we are using the 2.8 since some months and we test a lot of software with the 2.8. We change kernel because we have some problem with the GPIO that is fixed only in kernel 4.14 for now. If we adopt 3.0b2 will this problem solved? In which kernel version? Eventually we can test 3.0b2 and backport kernel mods, but we prefer to use BSP 2.8 for now.

How much difference in time did you measure?

I don’t have a measure, but you know that loading a module at runtime slow down the boot process.

Best,
Stefano.

We change kernel because we have some problem with the GPIO that is fixed only in kernel 4.14 for now.

Which problem are you talking about?

I don’t have a measure, but you know that loading a module at runtime slow down the boot process.

Yes, but we need to know how much. Additionally you have the choice to build your own custom kernel including whatever you like.

Best regards,
Jaski

Hi @jaski.tx

Which problem are you talking about?

I refer to this comment: link text

Yes, but we need to know how much. Additionally you have the choice to build your own custom kernel including whatever you like.

I know that there is this possibility, but until the 4.9 the toradex kernel more or less match our requirements.

Best,
Stefano.

Hi @Stefano

This is a devicetree change, which you can introduce your self in your custom device-tree. You don’t need to change the complete kernel for this small change.

I know that there is this possibility, but until the 4.9 the toradex kernel more or less match our requirements.

Then you should continue using the kernel 4.9 and your custom devicetree.

Best regards,
Jaski

You are right @jaski.tx , but at the time that I look at the 4.14 I see some commits about the Marvell wifi, since for us is a critical component I prefer to switch to the 4.14 with the idea to have a more stable situation on wifi side.

Then I see that the sdma has changed…

The 4.9 kernel in BSP 2.8 actually uses backports 4.19 while the 4.14 kernel in BSP 3.0b2 is used plain without backports. So you may actually be better off with BSP 2.8.

Hi @jaski.tx

I have the same issue for imx7s. I tried to load the firmware as a module by changing the CONFIG_IMX_SDMA=m in defconfig and adding linux-firmware-imx-sdma-imx7d to my image. However I get the following error:

May 11 06:51:08 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: no iram assigned, using external mem
May 11 06:51:08 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: Falling back to user helper
Jan 01 01:16:18 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:18 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:18 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:18 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:18 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:18 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:21 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:22 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:22 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:22 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:22 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:22 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: sdma firmware not ready!
Jan 01 01:16:28 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware
Jan 01 01:16:28 b2qt-colibri-imx7 kernel: imx-sdma 30bd0000.sdma: external firmware not found, using ROM firmware

I’m moving from BSP v2.8.7 to v3.04.
Best regards,
Michael

Hi @michaelg

Can you find the module under /lib/moduels:

find /lib/modules -name "imx-sdma.*"

And is the firmware really there?

ls /lib/firmware/imx/sdma/sdma-imx6q.bin

Regards,
Stefan

Hi @stefan_e.tx

Thanks for the help. The following patch helped me to solve the issue:
http://git.toradex.com/cgit/linux-toradex.git/commit/?h=toradex_4.14-2.0.x-imx&id=23abfc519183c2e6bc5644206177ef80b79f023e

Best regards,
Michael

Perfect, thanks for the feedback