Apalis TK1 - Apalis-TK1-K20 SPI1.1 Unsupported Firmware Version

I’m currently testing our new Easy Installer package on a number of Apalis TK1 V1.2A boards.

I have two TK1 modules on our own custom carrier which are working perfectly however there are 3 modules which are not behaving as expected, showing the following error during boot:

[ 8.200519] apalis-tk1-k20 spi1.1: Unsupported firmware version in both the device as well as the local firmware file.

This message is not displayed on the two working boards.

When I do an lsmod, I can see that there are less modules loaded because of the above error.

Module                  Size  Used by
rfcomm                 32871  0
iwlmvm                 86577  0
bnep                    9471  2
mac80211              347784  1 iwlmvm
apalis_tk1_k20         11238  0
bluetooth             267636  10 bnep,rfcomm
iwlwifi                73722  1 iwlmvm
cfg80211              348993  3 iwlwifi,mac80211,iwlmvm
nvhost_vi               2873  0

The console dump is here

I’ve compared the console output of this module to a fully working one and the output is nearly identical (just some things are re-ordered)

I’ve since taken the Toradex provided Easy Installer package for the TK1 and loaded it onto one of the problematic TK1 modules (apalis-tk1_l4t-image-tezi_21-7-2-8b3.tar).

Turns out, it is still problematic.

Here is the console dump for this one.

I believe we may have forgotten to update resp. /lib/firmware files in the mentioned L4T image. Just copy them e.g. from the regular LXDE image. OK?

Hi @marcel.tx, what’s strange is that I’ve used exactly the same image on these modules - some are working and some aren’t. I’ve checked the /lib/firmware folder and the apalis-tk1-k20.bin file is present.

Why would some modules work OK and others not?

Probably depends what was programmed on them before. The Kinetis K20 is a flash microcontroller which keeps its firmware once programmed. However, the Linux kernel module driver needs to match resp. firmware. But it fails updating now due to the /lib/firmware file not matching. If it is already at the proper level it does not matter that the/lib/firmware file is wrong.

Understood.

Is there any way of determining what the firmware version of the K20 is compared to the local file?

I’ve tried to force the reloading of firmware onto the K20 however, it doesn’t seem to do so.

If I try to first erase the device, I get the following error:

[  333.084147] of_get_named_gpio_flags exited with status 222
[  333.085564] of_get_named_gpio_flags exited with status 178
[  333.085640] of_get_named_gpio_flags exited with status 74
[  333.116971] apalis-tk1-k20 spi1.1: Unsupported firmware version in both the device as well as the local firmware file.
[  333.135910] apalis-tk1-k20: probe of spi1.1 failed with error -524

And then if I try reloading the module:

root@tegra-ubuntu:/lib/modules/3.10.40-g14dce90ee254/kernel/drivers/mfd# insmod apalis-tk1-k20.ko force_fw_reload=1
[  333.116971] apalis-tk1-k20 spi1.1: Unsupported firmware version in both the device as well as the local firmware file.

Ok, so if I do the following:

cp /lib/firmware/apalis-tk1-k20.bin /lib/firmware/apalis-tk1-k20.bin2
dd if=/dev/zero of=/lib/firmware/apalis-tk1-k20.bin bs=1 count=1
sudo reboot

Then at start up, I can see the following:

[   10.708583] apalis-tk1-k20 spi1.1: Chip fully erased.

But, if I now restore the firmware as follows:

mv /lib/firmware/apalis-tk1-k20.bin2 /lib/firmware/apalis-tk1-k20.bin
sudo reboot

The following message still appears:

[    9.422990] apalis-tk1-k20 spi1.1: Unsupported firmware version in both the device as well as the local firmware file.

Almost, at the last step just take the updated firmware file from the regular LXDE image.

Ok, I shall give that a go.

Thanks @marcel.tx - your Christmas card is in the post :slight_smile:

You are very welcome.

Just to add, this all now works perfectly.

No more complaints about the K20 firmware in the console.

Thanks for your feedback and sorry again that we messed it up with that L4T image.