[Feature][Modem]Update MTK MODEM V1.6 baseline version: MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6

MTK modem version: MT2735_IVT_MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6.tar.gz
RF  modem version: NA

Change-Id: I45a4c2752fa9d1a618beacd5d40737fb39ab64fb
diff --git a/mcu/interface/protocol/general/l5_common.h b/mcu/interface/protocol/general/l5_common.h
new file mode 100644
index 0000000..2251a47
--- /dev/null
+++ b/mcu/interface/protocol/general/l5_common.h
@@ -0,0 +1,252 @@
+#ifndef _L5_COMMON_H_
+#define _L5_COMMON_H_
+
+#include "kal_public_defs.h"
+#include "md_sap.h"
+#include "svc_sap.h"
+#include "dcl.h"
+#include "dcl_uart.h"
+
+#define L5_LOCAL_PARA_HDR \
+    LOCAL_PARA_HDR \
+    kal_uint32 l5seq_id;
+
+#define L5_LOCAL_PARA_HDR8 \
+    LOCAL_PARA_HDR \
+    kal_uint8 l5seq_id8;
+
+#define L5IO_L5U_LOCAL_PARA_HDR \
+    LOCAL_PARA_HDR \
+    kal_uint32 l5seq_id;
+
+#define L5IO_L5U_LOCAL_PARA_HDR8 \
+    LOCAL_PARA_HDR \
+    kal_uint8 l5seq_id8;
+
+typedef struct {
+    L5IO_L5U_LOCAL_PARA_HDR
+} l5io_l5u_struct;
+
+typedef struct {
+    L5IO_L5U_LOCAL_PARA_HDR8
+} l5io_l5u_struct8;
+
+//////////////////////////////////////////////////////////////////////////////////////
+#define GMC_LOCAL_PARA_HDR \
+    LOCAL_PARA_HDR \
+    kal_uint32 src_id;
+
+typedef struct {
+    GMC_LOCAL_PARA_HDR
+    kal_char config_type[32];
+    kal_uint8 buffer_type;    // 0 : local param buffer, 1 : peer buffer
+    kal_uint32 buffer_length;
+    kal_uint8 buffer[4096];
+} l5_general_modem_configure_set_req_struct;
+
+typedef struct {
+    GMC_LOCAL_PARA_HDR
+    kal_uint8 buffer_type;    // 0 : local param buffer, 1 : peer buffer
+    kal_uint32 buffer_length;
+    kal_uint8 buffer[4096];
+} l5_general_modem_configure_set_cnf_struct;
+
+typedef struct {
+    GMC_LOCAL_PARA_HDR
+    kal_char config_type[32];
+} l5_general_modem_configure_get_req_struct;
+
+typedef struct {
+    GMC_LOCAL_PARA_HDR
+    kal_uint8 buffer_type;    // 0 : local param buffer, 1 : peer buffer
+    kal_uint32 buffer_length;
+    kal_uint8 buffer[4096];
+} l5_general_modem_configure_get_cnf_struct;
+
+#define L5_RES_SEG_NUM (0x3FFFF)
+//18 bit for every user
+typedef enum {
+    //common result put here
+    L5_RES_COMMON_BEGIN = 0x00000000,
+        L5_RES_COMMON_SUCCESS = L5_RES_COMMON_BEGIN,
+    L5_RES_COMMON_END = L5_RES_COMMON_BEGIN + L5_RES_SEG_NUM,
+    //L5IO common result put in here(except XXXH's cause)
+    L5_RES_L5IO_BEGIN,
+    L5_RES_L5IO_END = L5_RES_L5IO_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_CAT_BEGIN,
+    L5_RES_CAT_END = L5_RES_CAT_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_CC_BEGIN,
+    L5_RES_CC_END = L5_RES_CC_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_NW_BEGIN,
+    L5_RES_NW_END = L5_RES_NW_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_PDN_BEGIN,
+        INVALID_PARA = L5_RES_PDN_BEGIN + 0x01,
+        NOT_FIND_APN_TO_ACT = L5_RES_PDN_BEGIN + 0x02,
+        NO_APN_INFO_TO_ABORT = L5_RES_PDN_BEGIN + 0x03,
+        APN_PROFILE_IS_DISABLED = L5_RES_PDN_BEGIN + 0x04,
+        NOT_FIND_CALL_INFO = L5_RES_PDN_BEGIN + 0x05,
+        REACH_MAX_USER = L5_RES_PDN_BEGIN + 0x06,
+        PROFILE_COUNT_ERROR = L5_RES_PDN_BEGIN + 0x07,
+        WRONG_APN_TYPE_OR_NO_APN = L5_RES_PDN_BEGIN + 0x08,
+        BUILT_IN_APN_NOT_READY = L5_RES_PDN_BEGIN + 0x09,
+        L5UPDN_ACT_CALL_RES = L5_RES_PDN_BEGIN + 0x70,
+        L5UPDN_FAIL_ABORT = L5UPDN_ACT_CALL_RES + 0x01,
+        L5UPDN_SUCC_ABORT = L5UPDN_ACT_CALL_RES + 0x02,
+        L5UPDN_FAIL_CONT = L5UPDN_ACT_CALL_RES + 0x03,
+        L5UPDN_SUCC_CONT = L5UPDN_ACT_CALL_RES + 0x04,
+        L5UPDN_REUSE = L5UPDN_ACT_CALL_RES + 0x05,
+        L5UPDN_ERROR_END = L5_RES_PDN_BEGIN + 0x7F,
+    L5_RES_PDN_END = L5_RES_PDN_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_RF_BEGIN,
+    L5_RES_RF_END = L5_RES_RF_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_SIM_BEGIN,
+    L5_RES_SIM_END = L5_RES_SIM_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_SMS_BEGIN,
+        L5_RES_SMS_U_BEGIN = L5_RES_SMS_BEGIN,
+        L5_RES_SMS_U_UNKNOWN_ACK_MODE = L5_RES_SMS_U_BEGIN,
+        L5_RES_SMS_U_INVALID_MEMORY_INDEX,
+        L5_RES_SMS_U_MMS_TYPE_ERROR,
+        L5_RES_SMS_U_STATUS_NOT_SUPPORT,
+        L5_RES_SMS_U_FAILURE,
+        L5_RES_SMS_U_FILTER_NOT_SUPPORTED,
+        L5_RES_SMS_U_FORMAT_NOT_SUPPORTED,
+        L5_RES_SMS_U_SET_SCA_INVALID,
+        L5_RES_SMS_U_NOT_INITIALIZED,
+        L5_RES_SMS_U_INVALID_SMSC_ADDRESS,
+        L5_RES_SMS_U_INVALID_PDU,
+        L5_RES_SMS_U_PREFER_STORAGE_NO_SUPPORT,
+        L5_RES_SMS_U_MMS_TYPE_INVALID,
+        L5_RES_SMS_U_SEND_TWO_SOURCE_EXIST,
+        L5_RES_SMS_U_OP_ONLY_ALLOWED_WITH_AT_IN_NON_PDU_MODE,
+        L5_RES_SMS_U_UNKNOWN_CPMS,
+        L5_RES_SMS_U_UNKNOWN_CNMI,
+        L5_RES_SMS_U_CPMS_UNSYNC,
+        L5_RES_SMS_U_SEND_C5GUSMS_FAIL,
+        L5_RES_SMS_U_MEMORY_FULL,
+        L5_RES_SMS_U_SEND_EMEMS_FAIL,
+        L5_RES_SMS_U_END = L5_RES_SMS_BEGIN + 0xFFFF,
+        //SMS AT is fixed with TS27.005
+        L5_RES_SMS_AT_BEGIN,
+        L5_RES_SMS_AT_UNASSIGNED_UNALLOCATED_NUMBER_1 =  L5_RES_SMS_AT_BEGIN + 1,
+        L5_RES_SMS_AT_OPERATOR_DETERMINED_BARRING_8 =  L5_RES_SMS_AT_BEGIN + 8,
+        L5_RES_SMS_AT_CALL_BARRED_10 =  L5_RES_SMS_AT_BEGIN + 10,
+        L5_RES_SMS_AT_SHORT_MESSAGE_TRANSFER_REJECTED_21 =  L5_RES_SMS_AT_BEGIN + 21,
+        L5_RES_SMS_AT_DESTINATION_OUT_OF_SERVICE_27 =  L5_RES_SMS_AT_BEGIN + 27,
+        L5_RES_SMS_AT_UNIDENTIFIED_SUBSCRIBER_28 =  L5_RES_SMS_AT_BEGIN + 28,
+        L5_RES_SMS_AT_FACILITY_REJECTED_29 =  L5_RES_SMS_AT_BEGIN + 29,
+        L5_RES_SMS_AT_UNKNOWN_SUBSCRIBER_30 =  L5_RES_SMS_AT_BEGIN + 30,
+        L5_RES_SMS_AT_NETWORK_OUT_OF_ORDER_38 =  L5_RES_SMS_AT_BEGIN + 38,
+        L5_RES_SMS_AT_TEMPORARY_FAILURE_41 =  L5_RES_SMS_AT_BEGIN + 41,
+        L5_RES_SMS_AT_CONGESTION_42 =  L5_RES_SMS_AT_BEGIN + 42,
+        L5_RES_SMS_AT_RESOURCES_UNAVAILABLE_UNSPECIFIED_47 =  L5_RES_SMS_AT_BEGIN + 47,
+        L5_RES_SMS_AT_REQUESTED_FACILITY_NOT_SUBSCRIBED_50 =  L5_RES_SMS_AT_BEGIN + 50,
+        L5_RES_SMS_AT_REQUESTED_FACILITY_NOT_IMPLEMENTED_69 =  L5_RES_SMS_AT_BEGIN + 69,
+        L5_RES_SMS_AT_INVALID_SHORT_MESSAGE_TRANSFER_REFERENCE_VALUE_81 =  L5_RES_SMS_AT_BEGIN + 81,
+        L5_RES_SMS_AT_INVALID_MESSAGE_UNSPECIFIED_95 =  L5_RES_SMS_AT_BEGIN + 95,
+        L5_RES_SMS_AT_INVALID_MANDATORY_INFORMATION_96 =  L5_RES_SMS_AT_BEGIN + 96,
+        L5_RES_SMS_AT_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED_97 =  L5_RES_SMS_AT_BEGIN + 97,
+        L5_RES_SMS_AT_MESSAGE_NOT_COMPATIBLE_WITH_SHORT_MESSAGE_PROTOCOL_STATE_98 =  L5_RES_SMS_AT_BEGIN + 98,
+        L5_RES_SMS_AT_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED_99 =  L5_RES_SMS_AT_BEGIN + 99,
+        L5_RES_SMS_AT_PROTOCOL_ERROR_UNSPECIFIED_111 =  L5_RES_SMS_AT_BEGIN + 111,
+        L5_RES_SMS_AT_INTERWORKING_UNSPECIFIED_127 =  L5_RES_SMS_AT_BEGIN + 127,
+        L5_RES_SMS_AT_TELEMATIC_INTERWORKING_NOT_SUPPORTED_0x80 =  L5_RES_SMS_AT_BEGIN + 0x80,              //0x80-0x8F: TP-PID errors
+        L5_RES_SMS_AT_SHORT_MESSAGE_TYPE_0_NOT_SUPPORTED_0x81 =  L5_RES_SMS_AT_BEGIN + 0x81,
+        L5_RES_SMS_AT_CANNOT_REPLACE_SHORT_MESSAGE_0x82 =  L5_RES_SMS_AT_BEGIN + 0x82,
+        L5_RES_SMS_AT_UNSPECIFIED_TP_PID_ERROR_0x8F =  L5_RES_SMS_AT_BEGIN + 0x8F,
+        L5_RES_SMS_AT_DATA_CODING_SCHEME_ALPHABET_NOT_SUPPORTED_0x90 =  L5_RES_SMS_AT_BEGIN + 0x90,         //0x90-0x9F: TP-DCS errors
+        L5_RES_SMS_AT_MESSAGE_CLASS_NOT_SUPPORTED_0x91 =  L5_RES_SMS_AT_BEGIN + 0x91,
+        L5_RES_SMS_AT_UNSPECIFIED_TP_DCS_ERROR_0x9F =  L5_RES_SMS_AT_BEGIN + 0x9F,
+        L5_RES_SMS_AT_COMMAND_CANNOT_BE_ACTIONED_0xA0 =  L5_RES_SMS_AT_BEGIN + 0xA0,                        //0xA0-0xAF: TP-Command errors
+        L5_RES_SMS_AT_COMMAND_UNSUPPORTED_0xA1 =  L5_RES_SMS_AT_BEGIN + 0xA1,
+        L5_RES_SMS_AT_UNSPECIFIED_TP_COMMAND_ERROR_0xAF =  L5_RES_SMS_AT_BEGIN + 0xAF,
+        L5_RES_SMS_AT_TPDU_NOT_SUPPORTED_0xB0 =  L5_RES_SMS_AT_BEGIN + 0xB0,
+        L5_RES_SMS_AT_SC_BUSY_0xC0 =  L5_RES_SMS_AT_BEGIN + 0xC0,
+        L5_RES_SMS_AT_NO_SC_SUBSCRIPTION_0xC1 =  L5_RES_SMS_AT_BEGIN + 0xC1,
+        L5_RES_SMS_AT_SC_SYSTEM_FAILURE_0xC2 =  L5_RES_SMS_AT_BEGIN + 0xC2,
+        L5_RES_SMS_AT_INVALID_SME_ADDRESS_0xC3 =  L5_RES_SMS_AT_BEGIN + 0xC3,
+        L5_RES_SMS_AT_DESTINATION_SME_BARRED_0xC4 =  L5_RES_SMS_AT_BEGIN + 0xC4,
+        L5_RES_SMS_AT_SM_REJECTED_DUPLICATE_SM_0xC5 =  L5_RES_SMS_AT_BEGIN + 0xC5,
+        L5_RES_SMS_AT_TP_VPF_NOT_SUPPORTED_0xC6 =  L5_RES_SMS_AT_BEGIN + 0xC6,
+        L5_RES_SMS_AT_TP_VP_NOT_SUPPORTED_0xC7 =  L5_RES_SMS_AT_BEGIN + 0xC7,
+        L5_RES_SMS_AT_SIM_SMS_STORAGE_FULL_0xD0 =  L5_RES_SMS_AT_BEGIN + 0xD0,
+        L5_RES_SMS_AT_NO_SMS_STORAGE_CAPABILITY_IN_SIM_0xD1 =  L5_RES_SMS_AT_BEGIN + 0xD1,
+        L5_RES_SMS_AT_ERROR_IN_MS_0xD2 =  L5_RES_SMS_AT_BEGIN + 0xD2,
+        L5_RES_SMS_AT_MEMORY_CAPACITY_EXCEEDED_0xD3 =  L5_RES_SMS_AT_BEGIN + 0xD3,
+        L5_RES_SMS_AT_SIM_APPLICATION_TOOLKIT_BUSY_0xD4 =  L5_RES_SMS_AT_BEGIN + 0xD4,
+        L5_RES_SMS_AT_SIM_DATA_DOWNLOAD_ERROR_0xD5 =  L5_RES_SMS_AT_BEGIN + 0xD5,
+        L5_RES_SMS_AT_SPECIFIC_APPLICATION_ERROR_0xE0 =  L5_RES_SMS_AT_BEGIN + 0xE0,                        //0xE0-0xEF: Specific to an application
+        L5_RES_SMS_AT_UNSPECIFIED_ERROR_CAUSE_0xFF =  L5_RES_SMS_AT_BEGIN + 0xFF,
+        L5_RES_SMS_AT_ME_FAILURE_300 =  L5_RES_SMS_AT_BEGIN + 300,
+        L5_RES_SMS_AT_SMS_SERVICE_OF_ME_RESERVED_301 =  L5_RES_SMS_AT_BEGIN + 301,
+        L5_RES_SMS_AT_OPERATION_NOT_ALLOWED_302 =  L5_RES_SMS_AT_BEGIN + 302,
+        L5_RES_SMS_AT_OPERATION_NOT_SUPPORTED_303 =  L5_RES_SMS_AT_BEGIN + 303,
+        L5_RES_SMS_AT_INVALID_PDU_MODE_PARAMETER_304 =  L5_RES_SMS_AT_BEGIN + 304,
+        L5_RES_SMS_AT_INVALID_TEXT_MODE_PARAMETER_305 =  L5_RES_SMS_AT_BEGIN + 305,
+        L5_RES_SMS_AT_SIM_NOT_INSERTED_310 =  L5_RES_SMS_AT_BEGIN + 310,
+        L5_RES_SMS_AT_SIM_PIN_REQUIRED_311 =  L5_RES_SMS_AT_BEGIN + 311,
+        L5_RES_SMS_AT_PH_SIM_PIN_REQUIRED_312 =  L5_RES_SMS_AT_BEGIN + 312,
+        L5_RES_SMS_AT_SIM_FAILURE_313 =  L5_RES_SMS_AT_BEGIN + 313,
+        L5_RES_SMS_AT_SIM_BUSY_314 =  L5_RES_SMS_AT_BEGIN + 314,
+        L5_RES_SMS_AT_SIM_WRONG_315 =  L5_RES_SMS_AT_BEGIN + 315,
+        L5_RES_SMS_AT_SIM_PUK_REQUIRED_316 =  L5_RES_SMS_AT_BEGIN + 316,
+        L5_RES_SMS_AT_SIM_PIN2_REQUIRED_317 =  L5_RES_SMS_AT_BEGIN + 317,
+        L5_RES_SMS_AT_SIM_PUK2_REQUIRED_318 =  L5_RES_SMS_AT_BEGIN + 318,
+        L5_RES_SMS_AT_MEMORY_FAILURE_320 =  L5_RES_SMS_AT_BEGIN + 320,
+        L5_RES_SMS_AT_INVALID_MEMORY_INDEX_321 =  L5_RES_SMS_AT_BEGIN + 321,
+        L5_RES_SMS_AT_MEMORY_FULL_322 =  L5_RES_SMS_AT_BEGIN + 322,
+        L5_RES_SMS_AT_SMSC_ADDRESS_UNKNOWN_330 =  L5_RES_SMS_AT_BEGIN + 330,
+        L5_RES_SMS_AT_NO_NETWORK_SERVICE_331 =  L5_RES_SMS_AT_BEGIN + 331,
+        L5_RES_SMS_AT_NETWORK_TIMEOUT_332 =  L5_RES_SMS_AT_BEGIN + 332,
+        L5_RES_SMS_AT_NO_CNMA_ACKNOWLEDGEMENT_EXPECTED_340 =  L5_RES_SMS_AT_BEGIN + 340,
+        L5_RES_SMS_AT_UNKNOWN_ERROR_500 =  L5_RES_SMS_AT_BEGIN + 500,
+        L5_RES_SMS_AT_END = L5_RES_SMS_AT_BEGIN + 0xFFFF,
+    L5_RES_SMS_END = L5_RES_SMS_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_SS_BEGIN,
+    L5_RES_SS_END = L5_RES_SS_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_SWITCH_BEGIN,
+    L5_RES_SWITCH_END = L5_RES_SWITCH_BEGIN + L5_RES_SEG_NUM,
+    L5_RES_SYS_BEGIN,
+    L5_RES_SYS_ERR_OPERATION_NOT_ALLOWED,
+    L5_RES_SYS_ERR_PEROID_EXCEED,
+    L5_RES_SYS_END = L5_RES_SYS_BEGIN + L5_RES_SEG_NUM,
+    //common l5u result put here
+    L5_RES_L5U_BEGIN,
+        L5_RES_L5U_SIM_NOT_INSERT,
+        L5_RES_L5U_AT_CMD_ENCODE_FAIL,
+        L5_RES_L5U_AT_CNF_DECODE_FAIL,
+        L5_RES_L5U_AT_CNF_TYPE_ERROR,
+        L5_RES_L5U_FAIL,
+    L5_RES_L5U_END = L5_RES_L5U_BEGIN + L5_RES_SEG_NUM,
+} l5_res_enum;
+
+typedef struct {
+    kal_bool is_standard;
+    kal_char name[32];
+    union {
+        kal_uint8 c[16];
+        kal_uint32 i[4];
+    } uuid;
+    kal_uint32 cid_count;
+    void *cid_table_ptr;
+
+    kal_uint32 is_custom_service;
+    kal_uint32 has_custom_service;
+} mbci_service_t;
+
+typedef kal_uint32 (*DSS_SERVICE_OPEN)(UART_PORT port);
+typedef kal_uint32 (*DSS_SERVICE_CLOSE)(UART_PORT port);
+
+typedef struct {
+    kal_char name[32];
+    union {
+        kal_uint8 c[16];
+        kal_uint32 i[4];
+    } uuid;
+
+    DSS_SERVICE_OPEN open_func;
+    DSS_SERVICE_CLOSE close_func;
+} mbci_dss_service_t;
+
+typedef void (*CUSTOM_L5_TIMER_CB)(void *cb_priv);
+
+#endif