wifi: add mt6622 resource in board
authorhwg <hwg@rock-chips.com>
Wed, 20 Mar 2013 09:39:26 +0000 (17:39 +0800)
committerhwg <hwg@rock-chips.com>
Wed, 20 Mar 2013 09:39:26 +0000 (17:39 +0800)
arch/arm/mach-rk30/board-rk3028-tb-sdmmc-conifg.c
arch/arm/mach-rk30/board-rk3028-tb.c
arch/arm/mach-rk30/board-rk3168-tb-sdmmc-conifg.c
arch/arm/mach-rk30/board-rk3168-tb.c
arch/arm/mach-rk30/board-rk3168m-tb-sdmmc-conifg.c
arch/arm/mach-rk30/board-rk3168m-tb.c

index ba831936ebbb61ecd3da6d810d6827fd1753759b..122cf0fadf28fc2e185c7d6ad58f6e71a04df4f7 100755 (executable)
@@ -132,6 +132,11 @@ int rk31sdk_get_sdmmc0_pin_io_voltage(void)
     #endif // #if COMBO_MODULE_MT6620_CDT--#endif
 #endif 
 
+#ifndef RK30SDK_WIFI_GPIO_WIFI_INT_B
+#define RK30SDK_WIFI_GPIO_WIFI_INT_B              INVALID_GPIO
+#define RK30SDK_WIFI_GPIO_WIFI_INT_B_ENABLE_VALUE   GPIO_HIGH 
+#endif
+
 int rk31sdk_get_sdio_wifi_voltage(void)
 {
     int voltage;
index 61e880afc4d12abbd67bd23e95f7d7596eabaee7..ffd1aae95ffc3a98b89063ec881eed165bebfb24 100755 (executable)
@@ -1288,6 +1288,41 @@ struct platform_device rk_device_gps = {
        };
 #endif
 
+#if defined(CONFIG_MT5931_MT6622)
+static struct mt6622_platform_data mt6622_platdata = {
+                   .power_gpio         = { // BT_REG_ON
+                       .io             = RK30_PIN3_PD5, // set io to INVALID_GPIO for disable it
+                           .enable         = GPIO_HIGH,
+                           .iomux          = {
+                                   .name       = NULL,
+                               },
+                   },
+
+                   .reset_gpio         = { // BT_RST
+                       .io             = RK30_PIN0_PD7,
+                       .enable         = GPIO_HIGH,
+                       .iomux          = {
+                           .name       = NULL,
+                       },
+                   },
+
+                   .irq_gpio           = {
+                           .io             = RK30_PIN3_PD2,
+                           .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_ION
@@ -1332,6 +1367,9 @@ static struct platform_device *devices[] __initdata = {
        &rk_device_gps,
 #endif
 
+#ifdef CONFIG_MT5931_MT6622
+       &device_mt6622,
+#endif
 };
 
 static int rk_platform_add_display_devices(void)
@@ -2044,6 +2082,10 @@ static void __init machine_rk30_board_init(void)
 #if defined(CONFIG_MT6620)
     clk_set_rate(clk_get_sys("rk_serial.0", "uart"), 48*1000000);
 #endif
+
+#if defined(CONFIG_MT5931_MT6622)
+               clk_set_rate(clk_get_sys("rk_serial.0", "uart"), 24*1000000);
+#endif         
 }
 
 static void __init rk30_reserve(void)
index 2f687c62e6bcc10e84fb11caa51adb8a547f4461..e44300abd7ec7ef63aa4906fc07f7edde53fc41d 100644 (file)
@@ -132,6 +132,11 @@ int rk31sdk_get_sdmmc0_pin_io_voltage(void)
     #endif // #if COMBO_MODULE_MT6620_CDT--#endif
 #endif 
 
+#ifndef RK30SDK_WIFI_GPIO_WIFI_INT_B
+#define RK30SDK_WIFI_GPIO_WIFI_INT_B              INVALID_GPIO
+#define RK30SDK_WIFI_GPIO_WIFI_INT_B_ENABLE_VALUE   GPIO_HIGH 
+#endif
+
 int rk31sdk_get_sdio_wifi_voltage(void)
 {
     int voltage;
index b5e8d6a58950af2a771af8ce25635f7a102403ae..5a115778937d53aebf3b19bf6a1dde6b3f607cfe 100755 (executable)
@@ -1272,6 +1272,41 @@ struct platform_device rk_device_gps = {
        };
 #endif
 
+#if defined(CONFIG_MT5931_MT6622)
+static struct mt6622_platform_data mt6622_platdata = {
+                   .power_gpio         = { // BT_REG_ON
+                       .io             = RK30_PIN3_PD5, // set io to INVALID_GPIO for disable it
+                           .enable         = GPIO_HIGH,
+                           .iomux          = {
+                                   .name       = NULL,
+                               },
+                   },
+
+                   .reset_gpio         = { // BT_RST
+                       .io             = RK30_PIN0_PD7,
+                       .enable         = GPIO_HIGH,
+                       .iomux          = {
+                           .name       = NULL,
+                       },
+                   },
+
+                   .irq_gpio           = {
+                           .io             = RK30_PIN3_PD2,
+                           .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_ION
@@ -1318,6 +1353,9 @@ static struct platform_device *devices[] __initdata = {
 #if defined(CONFIG_ARCH_RK3188)
        &device_mali,
 #endif
+#ifdef CONFIG_MT5931_MT6622
+       &device_mt6622,
+#endif
 };
 
 static int rk_platform_add_display_devices(void)
@@ -2030,6 +2068,10 @@ static void __init machine_rk30_board_init(void)
 #if defined(CONFIG_MT6620)
     clk_set_rate(clk_get_sys("rk_serial.0", "uart"), 48*1000000);
 #endif
+
+#if defined(CONFIG_MT5931_MT6622)
+               clk_set_rate(clk_get_sys("rk_serial.0", "uart"), 24*1000000);
+#endif         
 }
 #define HD_SCREEN_SIZE 1920UL*1200UL*4*3
 static void __init rk30_reserve(void)
index 6532d1b8800c30dcd632dc68a10c124ae7fd75b5..c1c03e05759999ab23a54add83873e4e7b08d4c5 100644 (file)
@@ -132,6 +132,11 @@ int rk31sdk_get_sdmmc0_pin_io_voltage(void)
     #endif // #if COMBO_MODULE_MT6620_CDT--#endif
 #endif 
 
+#ifndef RK30SDK_WIFI_GPIO_WIFI_INT_B
+#define RK30SDK_WIFI_GPIO_WIFI_INT_B              INVALID_GPIO
+#define RK30SDK_WIFI_GPIO_WIFI_INT_B_ENABLE_VALUE   GPIO_HIGH 
+#endif
+
 int rk31sdk_get_sdio_wifi_voltage(void)
 {
     int voltage;
index 741055301d30be10dd794f1ac573a6da59ad2ef5..b76afbd07e219357fa012b6e227d4e9575ac27e2 100755 (executable)
@@ -1278,6 +1278,41 @@ struct platform_device rk_device_gps = {
        };
 #endif
 
+#if defined(CONFIG_MT5931_MT6622)
+static struct mt6622_platform_data mt6622_platdata = {
+                   .power_gpio         = { // BT_REG_ON
+                       .io             = RK30_PIN3_PD5, // set io to INVALID_GPIO for disable it
+                           .enable         = GPIO_HIGH,
+                           .iomux          = {
+                                   .name       = NULL,
+                               },
+                   },
+
+                   .reset_gpio         = { // BT_RST
+                       .io             = RK30_PIN0_PD7,
+                       .enable         = GPIO_HIGH,
+                       .iomux          = {
+                           .name       = NULL,
+                       },
+                   },
+
+                   .irq_gpio           = {
+                           .io             = RK30_PIN3_PD2,
+                           .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_ION
@@ -1322,6 +1357,9 @@ static struct platform_device *devices[] __initdata = {
        &rk_device_gps,
 #endif
 
+#ifdef CONFIG_MT5931_MT6622
+       &device_mt6622,
+#endif
 };
 
 static int rk_platform_add_display_devices(void)
@@ -2035,6 +2073,10 @@ static void __init machine_rk30_board_init(void)
 #if defined(CONFIG_MT6620)
     clk_set_rate(clk_get_sys("rk_serial.0", "uart"), 48*1000000);
 #endif
+
+#if defined(CONFIG_MT5931_MT6622)
+               clk_set_rate(clk_get_sys("rk_serial.0", "uart"), 24*1000000);
+#endif         
 }
 
 static void __init rk30_reserve(void)