• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-2023 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();
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_FW_STORAGE "FW_STORAGE"
73 #define NAME_NXP_NFC_DEV_NODE "NXP_NFC_DEV_NODE"
74 #define NAME_NXP_NFC_CHIP "NXP_NFC_CHIP"
75 #define NAME_NXP_FW_TYPE "NXP_FW_TYPE"
76 #define NAME_NXP_FW_PROTECION_OVERRIDE "NXP_FW_PROTECION_OVERRIDE"
77 #define NAME_NXP_SYS_CLK_SRC_SEL "NXP_SYS_CLK_SRC_SEL"
78 #define NAME_NXP_SYS_CLK_FREQ_SEL "NXP_SYS_CLK_FREQ_SEL"
79 #define NAME_NXP_SYS_CLOCK_TO_CFG "NXP_SYS_CLOCK_TO_CFG"
80 #define NAME_NXP_CLOCK_REQ_DELAY "NXP_CLOCK_REQ_DELAY"
81 #define NAME_NXP_ACT_PROP_EXTN "NXP_ACT_PROP_EXTN"
82 #define NAME_NXP_EXT_TVDD_CFG "NXP_EXT_TVDD_CFG"
83 #define NAME_NXP_EXT_TVDD_CFG_1 "NXP_EXT_TVDD_CFG_1"
84 #define NAME_NXP_EXT_TVDD_CFG_2 "NXP_EXT_TVDD_CFG_2"
85 #define NAME_NXP_EXT_TVDD_CFG_3 "NXP_EXT_TVDD_CFG_3"
86 #define NAME_NXP_CORE_CONF_EXTN "NXP_CORE_CONF_EXTN"
87 #define NAME_NXP_CORE_CONF "NXP_CORE_CONF"
88 #define NAME_NXP_CHINA_TIANJIN_RF_ENABLED "NXP_CHINA_TIANJIN_RF_ENABLED"
89 #define NAME_NXP_CHINA_BLK_NUM_CHK_ENABLE "NXP_CN_TRANSIT_BLK_NUM_CHECK_ENABLE"
90 #define NAME_NXP_CN_TRANSIT_CMA_BYPASSMODE_ENABLE \
91   "NXP_CN_TRANSIT_CMA_BYPASSMODE_ENABLE"
92 #define NAME_NXP_SWP_SWITCH_TIMEOUT "NXP_SWP_SWITCH_TIMEOUT"
93 #define NAME_NXP_SWP_FULL_PWR_ON "NXP_SWP_FULL_PWR_ON"
94 #define NAME_NXP_CORE_RF_FIELD "NXP_CORE_RF_FIELD"
95 #define NAME_NXP_NFC_MERGE_RF_PARAMS "NXP_NFC_MERGE_RF_PARAMS"
96 #define NAME_NXP_I2C_FRAGMENTATION_ENABLED "NXP_I2C_FRAGMENTATION_ENABLED"
97 #define NAME_NFC_DEBUG_ENABLED "NFC_DEBUG_ENABLED"
98 #define NAME_AID_MATCHING_PLATFORM "AID_MATCHING_PLATFORM"
99 #define NAME_NXP_SET_CONFIG_ALWAYS "NXP_SET_CONFIG_ALWAYS"
100 #define NAME_NXP_PROP_BLACKLIST_ROUTING "NXP_PROP_BLACKLIST_ROUTING"
101 #define NAME_NXP_UICC_LISTEN_TECH_MASK "UICC_LISTEN_TECH_MASK"
102 #define NAME_NXP_ESE_LISTEN_TECH_MASK "NXP_ESE_LISTEN_TECH_MASK"
103 #define NAME_NXP_CORE_PROP_SYSTEM_DEBUG "NXP_CORE_PROP_SYSTEM_DEBUG"
104 #define NAME_NXP_DEFAULT_UICC2_SELECT "NXP_DEFAULT_UICC2_SELECT"
105 #define NAME_NXP_ALWAYS_FW_UPDATE "NXP_ALWAYS_FW_UPDATE"
106 #define NAME_RF_STATUS_UPDATE_ENABLE "RF_STATUS_UPDATE_ENABLE"
107 #define NAME_DEFAULT_ROUTE "DEFAULT_ROUTE"
108 #define NAME_DEFAULT_SYS_CODE_ROUTE "DEFAULT_SYS_CODE_ROUTE"
109 #define NAME_DEFAULT_SYS_CODE_PWR_STATE "DEFAULT_SYS_CODE_PWR_STATE"
110 #define NAME_OFF_HOST_ESE_PIPE_ID "OFF_HOST_ESE_PIPE_ID"
111 #define NAME_OFF_HOST_SIM_PIPE_ID "OFF_HOST_SIM_PIPE_ID"
112 #define NAME_DEFAULT_OFFHOST_ROUTE "DEFAULT_OFFHOST_ROUTE"
113 #define NAME_DEFAULT_NFCF_ROUTE "DEFAULT_NFCF_ROUTE"
114 #define NAME_ISO_DEP_MAX_TRANSCEIVE "ISO_DEP_MAX_TRANSCEIVE"
115 #define NAME_NFA_POLL_BAIL_OUT_MODE "NFA_POLL_BAIL_OUT_MODE"
116 #define NAME_DEFAULT_FELICA_SYS_CODE_ROUTE "DEFAULT_FELICA_SYS_CODE_ROUTE"
117 #define NAME_DEVICE_HOST_ALLOW_LIST "DEVICE_HOST_ALLOW_LIST"
118 #define NAME_NFA_PROPRIETARY_CFG "NFA_PROPRIETARY_CFG"
119 #define NAME_PRESENCE_CHECK_ALGORITHM "PRESENCE_CHECK_ALGORITHM"
120 #define NAME_NXP_CORE_PROP_SYSTEM_DEBUG "NXP_CORE_PROP_SYSTEM_DEBUG"
121 #define NAME_NXP_AUTONOMOUS_ENABLE "NXP_AUTONOMOUS_ENABLE"
122 #define NAME_RF_STORAGE "RF_STORAGE"
123 #define NAME_NXP_FLASH_CONFIG "NXP_FLASH_CONFIG"
124 #define NAME_OFFHOST_ROUTE_ESE "OFFHOST_ROUTE_ESE"
125 #define NAME_OFFHOST_ROUTE_UICC "OFFHOST_ROUTE_UICC"
126 #define NAME_DEFAULT_ISODEP_ROUTE "DEFAULT_ISODEP_ROUTE"
127 #define NAME_NXP_SE_COLD_TEMP_ERROR_DELAY "NXP_SE_COLD_TEMP_ERROR_DELAY"
128 #define NAME_HOST_LISTEN_TECH_MASK "HOST_LISTEN_TECH_MASK"
129 #define NAME_UICC_LISTEN_TECH_MASK "UICC_LISTEN_TECH_MASK"
130 #define NAME_POLLING_TECH_MASK "POLLING_TECH_MASK"
131 #define NAME_NXP_DEFAULT_SE "NXP_DEFAULT_SE"
132 #define NAME_NXP_SWP_RD_TAG_OP_TIMEOUT "NXP_SWP_RD_TAG_OP_TIMEOUT"
133 #define NAME_NXP_DUAL_UICC_ENABLE "NXP_DUAL_UICC_ENABLE"
134 #define NAME_DEFAULT_AID_ROUTE "DEFAULT_AID_ROUTE"
135 #define NAME_DEFAULT_MIFARE_CLT_ROUTE "DEFAULT_MIFARE_CLT_ROUTE"
136 #define NAME_DEFAULT_FELICA_CLT_ROUTE "DEFAULT_FELICA_CLT_ROUTE"
137 #define NAME_DEFAULT_AID_PWR_STATE "DEFAULT_AID_PWR_STATE"
138 #define NAME_DEFAULT_DESFIRE_PWR_STATE "DEFAULT_DESFIRE_PWR_STATE"
139 #define NAME_DEFAULT_MIFARE_CLT_PWR_STATE "DEFAULT_MIFARE_CLT_PWR_STATE"
140 #define NAME_DEFAULT_T4TNFCEE_AID_POWER_STATE "DEFAULT_T4TNFCEE_AID_POWER_STATE"
141 #define NAME_FORWARD_FUNCTIONALITY_ENABLE "FORWARD_FUNCTIONALITY_ENABLE"
142 #define NAME_DEFAULT_FELICA_CLT_PWR_STATE "DEFAULT_FELICA_CLT_PWR_STATE"
143 #define NAME_CHECK_DEFAULT_PROTO_SE_ID "NXP_CHECK_DEFAULT_PROTO_SE_ID"
144 #define NAME_NXP_DEFAULT_UICC2_SELECT "NXP_DEFAULT_UICC2_SELECT"
145 #define NAME_NXP_T4T_NFCEE_ENABLE "NXP_T4T_NFCEE_ENABLE"
146 #define NAME_NXP_SMB_TRANSCEIVE_TIMEOUT "NXP_SMB_TRANSCEIVE_TIMEOUT"
147 #define NAME_NXP_SMB_ERROR_RETRY "NXP_SMB_ERROR_RETRY"
148 #define NAME_DEFAULT_GSMA_PWR_STATE "DEFAULT_GSMA_PWR_STATE"
149 #define NAME_NXP_NFC_SE_TERMINAL_NUM "NXP_NFC_SE_TERMINAL_NUM"
150 #define NAME_NXP_POLL_FOR_EFD_TIMEDELAY "NXP_POLL_FOR_EFD_TIMEDELAY"
151 #define NAME_NXP_NFCC_MERGE_SAK_ENABLE "NXP_NFCC_MERGE_SAK_ENABLE"
152 #define NAME_NXP_STAG_TIMEOUT_CFG "NXP_STAG_TIMEOUT_CFG"
153 #define NAME_NXP_RF_FILE_VERSION_INFO "NXP_RF_FILE_VERSION_INFO"
154 #define NAME_RF_STORAGE "RF_STORAGE"
155 #define NAME_FW_STORAGE "FW_STORAGE"
156 #define NAME_NXP_CORE_CONF "NXP_CORE_CONF"
157 #define NAME_NXP_GUARD_TIMER_VALUE "NXP_GUARD_TIMER_VALUE"
158 #define NAME_NXP_PROP_RESET_EMVCO_CMD "NXP_PROP_RESET_EMVCO_CMD"
159 #define NAME_NFA_CONFIG_FORMAT "NFA_CONFIG_FORMAT"
160 #define NAME_NXP_DISCONNECT_TAG_IN_SCRN_OFF "NXP_DISCONNECT_TAG_IN_SCRN_OFF"
161 #define NAME_NXP_CE_PRIORITY_ENABLED "NXP_CE_PRIORITY_ENABLED"
162 #define NAME_NXP_ENABLE_DISABLE_LOGS "NXP_ENABLE_DISABLE_LOGS"
163 #define NAME_NXP_RDR_DISABLE_ENABLE_LPCD "NXP_RDR_DISABLE_ENABLE_LPCD"
164 #define NAME_NXP_TRANSPORT "NXP_TRANSPORT"
165 #define NAME_NXP_GET_HW_INFO_LOG "NXP_GET_HW_INFO_LOG"
166 #define NAME_NXP_ISO_DEP_MERGE_SAK "NXP_ISO_DEP_MERGE_SAK"
167 #define NAME_NXP_T4T_NDEF_NFCEE_AID "NXP_T4T_NDEF_NFCEE_AID"
168 #define NAME_NXP_NON_STD_CARD_TIMEDIFF "NXP_NON_STD_CARD_TIMEDIFF"
169 #define NAME_NXP_SRD_TIMEOUT "NXP_SRD_TIMEOUT"
170 #define NAME_NXP_UICC_ETSI_SUPPORT "NXP_UICC_ETSI_SUPPORT"
171 #define NAME_NXP_MINIMAL_FW_VERSION "NXP_MINIMAL_FW_VERSION"
172 #define NAME_NXP_NFCC_RECOVERY_SUPPORT "NXP_NFCC_RECOVERY_SUPPORT"
173 #define NAME_NXP_RESTART_RF_FOR_NFCEE_RECOVERY \
174   "NXP_RESTART_RF_FOR_NFCEE_RECOVERY"
175 #define NAME_NXP_PROP_CE_ACTION_NTF "NXP_PROP_CE_ACTION_NTF"
176 #define NAME_NXP_AGC_DEBUG_ENABLE "NXP_AGC_DEBUG_ENABLE"
177 #define NAME_NXP_EXTENDED_FIELD_DETECT_MODE "NXP_EXTENDED_FIELD_DETECT_MODE"
178 #define NAME_NXP_MIFARE_NACK_TO_RATS_ENABLE "NXP_MIFARE_NACK_TO_RATS_ENABLE"
179 #define NAME_CONF_GPIO_CONTROL "CONF_GPIO_CONTROL"
180 #define NAME_NXP_DEFAULT_ULPDET_MODE "NXP_DEFAULT_ULPDET_MODE"
181 #define NAME_NXP_SYSTEM_POWER_TRACE_POLL_DURATION \
182   "NXP_SYSTEM_POWER_TRACE_POLL_DURATION_SEC"
183 #define NAME_NXP_SE_SMB_TERMINAL_TYPE "NXP_SE_SMB_TERMINAL_TYPE"
184 #define NAME_NXP_ENABLE_DCDC_ON "NXP_ENABLE_DCDC_ON"
185 /* default configuration */
186 #define default_storage_location "/data/vendor/nfc"
187 #define NAME_NXP_AUTH_TIMEOUT_CFG "NXP_AUTH_TIMEOUT_CFG"
188 #endif
189