net: wireless: rockchip_wlan: add rtl8723cs support
[firefly-linux-kernel-4.4.55.git] / include / linux / rfkill-wlan.h
1 #ifndef __PLAT_BOARD_H
2 #define __PLAT_BOARD_H
3
4 #include <linux/types.h>
5 #include <linux/init.h>
6 #include <linux/device.h>
7
8 struct rksdmmc_iomux {
9     char    *name;  //set the MACRO of gpio
10     int     fgpio;
11     int     fmux;
12 };
13
14 struct rksdmmc_gpio {
15     int     io;                             //set the address of gpio
16     char    name[64];   //
17     int     enable;  // disable = !enable   //set the default value,i.e,GPIO_HIGH or GPIO_LOW
18     struct rksdmmc_iomux  iomux;
19 };
20
21 struct rksdmmc_pmu {
22     bool power_ctrl_by_pmu;
23     char pmu_regulator[20];
24     int  enable;
25 };
26
27 struct rksdmmc_gpio_wifi_moudle {
28     int sdio_vol;    //sdio reference voltage
29     bool vref_ctrl_enble;
30     bool wifi_power_remain;
31     struct rksdmmc_pmu    mregulator;
32     struct rksdmmc_pmu    ioregulator;
33     struct rksdmmc_gpio   power_n;  //PMU_EN  
34     struct rksdmmc_gpio   reset_n;  //SYSRET_B, DAIRST 
35     struct rksdmmc_gpio   vddio;
36     struct rksdmmc_gpio   bgf_int_b;
37     struct rksdmmc_gpio   wifi_int_b;
38     struct rksdmmc_gpio   gps_sync;
39     struct rksdmmc_gpio   ANTSEL2;  //pin5--ANTSEL2  
40     struct rksdmmc_gpio   ANTSEL3;  //pin6--ANTSEL3 
41     struct rksdmmc_gpio   GPS_LAN;  //pin33--GPS_LAN
42     struct regmap *grf;
43 };
44
45 enum {
46     WIFI_RK901,
47     WIFI_RK903,
48     WIFI_AP6181,
49     WIFI_AP6210,
50     WIFI_AP6212,
51     WIFI_AP6234,
52     WIFI_AP6330,
53     WIFI_AP6335,
54     WIFI_AP6354,
55     WIFI_AP6441,
56     WIFI_AP6476,
57     WIFI_AP6493,
58     WIFI_AP6XXX_SERIES,
59     WIFI_RTL8188EU,
60     WIFI_RTL8192DU,
61     WIFI_RTL8723AS,
62     WIFI_RTL8723BS,
63     WIFI_RTL8723BS_VQ0,
64     WIFI_RTL8723CS,
65     WIFI_RTL8723BU,
66     WIFI_RTL8723AU,
67     WIFI_RTL8189ES,
68     WIFI_RTL8812AU,
69     WIFI_RTL_SERIES,
70     WIFI_ESP8089,
71     TYPE_MAX,
72 };
73
74 int rfkill_get_wifi_power_state(int *power, int *vref_ctrl_enable);
75 void *rockchip_mem_prealloc(int section, unsigned long size);
76 int rockchip_wifi_ref_voltage(int on);
77 int rockchip_wifi_power(int on);
78 int rockchip_wifi_set_carddetect(int val);
79 int rockchip_wifi_get_oob_irq(void);
80 int rockchip_wifi_reset(int on);
81 int rockchip_wifi_mac_addr(unsigned char *buf);
82 void *rockchip_wifi_country_code(char *ccode);
83 #endif