A71CH on i.MX8

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

A71CH on i.MX8

1,064 Views
jose_au_zone
Contributor II

Hello! Is there any support for the A71CH for the i.MX8 family?

I found a similar question here, but it is from more than one year ago.

I downloaded the software package for the A71CH and was able to extract the needed pieces of code and cross compile it and test in a i.MX8 processor.

But the ioctl call in the file i2c_a7.c inside the function axI2CWriteRead is always returning an error.

Here's the error:

 

 

I2CInit: opening /dev/i2c-2
I2C driver: PEC flag cleared
I2C driver supports plain i2c-level commands.
I2C driver supports Read Block.
I2CInit: opening /dev/i2c-2
I2C driver: PEC flag cleared
I2C driver supports plain i2c-level commands.
I2C driver supports Read Block.
TX (1 byte): 07
axI2CWriteRead: ioctl cmd I2C_RDWR fails with value -1 (errno = 71)
axI2CWriteRead (Errorstring): Protocol error

 

 

 

In this part of the code, I'm trying to read the status of the device (that's why the TX byte is 7 accordingly to the value established in the section 13.9 of the AN12207 document) 
But the ioctl call always fails

I extracted one of the pages of the docs to PDF and attached in this post 

There is a line in this page that says:

"The bottom layer deals with the specific hardware of the I2C controller and is specific to the processor or board used, it is called the ‘I2C bus driver’. In case of the MCIMX6UL-EVK board the bus driver is contained in a file called ‘i2c-imx.c’."

Would that mean that maybe the i2c driver for the Linux distro that I'm using is not compatible with the Smart Card protocol, and that's why the ioctl is always failing?
I'm also attaching the i2c_a7.c file that I'm using in case it helps

Thank you so much!

Labels (1)
0 Kudos
3 Replies

1,024 Views
jose_au_zone
Contributor II

Thanks, but I'm still having the same problem with this demo code as well. I used the low level code in the the file: "SE-PLUG-TRUST-MW\simw-top\hostlib\hostLib\platform\linux\i2c_a7.c"

The error code is:

"axI2CWriteRead: ioctl cmd I2C_RDWR fails with value -1 (errno: 0x00000047)
Errorstring: : Protocol error
axI2CWriteRead: ioctl error (errno = 71)"

71 is the EPROTO error as one can see here 

And it is explained here 

I found a similar problem on stack overflow:

https://stackoverflow.com/questions/55228873/variable-sized-i2c-reads-raspberry/66496084#66496084

But the Linux version that I'm using supports SMBUS_READ_DATA, the code checks this at the beginning
I'm basing my code on this repo: https://github.com/KMOGAKI/A71CH-GET

You can see the check at i2c_a7.c:84 and I get the message "I2C driver supports Read Block"

It looks like something related to how the i2c driver handles the SMBUS protocol and I'm running out of ideas, because I should be able to do that without hacking the i2c driver

 

Thanks!

0 Kudos

1,017 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @jose_au_zone ,

 

Did you follow the steps in SE-PLUG-TRUST-MW/simw-top/doc/dev-platforms/platform_imx8_linux.html? Please also refer to SE-PLUG-TRUST-MW/simw-top/doc/a71ch/a71ch_miscellaneous.html for more details.

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos

1,036 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello @jose_au_zone ,

 

The latest MW for SE050 also support A71CH as well as i.MX 8MQuad, please kindly refer to the following for details.

imx8 demo for A71ch.png

You may have the MW from the following link:

https://www.nxp.com/products/security-and-authentication/authentication/edgelock-se050-plug-trust-se...

 

Hope that helps,

 

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos