rfkill-wlan.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __PLAT_BOARD_H
  3. #define __PLAT_BOARD_H
  4. #include <linux/types.h>
  5. #include <linux/init.h>
  6. #include <linux/device.h>
  7. #include <linux/clk.h>
  8. struct rksdmmc_iomux {
  9. char *name; //set the MACRO of gpio
  10. int fgpio;
  11. int fmux;
  12. };
  13. struct rksdmmc_gpio {
  14. int io; //set the address of gpio
  15. char name[64]; //
  16. int enable; // disable = !enable //set the default value,i.e,GPIO_HIGH or GPIO_LOW
  17. struct rksdmmc_iomux iomux;
  18. };
  19. struct rksdmmc_pmu {
  20. bool power_ctrl_by_pmu;
  21. char pmu_regulator[20];
  22. int enable;
  23. };
  24. struct rksdmmc_gpio_wifi_moudle {
  25. int sdio_vol; //sdio reference voltage
  26. bool vref_ctrl_enble;
  27. bool wifi_power_remain;
  28. struct rksdmmc_pmu mregulator;
  29. struct rksdmmc_pmu ioregulator;
  30. struct rksdmmc_gpio vbat_n;
  31. struct rksdmmc_gpio power_n; //PMU_EN
  32. struct rksdmmc_gpio reset_n; //SYSRET_B, DAIRST
  33. struct rksdmmc_gpio vddio;
  34. struct rksdmmc_gpio bgf_int_b;
  35. struct rksdmmc_gpio wifi_int_b;
  36. struct rksdmmc_gpio gps_sync;
  37. struct rksdmmc_gpio ANTSEL2; //pin5--ANTSEL2
  38. struct rksdmmc_gpio ANTSEL3; //pin6--ANTSEL3
  39. struct rksdmmc_gpio GPS_LAN; //pin33--GPS_LAN
  40. struct regmap *grf;
  41. struct clk *ext_clk;
  42. };
  43. enum {
  44. WIFI_RK901,
  45. WIFI_RK903,
  46. WIFI_AP6181,
  47. WIFI_AP6210,
  48. WIFI_AP6212,
  49. WIFI_AP6234,
  50. WIFI_AP6255,
  51. WIFI_AP6256,
  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_RTL8723DS,
  66. WIFI_RTL8723BU,
  67. WIFI_RTL8723AU,
  68. WIFI_RTL8189ES,
  69. WIFI_RTL8189FS,
  70. WIFI_RTL8812AU,
  71. WIFI_RTL_SERIES,
  72. WIFI_ESP8089,
  73. WIFI_MVL88W8977,
  74. WIFI_SSV6051,
  75. TYPE_MAX,
  76. };
  77. int rfkill_get_wifi_power_state(int *power, int *vref_ctrl_enable);
  78. void *rockchip_mem_prealloc(int section, unsigned long size);
  79. int rockchip_wifi_ref_voltage(int on);
  80. int rockchip_wifi_power(int on);
  81. int rockchip_wifi_set_carddetect(int val);
  82. int rockchip_wifi_get_oob_irq(void);
  83. int rockchip_wifi_get_oob_irq_flag(void);
  84. int rockchip_wifi_reset(int on);
  85. int rockchip_wifi_mac_addr(unsigned char *buf);
  86. void *rockchip_wifi_country_code(char *ccode);
  87. #endif