[Feature][Modem]Merge MTK release P3 P4 patch

Change-Id: I1ef3d69e36378ee73a422ecb2721488d6b416427
diff --git a/mcu/interface/service/sbp/sbp_feature.def b/mcu/interface/service/sbp/sbp_feature.def
index e7d0714..c3c0048 100755
--- a/mcu/interface/service/sbp/sbp_feature.def
+++ b/mcu/interface/service/sbp/sbp_feature.def
@@ -70,6 +70,7 @@
 		<RECORD Date="2022-05-16" Author="OT901109">Add SBP_NWSEL_CLEAR_RPLMN_FOR_POWER_ON_SEARCH</RECORD>
 		<RECORD Date="2022-05-16" Author="OT901109">Add SBP_NWSEL_CLEAR_RPLMN_FOR_HOME_COUNTRY_POWER_ON_SEARCH</RECORD>
         <RECORD Date="2022-08-16" Author="mtk15164">Add SBP_NAS_SV_RAT_CAP_CONTROL_BY_MRS_CONFIG</RECORD>
+        <RECORD Date="2022-09-21" Author="ot901109">Add SBP_N1_MODE_NOT_ALLOWED_PERMANENT_DISABLING</RECORD>
     </HISTORY>
 </SBP_DOC_INFO>
 ******* SBP Doc End ********/
@@ -29678,7 +29679,7 @@
     SBP_FEATURE_DEF(SBP_DISABLE_EUTRAN_WHEN_ATTACH_REJECT_ESM_CAUSE_27, SBP_ATTR_NONE, "Disable LTE when receive attach reject with ESM cause #27", "Not Supported", "Supported", 0)
 
 /****** SBP Document BEGIN ************************************************************************
-<SBP title="SBP_VZW_PERMANEMT_FTA_LIST - Permanent Forbidden TA List support for VZW">
+<SBP title="SBP_OP12_PERMANENT_FTA_LIST  - Permanent Forbidden TA List support for VZW">
     <DESCRIPTION>
         <PARAG> DUT will support permanent FTA list</PARAG>
     </DESCRIPTION>
@@ -29689,16 +29690,16 @@
     </CONFIG>
     <DEFAULT>0</DEFAULT>
     <OP>N/A</OP>
-    <DEPENDENCY>This SBP can be controlled by compile option __SBP_VZW_PERMANEMT_FTA_LIST__</DEPENDENCY>
+    <DEPENDENCY>This SBP can be controlled by compile option __SBP_OP12_PERMANENT_FTA_LIST__</DEPENDENCY>
     <NOTE>None</NOTE>
     <AUTHOR>mtk11225</AUTHOR>
 </SBP>
 ******* SBP Document END **************************************************************************/
-#ifdef __SBP_VZW_PERMANEMT_FTA_LIST__
-   SBP_FEATURE_DEF(SBP_VZW_PERMANEMT_FTA_LIST, SBP_ATTR_NONE, "Support permanent FTA list", "Disabled", "Enabled", 1)
+#ifdef __SBP_OP12_PERMANENT_FTA_LIST__
+   SBP_FEATURE_DEF(SBP_OP12_PERMANENT_FTA_LIST , SBP_ATTR_NONE, "Support permanent FTA list", "Disabled", "Enabled", 1)
 #else
-   SBP_FEATURE_DEF(SBP_VZW_PERMANEMT_FTA_LIST, SBP_ATTR_NONE, "Support permanent FTA list", "Disabled", "Enabled", 0)
-#endif /*__SBP_VZW_PERMANEMT_FTA_LIST__*/
+   SBP_FEATURE_DEF(SBP_OP12_PERMANENT_FTA_LIST , SBP_ATTR_NONE, "Support permanent FTA list", "Disabled", "Enabled", 0)
+#endif /*__SBP_OP12_PERMANENT_FTA_LIST__*/
 
 /****** SBP Document BEGIN ************************************************************************
 <SBP title="SBP_NWSEL_START_HPPLMN_TIMER_IN_NON_HIGHEST_HPLMN">
@@ -34500,8 +34501,276 @@
    SBP_FEATURE_DEF(SBP_NAS_SV_RAT_CAP_CONTROL_BY_MRS_CONFIG, SBP_ATTR_NONE, "enable the feature.",  "Not Enabled", "Enabled", 1)
 #endif
 
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_N1_MODE_NOT_ALLOWED_PERMANENT_DISABLING - N1 mode not allowed for Registation Reject Cause#27">
+    <DESCRIPTION>
+        <PARAG>
+           When SBP is enabled, UE will disable N1 mode when 5GMM registration is rejected with cause #27 N1 mode not allowed till USIM removal or power off.
+        </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>NAS</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disabled</VALUE>
+        <VALUE value="1">Enabled</VALUE>
+    </CONFIG>
+    <DEFAULT>0</DEFAULT>
+    <OP>KT</OP>
+    <DEPENDENCY>This SBP can be controlled by compiler option __N1_MODE_NOT_ALLOWED_PERMANENT_DISABLING__ </DEPENDENCY>
+    <NOTE>
+    IS_VIOLATE_STANDARD=Y
+    VIOLATED_STANDARD=3GPP TS 24.501
+    </NOTE>
+    <AUTHOR>ot901109</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+#ifdef __N1_MODE_NOT_ALLOWED_PERMANENT_DISABLING__
+    SBP_FEATURE_DEF(SBP_N1_MODE_NOT_ALLOWED_PERMANENT_DISABLING, SBP_ATTR_NONE, "Disable N1 mode for Registation Reject Cause#27 till power off", "Disabled", "Enabled", 1)
+#else
+    SBP_FEATURE_DEF(SBP_N1_MODE_NOT_ALLOWED_PERMANENT_DISABLING, SBP_ATTR_NONE, "Disable N1 mode for Registation Reject Cause#27 till power off", "Disabled", "Enabled", 0)
+#endif
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_NOT_RETRY_SKIP_ABNORMAL_PLMN - Not to search abnormal PLMN again">
+    <DESCRIPTION>
+        <PARAG>
+        When this SBP is enabled, some abnormal PLMNs would not reset to search again.
+        </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>NAS</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disable.</VALUE>
+        <VALUE value="1">Enable.</VALUE>
+    </CONFIG>
+    <DEFAULT>0</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY></DEPENDENCY>
+    <NOTE>
+    IS_VIOLATE_STANDARD=N
+    </NOTE>
+    <AUTHOR>mtk02124</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+#ifdef _NOT_RETRY_SKIP_ABNORMAL_PLMN_
+    SBP_FEATURE_DEF(SBP_NOT_RETRY_SKIP_ABNORMAL_PLMN, SBP_ATTR_NONE, "Not to search abnormal PLMN again", "Disabled", "Enabled", 1)
+#else
+    SBP_FEATURE_DEF(SBP_NOT_RETRY_SKIP_ABNORMAL_PLMN, SBP_ATTR_NONE, "Not to search abnormal PLMN again", "Disabled", "Enabled", 0)
+#endif
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_NR_LARGE_BW_CELL_PREFER_FOR_NON_CA">
+    <DESCRIPTION>
+        <PARAG>
+            With this feature enabled, prefer NR cell with large channel bandwidth when cell selection for NON CA condition.
+        </PARAG>
+    </DESCRIPTION>
+    <CONFIG>
+       <VALUE value="0">Disable</VALUE>
+       <VALUE value="1">Enable</VALUE>
+    </CONFIG>
+    <CATEGORY>NRRC</CATEGORY>
+    <DEFAULT>1</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>None</NOTE>
+    <AUTHOR>mtk10726</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+#if defined(__DISABLE_NR_LARGE_BW_CELL_PREFER_FOR_NON_CA__)
+    SBP_FEATURE_DEF(SBP_NR_LARGE_BW_CELL_PREFER_FOR_NON_CA, SBP_ATTR_NONE, "prefer NR cell with large channel bandwidth for NON CA", "Disabled", "Enabled", 0)
+#else
+    SBP_FEATURE_DEF(SBP_NR_LARGE_BW_CELL_PREFER_FOR_NON_CA, SBP_ATTR_NONE, "prefer NR cell with large channel bandwidth for NON CA", "Disabled", "Enabled", 1)
+#endif
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_L5_SS_USSD_HEX">
+    <DESCRIPTION>
+        <PARAG> With the feature enabled, L5 will change ussd payload string to hex </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>L5</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disabled</VALUE>
+        <VALUE value="1">Enabled</VALUE>
+    </CONFIG>
+    <DEFAULT>0</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>None</NOTE>
+    <AUTHOR>mtk21078</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+#if defined(__L5_SS_USSD_HEX__)
+    SBP_FEATURE_DEF(SBP_L5_SS_USSD_HEX, SBP_ATTR_NONE, "L5 will change ussd payload string to hex", "Disable", "Enable", 1)
+#else
+    SBP_FEATURE_DEF(SBP_L5_SS_USSD_HEX, SBP_ATTR_NONE, "L5 will change ussd payload string to hex", "Disable", "Enable", 0)
+#endif
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_L5_SS_AUTO_SET_UCS2">
+    <DESCRIPTION>
+        <PARAG> With the feature enabled, L5 will set cscs to ucs2 at start up init phase,default value is enable </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>L5</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disabled</VALUE>
+        <VALUE value="1">Enabled</VALUE>
+    </CONFIG>
+    <DEFAULT>0</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>None</NOTE>
+    <AUTHOR>mtk21078</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+#if defined(__L5_SS_AUTO_SET_UCS2__)
+    SBP_FEATURE_DEF(SBP_L5_SS_AUTO_SET_UCS2, SBP_ATTR_NONE, "L5 will set cscs to ucs2 at start up init phase", "Disable", "Enable", 0)
+#else
+    SBP_FEATURE_DEF(SBP_L5_SS_AUTO_SET_UCS2, SBP_ATTR_NONE, "L5 will set cscs to ucs2 at start up init phase", "Disable", "Enable", 1)
+#endif
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_ENABLE_LONG_INTERVAL_FOR_DR_SEARCH - Based on these SBP - ERRC will configure the intv or CSR pattern in CSR request in Gemini mode ">
+    <DESCRIPTION>
+        <PARAG>In Gemini mode -if SBP enabled - ERRC will configure the intv=1(640 ms) which reduce call degradation . otherwise 
+        	ERRC will configure the CSR pattern as CSR_PATTERN_DR_SEARCH_PRIORITY (160ms).
+        </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>LBS</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">ERRC configure CSR request with CSR Pattern in gemini mode</VALUE>
+        <VALUE value="1">ERRC configure CSR request with intv in gemini mode</VALUE>
+    </CONFIG>
+    <DEFAULT>0</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>
+        This feature is available from Gen97. SBP is implemented to handle tradeoff case . if the SBP enable , it makes delay in peer SIM to get service and also chance to miss paging .So it Suggest to disbale these by defualt .
+    </NOTE>
+    <AUTHOR>ot902253</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+    SBP_FEATURE_DEF(SBP_ENABLE_LONG_INTERVAL_FOR_DR_SEARCH, SBP_ATTR_NONE, "Based on these SBP - ERRC will configure the intv or CSR pattern in CSR request in Gemini mode", "Not enabled", "Enabled",0)
+
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_L5_SAVE_APN_TO_NVRAM">
+    <DESCRIPTION>
+        <PARAG> With the feature enabled, L5 will save apn to NVRAM/PARAG>
+    </DESCRIPTION>
+    <CATEGORY>L5</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disabled</VALUE>
+        <VALUE value="1">Enabled</VALUE>
+    </CONFIG>
+    <DEFAULT>1</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>None</NOTE>
+    <AUTHOR>mtk14059</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+#ifdef __L5_SAVE_APN_TO_NVRAM_DISABLE__
+    SBP_FEATURE_DEF(SBP_L5_SAVE_APN_TO_NVRAM, SBP_ATTR_NONE, "L5 save APN to NVRAM", "Disable", "Enable", 0)
+#else
+    SBP_FEATURE_DEF(SBP_L5_SAVE_APN_TO_NVRAM, SBP_ATTR_NONE, "L5 save APN to NVRAM", "Disable", "Enable", 1)
+#endif
+
 SBP_FEATURE_DEF_END(172)
 
+/* 174th byte*/
+SBP_FEATURE_DEF_BEGIN(173)
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_GET_EID_FROM_ECASD">
+    <DESCRIPTION>
+        <PARAG>
+            With this SBP enabled, modem will get EID from ECASD in eUICC detection.
+        </PARAG>
+    </DESCRIPTION>
+    <CONFIG>
+       <VALUE value="0">Disable</VALUE>
+       <VALUE value="1">Enable</VALUE>
+    </CONFIG>
+    <CATEGORY>SIM</CATEGORY>
+    <DEFAULT>0</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>N/A</NOTE>
+    <AUTHOR>mtk24100</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+    SBP_FEATURE_DEF(SBP_GET_EID_FROM_ECASD, SBP_ATTR_NONE, "Get EID from ECASD in eUICC detection", "Disable", "Enabled", 0)
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_VOWIFI_DISABLE_5G_SA_CHECK_VONR_BIT - UE will check the VoNR bit for VoWiFi disable 5G SA when this SBP is enabled">
+    <DESCRIPTION>
+        <PARAG>
+            UE will check the VoNR bit for VoWiFi disable 5G SA when this SBP is enabled.
+        </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>SASE</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disabled. UE will check the VoNR bit for VoWiFi disable 5G SA when this SBP is enabled</VALUE>
+        <VALUE value="1">Enabled. UE will NOT check the VoNR bit for VoWiFi disable 5G SA when this SBP is enabled</VALUE>
+    </CONFIG>
+    <DEFAULT>1</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>
+        IS_VIOLATE_STANDARD=N
+    </NOTE>
+    <AUTHOR>mtk26590</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+    SBP_FEATURE_DEF(SBP_VOWIFI_DISABLE_5G_SA_CHECK_VONR_BIT, SBP_ATTR_NONE, "Enable check the VoNR bit for VoWiFi disable 5G SA", "Not Enabled", "Enabled", 1)
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_DISABLE_5G_SA_CALL_SETUP_ON_HO_TO_VOWIFI - Disable 5G SA when call setup on VoLTE with PDN handover to VoWiFi">
+    <DESCRIPTION>
+        <PARAG>
+            UE Disable 5G SA when call setup on VoLTE with PDN handover to VoWiFi.
+        </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>SASE</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disabled. UE do NOT disable 5G SA when call setup on VoLTE with PDN handover to VoWiFi</VALUE>
+        <VALUE value="1">Enabled. UE disable 5G SA when call setup on VoLTE with PDN handover to VoWiFi</VALUE>
+    </CONFIG>
+    <DEFAULT>0</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>
+        IS_VIOLATE_STANDARD=N
+    </NOTE>
+    <AUTHOR>mtk26590</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+    SBP_FEATURE_DEF(SBP_DISABLE_5G_SA_CALL_HO_TO_VOWIFI, SBP_ATTR_NONE, "Disable 5G SA when call setup on VoLTE with PDN handover to VoWiFi", "Not Enabled", "Enabled", 0)
+
+/****** SBP Document BEGIN ************************************************************************
+<SBP title="SBP_LOCAL_RELEASE_FOR_VOWIFI_DISABLE_5G_SA - UE will do local release when disable 5G SA for VoWiFi">
+    <DESCRIPTION>
+        <PARAG>
+            UE will do local release when disable 5G SA for VoWiFi.
+        </PARAG>
+    </DESCRIPTION>
+    <CATEGORY>SASE</CATEGORY>
+    <CONFIG>
+        <VALUE value="0">Disabled. UE will do local release when disable 5G SA for VoWiFi</VALUE>
+        <VALUE value="1">Enabled. UE will NOT do local release when disable 5G SA for VoWiFi</VALUE>
+    </CONFIG>
+    <DEFAULT>0</DEFAULT>
+    <OP>N/A</OP>
+    <DEPENDENCY>N/A</DEPENDENCY>
+    <NOTE>
+        IS_VIOLATE_STANDARD=N
+    </NOTE>
+    <AUTHOR>mtk26590</AUTHOR>
+</SBP>
+******* SBP Document END **************************************************************************/
+    SBP_FEATURE_DEF(SBP_LOCAL_RELEASE_FOR_VOWIFI_DISABLE_5G_SA, SBP_ATTR_NONE, "UE will NOT do local release when disable 5G SA for VoWiFi", "Not Enabled", "Enabled", 0)
+
+SBP_FEATURE_DEF_END(173)
+
 #undef SBP_FEATURE_DEF_BEGIN
 #undef SBP_FEATURE_DEF
 #undef SBP_FEATURE_DEF_END