rtl8712_syscfg_bitdef.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2010 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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. * Modifications for inclusion into the Linux staging tree are
  19. * Copyright(c) 2010 Larry Finger. All rights reserved.
  20. *
  21. * Contact information:
  22. * WLAN FAE <wlanfae@realtek.com>
  23. * Larry Finger <Larry.Finger@lwfinger.net>
  24. *
  25. ******************************************************************************/
  26. #ifndef __RTL8712_SYSCFG_BITDEF_H__
  27. #define __RTL8712_SYSCFG_BITDEF_H__
  28. /*SYS_PWR_CTRL*/
  29. /*SRCTRL0*/
  30. /*SRCTRL1*/
  31. /*SYS_CLKR*/
  32. /*SYS_IOS_CTRL*/
  33. #define iso_LDR2RP_SHT 8 /* EE Loader to Retention Path*/
  34. #define iso_LDR2RP BIT(iso_LDR2RP_SHT) /* 1:isolation, 0:attach*/
  35. /*SYS_CTRL*/
  36. #define FEN_DIO_SDIO_SHT 0
  37. #define FEN_DIO_SDIO BIT(FEN_DIO_SDIO_SHT)
  38. #define FEN_SDIO_SHT 1
  39. #define FEN_SDIO BIT(FEN_SDIO_SHT)
  40. #define FEN_USBA_SHT 2
  41. #define FEN_USBA BIT(FEN_USBA_SHT)
  42. #define FEN_UPLL_SHT 3
  43. #define FEN_UPLL BIT(FEN_UPLL_SHT)
  44. #define FEN_USBD_SHT 4
  45. #define FEN_USBD BIT(FEN_USBD_SHT)
  46. #define FEN_DIO_PCIE_SHT 5
  47. #define FEN_DIO_PCIE BIT(FEN_DIO_PCIE_SHT)
  48. #define FEN_PCIEA_SHT 6
  49. #define FEN_PCIEA BIT(FEN_PCIEA_SHT)
  50. #define FEN_PPLL_SHT 7
  51. #define FEN_PPLL BIT(FEN_PPLL_SHT)
  52. #define FEN_PCIED_SHT 8
  53. #define FEN_PCIED BIT(FEN_PCIED_SHT)
  54. #define FEN_CPUEN_SHT 10
  55. #define FEN_CPUEN BIT(FEN_CPUEN_SHT)
  56. #define FEN_DCORE_SHT 11
  57. #define FEN_DCORE BIT(FEN_DCORE_SHT)
  58. #define FEN_ELDR_SHT 12
  59. #define FEN_ELDR BIT(FEN_ELDR_SHT)
  60. #define PWC_DV2LDR_SHT 13
  61. #define PWC_DV2LDR BIT(PWC_DV2LDR_SHT) /* Loader Power Enable*/
  62. /*=== SYS_CLKR ===*/
  63. #define SYS_CLKSEL_SHT 0
  64. #define SYS_CLKSEL BIT(SYS_CLKSEL_SHT) /* System Clock 80MHz*/
  65. #define PS_CLKSEL_SHT 1
  66. #define PS_CLKSEL BIT(PS_CLKSEL_SHT) /*System power save
  67. * clock select.*/
  68. #define CPU_CLKSEL_SHT 2
  69. #define CPU_CLKSEL BIT(CPU_CLKSEL_SHT) /* System Clock select,
  70. * 1: AFE source,
  71. * 0: System clock(L-Bus)*/
  72. #define INT32K_EN_SHT 3
  73. #define INT32K_EN BIT(INT32K_EN_SHT)
  74. #define MACSLP_SHT 4
  75. #define MACSLP BIT(MACSLP_SHT)
  76. #define MAC_CLK_EN_SHT 11
  77. #define MAC_CLK_EN BIT(MAC_CLK_EN_SHT) /* MAC Clock Enable.*/
  78. #define SYS_CLK_EN_SHT 12
  79. #define SYS_CLK_EN BIT(SYS_CLK_EN_SHT)
  80. #define RING_CLK_EN_SHT 13
  81. #define RING_CLK_EN BIT(RING_CLK_EN_SHT)
  82. #define SWHW_SEL_SHT 14
  83. #define SWHW_SEL BIT(SWHW_SEL_SHT) /* Load done,
  84. * control path switch.*/
  85. #define FWHW_SEL_SHT 15
  86. #define FWHW_SEL BIT(FWHW_SEL_SHT) /* Sleep exit,
  87. * control path switch.*/
  88. /*9346CR*/
  89. #define _VPDIDX_MSK 0xFF00
  90. #define _VPDIDX_SHT 8
  91. #define _EEM_MSK 0x00C0
  92. #define _EEM_SHT 6
  93. #define _EEM0 BIT(6)
  94. #define _EEM1 BIT(7)
  95. #define _EEPROM_EN BIT(5)
  96. #define _9356SEL BIT(4)
  97. #define _EECS BIT(3)
  98. #define _EESK BIT(2)
  99. #define _EEDI BIT(1)
  100. #define _EEDO BIT(0)
  101. /*AFE_MISC*/
  102. #define AFE_MISC_USB_MBEN_SHT 7
  103. #define AFE_MISC_USB_MBEN BIT(AFE_MISC_USB_MBEN_SHT)
  104. #define AFE_MISC_USB_BGEN_SHT 6
  105. #define AFE_MISC_USB_BGEN BIT(AFE_MISC_USB_BGEN_SHT)
  106. #define AFE_MISC_LD12_VDAJ_SHT 4
  107. #define AFE_MISC_LD12_VDAJ_MSK 0X0030
  108. #define AFE_MISC_LD12_VDAJ BIT(AFE_MISC_LD12_VDAJ_SHT)
  109. #define AFE_MISC_I32_EN_SHT 3
  110. #define AFE_MISC_I32_EN BIT(AFE_MISC_I32_EN_SHT)
  111. #define AFE_MISC_E32_EN_SHT 2
  112. #define AFE_MISC_E32_EN BIT(AFE_MISC_E32_EN_SHT)
  113. #define AFE_MISC_MBEN_SHT 1
  114. #define AFE_MISC_MBEN BIT(AFE_MISC_MBEN_SHT)/* Enable AFE Macro
  115. * Block's Mbias.*/
  116. #define AFE_MISC_BGEN_SHT 0
  117. #define AFE_MISC_BGEN BIT(AFE_MISC_BGEN_SHT)/* Enable AFE Macro
  118. * Block's Bandgap.*/
  119. /*--------------------------------------------------------------------------*/
  120. /* SPS1_CTRL bits (Offset 0x18-1E, 56bits)*/
  121. /*--------------------------------------------------------------------------*/
  122. #define SPS1_SWEN BIT(1) /* Enable vsps18 SW Macro Block.*/
  123. #define SPS1_LDEN BIT(0) /* Enable VSPS12 LDO Macro block.*/
  124. /*----------------------------------------------------------------------------*/
  125. /* LDOA15_CTRL bits (Offset 0x20, 8bits)*/
  126. /*----------------------------------------------------------------------------*/
  127. #define LDA15_EN BIT(0) /* Enable LDOA15 Macro Block*/
  128. /*----------------------------------------------------------------------------*/
  129. /* 8192S LDOV12D_CTRL bit (Offset 0x21, 8bits)*/
  130. /*----------------------------------------------------------------------------*/
  131. #define LDV12_EN BIT(0) /* Enable LDOVD12 Macro Block*/
  132. #define LDV12_SDBY BIT(1) /* LDOVD12 standby mode*/
  133. /*CLK_PS_CTRL*/
  134. #define _CLK_GATE_EN BIT(0)
  135. /* EFUSE_CTRL*/
  136. #define EF_FLAG BIT(31) /* Access Flag, Write:1;
  137. * Read:0*/
  138. #define EF_PGPD 0x70000000 /* E-fuse Program time*/
  139. #define EF_RDT 0x0F000000 /* E-fuse read time: in the
  140. * unit of cycle time*/
  141. #define EF_PDN_EN BIT(19) /* EFuse Power down enable*/
  142. #define ALD_EN BIT(18) /* Autoload Enable*/
  143. #define EF_ADDR 0x0003FF00 /* Access Address*/
  144. #define EF_DATA 0x000000FF /* Access Data*/
  145. /* EFUSE_TEST*/
  146. #define LDOE25_EN BIT(31) /* Enable LDOE25 Macro Block*/
  147. /* EFUSE_CLK_CTRL*/
  148. #define EFUSE_CLK_EN BIT(1) /* E-Fuse Clock Enable*/
  149. #define EFUSE_CLK_SEL BIT(0) /* E-Fuse Clock Select,
  150. * 0:500K, 1:40M*/
  151. #endif /*__RTL8712_SYSCFG_BITDEF_H__*/