#define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE GPIO_HIGH
#define RK30SDK_WIFI_GPIO_RESET_PIN_NAME GPIO3D1_SDMMC1BACKENDPWR_NAME
#define RK30SDK_WIFI_GPIO_RESET_IOMUX_FGPIO GPIO3D_GPIO3D1
+
+ #elif defined(CONFIG_MT5931) || defined(CONFIG_MT5931_MT6622)
+ //power
+ #define RK30SDK_WIFI_GPIO_POWER_N RK30_PIN3_PC6 //RK30_PIN3_PD0 // huweiguo
+ #define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE GPIO_HIGH
+ //reset
+ #define RK30SDK_WIFI_GPIO_RESET_N RK30_PIN3_PD1 // huweiguo
+ #define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE GPIO_HIGH
#elif defined(CONFIG_MT6620)
#if !defined(CONFIG_USE_SDMMC0_FOR_WIFI_DEVELOP_BOARD)
gpio_request(rksdmmc1_gpio_init.data0_gpio.io, "mmc1-data0");
gpio_direction_output(rksdmmc1_gpio_init.data0_gpio.io,GPIO_LOW);//set mmc1-data0 to low.
- #if defined(CONFIG_WIFI_COMBO_MODULE_CONTROL_FUNC)
+ #if defined(CONFIG_WIFI_COMBO_MODULE_CONTROL_FUNC) || defined(CONFIG_MT5931) || defined(CONFIG_MT5931_MT6622)
rk29_mux_api_set(rksdmmc1_gpio_init.data1_gpio.iomux.name, rksdmmc1_gpio_init.data1_gpio.iomux.fgpio);
gpio_request(rksdmmc1_gpio_init.data1_gpio.io, "mmc1-data1");
gpio_direction_output(rksdmmc1_gpio_init.data1_gpio.io,GPIO_LOW);//set mmc1-data1 to low.
#if defined(CONFIG_SDMMC1_RK29) && !defined(CONFIG_SDMMC_RK29_OLD)
+ #if !defined(CONFIG_MT5931) && !defined(CONFIG_MT5931_MT6622)
rk29_mux_api_set(rksdmmc1_gpio_init.data1_gpio.iomux.name, rksdmmc1_gpio_init.data1_gpio.iomux.fgpio);
gpio_request(rksdmmc1_gpio_init.data1_gpio.io, "mmc1-data1");
gpio_direction_output(rksdmmc1_gpio_init.data1_gpio.io,GPIO_LOW);//set mmc1-data1 to low.
rk29_mux_api_set(rksdmmc1_gpio_init.data3_gpio.iomux.name, rksdmmc1_gpio_init.data3_gpio.iomux.fgpio);
gpio_request(rksdmmc1_gpio_init.data3_gpio.io, "mmc1-data3");
gpio_direction_output(rksdmmc1_gpio_init.data3_gpio.io,GPIO_LOW);//set mmc1-data3 to low.
+ #endif
rk29_sdmmc_gpio_open(1, 0); //added by xbw at 2011-10-13
#endif
};
#endif
+#if defined(CONFIG_MT5931_MT6622)
+static struct mt6622_platform_data mt6622_platdata = {
+ .power_gpio = { // BT_REG_ON
+ .io = RK30_PIN3_PC7, // set io to INVALID_GPIO for disable it
+ .enable = GPIO_HIGH,
+ .iomux = {
+ .name = NULL,
+ },
+ },
+
+ .reset_gpio = { // BT_RST
+ .io = RK30_PIN3_PD1,
+ .enable = GPIO_LOW,
+ .iomux = {
+ .name = NULL,
+ },
+ },
+
+ .irq_gpio = {
+ .io = RK30_PIN6_PA7,
+ .enable = GPIO_HIGH,
+ .iomux = {
+ .name = NULL,
+ },
+ }
+};
+
+static struct platform_device device_mt6622 = {
+ .name = "mt6622",
+ .id = -1,
+ .dev = {
+ .platform_data = &mt6622_platdata,
+ },
+};
+#endif
+
static struct platform_device *devices[] __initdata = {
#ifdef CONFIG_FB_ROCKCHIP
&device_fb,
#ifdef CONFIG_RFKILL_RK
&device_rfkill_rk,
#endif
+#ifdef CONFIG_MT5931_MT6622
+ &device_mt6622,
+#endif
};
// i2c