The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
Evan Chu | e9629ba | 2014-01-31 11:18:47 -0500 | [diff] [blame] | 3 | * Copyright (C) 2012-2014 Broadcom Corporation |
The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at: |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
| 17 | ******************************************************************************/ |
| 18 | |
| 19 | /****************************************************************************** |
| 20 | * |
| 21 | * This file contains the Broadcom-specific defintions that are shared |
| 22 | * between HAL, nfc stack, adaptation layer and applications. |
| 23 | * |
| 24 | ******************************************************************************/ |
| 25 | |
| 26 | #ifndef NFC_BRCM_DEFS_H |
| 27 | #define NFC_BRCM_DEFS_H |
| 28 | |
The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 29 | /********************************************** |
| 30 | * NCI Message Proprietary Group - F |
| 31 | **********************************************/ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 32 | #define NCI_MSG_GET_BUILD_INFO 0x04 |
| 33 | #define NCI_MSG_HCI_NETWK 0x05 |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 34 | #define NCI_MSG_POWER_LEVEL 0x08 |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 35 | #define NCI_MSG_UICC_READER_ACTION 0x0A |
Ruchi Kandoi | 46e6e28 | 2017-01-30 14:26:10 -0800 | [diff] [blame] | 36 | /* reset HCI network/close all pipes (S,D) register */ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 37 | #define NCI_MSG_GET_NV_DEVICE 0x24 |
| 38 | #define NCI_MSG_LPTD 0x25 |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 39 | #define NCI_MSG_EEPROM_RW 0x29 |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 40 | #define NCI_MSG_GET_PATCH_VERSION 0x2D |
| 41 | #define NCI_MSG_SECURE_PATCH_DOWNLOAD 0x2E |
The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 42 | |
| 43 | /* Secure Patch Download definitions (patch type definitions) */ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 44 | #define NCI_SPD_TYPE_HEADER 0x00 |
The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 45 | |
| 46 | /********************************************** |
| 47 | * NCI Interface Types |
| 48 | **********************************************/ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 49 | #define NCI_INTERFACE_VS_MIFARE 0x80 |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 50 | #define NCI_INTERFACE_VS_T2T_CE 0x82 /* for Card Emulation side */ |
The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 51 | |
| 52 | /********************************************** |
| 53 | * NCI Proprietary Parameter IDs |
| 54 | **********************************************/ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 55 | #define NCI_PARAM_ID_HOST_LISTEN_MASK 0xA2 |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 56 | #define NCI_PARAM_ID_TAGSNIFF_CFG 0xB9 |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 57 | #define NCI_PARAM_ID_ACT_ORDER 0xC5 |
The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 58 | |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 59 | #define NFC_SNOOZE_MODE_UART 0x01 /* Snooze mode for UART */ |
The Android Open Source Project | e9df6ba | 2012-12-13 14:55:37 -0800 | [diff] [blame] | 60 | |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 61 | #define NFC_SNOOZE_ACTIVE_LOW 0x00 /* high to low voltage is asserting */ |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 62 | |
| 63 | /********************************************** |
| 64 | * HCI definitions |
| 65 | **********************************************/ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 66 | #define NFC_HAL_HCI_SESSION_ID_LEN 8 |
| 67 | #define NFC_HAL_HCI_SYNC_ID_LEN 2 |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 68 | |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 69 | /* Card emulation RF Gate A definitions */ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 70 | #define NFC_HAL_HCI_CE_RF_A_UID_REG_LEN 10 |
| 71 | #define NFC_HAL_HCI_CE_RF_A_ATQA_RSP_CODE_LEN 2 |
| 72 | #define NFC_HAL_HCI_CE_RF_A_MAX_HIST_DATA_LEN 15 |
| 73 | #define NFC_HAL_HCI_CE_RF_A_MAX_DATA_RATE_LEN 3 |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 74 | |
| 75 | /* Card emulation RF Gate B definitions */ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 76 | #define NFC_HAL_HCI_CE_RF_B_PUPI_LEN 4 |
| 77 | #define NFC_HAL_HCI_CE_RF_B_ATQB_LEN 4 |
| 78 | #define NFC_HAL_HCI_CE_RF_B_HIGHER_LAYER_RSP_LEN 61 |
| 79 | #define NFC_HAL_HCI_CE_RF_B_MAX_DATA_RATE_LEN 3 |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 80 | |
| 81 | /* Card emulation RF Gate BP definitions */ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 82 | #define NFC_HAL_HCI_CE_RF_BP_MAX_PAT_IN_LEN 8 |
| 83 | #define NFC_HAL_HCI_CE_RF_BP_DATA_OUT_LEN 40 |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 84 | |
| 85 | /* Reader RF Gate A definitions */ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 86 | #define NFC_HAL_HCI_RD_RF_B_HIGHER_LAYER_DATA_LEN 61 |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 87 | |
| 88 | /* DH HCI Network command definitions */ |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 89 | #define NFC_HAL_HCI_DH_MAX_DYN_PIPES 20 |
Evan Chu | a24be4f | 2013-11-13 15:30:16 -0500 | [diff] [blame] | 90 | |
Ruchi Kandoi | 6fca02d | 2017-01-30 14:28:16 -0800 | [diff] [blame] | 91 | #endif /* NFC_BRCM_DEFS_H */ |