[Xperia Z2 Q&A, Help & Troubleshooting] rampage101:
Hi guys,

Having trouble with NFC. Recently flashed to Lollipop (Sony stock .690 or whatever it is) and that's where I first noticed it not working. Now back to CM12.1 and it starts enabling then goes back to off. Same with multiple old CM12 build (which at least one of which worked in the past).

Logs that seem relevant:

04-05 14:39:57.547 I/NfcService(1525): Enabling NFC
04-05 14:39:57.547 D/BrcmNfcJni(1525): nfcManager_doInitialize: enter; ver=NFCDROID-AOSP_L_00.01 nfa=NFA_PI_1.03.66+ NCI_VERSION=0x10
04-05 14:39:57.547 D/BrcmNfcJni(1525): PowerSwitch::initialize: level=PS-FULL (1)
04-05 14:39:57.547 D/NfcAdaptation(1525): bool CNfcConfig::readConfig(const char*, bool) Opened base config /etc/libnfc-brcm.conf
04-05 14:39:57.567 D/NfcAdaptation(1525): const CNfcParam* CNfcConfig::find(const char*) const found SCREEN_OFF_POWER_STATE=(0x1)
04-05 14:39:57.567 D/BrcmNfcJni(1525): PowerSwitch::initialize: desired screen-off state=1
04-05 14:39:57.567 D/NfcAdaptation(1525): NfcAdaptation::Initialize: enter
04-05 14:39:57.567 E/NfcAdaptation(1525): NfcAdaptation::Initialize: ver=NFCDROID-AOSP_L_00.01 nfa=NFA_PI_1.03.66+
04-05 14:39:57.567 D/NfcAdaptation(1525): const CNfcParam* CNfcConfig::find(const char*) const found NFA_STORAGE=/data/nfc
04-05 14:39:57.567 D/NfcAdaptation(1525): const CNfcParam* CNfcConfig::find(const char*) const found PROTOCOL_TRACE_LEVEL=(0xFFFFFFFF)
04-05 14:39:57.567 D/NfcAdaptation(1525): const CNfcParam* CNfcConfig::find(const char*) const found APPL_TRACE_LEVEL=(0xFF)
04-05 14:39:57.567 D/BrcmNfcJni(1525): initializeGlobalAppLogLevel: level=5
04-05 14:39:57.567 D/ (1525): verify_stack_non_volatile_store
04-05 14:39:57.567 D/NfcNciHal(1525): crcChecksumVerifyIntegrity: filename=/data/nfc/nfaStorage.bin1
04-05 14:39:57.567 D/NfcNciHal(1525): crcChecksumVerifyIntegrity: filename=/data/nfc/nfaStorage.bin2
04-05 14:39:57.567 D/NfcNciHal(1525): crcChecksumVerifyIntegrity: filename=/data/nfc/nfaStorage.bin3
04-05 14:39:57.567 D/NfcNciHal(1525): crcChecksumVerifyIntegrity: filename=/data/nfc/nfaStorage.bin4
04-05 14:39:57.567 D/NfcNciHal(1525): crcChecksumVerifyIntegrity: filename=/data/nfc/nfaStorage.bin5
04-05 14:39:57.567 D/NfcAdaptation(1525): const CNfcParam* CNfcConfig::find(const char*) const found PRESERVE_STORAGE=(0x1)
04-05 14:39:57.567 D/NfcAdaptation(1525): Initialize: preserve stack NV store
04-05 14:39:57.567 D/NfcAdaptation(1525): NfcAdaptation::NFCA_TASK: enter
04-05 14:39:57.567 I/BrcmNfcNfa(1525): GKI_run(): Start/Stop GKI_timer_update_registered!
04-05 14:39:57.567 D/NfcAdaptation(1525): NfcAdaptation::Thread: enter
04-05 14:39:57.577 I/BrcmNfcNfa(1525): NFC_TASK started.
04-05 14:39:57.577 D/NfcAdaptation(1525): NfcAdaptation::Thread: exit
04-05 14:39:57.577 D/NfcAdaptation(1525): NfcAdaptation::InitializeHalDeviceContext: enter
04-05 14:39:57.577 D/NfcAdaptation(1525): const CNfcParam* CNfcConfig::find(const char*) const found NCI_HAL_MODULE=nfc_nci.pn54x
04-05 14:39:57.577 D/NxpNfcNciHal(1525): nfc_open: enter; name=nci
04-05 14:39:57.577 D/NxpNfcNciHal(1525): nfc_open: exit 0
04-05 14:39:57.577 D/NfcAdaptation(1525): NfcAdaptation::InitializeHalDeviceContext: exit
04-05 14:39:57.577 D/NfcAdaptation(1525): NfcAdaptation::Initialize: exit
04-05 14:39:57.577 I/BrcmNfcNfa(1525): NFA_Init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_dm_init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_sys_register () id=1, enable_cplt_mask=0x0
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_p2p_init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_sys_register () id=3, enable_cplt_mask=0x8
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_rw_init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_sys_register () id=6, enable_cplt_mask=0x4
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_ce_init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_sys_register () id=7, enable_cplt_mask=0xc8
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_ee_init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_sys_register () id=2, enable_cplt_mask=0xcc
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_hci_init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_sys_register () id=8, enable_cplt_mask=0x1cc
04-05 14:39:57.577 I/BrcmNfcNfa(1525): LLCP - llcp_init ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): num_rx_buff = 9, rx_congest_start = 6, rx_congest_end = 4, max_num_ll_rx_buff = 2
04-05 14:39:57.577 I/BrcmNfcNfa(1525): max_num_tx_buff = 21, max_num_ll_tx_buff = 6
04-05 14:39:57.577 I/BrcmNfcNfa(1525): LLCP_RegisterServer (): SAP:0x1, link_type:0x2, ServiceName:<urn:nfc:sn:sdp>
04-05 14:39:57.577 I/BrcmNfcNfa(1525): LLCP_RegisterServer (): Registered SAP = 0x01
04-05 14:39:57.577 I/BrcmNfcNfa(1525): NFA_Enable ()
04-05 14:39:57.577 D/NfcAdaptation(1525): const CNfcParam* CNfcConfig::find(const char*) const found APPL_TRACE_LEVEL=(0xFF)
04-05 14:39:57.577 D/BrcmNfcJni(1525): initializeGlobalAppLogLevel: level=5
04-05 14:39:57.577 I/BrcmNfcNfa(1525): NFC_SetTraceLevel () new_level = 5
04-05 14:39:57.577 I/BrcmNfcNfa(1525): NFA got event 0x0100
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_dm_evt_hdlr event: NFA_DM_API_ENABLE_EVT (0x00)
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfa_dm_enable ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): NFC_Enable ()
04-05 14:39:57.577 I/BrcmNfcNfa(1525): nfc_set_state 0 (NONE)->1 (W4_HAL_OPEN)
04-05 14:39:57.577 D/NfcAdaptation(1525): NfcAdaptation::HalOpen
04-05 14:39:57.597 D/ (1525): phNxpLog_InitializeLogLevel: global =1, Fwdnld =1, extns =1, hal =1, tml =1, ncir =1, ncix =1
04-05 14:39:57.597 E/NxpTml (1525): _i2c_open() Failed: retval ffffffff
04-05 14:39:57.597 E/NxpHal (1525): phTmlNfc_Init Failed
04-05 14:39:57.597 D/NfcAdaptation(1525): NfcAdaptation::HalDeviceContextCallback: event=0
04-05 14:39:57.597 I/BrcmNfcNfa(1525): nfc_main_hal_cback event: HAL_NFC_OPEN_CPLT_EVT(0x0), status=1
04-05 14:39:57.597 I/BrcmNfcNfa(1525): nfc_main_handle_hal_evt(): HAL event=0x0
04-05 14:39:57.597 I/BrcmNfcNfa(1525): nfc_set_state 1 (W4_HAL_OPEN)->0 (NONE)
04-05 14:39:57.597 I/BrcmNfcNfa(1525): nfa_dm_nfc_response_cback () NFC_ENABLE_REVT(0x5000)
04-05 14:39:57.597 D/BrcmNfcJni(1525): nfaDeviceManagementCallback: enter; event=0x0
04-05 14:39:57.597 D/BrcmNfcJni(1525): nfaDeviceManagementCallback: NFA_DM_ENABLE_EVT; status=0x3
04-05 14:39:57.597 E/BrcmNfcJni(1525): nfcManager_doInitialize: fail nfa enable; error=0x0
04-05 14:39:57.597 D/NfcAdaptation(1525): NfcAdaptation::Finalize: enter
04-05 14:39:58.507 I/BrcmNfcNfa(1525): GKI TASK_DEAD received. exit thread 3...
04-05 14:39:58.607 D/NfcAdaptation(1525): NfcAdaptation::Finalize: exit
04-05 14:39:58.607 D/BrcmNfcJni(1525): nfcManager_doInitialize: exit
04-05 14:39:58.607 W/NfcService(1525): Error enabling NFC
04-05 14:39:58.607 D/NfcAdaptation(1525): NfcAdaptation::NFCA_TASK: exi