[Feature]add MT2731_MP2_MR2_SVN388 baseline version

Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/cust_usb.h b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/cust_usb.h
new file mode 100644
index 0000000..501b4ad
--- /dev/null
+++ b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/cust_usb.h
@@ -0,0 +1,9 @@
+#pragma once
+
+#define CONFIG_USBD_LANG    "0409"
+
+#define USB_VENDORID        (0x0E8D)
+#define USB_PRODUCTID       (0x201C)
+#define USB_VERSIONID       (0x0100)
+#define USB_MANUFACTURER    "MediaTek"
+#define USB_PRODUCT_NAME    "Yocto"
diff --git a/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/debugconfig.h b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/debugconfig.h
new file mode 100644
index 0000000..8f463ef
--- /dev/null
+++ b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/debugconfig.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2014 Travis Geiselbrecht
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+#pragma once
+
+#define DEBUG_UART 0
+
diff --git a/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/io_pwr.h b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/io_pwr.h
new file mode 100644
index 0000000..22beef1
--- /dev/null
+++ b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/include/target/io_pwr.h
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2018 MediaTek Inc.
+ *
+ * Use of this source code is governed by a MIT-style
+ * license that can be found in the LICENSE file or at
+ * https://opensource.org/licenses/MIT
+ */
+
+#ifndef IO_PWR_H
+#define IO_PWR_H
+
+/*
+ * auto2731fpga io power domain
+ * define 1: 3.3v
+ * define 0: 1.8v
+ */
+
+#define VCC3IO_GPIO    1
+#define VCC3IO_GBE     1
+#define VCC3IO_NOR     1
+#define VCC3IO_MSDC1   1
+#define VCC3IO_MSDC2   1
+#define VCC3IO_UART4B  1
+#define VCC3IO_SPICTP  0
+#define VCC3IO_SPIMCU  1
+#define VCC3IO_I2S102  1
+#define VCC3IO_I2SIO1  1
+#define VCC3IO_I2SO02  1
+#define VCC3IO_TDMO    1
+
+#endif
+
diff --git a/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/rules.mk b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/rules.mk
new file mode 100644
index 0000000..9bbd012
--- /dev/null
+++ b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/rules.mk
@@ -0,0 +1,21 @@
+LOCAL_DIR := $(GET_LOCAL_DIR)
+MODULE := ${LOCAL_DIR}
+
+GLOBAL_INCLUDES += \
+    $(LOCAL_DIR)/include
+
+MODULE_SRCS += \
+    $(LOCAL_DIR)/target.c
+
+PLATFORM := mt2731
+PMIC := $(MTK_PMIC_CHIP_TYPE)
+ifeq ($(findstring PMIC, $(strip $(DEFINES))),)
+GLOBAL_DEFINES += PMIC_CHIP_$(shell echo $(PMIC) | tr '[a-z]' '[A-Z]')
+endif
+
+LOW_POWER_VERSION := lpddr4
+
+MODULE_DEPS += \
+    platform/$(PLATFORM)/drivers/mmc \
+
+include make/module.mk
diff --git a/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/target.c b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/target.c
new file mode 100644
index 0000000..f6e1d02
--- /dev/null
+++ b/src/bsp/lk/target/auto2731evb-ivt-emmc-lp4/target.c
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018 MediaTek Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining
+ * a copy of this software and associated documentation files
+ * (the "Software"), to deal in the Software without restriction,
+ * including without limitation the rights to use, copy, modify, merge,
+ * publish, distribute, sublicense, and/or sell copies of the Software,
+ * and to permit persons to whom the Software is furnished to do so,
+ * subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#include <platform/mmc_core.h>
+
+extern void platform_memory_init(void);
+
+struct mmc_card *card;
+bool retry_opcond;
+
+void target_early_init(void)
+{
+    card = emmc_init_stage1(&retry_opcond);
+
+    /* init memory */
+    platform_memory_init();
+}
+
+void target_init(void)
+{
+    if (card) {
+        emmc_init_stage2(card, retry_opcond);
+    }
+}
+