AnsweredAssumed Answered

Porting pn54x driver to Raspberry Pi 3

Question asked by Sangdo Lee on Oct 19, 2016
Latest reply on Feb 2, 2017 by Jason Wu

Hi,

I have tested OM5577, NFC developing kit, using rasberry pi linux demo image from NXP. It works well.

 

I want to make new raspberry pi OS image.

 

I did port pn54x i2c driver to new image according to NXP porting guide(PN71x0 Linux Software Stack Integration Guidelines), changing device tree and platform data, interrupt and ven port to GPIO 23 and 24.

 

&i2c{ status = "okay"; pn547: pn547@28 {

compatible = "nxp,pn547";

reg = <0x28>; clock-frequency = <400000>;

interrupt-gpios = <&gpio 23 0>;

enable-gpios = <&gpio 23 0>; };

};

 

static struct pn544_i2c_platform_data nfc_pdata = {

.irq_gpio = GPIO_TO_PIN(1,23),

.ven_gpio = GPIO_TO_PIN(0,24),

.firm_gpio = GPIO_UNUSED

.clkreq_gpio = GPIO_UNUSED };

 

static struct i2c_board_info __initdata nfc_board_info[] = { { I2C_BOARD_INFO("pn547", 0x28), .platform_data = &nfc_pdata, }, };

 

But, "nfcDemo poll" is not working at all.

 

PN7120 seems to be installed on 28 properly, I think.

 

raspberrypi:/dev# i2cdetect -l
i2c-1 i2c 3f804000.i2c I2C adapter
raspberrypi:/dev#
raspberrypi:/dev#
raspberrypi:/dev# lsmod | grep i2c
pn5xx_i2c 7587 0
i2c_dev 6372 0
i2c_bcm2708 4948 0
raspberrypi:/dev#
raspberrypi:/dev#
raspberrypi:/dev# sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: — — — — — — — — — — — — —
10: — — — — — — — — — — — — — — — —
20: — — — — — — — — UU — — — — — — —
30: — — — — — — — — — — — — — — — —
40: — — — — — — — — — — — — — — — —
50: — — — — — — — — — — — — — — — —
60: — — — — — — — — — — — — — — — —
70: — — — — — — — —
raspberrypi:/dev# ls -al pn544
crw-rw-rw- 1 root root 10, 58 Oct 19 17:28 pn544

 

Is there anyone who have done porting to new image?

Let me know how I have to...

 

BR

Paul

Outcomes