halmac_gpio_cmd.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2016 - 2018 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. ******************************************************************************/
  15. #ifndef HALMAC_GPIO_CMD
  16. #define HALMAC_GPIO_CMD
  17. #include "halmac_2_platform.h"
  18. /* GPIO ID */
  19. #define HALMAC_GPIO0 0
  20. #define HALMAC_GPIO1 1
  21. #define HALMAC_GPIO2 2
  22. #define HALMAC_GPIO3 3
  23. #define HALMAC_GPIO4 4
  24. #define HALMAC_GPIO5 5
  25. #define HALMAC_GPIO6 6
  26. #define HALMAC_GPIO7 7
  27. #define HALMAC_GPIO8 8
  28. #define HALMAC_GPIO9 9
  29. #define HALMAC_GPIO10 10
  30. #define HALMAC_GPIO11 11
  31. #define HALMAC_GPIO12 12
  32. #define HALMAC_GPIO13 13
  33. #define HALMAC_GPIO14 14
  34. #define HALMAC_GPIO15 15
  35. #define HALMAC_GPIO_NUM 16
  36. /* GPIO type */
  37. #define HALMAC_GPIO_IN 0
  38. #define HALMAC_GPIO_OUT 1
  39. #define HALMAC_GPIO_IN_OUT 2
  40. /* Function name */
  41. #define HALMAC_WL_HWPDN 0
  42. #define HALMAC_BT_HWPDN 1
  43. #define HALMAC_BT_GPIO 2
  44. #define HALMAC_WL_HW_EXTWOL 3
  45. #define HALMAC_BT_HW_EXTWOL 4
  46. #define HALMAC_BT_SFLASH 5
  47. #define HALMAC_WL_SFLASH 6
  48. #define HALMAC_WL_LED 7
  49. #define HALMAC_SDIO_INT 8
  50. #define HALMAC_UART0 9
  51. #define HALMAC_EEPROM 10
  52. #define HALMAC_JTAG 11
  53. #define HALMAC_LTE_COEX_UART 12
  54. #define HALMAC_3W_LTE_WL_GPIO 13
  55. #define HALMAC_GPIO2_3_WL_CTRL_EN 14
  56. #define HALMAC_GPIO13_14_WL_CTRL_EN 15
  57. #define HALMAC_DBG_GNT_WL_BT 16
  58. #define HALMAC_BT_3DDLS_A 17
  59. #define HALMAC_BT_3DDLS_B 18
  60. #define HALMAC_BT_PTA 19
  61. #define HALMAC_WL_PTA 20
  62. #define HALMAC_WL_UART 21
  63. #define HALMAC_WLMAC_DBG 22
  64. #define HALMAC_WLPHY_DBG 23
  65. #define HALMAC_BT_DBG 24
  66. #define HALMAC_WLPHY_RFE_CTRL2GPIO 25
  67. #define HALMAC_EXT_XTAL 26
  68. #define HALMAC_SW_IO 27
  69. #define HALMAC_BT_SDIO_INT 28
  70. #define HALMAC_BT_JTAG 29
  71. #define HALMAC_WL_JTAG 30
  72. #define HALMAC_BT_RF 31
  73. #define HALMAC_WLPHY_RFE_CTRL2GPIO_2 32
  74. #define HALMAC_MAILBOX_3W 33
  75. #define HALMAC_MAILBOX_1W 34
  76. #define HALMAC_SW_DPDT_SEL 35
  77. #define HALMAC_BT_DPDT_SEL 36
  78. #define HALMAC_WL_DPDT_SEL 37
  79. #define HALMAC_BT_PAPE_SEL 38
  80. #define HALMAC_SW_PAPE_SEL 39
  81. #define HALMAC_WLBT_PAPE_SEL 40
  82. #define HALMAC_SW_LNAON_SET 41
  83. #define HALMAC_BT_LNAON_SEL 42
  84. #define HALMAC_WLBT_LNAON_SEL 43
  85. #define HALMAC_SWR_CTRL_EN 44
  86. struct halmac_gpio_pimux_list {
  87. u16 func;
  88. u8 id;
  89. u8 type;
  90. u16 offset;
  91. u8 msk;
  92. u8 value;
  93. };
  94. #endif