Hi, I am doing exactly the same thing.
Using Raspberry Pi 3 - B and following the document NXPNCI Android Porting Guidelines.
Also, the demo image OM5577-PN7120S_Rpi_Linux_demo_v1.2.zip works well too.
2.2.3.1 Device tree
I tried to follow the instructions, and modified /arch/arm/boot/dts/bcm2710-rpi-3-b.dts file
but i got this inside dmesg.
[ 4.259228] i2c i2c-0: Failed to register i2c client pn547 at 0x28 (-16)
[ 4.259251] i2c i2c-0: Can't create device at 0x28
......
[ 88.630261] pn54x_dev_write : i2c_master_send returned -5
[ 88.632645] pn54x_dev_write : i2c_master_send returned -5
[ 88.634940] pn54x_dev_write : i2c_master_send returned -5
[ 88.637216] pn54x_dev_write : i2c_master_send returned -5
[ 88.639491] pn54x_dev_write : i2c_master_send returned -5
[ 88.641805] pn54x_dev_write : i2c_master_send returned -5
so does that means my i2c doesn't set up properly?
what i have done with 2.2.3.2
2.2.3.2 Platform data
void __init bcm2709_init(void)
{
int ret;
vc_cma_early_init();
pm_power_off = bcm2709_power_off;
ret = of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
if (ret) {
pr_err("of_platform_populate failed: %d\n", ret);
BUG();
}
i2c_register_board_info(0, nfc_board_info, ARRAY_SIZE(nfc_board_info));
bcm2709_init_uart1();
system_rev = boardrev;
system_serial_low = serial;
}
###################################################################
here are some more informations.
root@raspberrypi:~# lsmod | grep i2c
pn5xx_i2c 7549 0
i2c_bcm2708 4834 0
i2c_dev 5859 0
root@raspberrypi:~# i2cdetect -y 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- 1c -- -- --
20: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- 43 -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
and of course my ./nfcDemoApp poll not going to work.
#########################################################################################
## NFC demo ##
#########################################################################################
## Poll mode activated ##
#########################################################################################
... press enter to quit ...
NxpFunc: nativeNfcManager_doInitialize: enter; NCI_VERSION=0x10
NxpFunc: NfcAdaptation::Initialize: enter
NxpFunc: NfcAdaptation::Initialize: Overriding NFA_EE_MAX_EE_SUPPORTED to use 1
NxpFunc: NfcAdaptation::NFCA_TASK: enter
NxpFunc: NfcAdaptation::Thread: enter
NxpFunc: Brcm: NFC_TASK started.
NxpFunc: NfcAdaptation::Thread: exit
NxpFunc: NfcAdaptation::InitializeHalDeviceContext: enter
NxpFunc: NfcAdaptation::InitializeHalDeviceContext: exit
NxpFunc: NfcAdaptation::Initialize: exit
NxpFunc: Brcm: nfa_dm_init ()
NxpFunc: Brcm: nfa_sys_register () id=1, enable_cplt_mask=0x0
NxpFunc: Brcm: nfa_sys_register () id=3, enable_cplt_mask=0x8
NxpFunc: Brcm: nfa_sys_register () id=4, enable_cplt_mask=0x18
NxpFunc: Brcm: nfa_snep_init (): is_dta_mode=0
NxpFunc: Brcm: nfa_snep_default_init ()
NxpFunc: Brcm: nfa_sys_register () id=5, enable_cplt_mask=0x38
NxpFunc: Brcm: nfa_rw_init ()
NxpFunc: Brcm: nfa_sys_register () id=6, enable_cplt_mask=0x78
NxpFunc: Brcm: nfa_ce_init ()
NxpFunc: Brcm: nfa_sys_register () id=7, enable_cplt_mask=0xf8
NxpFunc: Brcm: nfa_ee_init ()
NxpFunc: Brcm: nfa_sys_register () id=2, enable_cplt_mask=0xfc
NxpFunc: Brcm: nfa_hci_init ()
NxpFunc: Brcm: nfa_sys_register () id=8, enable_cplt_mask=0x1fc
NxpFunc: Brcm: LLCP - llcp_init ()
NxpFunc: Brcm: num_rx_buff = 9, rx_congest_start = 6, rx_congest_end = 4, max_num_ll_rx_buff = 2
NxpFunc: Brcm: max_num_tx_buff = 21, max_num_ll_tx_buff = 6
NxpFunc: Brcm: LLCP_RegisterServer (): SAP:0x1, link_type:0x2, ServiceName:<urn:nfc:sn:sdp>
NxpFunc: Brcm: LLCP_RegisterServer (): Registered SAP = 0x01
NxpFunc: Brcm: NFA_Enable ()
NxpFunc: Brcm: NFA got event 0x0100
NxpFunc: Brcm: NFA got event 0x0100
NxpFunc: NfcAdaptation::HalOpen
NxpFunc: phNxpLog_InitializeLogLevel: global =0, Fwdnld =0, extns =0, hal =0, tml =0, ncir =0, ncix =0
NxpFunc: NfcAdaptation::HalDeviceContextCallback: event=6
Can you please help me on setting up this?
i think it probably the dts file problem