rk3168: ds1006h: mt5931&mt6622 support(lintao)
authorkfx <kfx@rock-chips.com>
Mon, 31 Dec 2012 10:29:40 +0000 (18:29 +0800)
committerkfx <kfx@rock-chips.com>
Mon, 31 Dec 2012 10:29:40 +0000 (18:29 +0800)
arch/arm/configs/rk3168_ds1006h_defconfig
arch/arm/mach-rk30/board-rk30-sdk-sdmmc.c [changed mode: 0755->0644]
arch/arm/mach-rk30/board-rk3168-ds1006h.c

index 587b0cb06d6950a2ac74a92309ccbfc6b1c73ffa..f4eb004340f555282d8fc6d1f60c6ec46bf8d477 100644 (file)
@@ -207,7 +207,8 @@ CONFIG_PHYLIB=y
 # CONFIG_NETDEV_1000 is not set
 # CONFIG_NETDEV_10000 is not set
 CONFIG_WLAN_80211=y
-CONFIG_RKWIFI=y
+CONFIG_MT5931_MT6622=y
+#CONFIG_RKWIFI is not set
 CONFIG_USB_USBNET=y
 CONFIG_PPP=y
 CONFIG_PPP_MULTILINK=y
@@ -261,7 +262,8 @@ CONFIG_PS_STK3171=y
 # CONFIG_LEGACY_PTYS is not set
 CONFIG_SERIAL_RK29=y
 CONFIG_UART0_RK29=y
-CONFIG_UART0_CTS_RTS_RK29=y
+# CONFIG_UART0_CTS_RTS_RK29 is not set
+CONFIG_UART0_DMA_RK29=2
 CONFIG_UART3_RK29=y
 CONFIG_UART3_CTS_RTS_RK29=y
 # CONFIG_HW_RANDOM is not set
old mode 100755 (executable)
new mode 100644 (file)
index 27d87a5..29781a6
         #define RK30SDK_WIFI_GPIO_RESET_IOMUX_FGPIO     GPIO2A_GPIO2A7
     
     #elif defined(CONFIG_MT5931_MT6622) || defined(CONFIG_MT5931)
-       #define RK30SDK_WIFI_GPIO_POWER_N               RK30_PIN3_PD0 
-       #define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE    GPIO_HIGH
-        #define RK30SDK_WIFI_GPIO_POWER_PIN_NAME        GPIO3D0_SDMMC1PWREN_MIIMD_NAME
-        #define RK30SDK_WIFI_GPIO_POWER_IOMUX_FGPIO     GPIO3D_GPIO3D0
+           #define RK30SDK_WIFI_GPIO_POWER_N               RK30_PIN0_PA5 
+           #define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE    GPIO_HIGH
+        //#define RK30SDK_WIFI_GPIO_POWER_PIN_NAME        GPIO3D0_SDMMC1PWREN_MIIMD_NAME
+        //#define RK30SDK_WIFI_GPIO_POWER_IOMUX_FGPIO     GPIO3D_GPIO3D0
  
-        //#define RK30SDK_WIFI_GPIO_RESET_N            RK30_PIN3_PD1
-        //#define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE    GPIO_HIGH
-        //#define RK30SDK_WIFI_GPIO_RESET_PIN_NAME        GPIO3D1_SDMMC1BACKENDPWR_MIIMDCLK_NAME
-        //#define RK30SDK_WIFI_GPIO_RESET_IOMUX_FGPIO     GPIO3D_GPIO3D1
+        #define RK30SDK_WIFI_GPIO_RESET_N                  RK30_PIN3_PD1
+        #define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE    GPIO_HIGH
+        #define RK30SDK_WIFI_GPIO_RESET_PIN_NAME        GPIO3D1_SDMMC1BACKENDPWR_MIIMDCLK_NAME
+        #define RK30SDK_WIFI_GPIO_RESET_IOMUX_FGPIO     GPIO3D_GPIO3D1
     #endif   
 #elif defined(CONFIG_ARCH_RK2928) //refer to file ./arch/arm/mach-rk2928/include/mach/iomux.h
     #define WIFI_HOST_WAKE RK2928_PIN3_PC0 
index 5e4c1b72735593bde42198482da5fc7fca034b7a..b1b90d3c1adc0cc6cf52b5f4e7f6f16246f88d97 100644 (file)
@@ -989,6 +989,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_FB_ROCKCHIP
@@ -1025,6 +1060,9 @@ static struct platform_device *devices[] __initdata = {
 #ifdef CONFIG_GPS_RK
        &rk_device_gps,
 #endif
+#ifdef CONFIG_MT5931_MT6622
+       &device_mt6622,
+#endif
 };
 
 // i2c
@@ -1611,6 +1649,10 @@ static void __init machine_rk30_board_init(void)
 #if defined(CONFIG_MT6620)
            clk_set_rate(clk_get_sys("rk_serial.1", "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)