1 /****************************************************************************** 2 * 3 * Copyright (C) 1999-2012 Broadcom Corporation 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 * The original Work has been changed by NXP. 22 * 23 * Copyright 2013-2021 NXP 24 * 25 * Licensed under the Apache License, Version 2.0 (the "License"); 26 * you may not use this file except in compliance with the License. 27 * You may obtain a copy of the License at 28 * 29 * http://www.apache.org/licenses/LICENSE-2.0 30 * 31 * Unless required by applicable law or agreed to in writing, software 32 * distributed under the License is distributed on an "AS IS" BASIS, 33 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 34 * See the License for the specific language governing permissions and 35 * limitations under the License. 36 * 37 ******************************************************************************/ 38 39 #ifndef __CONFIG_H 40 #define __CONFIG_H 41 42 #ifdef __cplusplus 43 extern "C" { 44 #endif 45 46 int GetNxpStrValue(const char* name, char* p_value, unsigned long len); 47 int GetNxpNumValue(const char* name, void* p_value, unsigned long len); 48 int GetNxpByteArrayValue(const char* name, char* pValue, long bufflen, 49 long* len); 50 void resetNxpConfig(void); 51 int isNxpRFConfigModified(); 52 int isNxpConfigModified(); 53 int updateNxpConfigTimestamp(); 54 int updateNxpRfConfigTimestamp(); 55 void setNxpRfConfigPath(const char* name); 56 void setNxpFwConfigPath(const char* name); 57 58 #ifdef __cplusplus 59 }; 60 #endif 61 62 extern char Fw_Lib_Path[256]; 63 64 #define NAME_NXPLOG_EXTNS_LOGLEVEL "NXPLOG_EXTNS_LOGLEVEL" 65 #define NAME_NXPLOG_NCIHAL_LOGLEVEL "NXPLOG_NCIHAL_LOGLEVEL" 66 #define NAME_NXPLOG_NCIX_LOGLEVEL "NXPLOG_NCIX_LOGLEVEL" 67 #define NAME_NXPLOG_NCIR_LOGLEVEL "NXPLOG_NCIR_LOGLEVEL" 68 #define NAME_NXPLOG_FWDNLD_LOGLEVEL "NXPLOG_FWDNLD_LOGLEVEL" 69 #define NAME_NXPLOG_TML_LOGLEVEL "NXPLOG_TML_LOGLEVEL" 70 71 #define NAME_MIFARE_READER_ENABLE "MIFARE_READER_ENABLE" 72 #define NAME_LEGACY_MIFARE_READER "LEGACY_MIFARE_READER" 73 #define NAME_FW_STORAGE "FW_STORAGE" 74 #define NAME_NXP_NFC_DEV_NODE "NXP_NFC_DEV_NODE" 75 #define NAME_NXP_NFC_CHIP "NXP_NFC_CHIP" 76 #define NAME_NXP_FW_TYPE "NXP_FW_TYPE" 77 #define NAME_NXP_FW_PROTECION_OVERRIDE "NXP_FW_PROTECION_OVERRIDE" 78 #define NAME_NXP_SYS_CLK_SRC_SEL "NXP_SYS_CLK_SRC_SEL" 79 #define NAME_NXP_SYS_CLK_FREQ_SEL "NXP_SYS_CLK_FREQ_SEL" 80 #define NAME_NXP_SYS_CLOCK_TO_CFG "NXP_SYS_CLOCK_TO_CFG" 81 #define NAME_NXP_CLOCK_REQ_DELAY "NXP_CLOCK_REQ_DELAY" 82 #define NAME_NXP_ACT_PROP_EXTN "NXP_ACT_PROP_EXTN" 83 #define NAME_NXP_EXT_TVDD_CFG "NXP_EXT_TVDD_CFG" 84 #define NAME_NXP_EXT_TVDD_CFG_1 "NXP_EXT_TVDD_CFG_1" 85 #define NAME_NXP_EXT_TVDD_CFG_2 "NXP_EXT_TVDD_CFG_2" 86 #define NAME_NXP_EXT_TVDD_CFG_3 "NXP_EXT_TVDD_CFG_3" 87 #define NAME_NXP_CORE_CONF_EXTN "NXP_CORE_CONF_EXTN" 88 #define NAME_NXP_CORE_CONF "NXP_CORE_CONF" 89 #define NAME_NXP_CHINA_TIANJIN_RF_ENABLED "NXP_CHINA_TIANJIN_RF_ENABLED" 90 #define NAME_NXP_CHINA_BLK_NUM_CHK_ENABLE "NXP_CN_TRANSIT_BLK_NUM_CHECK_ENABLE" 91 #define NAME_NXP_CN_TRANSIT_CMA_BYPASSMODE_ENABLE \ 92 "NXP_CN_TRANSIT_CMA_BYPASSMODE_ENABLE" 93 #define NAME_NXP_ESE_POWER_DH_CONTROL "NXP_ESE_POWER_DH_CONTROL" 94 #define NAME_NXP_ESE_POWER_EXT_PMU "NXP_ESE_POWER_EXT_PMU" 95 #define NAME_NXP_ESE_POWER_DH_CONTROL_CFG_1 "NXP_ESE_POWER_DH_CONTROL_CFG_1" 96 #define NAME_NXP_SWP_SWITCH_TIMEOUT "NXP_SWP_SWITCH_TIMEOUT" 97 #define NAME_NXP_SWP_FULL_PWR_ON "NXP_SWP_FULL_PWR_ON" 98 #define NAME_NXP_CORE_RF_FIELD "NXP_CORE_RF_FIELD" 99 #define NAME_NXP_NFC_MERGE_RF_PARAMS "NXP_NFC_MERGE_RF_PARAMS" 100 #define NAME_NXP_I2C_FRAGMENTATION_ENABLED "NXP_I2C_FRAGMENTATION_ENABLED" 101 #define NAME_NFC_DEBUG_ENABLED "NFC_DEBUG_ENABLED" 102 #define NAME_AID_MATCHING_PLATFORM "AID_MATCHING_PLATFORM" 103 #define NAME_NXP_TYPEA_UICC_BAUD_RATE "NXP_TYPEA_UICC_BAUD_RATE" 104 #define NAME_NXP_TYPEB_UICC_BAUD_RATE "NXP_TYPEB_UICC_BAUD_RATE" 105 #define NAME_NXP_SET_CONFIG_ALWAYS "NXP_SET_CONFIG_ALWAYS" 106 #define NAME_NXP_PROP_BLACKLIST_ROUTING "NXP_PROP_BLACKLIST_ROUTING" 107 #define NAME_NXP_WIREDMODE_RESUME_TIMEOUT "NXP_WIREDMODE_RESUME_TIMEOUT" 108 #define NAME_NXP_UICC_LISTEN_TECH_MASK "UICC_LISTEN_TECH_MASK" 109 #define NAME_NXP_ESE_LISTEN_TECH_MASK "NXP_ESE_LISTEN_TECH_MASK" 110 #define NAME_NXP_SVDD_SYNC_OFF_DELAY "NXP_SVDD_SYNC_OFF_DELAY" 111 #define NAME_NXP_CORE_PROP_SYSTEM_DEBUG "NXP_CORE_PROP_SYSTEM_DEBUG" 112 #define NAME_NXP_NCI_PARSER_LIBRARY "NXP_NCI_PARSER_LIBRARY" 113 #define NAME_NXP_DEFAULT_UICC2_SELECT "NXP_DEFAULT_UICC2_SELECT" 114 #define NAME_NXP_ALWAYS_FW_UPDATE "NXP_ALWAYS_FW_UPDATE" 115 #define NAME_NXP_P61_JCOP_DEFAULT_INTERFACE "NXP_P61_JCOP_DEFAULT_INTERFACE" 116 #define NAME_RF_STATUS_UPDATE_ENABLE "RF_STATUS_UPDATE_ENABLE" 117 #define NAME_DEFAULT_ROUTE "DEFAULT_ROUTE" 118 #define NAME_DEFAULT_SYS_CODE_ROUTE "DEFAULT_SYS_CODE_ROUTE" 119 #define NAME_DEFAULT_SYS_CODE_PWR_STATE "DEFAULT_SYS_CODE_PWR_STATE" 120 #define NAME_OFF_HOST_ESE_PIPE_ID "OFF_HOST_ESE_PIPE_ID" 121 #define NAME_OFF_HOST_SIM_PIPE_ID "OFF_HOST_SIM_PIPE_ID" 122 #define NAME_DEFAULT_OFFHOST_ROUTE "DEFAULT_OFFHOST_ROUTE" 123 #define NAME_DEFAULT_NFCF_ROUTE "DEFAULT_NFCF_ROUTE" 124 #define NAME_ISO_DEP_MAX_TRANSCEIVE "ISO_DEP_MAX_TRANSCEIVE" 125 #define NAME_NFA_POLL_BAIL_OUT_MODE "NFA_POLL_BAIL_OUT_MODE" 126 #define NAME_ACTIVE_SE "ACTIVE_SE" 127 #define NAME_ACTIVE_SE_NFCF "ACTIVE_SE_NFCF" 128 #define NAME_DEFAULT_FELICA_SYS_CODE_ROUTE "DEFAULT_FELICA_SYS_CODE_ROUTE" 129 #define NAME_DEVICE_HOST_WHITE_LIST "DEVICE_HOST_WHITE_LIST" 130 #define NAME_NFA_PROPRIETARY_CFG "NFA_PROPRIETARY_CFG" 131 #define NAME_PRESENCE_CHECK_ALGORITHM "PRESENCE_CHECK_ALGORITHM" 132 #define NAME_NXP_CORE_PROP_SYSTEM_DEBUG "NXP_CORE_PROP_SYSTEM_DEBUG" 133 #define NAME_NXP_AUTONOMOUS_ENABLE "NXP_AUTONOMOUS_ENABLE" 134 #define NAME_NXP_P61_LS_DEFAULT_INTERFACE "NXP_P61_LS_DEFAULT_INTERFACE" 135 #define NAME_NXP_LS_FORCE_UPDATE_REQUIRED "NXP_LS_FORCE_UPDATE_REQUIRED" 136 #define NAME_NXP_JCOP_FORCE_UPDATE_REQUIRED "NXP_JCOP_FORCE_UPDATE_REQUIRED" 137 #define NAME_RF_STORAGE "RF_STORAGE" 138 #define NAME_NXP_FLASH_CONFIG "NXP_FLASH_CONFIG" 139 #define NAME_OFFHOST_ROUTE_ESE "OFFHOST_ROUTE_ESE" 140 #define NAME_OFFHOST_ROUTE_UICC "OFFHOST_ROUTE_UICC" 141 #define NAME_DEFAULT_ISODEP_ROUTE "DEFAULT_ISODEP_ROUTE" 142 #if (NXP_EXTNS == TRUE) 143 #define NAME_NXP_SE_COLD_TEMP_ERROR_DELAY "NXP_SE_COLD_TEMP_ERROR_DELAY" 144 #define NAME_P2P_LISTEN_TECH_MASK "P2P_LISTEN_TECH_MASK" 145 #define NAME_HOST_LISTEN_TECH_MASK "HOST_LISTEN_TECH_MASK" 146 #define NAME_UICC_LISTEN_TECH_MASK "UICC_LISTEN_TECH_MASK" 147 #define NAME_POLLING_TECH_MASK "POLLING_TECH_MASK" 148 #define NAME_NXP_DEFAULT_SE "NXP_DEFAULT_SE" 149 #define NAME_NXP_SWP_RD_TAG_OP_TIMEOUT "NXP_SWP_RD_TAG_OP_TIMEOUT" 150 #define NAME_NXP_DUAL_UICC_ENABLE "NXP_DUAL_UICC_ENABLE" 151 #define NAME_DEFAULT_AID_ROUTE "DEFAULT_AID_ROUTE" 152 #define NAME_DEFAULT_MIFARE_CLT_ROUTE "DEFAULT_MIFARE_CLT_ROUTE" 153 #define NAME_DEFAULT_FELICA_CLT_ROUTE "DEFAULT_FELICA_CLT_ROUTE" 154 #define NAME_DEFAULT_AID_PWR_STATE "DEFAULT_AID_PWR_STATE" 155 #define NAME_DEFAULT_DESFIRE_PWR_STATE "DEFAULT_DESFIRE_PWR_STATE" 156 #define NAME_DEFAULT_MIFARE_CLT_PWR_STATE "DEFAULT_MIFARE_CLT_PWR_STATE" 157 #define NAME_DEFAULT_T4TNFCEE_AID_POWER_STATE "DEFAULT_T4TNFCEE_AID_POWER_STATE" 158 #define NAME_FORWARD_FUNCTIONALITY_ENABLE "FORWARD_FUNCTIONALITY_ENABLE" 159 #define NAME_DEFAULT_FELICA_CLT_PWR_STATE "DEFAULT_FELICA_CLT_PWR_STATE" 160 #define NAME_CHECK_DEFAULT_PROTO_SE_ID "NXP_CHECK_DEFAULT_PROTO_SE_ID" 161 #define NAME_NXP_DEFAULT_UICC2_SELECT "NXP_DEFAULT_UICC2_SELECT" 162 #define NAME_NXP_T4T_NFCEE_ENABLE "NXP_T4T_NFCEE_ENABLE" 163 #define NAME_NXP_SMB_TRANSCEIVE_TIMEOUT "NXP_SMB_TRANSCEIVE_TIMEOUT" 164 #define NAME_NXP_SMB_ERROR_RETRY "NXP_SMB_ERROR_RETRY" 165 #define NAME_DEFAULT_GSMA_PWR_STATE "DEFAULT_GSMA_PWR_STATE" 166 #define NAME_NXP_NFC_SE_TERMINAL_NUM "NXP_NFC_SE_TERMINAL_NUM" 167 #define NAME_NXP_POLL_FOR_EFD_TIMEDELAY "NXP_POLL_FOR_EFD_TIMEDELAY" 168 #define NAME_NXP_NFCC_MERGE_SAK_ENABLE "NXP_NFCC_MERGE_SAK_ENABLE" 169 #define NAME_NXP_STAG_TIMEOUT_CFG "NXP_STAG_TIMEOUT_CFG" 170 #define NAME_NXP_RF_FILE_VERSION_INFO "NXP_RF_FILE_VERSION_INFO" 171 #define NAME_RF_STORAGE "RF_STORAGE" 172 #define NAME_FW_STORAGE "FW_STORAGE" 173 #define NAME_NXP_CORE_CONF "NXP_CORE_CONF" 174 #define NAME_NXP_GUARD_TIMER_VALUE "NXP_GUARD_TIMER_VALUE" 175 #define NAME_NXP_PROP_RESET_EMVCO_CMD "NXP_PROP_RESET_EMVCO_CMD" 176 #define NAME_NFA_CONFIG_FORMAT "NFA_CONFIG_FORMAT" 177 #define NAME_NXP_CORE_PWR_OFF_AUTONOMOUS_ENABLE \ 178 "NXP_CORE_PWR_OFF_AUTONOMOUS_ENABLE" 179 #define NAME_NXP_DISCONNECT_TAG_IN_SCRN_OFF "NXP_DISCONNECT_TAG_IN_SCRN_OFF" 180 #define NAME_NXP_ENABLE_DISABLE_LOGS "NXP_ENABLE_DISABLE_LOGS" 181 #define NAME_NXP_RDR_DISABLE_ENABLE_LPCD "NXP_RDR_DISABLE_ENABLE_LPCD" 182 #define NAME_NXP_TRANSPORT "NXP_TRANSPORT" 183 #define NAME_NXP_GET_HW_INFO_LOG "NXP_GET_HW_INFO_LOG" 184 #define NAME_NXP_ISO_DEP_MERGE_SAK "NXP_ISO_DEP_MERGE_SAK" 185 #define NAME_NXP_T4T_NDEF_NFCEE_AID "NXP_T4T_NDEF_NFCEE_AID" 186 #define NAME_NXP_NON_STD_CARD_TIMEDIFF "NXP_NON_STD_CARD_TIMEDIFF" 187 #define NAME_NXP_SRD_TIMEOUT "NXP_SRD_TIMEOUT" 188 #endif 189 /* default configuration */ 190 #define default_storage_location "/data/vendor/nfc" 191 #define NAME_NXP_AUTH_TIMEOUT_CFG "NXP_AUTH_TIMEOUT_CFG" 192 #endif 193