Add basic change for v1453
Change-Id: I9497a61bbc3717f66413794a4e7dee0347c0bc33
diff --git a/mbtk/mbtk_at/inc/mbtk_gpio_def.h b/mbtk/mbtk_at/inc/mbtk_gpio_def.h
new file mode 100755
index 0000000..4234f86
--- /dev/null
+++ b/mbtk/mbtk_at/inc/mbtk_gpio_def.h
@@ -0,0 +1,173 @@
+/**
+ * \file gpio-define.h
+ * \brief A Documented file.
+ *
+ * Detailed description
+ * \Author: Sniper <js.wang@mobiletek.cn>
+ * \Version: 1.0.0
+ * \Date: 2022-04-26
+ */
+
+#ifndef __GPIO_DEFINE_H__
+#define __GPIO_DEFINE_H__
+
+typedef unsigned int uint32; /* Unsigned 32 bit value */
+typedef unsigned short uint16; /* Unsigned 16 bit value */
+typedef unsigned char uint8; /* Unsigned 8 bit value */
+
+
+/*
+4组GPIO共128个GPIO,分别从GPIO_0到GPIO_127
+GPIO22位于0xd4019000这一组的BIT22
+
+GPIO0_BASE 0xD4019000
+GPIO1_BASE 0xD4019004
+GPIO2_BASE 0xD4019008
+GPIO3_BASE 0xD4019100
+ */
+
+#define GPIO_FUNC_MMC1_DAT3 0xD401E094
+#define GPIO_FUNC_MMC1_DAT2 0xD401E098
+#define GPIO_FUNC_MMC1_DAT1 0xD401E09C
+#define GPIO_FUNC_MMC1_DAT0 0xD401E0A0
+#define GPIO_FUNC_MMC1_CMD 0xD401E0A4
+#define GPIO_FUNC_MMC1_CLK 0xD401E0A8
+#define GPIO_FUNC_MMC1_CD 0xD401E0AC
+#define GPIO_FUNC_USB_ID 0xD401E0B0
+#define GPIO_FUNC_PRI_TDI 0xD401E0B4
+#define GPIO_FUNC_PRI_TMS 0xD401E0B8
+#define GPIO_FUNC_PRI_TCK 0xD401E0BC
+#define GPIO_FUNC_PRI_TDO 0xD401E0C0
+#define GPIO_FUNC_QSPI_VMODE_GPIO 0xD401E0C4
+#define GPIO_FUNC_VBUS_DRV 0xD401E0C8
+#define GPIO_FUNC_CLK_REQ 0xD401E0CC
+#define GPIO_FUNC_VCXO_REQ 0xD401E0D4
+#define GPIO_FUNC_VCXO_OUT 0xD401E0D8
+
+#define GPIO_FUNC_GPIO_00 0xD401E0DC
+#define GPIO_FUNC_GPIO_01 0xD401E0E0
+#define GPIO_FUNC_GPIO_02 0xD401E0E4
+#define GPIO_FUNC_GPIO_03 0xD401E0E8
+#define GPIO_FUNC_GPIO_04 0xD401E0EC
+#define GPIO_FUNC_GPIO_05 0xD401E0F0
+#define GPIO_FUNC_GPIO_06 0xD401E0F4
+#define GPIO_FUNC_GPIO_07 0xD401E0F8
+#define GPIO_FUNC_GPIO_08 0xD401E0FC
+#define GPIO_FUNC_GPIO_09 0xD401E100
+#define GPIO_FUNC_GPIO_10 0xD401E104
+
+#define GPIO_FUNC_GPIO_11 0xD401E108
+#define GPIO_FUNC_GPIO_12 0xD401E10C
+#define GPIO_FUNC_GPIO_13 0xD401E110
+#define GPIO_FUNC_GPIO_14 0xD401E114
+#define GPIO_FUNC_GPIO_15 0xD401E118
+#define GPIO_FUNC_GPIO_16 0xD401E11C
+#define GPIO_FUNC_GPIO_17 0xD401E120
+#define GPIO_FUNC_GPIO_18 0xD401E124
+#define GPIO_FUNC_GPIO_19 0xD401E128
+#define GPIO_FUNC_GPIO_20 0xD401E12C
+
+#define GPIO_FUNC_GPIO_21 0xD401E130
+#define GPIO_FUNC_GPIO_22 0xD401E134
+#define GPIO_FUNC_GPIO_23 0xD401E138
+#define GPIO_FUNC_GPIO_24 0xD401E13C
+#define GPIO_FUNC_GPIO_25 0xD401E140
+#define GPIO_FUNC_GPIO_26 0xD401E144
+#define GPIO_FUNC_GPIO_27 0xD401E148
+#define GPIO_FUNC_GPIO_28 0xD401E14C
+#define GPIO_FUNC_GPIO_29 0xD401E150
+#define GPIO_FUNC_GPIO_30 0xD401E154
+
+#define GPIO_FUNC_GPIO_31 0xD401E158
+#define GPIO_FUNC_GPIO_32 0xD401E15C
+#define GPIO_FUNC_GPIO_33 0xD401E160
+#define GPIO_FUNC_GPIO_34 0xD401E164
+#define GPIO_FUNC_GPIO_35 0xD401E168
+#define GPIO_FUNC_GPIO_36 0xD401E16C
+#define GPIO_FUNC_GPIO_37 0xD401E170
+#define GPIO_FUNC_GPIO_38 0xD401E174
+#define GPIO_FUNC_GPIO_39 0xD401E178
+#define GPIO_FUNC_GPIO_40 0xD401E17C
+
+#define GPIO_FUNC_GPIO_41 0xD401E180
+#define GPIO_FUNC_GPIO_42 0xD401E184
+#define GPIO_FUNC_GPIO_43 0xD401E188
+#define GPIO_FUNC_GPIO_44 0xD401E18C
+#define GPIO_FUNC_GPIO_45 0xD401E190
+#define GPIO_FUNC_GPIO_46 0xD401E194
+#define GPIO_FUNC_GPIO_47 0xD401E198
+#define GPIO_FUNC_GPIO_48 0xD401E19C
+#define GPIO_FUNC_GPIO_49 0xD401E1A0
+#define GPIO_FUNC_GPIO_50 0xD401E1A4
+
+#define GPIO_FUNC_GPIO_51 0xD401E1A8
+#define GPIO_FUNC_GPIO_52 0xD401E1AC
+#define GPIO_FUNC_GPIO_53 0xD401E1B0
+#define GPIO_FUNC_GPIO_54 0xD401E1B4
+#define GPIO_FUNC_DVL_0 0xD401E2B4
+#define GPIO_FUNC_DVL_1 0xD401E2B8
+#define GPIO_FUNC_GPIO_69 0xD401E2BC
+#define GPIO_FUNC_GPIO_70 0xD401E2C0
+
+#define GPIO_FUNC_QSPI_DAT3 0xD401E2C4
+#define GPIO_FUNC_QSPI_DAT2 0xD401E2C8
+#define GPIO_FUNC_QSPI_DAT1 0xD401E2CC
+#define GPIO_FUNC_QSPI_DAT0 0xD401E2D0
+#define GPIO_FUNC_QSPI_CLK 0xD401E2D4
+#define GPIO_FUNC_QSPI_CS1 0xD401E2D8
+#define GPIO_FUNC_GPIO_77 0xD401E2DC
+#define GPIO_FUNC_GPIO_78 0xD401E2E0
+#define GPIO_FUNC_GPIO_79 0xD401E2E4
+#define GPIO_FUNC_GPIO_80 0xD401E2E8
+
+#define GPIO_FUNC_SDIO_DAT3 0xD401E2EC
+#define GPIO_FUNC_SDIO_DAT2 0xD401E2F0
+#define GPIO_FUNC_SDIO_DAT1 0xD401E2F4
+#define GPIO_FUNC_SDIO_DAT0 0xD401E2F8
+#define GPIO_FUNC_SDIO_CMD 0xD401E2FC
+#define GPIO_FUNC_SDIO_CLK 0xD401E300
+#define GPIO_FUNC_GPIO_60 0xD401E304
+#define GPIO_FUNC_USIM_UCLK 0xD401E320
+#define GPIO_FUNC_USIM_UIO 0xD401E324
+#define GPIO_FUNC_USIM_URSTn 0xD401E328
+
+#define MMC1_DAT3 0x
+
+
+
+#define GPIO0_BASE 0xD4019000
+#define GPIO1_BASE 0xD4019004
+#define GPIO2_BASE 0xD4019008
+#define GPIO3_BASE 0xD4019100
+
+struct gpio_register_function
+{
+ int reg;
+ int func_gpio; // 第 [func_gpio] 功能为 GPIO
+};
+
+typedef struct
+{
+ uint16 output_pin;
+ uint16 input_pin;
+ uint8 mbtk_gpio_test_result; // 0 is pass, 1 is low failed, 2 is high failed
+}mbtk_gpio_test_pin_paired;
+
+
+typedef struct
+{
+ uint16 output_pin;
+ uint16 output_gpio;
+ uint16 input_gpio;
+ uint16 input_pin;
+ uint8 mbtk_gpio_test_result; // 0 is pass, 1 is low failed, 2 is high failed
+}mbtk_gpio_paired_info_struct;
+
+typedef struct
+{
+ uint16 gpio_num;
+ uint16 pin_num; //moudle pin num
+}mbtk_gpio_test_pin_and_gpio;
+
+#endif /*__GPIO_DEFINE_H__*/
+