Wifi:Bt: add wifi & bt resources into rk3288 dts.

This commit is contained in:
gwl
2014-03-19 11:23:53 +08:00
parent 654667b3e0
commit ead7a910c0
5 changed files with 66 additions and 6 deletions

View File

@@ -182,7 +182,7 @@
supports-highspeed;
supports-sdio;
cap-sdio-irq;
//cap-sdio-irq;
status = "okay";
};

View File

@@ -8,6 +8,39 @@
status = "okay";
};
wireless-wlan {
compatible = "wlan-platdata";
wifi_chip_type = "";
sdio_vref = <28000>;
//power_ctrl_by_pmu;
pmu_regulator = "act_ldo3";
pmu_enable_level = <1>; //1->HIGH, 0->LOW
WIFI,poweren_gpio = <&gpio4 GPIO_D4 GPIO_ACTIVE_HIGH>;
WIFI,host_wake_irq = <&gpio4 GPIO_D6 GPIO_ACTIVE_HIGH>;
//WIFI,reset_gpio = <&gpio0 GPIO_A2 GPIO_ACTIVE_LOW>;
status = "okay";
};
wireless-bluetooth {
compatible = "bluetooth-platdata";
uart_rts_gpios = <&gpio4 GPIO_C3 GPIO_ACTIVE_LOW>;
pinctrl-names = "default","rts_gpio";
pinctrl-0 = <&uart0_rts>;
pinctrl-1 = <&uart0_rts_gpio>;
BT,power_gpio = <&gpio4 GPIO_D3 GPIO_ACTIVE_HIGH>;
BT,reset_gpio = <&gpio4 GPIO_D5 GPIO_ACTIVE_HIGH>;
BT,wake_gpio = <&gpio4 GPIO_D2 GPIO_ACTIVE_HIGH>;
BT,wake_host_irq = <&gpio4 GPIO_D7 GPIO_ACTIVE_LOW>;
status = "okay";
};
backlight {
compatible = "pwm-backlight";
pwms = <&pwm0 0 25000>;
@@ -80,7 +113,7 @@
supports-highspeed;
supports-sdio;
cap-sdio-irq;
//cap-sdio-irq;
status = "diabled";
};

View File

@@ -37,10 +37,7 @@
#ifdef CUSTOMER_OOB
int bcm_wlan_get_oob_irq(void)
{
int host_oob_irq = 0;
return host_oob_irq;
return rockchip_wifi_get_oob_irq();
}
#endif

View File

@@ -41,6 +41,7 @@ struct rksdmmc_gpio_wifi_moudle {
void *rockchip_mem_prealloc(int section, unsigned long size);
int rockchip_wifi_power(int on);
int rockchip_wifi_set_carddetect(void);
int rockchip_wifi_get_oob_irq(void);
int rockchip_wifi_reset(int on);
int rockchip_wifi_mac_addr(unsigned char *buf);
void *rockchip_wifi_country_code(char *ccode);

View File

@@ -275,6 +275,35 @@ int rockchip_wifi_set_carddetect(void)
}
EXPORT_SYMBOL(rockchip_wifi_set_carddetect);
/**************************************************************************
*
* Wifi Get Interrupt irq Func
*
*************************************************************************/
int rockchip_wifi_get_oob_irq(void)
{
struct rfkill_wlan_data *mrfkill = g_rfkill;
struct rksdmmc_gpio *wifi_int_irq;
LOG("%s: Enter\n", __func__);
if (mrfkill == NULL) {
LOG("%s: rfkill-wlan driver has not Successful initialized\n", __func__);
return -1;
}
wifi_int_irq = &mrfkill->pdata->wifi_int_b;
if (gpio_is_valid(wifi_int_irq->io)) {
return gpio_to_irq(wifi_int_irq->io);
//return wifi_int_irq->io;
} else {
LOG("%s: wifi OOB pin isn't defined.\n", __func__);
}
return -1;
}
EXPORT_SYMBOL(rockchip_wifi_get_oob_irq);
/**************************************************************************
*
* Wifi Reset Func