Blueboard_PNEV12B with i.MX7D Processor (I2C)

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

Blueboard_PNEV12B with i.MX7D Processor (I2C)

614 Views
janinest
Contributor I

I have the Blueboard_PNEV12B connected over I2C to a i.MX7D Processor running embedded Linux with Kernel version 4.9. 

I would like to know the recommended approach to get the two talking to one another.

I read several options online but I am unsure which is the correct one to pursue. There are examples using the nxp-pn5xx kernel driver together with linux_libnfc-nci. But I am unsure if this solution also works for the PN512? Another option might be using the NFC Reader Library for Linux. But as far as I can tell the only supported communication would be through SPI?

Any help would be really appreciated. Thank you.

Labels (1)
Tags (1)
0 Kudos
3 Replies

526 Views
janinest
Contributor I

Hi Igor

thank you for your response. I followed the tutorial but had to do several modifications:

nxp-pn5xx: I am unable to register my device "PN512", in order to get an entry under /dev/pn5** I had to use pn547.

like in the example. I get the following entries on my imx7 searching for "pn5" so this seemed to work.

./dev/pn544
./etc/libnfc-nxp-pn547.conf
./etc/libnfc-nxp-pn548.conf
./lib/modules/4.9.144+g5758a8e/kernel/drivers/misc/nxp-pn5xx
./lib/modules/4.9.144+g5758a8e/kernel/drivers/misc/nxp-pn5xx/pn5xx_i2c.ko
./sys/kernel/debug/regulator/reg-dummy-regulator-dummy/2-0028-nxp,pn54x-sevdd
./sys/kernel/debug/regulator/reg-dummy-regulator-dummy/2-0028-nxp,pn54x-pmuvcc
./sys/kernel/debug/regulator/reg-dummy-regulator-dummy/2-0028-nxp,pn54x-vbat
./sys/kernel/debug/regulator/reg-dummy-regulator-dummy/2-0028-nxp,pn54x-pvdd
./sys/devices/platform/reg-dummy/regulator/regulator.0/2-0028-nxp,pn54x-vbat
./sys/devices/platform/reg-dummy/regulator/regulator.0/2-0028-nxp,pn54x-sevdd
./sys/devices/platform/reg-dummy/regulator/regulator.0/2-0028-nxp,pn54x-pvdd
./sys/devices/platform/reg-dummy/regulator/regulator.0/2-0028-nxp,pn54x-pmuvcc
./sys/devices/virtual/misc/pn544
./sys/class/misc/pn544
./sys/firmware/devicetree/base/soc/aips-bus@30800000/i2c@30a40000/pn547@28
./sys/bus/i2c/drivers/pn544
./sys/module/pn5xx_i2c
./sys/module/pn5xx_i2c/drivers/i2c:pn544
./var/lib/opkg/info/kernel-module-pn5xx-i2c-4.9.144+g5758a8e.postrm
./var/lib/opkg/info/kernel-module-pn5xx-i2c-4.9.144+g5758a8e.list
./var/lib/opkg/info/kernel-module-pn5xx-i2c-4.9.144+g5758a8e.control
./var/lib/opkg/info/kernel-module-pn5xx-i2c-4.9.144+g5758a8e.postinst
./proc/irq/115/pn547

I am also able to compile the NFC Library and to install the library files to my BSP. I can run the "nfcDemoApp poll" and here is the output of the program:

root@colibri-imx7:/# nfcDemoApp poll
#########################################################################################
## [ 1445.549368] pn54x_dev_open : 10,55
[ 1445.555054] pn54x_dev_ioctl, cmd=1074063617, arg=1
NFC demo [ 1445.562590] pn544_enable power on
##
#########################################################################################
## Poll mode activated ##
#########################################################################################
... press enter to quit ...

[ 1445.782844] pn54x_dev_ioctl, cmd=1074063617, arg=0
[ 1445.787666] pn544_disable power off
[ 1446.002864] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1446.007685] pn544_enable power on
[ 1447.126082] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1447.130927] pn544_enable power on
[ 1447.352891] pn54x_dev_ioctl, cmd=1074063617, arg=0
[ 1447.357708] pn544_disable power off
[ 1447.582857] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1447.587678] pn544_enable power on
[ 1448.705237] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1448.710062] pn544_enable power on
[ 1448.932848] pn54x_dev_ioctl, cmd=1074063617, arg=0
[ 1448.937666] pn544_disable power off
[ 1449.152835] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1449.157655] pn544_enable power on
[ 1450.275176] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1450.280001] pn544_enable power on
[ 1450.502798] pn54x_dev_ioctl, cmd=1074063617, arg=0
[ 1450.507618] pn544_disable power off
[ 1450.722843] pn54x_dev_ioctl, cmd=1074063617, arg=1
[ 1450.727662] pn544_enable power on

Observing the I2C bus with a MSO I can see bytes being written to the PN512, but the PN512 is not responding.

In the document

https://community.nxp.com/docs/DOC-329733

There is a discussion open if the pn544 is able to use the linux_libnfc-nci library. Does this apply for the PN512 as well?

Best regards,

Janine

0 Kudos

526 Views
igorpadykov
NXP Employee
NXP Employee

Hi Janine

unfortunately this part is not officially supported in nxp bsps,

for help with its integration may be recommended to proceed with

 Commercial Support and Engineering Services | NXP 

Best regards
igor

0 Kudos

526 Views
igorpadykov
NXP Employee
NXP Employee

Hi Janine

one can look at below link and try to reuse it for i.MX7D

NFC PN7120 on the i.MX6Q 

nfc with i2c :

GitHub - NXPNFCLinux/nxp-pn5xx: NXP's NFC Open Source Kernel mode driver 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos