#define RK30SDK_WIFI_GPIO_RESET_IOMUX_FGPIO GPIO3C_GPIO3C2
- #elif defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
+ #elif defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
#define RK30SDK_WIFI_GPIO_POWER_N RK2928_PIN0_PD6
#define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE GPIO_LOW
#define RK30SDK_WIFI_GPIO_POWER_PIN_NAME GPIO0D6_MMC1_PWREN_NAME
#define RK30SDK_WIFI_GPIO_POWER_IOMUX_FGPIO GPIO0D_GPIO0D6
+
+ #elif defined(CONFIG_MT5931) || defined(CONFIG_MT5931_MT6622)
+ #define RK30SDK_WIFI_GPIO_POWER_N RK2928_PIN3_PD2
+ #define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE GPIO_HIGH
+
+ #define RK30SDK_WIFI_GPIO_RESET_N RK2928_PIN3_PD5
+ #define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE GPIO_HIGH
#endif
#endif
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)
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
+
mdelay(100);
}
#endif
return 0;
}
+#if defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU)
+static int __init rk29sdk_wifi_bt_gpio_control_init(void)
+{
+ pr_info("%s: init finished\n",__func__);
+ return 0;
+}
+#else
static int __init rk29sdk_wifi_bt_gpio_control_init(void)
{
rk29sdk_init_wifi_mem();
#endif
#if defined(CONFIG_SDMMC1_RK29) && !defined(CONFIG_SDMMC_RK29_OLD)
-
- 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.data2_gpio.iomux.name, rksdmmc1_gpio_init.data2_gpio.iomux.fgpio);
- gpio_request(rksdmmc1_gpio_init.data2_gpio.io, "mmc1-data2");
- gpio_direction_output(rksdmmc1_gpio_init.data2_gpio.io,GPIO_LOW);//set mmc1-data2 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.
-
rk29_sdmmc_gpio_open(1, 0); //added by xbw at 2011-10-13
#endif
pr_info("%s: init finished\n",__func__);
return 0;
}
+#endif
#if (defined(CONFIG_RTL8192CU) || defined(CONFIG_RTL8188EU) )&& defined(CONFIG_ARCH_RK2928)
static int usbwifi_power_status = 1;
.iomux = {
.name = RK29SDK_SD_CARD_DETECT_PIN_NAME,
.fgpio = RK29SDK_SD_CARD_DETECT_IOMUX_FGPIO,
- .fmux = GPIO3B_SDMMC0_DETECT_N,
+ .fmux = RK29SDK_SD_CARD_DETECT_IOMUX_FMUX,
},
},
* the end of setting for SDMMC devices
**************************************************************************************************/
+#if defined(CONFIG_MT5931_MT6622)
+static struct mt6622_platform_data mt6622_platdata = {
+ .power_gpio = { // BT_REG_ON
+ .io = RK2928_PIN3_PC2, // set io to INVALID_GPIO for disable it
+ .enable = GPIO_HIGH,
+ .iomux = {
+ .name = NULL,
+ },
+ },
+
+ .reset_gpio = { // BT_RST
+ .io = RK2928_PIN0_PC6,
+ .enable = GPIO_LOW,
+ .iomux = {
+ .name = NULL,
+ },
+ },
+
+ .irq_gpio = {
+ .io = RK2928_PIN3_PD3,
+ .enable = GPIO_HIGH,
+ .iomux = {
+ .name = NULL,
+ },
+ }
+};
+
+static struct platform_device device_mt6622 = {
+ .name = "mt6622",
+ .id = -1,
+ .dev = {
+ .platform_data = &mt6622_platdata,
+ },
+};
+#endif
#ifdef CONFIG_SND_SOC_RK2928
static struct resource resources_acodec[] = {
#ifdef CONFIG_BATTERY_RK30_ADC_FAC
&rk30_device_adc_battery,
#endif
+#ifdef CONFIG_WIFI_CONTROL_FUNC
+ &rk29sdk_wifi_device,
+#endif
+#ifdef CONFIG_MT5931_MT6622
+ &device_mt6622,
+#endif
};
//i2c
#ifdef CONFIG_I2C0_RK30