IMX8MP CAAM driver failed to acquire DECO 0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX8MP CAAM driver failed to acquire DECO 0

1,513 Views
aleksandaratanasovski
Contributor I

Hi everyone,

I am using IMX8MP SoC with kernel 5.10.35 but unfortunately not able to get CAAM module working.

From console (during boot or when modprobe caam module) I am getting the following output:

root@ivoclar:~# dmesg | grep crypto
[ 6.264011] caam 30900000.crypto: Entropy delay = 3200
[ 6.334394] caam 30900000.crypto: failed to acquire DECO 0
[ 6.334627] caam 30900000.crypto: failed to instantiate RNG

I debug drivers/crypro/caam/ctrl.c and found in run_descriptor_deco0  reading both DECO_RSR and DECO_RQ returns 0x00000000.

I also tried reading these registers from devmem2.

Is there anything specific I should configure/enable to make caam initialization successful ?

I double checked kernel configuration, device tree and driver instantiation and everything is aligned with the NXP Linux Reference Manual and Security Reference Manual documentation.

Thanks.

 

0 Kudos
Reply
4 Replies

1,405 Views
v-bertin
Contributor II

Hello aleksandaratanasovski,

We faced the exact same issue a few weeks ago and we manage to solve it.

The issue does not come from the kernel but from U-Boot. We found out that using an older BSP with kernel 5.4.70 and U-Boot v2020.04, we don't have this issue anymore.

We compared U-Boot v2020.04 and U-Boot v2021.04 and found out that in the newest version the RNG hardware module initialization code has been simply removed.

Technically speaking, here is what to modify in U-Boot source :

Add a call to caam_open() at SoC registering (arch/arm/mach-imx/imx8m/soc.c: int arch_cpu_init(void)). (it should not be there)

CAAM driver (fsl_caam.c) is not compiled : enable it in drivers/crypto/Makefile.

Hope it will help !

0 Kudos
Reply

1,468 Views
Harvey021
NXP TechSupport
NXP TechSupport

Hi @aleksandaratanasovski 

I've tested the same with BSP 5.10.35, No such problem.

I've dumped .config file for kernel, you can take a check for comparation. 

Best regards

Harvey

 

0 Kudos
Reply

1,458 Views
aleksandaratanasovski
Contributor I

Hi Harvey,

Thanks for your answer.

I identified some differences I have in my config file comparing to the config.gz you gave me.

Then I apply these changes in my config to have the same configuration.

Unfortunately, it still doesn't work.

 

Is there anything in SoC config from system level or device tree, or even U-Boot that could cause CAAM registers access issue (that produces DECO 0 error) ?

 

 

0 Kudos
Reply

868 Views
AN7
Contributor I

Hi,

Did you able to solve this one? as i was also getting same error.

If you solve it , Please post it.

 

Thanks

0 Kudos
Reply