rk3026: rk3028a_tb: wifi support

This commit is contained in:
kfx
2013-08-02 10:44:40 +08:00
parent 1422cd135d
commit d489cd9790
4 changed files with 199 additions and 10 deletions

View File

@@ -1085,6 +1085,11 @@ static void __init machine_rk30_board_init(void)
spi_register_board_info(board_spi_devices, ARRAY_SIZE(board_spi_devices));
platform_add_devices(devices, ARRAY_SIZE(devices));
rk_platform_add_display_devices();
#if defined(CONFIG_WIFI_CONTROL_FUNC)
rk29sdk_wifi_bt_gpio_control_init();
#elif defined(CONFIG_WIFI_COMBO_MODULE_CONTROL_FUNC)
rk29sdk_wifi_combo_module_gpio_init();
#endif
}
static void __init rk30_reserve(void)

View File

@@ -73,10 +73,10 @@ int rk31sdk_get_sdmmc0_pin_io_voltage(void)
#define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE GPIO_LOW//GPIO_HIGH
#elif defined(CONFIG_BCM4330) || defined(CONFIG_BCM4329) || defined(CONFIG_BCM4319) || defined(CONFIG_RK903) || defined(CONFIG_RK901)
#define RK30SDK_WIFI_GPIO_POWER_N RK30_PIN3_PD0
#define RK30SDK_WIFI_GPIO_POWER_N RK30_PIN0_PD6
#define RK30SDK_WIFI_GPIO_POWER_ENABLE_VALUE GPIO_HIGH
#define RK30SDK_WIFI_GPIO_RESET_N RK30_PIN2_PA7
#define RK30SDK_WIFI_GPIO_RESET_N RK30_PIN3_PC2
#define RK30SDK_WIFI_GPIO_RESET_ENABLE_VALUE GPIO_HIGH
#elif defined(CONFIG_MT5931_MT6622) || defined(CONFIG_MT5931)

View File

@@ -721,40 +721,40 @@ static struct rfkill_rk_platform_data rfkill_rk_platdata = {
},
.reset_gpio = { // BT_RST
.io = RK30_PIN1_PB3, // set io to INVALID_GPIO for disable it
.io = RK30_PIN3_PD5, // set io to INVALID_GPIO for disable it
.enable = GPIO_LOW,
.iomux = {
.name = "bt_reset",
.fgpio = GPIO1_B3,
//.fgpio = GPIO3_D5,
},
},
.wake_gpio = { // BT_WAKE, use to control bt's sleep and wakeup
.io = RK30_PIN1_PB2, // set io to INVALID_GPIO for disable it
.io = RK30_PIN0_PC6, // set io to INVALID_GPIO for disable it
.enable = GPIO_HIGH,
.iomux = {
.name = "bt_wake",
.fgpio = GPIO1_B2,
//.fgpio = GPIO0_C6,
},
},
.wake_host_irq = { // BT_HOST_WAKE, for bt wakeup host when it is in deep sleep
.gpio = {
.io = RK30_PIN0_PA4, // set io to INVALID_GPIO for disable it
.io = RK30_PIN0_PC5, // set io to INVALID_GPIO for disable it
.enable = GPIO_LOW, // set GPIO_LOW for falling, set 0 for rising
.iomux = {
.name = "bt_wake_host",
//.fgpio = GPIO0_A4,
//.fgpio = GPIO0_C5,
},
},
},
.rts_gpio = { // UART_RTS, enable or disable BT's data coming
.io = RK30_PIN1_PA3, // set io to INVALID_GPIO for disable it
.io = RK30_PIN0_PC3, // set io to INVALID_GPIO for disable it
.enable = GPIO_LOW,
.iomux = {
.name = "bt_rts",
.fgpio = GPIO1_A3,
.fgpio = GPIO0_C3,
.fmux = UART0_RTSN,
},
}
@@ -1153,6 +1153,11 @@ static void __init machine_rk30_board_init(void)
spi_register_board_info(board_spi_devices, ARRAY_SIZE(board_spi_devices));
platform_add_devices(devices, ARRAY_SIZE(devices));
rk_platform_add_display_devices();
#if defined(CONFIG_WIFI_CONTROL_FUNC)
rk29sdk_wifi_bt_gpio_control_init();
#elif defined(CONFIG_WIFI_COMBO_MODULE_CONTROL_FUNC)
rk29sdk_wifi_combo_module_gpio_init();
#endif
}
static void __init rk30_reserve(void)

View File

@@ -461,6 +461,185 @@ static struct rksdmmc_gpio_board rksdmmc1_gpio_init = {
};
// ---end -#if defined(CONFIG_ARCH_RK2928)
#elif defined(CONFIG_ARCH_RK3026)
/*
* define the gpio for sdmmc0
*/
static struct rksdmmc_gpio_board rksdmmc0_gpio_init = {
.clk_gpio = {
.io = RK30_PIN1_PC0,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc0_clk",
.fgpio = GPIO1_C0,
.fmux = MMC0_CLKOUT,
},
},
.cmd_gpio = {
.io = RK30_PIN1_PB7,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc0_cmd",
.fgpio = GPIO1_B7,
.fmux = MMC0_CMD,
},
},
.data0_gpio = {
.io = RK30_PIN1_PC2,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc0_d0",
.fgpio = GPIO1_C2,
.fmux = MMC0_D0,
},
},
.data1_gpio = {
.io = RK30_PIN1_PC3,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc0_d1",
.fgpio = GPIO1_C3,
.fmux = MMC0_D1,
},
},
.data2_gpio = {
.io = RK30_PIN1_PC4,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc0_d2",
.fgpio = GPIO1_C4,
.fmux = MMC0_D2,
},
},
.data3_gpio = {
.io = RK30_PIN1_PC5,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc0_d3",
.fgpio = GPIO1_C5,
.fmux = MMC0_D3,
},
},
.power_en_gpio = {
#if defined(RK29SDK_SD_CARD_PWR_EN) || (INVALID_GPIO != RK29SDK_SD_CARD_PWR_EN)
.io = RK29SDK_SD_CARD_PWR_EN,
.enable = RK29SDK_SD_CARD_PWR_EN_LEVEL,
#ifdef RK29SDK_SD_CARD_PWR_EN_PIN_NAME
.iomux = {
.name = RK29SDK_SD_CARD_PWR_EN_PIN_NAME,
#ifdef RK29SDK_SD_CARD_PWR_EN_IOMUX_FGPIO
.fgpio = RK29SDK_SD_CARD_PWR_EN_IOMUX_FGPIO,
#endif
#ifdef RK29SDK_SD_CARD_PWR_EN_IOMUX_FMUX
.fmux = RK29SDK_SD_CARD_PWR_EN_IOMUX_FMUX,
#endif
},
#endif
#else
.io = INVALID_GPIO,
.enable = GPIO_LOW,
#endif
},
.detect_irq = {
#if defined(RK29SDK_SD_CARD_DETECT_N) || (INVALID_GPIO != RK29SDK_SD_CARD_DETECT_N)
.io = RK29SDK_SD_CARD_DETECT_N,
.enable = RK29SDK_SD_CARD_INSERT_LEVEL,
#ifdef RK29SDK_SD_CARD_DETECT_PIN_NAME
.iomux = {
.name = RK29SDK_SD_CARD_DETECT_PIN_NAME,
#ifdef RK29SDK_SD_CARD_DETECT_IOMUX_FGPIO
.fgpio = RK29SDK_SD_CARD_DETECT_IOMUX_FGPIO,
#endif
#ifdef RK29SDK_SD_CARD_DETECT_IOMUX_FMUX
.fmux = RK29SDK_SD_CARD_DETECT_IOMUX_FMUX,
#endif
},
#endif
#else
.io = INVALID_GPIO,
.enable = GPIO_LOW,
#endif
},
};
/*
* define the gpio for sdmmc1
*/
static struct rksdmmc_gpio_board rksdmmc1_gpio_init = {
.clk_gpio = {
.io = RK30_PIN0_PB1,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc1_clk",
.fgpio = GPIO0_B1,
.fmux = MMC1_CLKOUT,
},
},
.cmd_gpio = {
.io = RK30_PIN0_PB0,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc1_cmd",
.fgpio = GPIO0_B0,
.fmux = MMC1_CMD,
},
},
.data0_gpio = {
.io = RK30_PIN0_PB3,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc1_d0",
.fgpio = GPIO0_B3,
.fmux = MMC1_D0,
},
},
.data1_gpio = {
.io = RK30_PIN0_PB4,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc1_d1",
.fgpio = GPIO0_B4,
.fmux = MMC1_D1,
},
},
.data2_gpio = {
.io = RK30_PIN0_PB5,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc1_d2",
.fgpio = GPIO0_B5,
.fmux = MMC1_D2,
},
},
.data3_gpio = {
.io = RK30_PIN0_PB6,
.enable = GPIO_HIGH,
.iomux = {
.name = "mmc1_d3",
.fgpio = GPIO0_B6,
.fmux = MMC1_D3,
},
},
};
// ---end -#if defined(CONFIG_ARCH_RK3026)
#else //default for RK30,RK3066 SDK
/*