Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFC: port100: Add support for type 4B tag

This patch adds support for ISO-DEP protocol over NFC-B rf technology
by adding NFC_PROTO_ISO14443_B to the supported protocols and an entry
for framing configuration.

Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Thierry Escande and committed by
Samuel Ortiz
09592ccf ef1b075c

+35 -1
+35 -1
drivers/nfc/port100.c
··· 28 28 NFC_PROTO_MIFARE_MASK | \ 29 29 NFC_PROTO_FELICA_MASK | \ 30 30 NFC_PROTO_NFC_DEP_MASK | \ 31 - NFC_PROTO_ISO14443_MASK) 31 + NFC_PROTO_ISO14443_MASK | \ 32 + NFC_PROTO_ISO14443_B_MASK) 32 33 33 34 #define PORT100_CAPABILITIES (NFC_DIGITAL_DRV_CAPS_IN_CRC | \ 34 35 NFC_DIGITAL_DRV_CAPS_TG_CRC) ··· 121 120 #define PORT100_COMM_TYPE_IN_212F 0x01 122 121 #define PORT100_COMM_TYPE_IN_424F 0x02 123 122 #define PORT100_COMM_TYPE_IN_106A 0x03 123 + #define PORT100_COMM_TYPE_IN_106B 0x07 124 124 125 125 static const struct port100_in_rf_setting in_rf_settings[] = { 126 126 [NFC_DIGITAL_RF_TECH_212F] = { ··· 141 139 .in_send_comm_type = PORT100_COMM_TYPE_IN_106A, 142 140 .in_recv_set_number = 15, 143 141 .in_recv_comm_type = PORT100_COMM_TYPE_IN_106A, 142 + }, 143 + [NFC_DIGITAL_RF_TECH_106B] = { 144 + .in_send_set_number = 3, 145 + .in_send_comm_type = PORT100_COMM_TYPE_IN_106B, 146 + .in_recv_set_number = 15, 147 + .in_recv_comm_type = PORT100_COMM_TYPE_IN_106B, 144 148 }, 145 149 /* Ensures the array has NFC_DIGITAL_RF_TECH_LAST elements */ 146 150 [NFC_DIGITAL_RF_TECH_LAST] = { 0 }, ··· 347 339 }, 348 340 [NFC_DIGITAL_FRAMING_NFC_DEP_ACTIVATED] = { 349 341 { PORT100_IN_PROT_END, 0 }, 342 + }, 343 + [NFC_DIGITAL_FRAMING_NFCB] = { 344 + { PORT100_IN_PROT_INITIAL_GUARD_TIME, 20 }, 345 + { PORT100_IN_PROT_ADD_CRC, 1 }, 346 + { PORT100_IN_PROT_CHECK_CRC, 1 }, 347 + { PORT100_IN_PROT_MULTI_CARD, 0 }, 348 + { PORT100_IN_PROT_ADD_PARITY, 0 }, 349 + { PORT100_IN_PROT_CHECK_PARITY, 0 }, 350 + { PORT100_IN_PROT_BITWISE_AC_RECV_MODE, 0 }, 351 + { PORT100_IN_PROT_VALID_BIT_NUMBER, 8 }, 352 + { PORT100_IN_PROT_CRYPTO1, 0 }, 353 + { PORT100_IN_PROT_ADD_SOF, 1 }, 354 + { PORT100_IN_PROT_CHECK_SOF, 1 }, 355 + { PORT100_IN_PROT_ADD_EOF, 1 }, 356 + { PORT100_IN_PROT_CHECK_EOF, 1 }, 357 + { PORT100_IN_PROT_DEAF_TIME, 4 }, 358 + { PORT100_IN_PROT_CRM, 0 }, 359 + { PORT100_IN_PROT_CRM_MIN_LEN, 0 }, 360 + { PORT100_IN_PROT_T1_TAG_FRAME, 0 }, 361 + { PORT100_IN_PROT_RFCA, 0 }, 362 + { PORT100_IN_PROT_GUARD_TIME_AT_INITIATOR, 6 }, 363 + { PORT100_IN_PROT_END, 0 }, 364 + }, 365 + [NFC_DIGITAL_FRAMING_NFCB_T4T] = { 366 + /* nfc_digital_framing_nfcb */ 367 + { PORT100_IN_PROT_END, 0 }, 350 368 }, 351 369 /* Ensures the array has NFC_DIGITAL_FRAMING_LAST elements */ 352 370 [NFC_DIGITAL_FRAMING_LAST] = {