ar71xx_regs.h 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. /*
  2. * Atheros AR71XX/AR724X/AR913X SoC register definitions
  3. *
  4. * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com>
  5. * Copyright (C) 2008-2010 Gabor Juhos <juhosg@openwrt.org>
  6. * Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
  7. *
  8. * Parts of this file are based on Atheros' 2.6.15/2.6.31 BSP
  9. *
  10. * This program is free software; you can redistribute it and/or modify it
  11. * under the terms of the GNU General Public License version 2 as published
  12. * by the Free Software Foundation.
  13. */
  14. #ifndef __ASM_MACH_AR71XX_REGS_H
  15. #define __ASM_MACH_AR71XX_REGS_H
  16. #define BIT(_x) (1UL << (_x))
  17. #define AR71XX_APB_BASE 0x18000000
  18. #define AR71XX_GE0_BASE 0x19000000
  19. #define AR71XX_GE0_SIZE 0x10000
  20. #define AR71XX_GE1_BASE 0x1a000000
  21. #define AR71XX_GE1_SIZE 0x10000
  22. #define AR71XX_EHCI_BASE 0x1b000000
  23. #define AR71XX_EHCI_SIZE 0x1000
  24. #define AR71XX_OHCI_BASE 0x1c000000
  25. #define AR71XX_OHCI_SIZE 0x1000
  26. #define AR71XX_SPI_BASE 0x1f000000
  27. #define AR71XX_SPI_SIZE 0x01000000
  28. #define AR71XX_DDR_CTRL_BASE (AR71XX_APB_BASE + 0x00000000)
  29. #define AR71XX_DDR_CTRL_SIZE 0x100
  30. #define AR71XX_UART_BASE (AR71XX_APB_BASE + 0x00020000)
  31. #define AR71XX_UART_SIZE 0x100
  32. #define AR71XX_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000)
  33. #define AR71XX_USB_CTRL_SIZE 0x100
  34. #define AR71XX_GPIO_BASE (AR71XX_APB_BASE + 0x00040000)
  35. #define AR71XX_GPIO_SIZE 0x100
  36. #define AR71XX_PLL_BASE (AR71XX_APB_BASE + 0x00050000)
  37. #define AR71XX_PLL_SIZE 0x100
  38. #define AR71XX_RESET_BASE (AR71XX_APB_BASE + 0x00060000)
  39. #define AR71XX_RESET_SIZE 0x100
  40. #define AR71XX_MII_BASE (AR71XX_APB_BASE + 0x00070000)
  41. #define AR71XX_MII_SIZE 0x100
  42. #define AR71XX_PCI_MEM_BASE 0x10000000
  43. #define AR71XX_PCI_MEM_SIZE 0x07000000
  44. #define AR71XX_PCI_WIN0_OFFS 0x10000000
  45. #define AR71XX_PCI_WIN1_OFFS 0x11000000
  46. #define AR71XX_PCI_WIN2_OFFS 0x12000000
  47. #define AR71XX_PCI_WIN3_OFFS 0x13000000
  48. #define AR71XX_PCI_WIN4_OFFS 0x14000000
  49. #define AR71XX_PCI_WIN5_OFFS 0x15000000
  50. #define AR71XX_PCI_WIN6_OFFS 0x16000000
  51. #define AR71XX_PCI_WIN7_OFFS 0x07000000
  52. #define AR71XX_PCI_CFG_BASE \
  53. (AR71XX_PCI_MEM_BASE + AR71XX_PCI_WIN7_OFFS + 0x10000)
  54. #define AR71XX_PCI_CFG_SIZE 0x100
  55. #define AR7240_USB_CTRL_BASE (AR71XX_APB_BASE + 0x00030000)
  56. #define AR7240_USB_CTRL_SIZE 0x100
  57. #define AR7240_OHCI_BASE 0x1b000000
  58. #define AR7240_OHCI_SIZE 0x1000
  59. #define AR724X_PCI_MEM_BASE 0x10000000
  60. #define AR724X_PCI_MEM_SIZE 0x04000000
  61. #define AR724X_PCI_CFG_BASE 0x14000000
  62. #define AR724X_PCI_CFG_SIZE 0x1000
  63. #define AR724X_PCI_CRP_BASE (AR71XX_APB_BASE + 0x000c0000)
  64. #define AR724X_PCI_CRP_SIZE 0x1000
  65. #define AR724X_PCI_CTRL_BASE (AR71XX_APB_BASE + 0x000f0000)
  66. #define AR724X_PCI_CTRL_SIZE 0x100
  67. #define AR724X_EHCI_BASE 0x1b000000
  68. #define AR724X_EHCI_SIZE 0x1000
  69. #define AR913X_EHCI_BASE 0x1b000000
  70. #define AR913X_EHCI_SIZE 0x1000
  71. #define AR913X_WMAC_BASE (AR71XX_APB_BASE + 0x000C0000)
  72. #define AR913X_WMAC_SIZE 0x30000
  73. #define AR933X_UART_BASE (AR71XX_APB_BASE + 0x00020000)
  74. #define AR933X_UART_SIZE 0x14
  75. #define AR933X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
  76. #define AR933X_GMAC_SIZE 0x04
  77. #define AR933X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
  78. #define AR933X_WMAC_SIZE 0x20000
  79. #define AR933X_EHCI_BASE 0x1b000000
  80. #define AR933X_EHCI_SIZE 0x1000
  81. #define AR934X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
  82. #define AR934X_GMAC_SIZE 0x14
  83. #define AR934X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
  84. #define AR934X_WMAC_SIZE 0x20000
  85. #define AR934X_EHCI_BASE 0x1b000000
  86. #define AR934X_EHCI_SIZE 0x200
  87. #define QCA955X_PCI_MEM_BASE0 0x10000000
  88. #define QCA955X_PCI_MEM_BASE1 0x12000000
  89. #define QCA955X_PCI_MEM_SIZE 0x02000000
  90. #define QCA955X_PCI_CFG_BASE0 0x14000000
  91. #define QCA955X_PCI_CFG_BASE1 0x16000000
  92. #define QCA955X_PCI_CFG_SIZE 0x1000
  93. #define QCA955X_PCI_CRP_BASE0 (AR71XX_APB_BASE + 0x000c0000)
  94. #define QCA955X_PCI_CRP_BASE1 (AR71XX_APB_BASE + 0x00250000)
  95. #define QCA955X_PCI_CRP_SIZE 0x1000
  96. #define QCA955X_PCI_CTRL_BASE0 (AR71XX_APB_BASE + 0x000f0000)
  97. #define QCA955X_PCI_CTRL_BASE1 (AR71XX_APB_BASE + 0x00280000)
  98. #define QCA955X_PCI_CTRL_SIZE 0x100
  99. #define QCA955X_WMAC_BASE (AR71XX_APB_BASE + 0x00100000)
  100. #define QCA955X_WMAC_SIZE 0x20000
  101. #define QCA955X_EHCI0_BASE 0x1b000000
  102. #define QCA955X_EHCI1_BASE 0x1b400000
  103. #define QCA955X_EHCI_SIZE 0x1000
  104. #define QCA955X_GMAC_BASE (AR71XX_APB_BASE + 0x00070000)
  105. #define QCA955X_GMAC_SIZE 0x40
  106. #define AR9300_OTP_BASE 0x14000
  107. #define AR9300_OTP_STATUS 0x15f18
  108. #define AR9300_OTP_STATUS_TYPE 0x7
  109. #define AR9300_OTP_STATUS_VALID 0x4
  110. #define AR9300_OTP_STATUS_ACCESS_BUSY 0x2
  111. #define AR9300_OTP_STATUS_SM_BUSY 0x1
  112. #define AR9300_OTP_READ_DATA 0x15f1c
  113. /*
  114. * DDR_CTRL block
  115. */
  116. #define AR71XX_DDR_REG_PCI_WIN0 0x7c
  117. #define AR71XX_DDR_REG_PCI_WIN1 0x80
  118. #define AR71XX_DDR_REG_PCI_WIN2 0x84
  119. #define AR71XX_DDR_REG_PCI_WIN3 0x88
  120. #define AR71XX_DDR_REG_PCI_WIN4 0x8c
  121. #define AR71XX_DDR_REG_PCI_WIN5 0x90
  122. #define AR71XX_DDR_REG_PCI_WIN6 0x94
  123. #define AR71XX_DDR_REG_PCI_WIN7 0x98
  124. #define AR71XX_DDR_REG_FLUSH_GE0 0x9c
  125. #define AR71XX_DDR_REG_FLUSH_GE1 0xa0
  126. #define AR71XX_DDR_REG_FLUSH_USB 0xa4
  127. #define AR71XX_DDR_REG_FLUSH_PCI 0xa8
  128. #define AR724X_DDR_REG_FLUSH_GE0 0x7c
  129. #define AR724X_DDR_REG_FLUSH_GE1 0x80
  130. #define AR724X_DDR_REG_FLUSH_USB 0x84
  131. #define AR724X_DDR_REG_FLUSH_PCIE 0x88
  132. #define AR913X_DDR_REG_FLUSH_GE0 0x7c
  133. #define AR913X_DDR_REG_FLUSH_GE1 0x80
  134. #define AR913X_DDR_REG_FLUSH_USB 0x84
  135. #define AR913X_DDR_REG_FLUSH_WMAC 0x88
  136. #define AR933X_DDR_REG_FLUSH_GE0 0x7c
  137. #define AR933X_DDR_REG_FLUSH_GE1 0x80
  138. #define AR933X_DDR_REG_FLUSH_USB 0x84
  139. #define AR933X_DDR_REG_FLUSH_WMAC 0x88
  140. #define AR934X_DDR_REG_FLUSH_GE0 0x9c
  141. #define AR934X_DDR_REG_FLUSH_GE1 0xa0
  142. #define AR934X_DDR_REG_FLUSH_USB 0xa4
  143. #define AR934X_DDR_REG_FLUSH_PCIE 0xa8
  144. #define AR934X_DDR_REG_FLUSH_WMAC 0xac
  145. /*
  146. * PLL block
  147. */
  148. #define AR71XX_PLL_REG_CPU_CONFIG 0x00
  149. #define AR71XX_PLL_REG_SEC_CONFIG 0x04
  150. #define AR71XX_PLL_REG_ETH0_INT_CLOCK 0x10
  151. #define AR71XX_PLL_REG_ETH1_INT_CLOCK 0x14
  152. #define AR71XX_PLL_DIV_SHIFT 3
  153. #define AR71XX_PLL_DIV_MASK 0x1f
  154. #define AR71XX_CPU_DIV_SHIFT 16
  155. #define AR71XX_CPU_DIV_MASK 0x3
  156. #define AR71XX_DDR_DIV_SHIFT 18
  157. #define AR71XX_DDR_DIV_MASK 0x3
  158. #define AR71XX_AHB_DIV_SHIFT 20
  159. #define AR71XX_AHB_DIV_MASK 0x7
  160. #define AR71XX_ETH0_PLL_SHIFT 17
  161. #define AR71XX_ETH1_PLL_SHIFT 19
  162. #define AR724X_PLL_REG_CPU_CONFIG 0x00
  163. #define AR724X_PLL_REG_PCIE_CONFIG 0x18
  164. #define AR724X_PLL_DIV_SHIFT 0
  165. #define AR724X_PLL_DIV_MASK 0x3ff
  166. #define AR724X_PLL_REF_DIV_SHIFT 10
  167. #define AR724X_PLL_REF_DIV_MASK 0xf
  168. #define AR724X_AHB_DIV_SHIFT 19
  169. #define AR724X_AHB_DIV_MASK 0x1
  170. #define AR724X_DDR_DIV_SHIFT 22
  171. #define AR724X_DDR_DIV_MASK 0x3
  172. #define AR7242_PLL_REG_ETH0_INT_CLOCK 0x2c
  173. #define AR913X_PLL_REG_CPU_CONFIG 0x00
  174. #define AR913X_PLL_REG_ETH_CONFIG 0x04
  175. #define AR913X_PLL_REG_ETH0_INT_CLOCK 0x14
  176. #define AR913X_PLL_REG_ETH1_INT_CLOCK 0x18
  177. #define AR913X_PLL_DIV_SHIFT 0
  178. #define AR913X_PLL_DIV_MASK 0x3ff
  179. #define AR913X_DDR_DIV_SHIFT 22
  180. #define AR913X_DDR_DIV_MASK 0x3
  181. #define AR913X_AHB_DIV_SHIFT 19
  182. #define AR913X_AHB_DIV_MASK 0x1
  183. #define AR913X_ETH0_PLL_SHIFT 20
  184. #define AR913X_ETH1_PLL_SHIFT 22
  185. #define AR933X_PLL_CPU_CONFIG_REG 0x00
  186. #define AR933X_PLL_CLOCK_CTRL_REG 0x08
  187. #define AR933X_PLL_CPU_CONFIG_NINT_SHIFT 10
  188. #define AR933X_PLL_CPU_CONFIG_NINT_MASK 0x3f
  189. #define AR933X_PLL_CPU_CONFIG_REFDIV_SHIFT 16
  190. #define AR933X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f
  191. #define AR933X_PLL_CPU_CONFIG_OUTDIV_SHIFT 23
  192. #define AR933X_PLL_CPU_CONFIG_OUTDIV_MASK 0x7
  193. #define AR933X_PLL_CLOCK_CTRL_BYPASS BIT(2)
  194. #define AR933X_PLL_CLOCK_CTRL_CPU_DIV_SHIFT 5
  195. #define AR933X_PLL_CLOCK_CTRL_CPU_DIV_MASK 0x3
  196. #define AR933X_PLL_CLOCK_CTRL_DDR_DIV_SHIFT 10
  197. #define AR933X_PLL_CLOCK_CTRL_DDR_DIV_MASK 0x3
  198. #define AR933X_PLL_CLOCK_CTRL_AHB_DIV_SHIFT 15
  199. #define AR933X_PLL_CLOCK_CTRL_AHB_DIV_MASK 0x7
  200. #define AR934X_PLL_CPU_CONFIG_REG 0x00
  201. #define AR934X_PLL_DDR_CONFIG_REG 0x04
  202. #define AR934X_PLL_CPU_DDR_CLK_CTRL_REG 0x08
  203. #define AR934X_PLL_ETH_XMII_CONTROL_REG 0x2c
  204. #define AR934X_PLL_CPU_CONFIG_NFRAC_SHIFT 0
  205. #define AR934X_PLL_CPU_CONFIG_NFRAC_MASK 0x3f
  206. #define AR934X_PLL_CPU_CONFIG_NINT_SHIFT 6
  207. #define AR934X_PLL_CPU_CONFIG_NINT_MASK 0x3f
  208. #define AR934X_PLL_CPU_CONFIG_REFDIV_SHIFT 12
  209. #define AR934X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f
  210. #define AR934X_PLL_CPU_CONFIG_OUTDIV_SHIFT 19
  211. #define AR934X_PLL_CPU_CONFIG_OUTDIV_MASK 0x3
  212. #define AR934X_PLL_DDR_CONFIG_NFRAC_SHIFT 0
  213. #define AR934X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff
  214. #define AR934X_PLL_DDR_CONFIG_NINT_SHIFT 10
  215. #define AR934X_PLL_DDR_CONFIG_NINT_MASK 0x3f
  216. #define AR934X_PLL_DDR_CONFIG_REFDIV_SHIFT 16
  217. #define AR934X_PLL_DDR_CONFIG_REFDIV_MASK 0x1f
  218. #define AR934X_PLL_DDR_CONFIG_OUTDIV_SHIFT 23
  219. #define AR934X_PLL_DDR_CONFIG_OUTDIV_MASK 0x7
  220. #define AR934X_PLL_CPU_DDR_CLK_CTRL_CPU_PLL_BYPASS BIT(2)
  221. #define AR934X_PLL_CPU_DDR_CLK_CTRL_DDR_PLL_BYPASS BIT(3)
  222. #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHB_PLL_BYPASS BIT(4)
  223. #define AR934X_PLL_CPU_DDR_CLK_CTRL_CPU_POST_DIV_SHIFT 5
  224. #define AR934X_PLL_CPU_DDR_CLK_CTRL_CPU_POST_DIV_MASK 0x1f
  225. #define AR934X_PLL_CPU_DDR_CLK_CTRL_DDR_POST_DIV_SHIFT 10
  226. #define AR934X_PLL_CPU_DDR_CLK_CTRL_DDR_POST_DIV_MASK 0x1f
  227. #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHB_POST_DIV_SHIFT 15
  228. #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHB_POST_DIV_MASK 0x1f
  229. #define AR934X_PLL_CPU_DDR_CLK_CTRL_CPUCLK_FROM_CPUPLL BIT(20)
  230. #define AR934X_PLL_CPU_DDR_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21)
  231. #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24)
  232. #define QCA955X_PLL_CPU_CONFIG_REG 0x00
  233. #define QCA955X_PLL_DDR_CONFIG_REG 0x04
  234. #define QCA955X_PLL_CLK_CTRL_REG 0x08
  235. #define QCA955X_PLL_CPU_CONFIG_NFRAC_SHIFT 0
  236. #define QCA955X_PLL_CPU_CONFIG_NFRAC_MASK 0x3f
  237. #define QCA955X_PLL_CPU_CONFIG_NINT_SHIFT 6
  238. #define QCA955X_PLL_CPU_CONFIG_NINT_MASK 0x3f
  239. #define QCA955X_PLL_CPU_CONFIG_REFDIV_SHIFT 12
  240. #define QCA955X_PLL_CPU_CONFIG_REFDIV_MASK 0x1f
  241. #define QCA955X_PLL_CPU_CONFIG_OUTDIV_SHIFT 19
  242. #define QCA955X_PLL_CPU_CONFIG_OUTDIV_MASK 0x3
  243. #define QCA955X_PLL_DDR_CONFIG_NFRAC_SHIFT 0
  244. #define QCA955X_PLL_DDR_CONFIG_NFRAC_MASK 0x3ff
  245. #define QCA955X_PLL_DDR_CONFIG_NINT_SHIFT 10
  246. #define QCA955X_PLL_DDR_CONFIG_NINT_MASK 0x3f
  247. #define QCA955X_PLL_DDR_CONFIG_REFDIV_SHIFT 16
  248. #define QCA955X_PLL_DDR_CONFIG_REFDIV_MASK 0x1f
  249. #define QCA955X_PLL_DDR_CONFIG_OUTDIV_SHIFT 23
  250. #define QCA955X_PLL_DDR_CONFIG_OUTDIV_MASK 0x7
  251. #define QCA955X_PLL_CLK_CTRL_CPU_PLL_BYPASS BIT(2)
  252. #define QCA955X_PLL_CLK_CTRL_DDR_PLL_BYPASS BIT(3)
  253. #define QCA955X_PLL_CLK_CTRL_AHB_PLL_BYPASS BIT(4)
  254. #define QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_SHIFT 5
  255. #define QCA955X_PLL_CLK_CTRL_CPU_POST_DIV_MASK 0x1f
  256. #define QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_SHIFT 10
  257. #define QCA955X_PLL_CLK_CTRL_DDR_POST_DIV_MASK 0x1f
  258. #define QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_SHIFT 15
  259. #define QCA955X_PLL_CLK_CTRL_AHB_POST_DIV_MASK 0x1f
  260. #define QCA955X_PLL_CLK_CTRL_CPUCLK_FROM_CPUPLL BIT(20)
  261. #define QCA955X_PLL_CLK_CTRL_DDRCLK_FROM_DDRPLL BIT(21)
  262. #define QCA955X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL BIT(24)
  263. /*
  264. * USB_CONFIG block
  265. */
  266. #define AR71XX_USB_CTRL_REG_FLADJ 0x00
  267. #define AR71XX_USB_CTRL_REG_CONFIG 0x04
  268. /*
  269. * RESET block
  270. */
  271. #define AR71XX_RESET_REG_TIMER 0x00
  272. #define AR71XX_RESET_REG_TIMER_RELOAD 0x04
  273. #define AR71XX_RESET_REG_WDOG_CTRL 0x08
  274. #define AR71XX_RESET_REG_WDOG 0x0c
  275. #define AR71XX_RESET_REG_MISC_INT_STATUS 0x10
  276. #define AR71XX_RESET_REG_MISC_INT_ENABLE 0x14
  277. #define AR71XX_RESET_REG_PCI_INT_STATUS 0x18
  278. #define AR71XX_RESET_REG_PCI_INT_ENABLE 0x1c
  279. #define AR71XX_RESET_REG_GLOBAL_INT_STATUS 0x20
  280. #define AR71XX_RESET_REG_RESET_MODULE 0x24
  281. #define AR71XX_RESET_REG_PERFC_CTRL 0x2c
  282. #define AR71XX_RESET_REG_PERFC0 0x30
  283. #define AR71XX_RESET_REG_PERFC1 0x34
  284. #define AR71XX_RESET_REG_REV_ID 0x90
  285. #define AR913X_RESET_REG_GLOBAL_INT_STATUS 0x18
  286. #define AR913X_RESET_REG_RESET_MODULE 0x1c
  287. #define AR913X_RESET_REG_PERF_CTRL 0x20
  288. #define AR913X_RESET_REG_PERFC0 0x24
  289. #define AR913X_RESET_REG_PERFC1 0x28
  290. #define AR724X_RESET_REG_RESET_MODULE 0x1c
  291. #define AR933X_RESET_REG_RESET_MODULE 0x1c
  292. #define AR933X_RESET_REG_BOOTSTRAP 0xac
  293. #define AR934X_RESET_REG_RESET_MODULE 0x1c
  294. #define AR934X_RESET_REG_BOOTSTRAP 0xb0
  295. #define AR934X_RESET_REG_PCIE_WMAC_INT_STATUS 0xac
  296. #define QCA955X_RESET_REG_BOOTSTRAP 0xb0
  297. #define QCA955X_RESET_REG_EXT_INT_STATUS 0xac
  298. #define MISC_INT_ETHSW BIT(12)
  299. #define MISC_INT_TIMER4 BIT(10)
  300. #define MISC_INT_TIMER3 BIT(9)
  301. #define MISC_INT_TIMER2 BIT(8)
  302. #define MISC_INT_DMA BIT(7)
  303. #define MISC_INT_OHCI BIT(6)
  304. #define MISC_INT_PERFC BIT(5)
  305. #define MISC_INT_WDOG BIT(4)
  306. #define MISC_INT_UART BIT(3)
  307. #define MISC_INT_GPIO BIT(2)
  308. #define MISC_INT_ERROR BIT(1)
  309. #define MISC_INT_TIMER BIT(0)
  310. #define AR71XX_RESET_EXTERNAL BIT(28)
  311. #define AR71XX_RESET_FULL_CHIP BIT(24)
  312. #define AR71XX_RESET_CPU_NMI BIT(21)
  313. #define AR71XX_RESET_CPU_COLD BIT(20)
  314. #define AR71XX_RESET_DMA BIT(19)
  315. #define AR71XX_RESET_SLIC BIT(18)
  316. #define AR71XX_RESET_STEREO BIT(17)
  317. #define AR71XX_RESET_DDR BIT(16)
  318. #define AR71XX_RESET_GE1_MAC BIT(13)
  319. #define AR71XX_RESET_GE1_PHY BIT(12)
  320. #define AR71XX_RESET_USBSUS_OVERRIDE BIT(10)
  321. #define AR71XX_RESET_GE0_MAC BIT(9)
  322. #define AR71XX_RESET_GE0_PHY BIT(8)
  323. #define AR71XX_RESET_USB_OHCI_DLL BIT(6)
  324. #define AR71XX_RESET_USB_HOST BIT(5)
  325. #define AR71XX_RESET_USB_PHY BIT(4)
  326. #define AR71XX_RESET_PCI_BUS BIT(1)
  327. #define AR71XX_RESET_PCI_CORE BIT(0)
  328. #define AR7240_RESET_USB_HOST BIT(5)
  329. #define AR7240_RESET_OHCI_DLL BIT(3)
  330. #define AR724X_RESET_GE1_MDIO BIT(23)
  331. #define AR724X_RESET_GE0_MDIO BIT(22)
  332. #define AR724X_RESET_PCIE_PHY_SERIAL BIT(10)
  333. #define AR724X_RESET_PCIE_PHY BIT(7)
  334. #define AR724X_RESET_PCIE BIT(6)
  335. #define AR724X_RESET_USB_HOST BIT(5)
  336. #define AR724X_RESET_USB_PHY BIT(4)
  337. #define AR724X_RESET_USBSUS_OVERRIDE BIT(3)
  338. #define AR913X_RESET_AMBA2WMAC BIT(22)
  339. #define AR913X_RESET_USBSUS_OVERRIDE BIT(10)
  340. #define AR913X_RESET_USB_HOST BIT(5)
  341. #define AR913X_RESET_USB_PHY BIT(4)
  342. #define AR933X_RESET_GE1_MDIO BIT(23)
  343. #define AR933X_RESET_GE0_MDIO BIT(22)
  344. #define AR933X_RESET_GE1_MAC BIT(13)
  345. #define AR933X_RESET_WMAC BIT(11)
  346. #define AR933X_RESET_GE0_MAC BIT(9)
  347. #define AR933X_RESET_USB_HOST BIT(5)
  348. #define AR933X_RESET_USB_PHY BIT(4)
  349. #define AR933X_RESET_USBSUS_OVERRIDE BIT(3)
  350. #define AR934X_RESET_HOST BIT(31)
  351. #define AR934X_RESET_SLIC BIT(30)
  352. #define AR934X_RESET_HDMA BIT(29)
  353. #define AR934X_RESET_EXTERNAL BIT(28)
  354. #define AR934X_RESET_RTC BIT(27)
  355. #define AR934X_RESET_PCIE_EP_INT BIT(26)
  356. #define AR934X_RESET_CHKSUM_ACC BIT(25)
  357. #define AR934X_RESET_FULL_CHIP BIT(24)
  358. #define AR934X_RESET_GE1_MDIO BIT(23)
  359. #define AR934X_RESET_GE0_MDIO BIT(22)
  360. #define AR934X_RESET_CPU_NMI BIT(21)
  361. #define AR934X_RESET_CPU_COLD BIT(20)
  362. #define AR934X_RESET_HOST_RESET_INT BIT(19)
  363. #define AR934X_RESET_PCIE_EP BIT(18)
  364. #define AR934X_RESET_UART1 BIT(17)
  365. #define AR934X_RESET_DDR BIT(16)
  366. #define AR934X_RESET_USB_PHY_PLL_PWD_EXT BIT(15)
  367. #define AR934X_RESET_NANDF BIT(14)
  368. #define AR934X_RESET_GE1_MAC BIT(13)
  369. #define AR934X_RESET_ETH_SWITCH_ANALOG BIT(12)
  370. #define AR934X_RESET_USB_PHY_ANALOG BIT(11)
  371. #define AR934X_RESET_HOST_DMA_INT BIT(10)
  372. #define AR934X_RESET_GE0_MAC BIT(9)
  373. #define AR934X_RESET_ETH_SWITCH BIT(8)
  374. #define AR934X_RESET_PCIE_PHY BIT(7)
  375. #define AR934X_RESET_PCIE BIT(6)
  376. #define AR934X_RESET_USB_HOST BIT(5)
  377. #define AR934X_RESET_USB_PHY BIT(4)
  378. #define AR934X_RESET_USBSUS_OVERRIDE BIT(3)
  379. #define AR934X_RESET_LUT BIT(2)
  380. #define AR934X_RESET_MBOX BIT(1)
  381. #define AR934X_RESET_I2S BIT(0)
  382. #define AR933X_BOOTSTRAP_MDIO_GPIO_EN BIT(18)
  383. #define AR933X_BOOTSTRAP_EEPBUSY BIT(4)
  384. #define AR933X_BOOTSTRAP_REF_CLK_40 BIT(0)
  385. #define AR934X_BOOTSTRAP_SW_OPTION8 BIT(23)
  386. #define AR934X_BOOTSTRAP_SW_OPTION7 BIT(22)
  387. #define AR934X_BOOTSTRAP_SW_OPTION6 BIT(21)
  388. #define AR934X_BOOTSTRAP_SW_OPTION5 BIT(20)
  389. #define AR934X_BOOTSTRAP_SW_OPTION4 BIT(19)
  390. #define AR934X_BOOTSTRAP_SW_OPTION3 BIT(18)
  391. #define AR934X_BOOTSTRAP_SW_OPTION2 BIT(17)
  392. #define AR934X_BOOTSTRAP_SW_OPTION1 BIT(16)
  393. #define AR934X_BOOTSTRAP_USB_MODE_DEVICE BIT(7)
  394. #define AR934X_BOOTSTRAP_PCIE_RC BIT(6)
  395. #define AR934X_BOOTSTRAP_EJTAG_MODE BIT(5)
  396. #define AR934X_BOOTSTRAP_REF_CLK_40 BIT(4)
  397. #define AR934X_BOOTSTRAP_BOOT_FROM_SPI BIT(2)
  398. #define AR934X_BOOTSTRAP_SDRAM_DISABLED BIT(1)
  399. #define AR934X_BOOTSTRAP_DDR1 BIT(0)
  400. #define QCA955X_BOOTSTRAP_REF_CLK_40 BIT(4)
  401. #define AR934X_PCIE_WMAC_INT_WMAC_MISC BIT(0)
  402. #define AR934X_PCIE_WMAC_INT_WMAC_TX BIT(1)
  403. #define AR934X_PCIE_WMAC_INT_WMAC_RXLP BIT(2)
  404. #define AR934X_PCIE_WMAC_INT_WMAC_RXHP BIT(3)
  405. #define AR934X_PCIE_WMAC_INT_PCIE_RC BIT(4)
  406. #define AR934X_PCIE_WMAC_INT_PCIE_RC0 BIT(5)
  407. #define AR934X_PCIE_WMAC_INT_PCIE_RC1 BIT(6)
  408. #define AR934X_PCIE_WMAC_INT_PCIE_RC2 BIT(7)
  409. #define AR934X_PCIE_WMAC_INT_PCIE_RC3 BIT(8)
  410. #define AR934X_PCIE_WMAC_INT_WMAC_ALL \
  411. (AR934X_PCIE_WMAC_INT_WMAC_MISC | AR934X_PCIE_WMAC_INT_WMAC_TX | \
  412. AR934X_PCIE_WMAC_INT_WMAC_RXLP | AR934X_PCIE_WMAC_INT_WMAC_RXHP)
  413. #define AR934X_PCIE_WMAC_INT_PCIE_ALL \
  414. (AR934X_PCIE_WMAC_INT_PCIE_RC | AR934X_PCIE_WMAC_INT_PCIE_RC0 | \
  415. AR934X_PCIE_WMAC_INT_PCIE_RC1 | AR934X_PCIE_WMAC_INT_PCIE_RC2 | \
  416. AR934X_PCIE_WMAC_INT_PCIE_RC3)
  417. #define QCA955X_EXT_INT_WMAC_MISC BIT(0)
  418. #define QCA955X_EXT_INT_WMAC_TX BIT(1)
  419. #define QCA955X_EXT_INT_WMAC_RXLP BIT(2)
  420. #define QCA955X_EXT_INT_WMAC_RXHP BIT(3)
  421. #define QCA955X_EXT_INT_PCIE_RC1 BIT(4)
  422. #define QCA955X_EXT_INT_PCIE_RC1_INT0 BIT(5)
  423. #define QCA955X_EXT_INT_PCIE_RC1_INT1 BIT(6)
  424. #define QCA955X_EXT_INT_PCIE_RC1_INT2 BIT(7)
  425. #define QCA955X_EXT_INT_PCIE_RC1_INT3 BIT(8)
  426. #define QCA955X_EXT_INT_PCIE_RC2 BIT(12)
  427. #define QCA955X_EXT_INT_PCIE_RC2_INT0 BIT(13)
  428. #define QCA955X_EXT_INT_PCIE_RC2_INT1 BIT(14)
  429. #define QCA955X_EXT_INT_PCIE_RC2_INT2 BIT(15)
  430. #define QCA955X_EXT_INT_PCIE_RC2_INT3 BIT(16)
  431. #define QCA955X_EXT_INT_USB1 BIT(24)
  432. #define QCA955X_EXT_INT_USB2 BIT(28)
  433. #define QCA955X_EXT_INT_WMAC_ALL \
  434. (QCA955X_EXT_INT_WMAC_MISC | QCA955X_EXT_INT_WMAC_TX | \
  435. QCA955X_EXT_INT_WMAC_RXLP | QCA955X_EXT_INT_WMAC_RXHP)
  436. #define QCA955X_EXT_INT_PCIE_RC1_ALL \
  437. (QCA955X_EXT_INT_PCIE_RC1 | QCA955X_EXT_INT_PCIE_RC1_INT0 | \
  438. QCA955X_EXT_INT_PCIE_RC1_INT1 | QCA955X_EXT_INT_PCIE_RC1_INT2 | \
  439. QCA955X_EXT_INT_PCIE_RC1_INT3)
  440. #define QCA955X_EXT_INT_PCIE_RC2_ALL \
  441. (QCA955X_EXT_INT_PCIE_RC2 | QCA955X_EXT_INT_PCIE_RC2_INT0 | \
  442. QCA955X_EXT_INT_PCIE_RC2_INT1 | QCA955X_EXT_INT_PCIE_RC2_INT2 | \
  443. QCA955X_EXT_INT_PCIE_RC2_INT3)
  444. #define REV_ID_MAJOR_MASK 0xfff0
  445. #define REV_ID_MAJOR_AR71XX 0x00a0
  446. #define REV_ID_MAJOR_AR913X 0x00b0
  447. #define REV_ID_MAJOR_AR7240 0x00c0
  448. #define REV_ID_MAJOR_AR7241 0x0100
  449. #define REV_ID_MAJOR_AR7242 0x1100
  450. #define REV_ID_MAJOR_AR9330 0x0110
  451. #define REV_ID_MAJOR_AR9331 0x1110
  452. #define REV_ID_MAJOR_AR9341 0x0120
  453. #define REV_ID_MAJOR_AR9342 0x1120
  454. #define REV_ID_MAJOR_AR9344 0x2120
  455. #define REV_ID_MAJOR_QCA9558 0x1130
  456. #define AR71XX_REV_ID_MINOR_MASK 0x3
  457. #define AR71XX_REV_ID_MINOR_AR7130 0x0
  458. #define AR71XX_REV_ID_MINOR_AR7141 0x1
  459. #define AR71XX_REV_ID_MINOR_AR7161 0x2
  460. #define AR71XX_REV_ID_REVISION_MASK 0x3
  461. #define AR71XX_REV_ID_REVISION_SHIFT 2
  462. #define AR913X_REV_ID_MINOR_MASK 0x3
  463. #define AR913X_REV_ID_MINOR_AR9130 0x0
  464. #define AR913X_REV_ID_MINOR_AR9132 0x1
  465. #define AR913X_REV_ID_REVISION_MASK 0x3
  466. #define AR913X_REV_ID_REVISION_SHIFT 2
  467. #define AR933X_REV_ID_REVISION_MASK 0x3
  468. #define AR724X_REV_ID_REVISION_MASK 0x3
  469. #define AR934X_REV_ID_REVISION_MASK 0xf
  470. #define AR944X_REV_ID_REVISION_MASK 0xf
  471. /*
  472. * SPI block
  473. */
  474. #define AR71XX_SPI_REG_FS 0x00 /* Function Select */
  475. #define AR71XX_SPI_REG_CTRL 0x04 /* SPI Control */
  476. #define AR71XX_SPI_REG_IOC 0x08 /* SPI I/O Control */
  477. #define AR71XX_SPI_REG_RDS 0x0c /* Read Data Shift */
  478. #define AR71XX_SPI_FS_GPIO BIT(0) /* Enable GPIO mode */
  479. #define AR71XX_SPI_CTRL_RD BIT(6) /* Remap Disable */
  480. #define AR71XX_SPI_CTRL_DIV_MASK 0x3f
  481. #define AR71XX_SPI_IOC_DO BIT(0) /* Data Out pin */
  482. #define AR71XX_SPI_IOC_CLK BIT(8) /* CLK pin */
  483. #define AR71XX_SPI_IOC_CS(n) BIT(16 + (n))
  484. #define AR71XX_SPI_IOC_CS0 AR71XX_SPI_IOC_CS(0)
  485. #define AR71XX_SPI_IOC_CS1 AR71XX_SPI_IOC_CS(1)
  486. #define AR71XX_SPI_IOC_CS2 AR71XX_SPI_IOC_CS(2)
  487. #define AR71XX_SPI_IOC_CS_ALL (AR71XX_SPI_IOC_CS0 | AR71XX_SPI_IOC_CS1 | \
  488. AR71XX_SPI_IOC_CS2)
  489. /*
  490. * GPIO block
  491. */
  492. #define AR71XX_GPIO_REG_OE 0x00
  493. #define AR71XX_GPIO_REG_IN 0x04
  494. #define AR71XX_GPIO_REG_OUT 0x08
  495. #define AR71XX_GPIO_REG_SET 0x0c
  496. #define AR71XX_GPIO_REG_CLEAR 0x10
  497. #define AR71XX_GPIO_REG_INT_MODE 0x14
  498. #define AR71XX_GPIO_REG_INT_TYPE 0x18
  499. #define AR71XX_GPIO_REG_INT_POLARITY 0x1c
  500. #define AR71XX_GPIO_REG_INT_PENDING 0x20
  501. #define AR71XX_GPIO_REG_INT_ENABLE 0x24
  502. #define AR71XX_GPIO_REG_FUNC 0x28
  503. #define AR934X_GPIO_REG_OUT_FUNC0 0x2c
  504. #define AR934X_GPIO_REG_OUT_FUNC1 0x30
  505. #define AR934X_GPIO_REG_OUT_FUNC2 0x34
  506. #define AR934X_GPIO_REG_OUT_FUNC3 0x38
  507. #define AR934X_GPIO_REG_OUT_FUNC4 0x3c
  508. #define AR934X_GPIO_REG_OUT_FUNC5 0x40
  509. #define AR934X_GPIO_REG_FUNC 0x6c
  510. #define AR71XX_GPIO_COUNT 16
  511. #define AR724X_GPIO_COUNT 18
  512. #define AR913X_GPIO_COUNT 22
  513. #define AR933X_GPIO_COUNT 30
  514. #define AR934X_GPIO_COUNT 23
  515. #define QCA955X_GPIO_COUNT 24
  516. #define AR71XX_GPIO_FUNC_STEREO_EN BIT(17)
  517. #define AR71XX_GPIO_FUNC_SLIC_EN BIT(16)
  518. #define AR71XX_GPIO_FUNC_SPI_CS2_EN BIT(13)
  519. #define AR71XX_GPIO_FUNC_SPI_CS1_EN BIT(12)
  520. #define AR71XX_GPIO_FUNC_UART_EN BIT(8)
  521. #define AR71XX_GPIO_FUNC_USB_OC_EN BIT(4)
  522. #define AR71XX_GPIO_FUNC_USB_CLK_EN BIT(0)
  523. #define AR724X_GPIO_FUNC_GE0_MII_CLK_EN BIT(19)
  524. #define AR724X_GPIO_FUNC_SPI_EN BIT(18)
  525. #define AR724X_GPIO_FUNC_SPI_CS_EN2 BIT(14)
  526. #define AR724X_GPIO_FUNC_SPI_CS_EN1 BIT(13)
  527. #define AR724X_GPIO_FUNC_CLK_OBS5_EN BIT(12)
  528. #define AR724X_GPIO_FUNC_CLK_OBS4_EN BIT(11)
  529. #define AR724X_GPIO_FUNC_CLK_OBS3_EN BIT(10)
  530. #define AR724X_GPIO_FUNC_CLK_OBS2_EN BIT(9)
  531. #define AR724X_GPIO_FUNC_CLK_OBS1_EN BIT(8)
  532. #define AR724X_GPIO_FUNC_ETH_SWITCH_LED4_EN BIT(7)
  533. #define AR724X_GPIO_FUNC_ETH_SWITCH_LED3_EN BIT(6)
  534. #define AR724X_GPIO_FUNC_ETH_SWITCH_LED2_EN BIT(5)
  535. #define AR724X_GPIO_FUNC_ETH_SWITCH_LED1_EN BIT(4)
  536. #define AR724X_GPIO_FUNC_ETH_SWITCH_LED0_EN BIT(3)
  537. #define AR724X_GPIO_FUNC_UART_RTS_CTS_EN BIT(2)
  538. #define AR724X_GPIO_FUNC_UART_EN BIT(1)
  539. #define AR724X_GPIO_FUNC_JTAG_DISABLE BIT(0)
  540. #define AR913X_GPIO_FUNC_WMAC_LED_EN BIT(22)
  541. #define AR913X_GPIO_FUNC_EXP_PORT_CS_EN BIT(21)
  542. #define AR913X_GPIO_FUNC_I2S_REFCLKEN BIT(20)
  543. #define AR913X_GPIO_FUNC_I2S_MCKEN BIT(19)
  544. #define AR913X_GPIO_FUNC_I2S1_EN BIT(18)
  545. #define AR913X_GPIO_FUNC_I2S0_EN BIT(17)
  546. #define AR913X_GPIO_FUNC_SLIC_EN BIT(16)
  547. #define AR913X_GPIO_FUNC_UART_RTSCTS_EN BIT(9)
  548. #define AR913X_GPIO_FUNC_UART_EN BIT(8)
  549. #define AR913X_GPIO_FUNC_USB_CLK_EN BIT(4)
  550. #define AR933X_GPIO_FUNC_SPDIF2TCK BIT(31)
  551. #define AR933X_GPIO_FUNC_SPDIF_EN BIT(30)
  552. #define AR933X_GPIO_FUNC_I2SO_22_18_EN BIT(29)
  553. #define AR933X_GPIO_FUNC_I2S_MCK_EN BIT(27)
  554. #define AR933X_GPIO_FUNC_I2SO_EN BIT(26)
  555. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED_DUPL BIT(25)
  556. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED_COLL BIT(24)
  557. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED_ACT BIT(23)
  558. #define AR933X_GPIO_FUNC_SPI_EN BIT(18)
  559. #define AR933X_GPIO_FUNC_SPI_CS_EN2 BIT(14)
  560. #define AR933X_GPIO_FUNC_SPI_CS_EN1 BIT(13)
  561. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN BIT(7)
  562. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN BIT(6)
  563. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN BIT(5)
  564. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN BIT(4)
  565. #define AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN BIT(3)
  566. #define AR933X_GPIO_FUNC_UART_RTS_CTS_EN BIT(2)
  567. #define AR933X_GPIO_FUNC_UART_EN BIT(1)
  568. #define AR933X_GPIO_FUNC_JTAG_DISABLE BIT(0)
  569. #define AR934X_GPIO_FUNC_DDR_DQOE_EN BIT(17)
  570. #define AR934X_GPIO_FUNC_SPI_CS_1_EN BIT(14)
  571. #define AR934X_GPIO_FUNC_SPI_CS_0_EN BIT(13)
  572. #define AR934X_GPIO_OUT_GPIO 0x00
  573. /*
  574. * MII_CTRL block
  575. */
  576. #define AR71XX_MII_REG_MII0_CTRL 0x00
  577. #define AR71XX_MII_REG_MII1_CTRL 0x04
  578. #define AR71XX_MII_CTRL_IF_MASK 3
  579. #define AR71XX_MII_CTRL_SPEED_SHIFT 4
  580. #define AR71XX_MII_CTRL_SPEED_MASK 3
  581. #define AR71XX_MII_CTRL_SPEED_10 0
  582. #define AR71XX_MII_CTRL_SPEED_100 1
  583. #define AR71XX_MII_CTRL_SPEED_1000 2
  584. #define AR71XX_MII0_CTRL_IF_GMII 0
  585. #define AR71XX_MII0_CTRL_IF_MII 1
  586. #define AR71XX_MII0_CTRL_IF_RGMII 2
  587. #define AR71XX_MII0_CTRL_IF_RMII 3
  588. #define AR71XX_MII1_CTRL_IF_RGMII 0
  589. #define AR71XX_MII1_CTRL_IF_RMII 1
  590. /*
  591. * AR933X GMAC interface
  592. */
  593. #define AR933X_GMAC_REG_ETH_CFG 0x00
  594. #define AR933X_ETH_CFG_RGMII_GE0 BIT(0)
  595. #define AR933X_ETH_CFG_MII_GE0 BIT(1)
  596. #define AR933X_ETH_CFG_GMII_GE0 BIT(2)
  597. #define AR933X_ETH_CFG_MII_GE0_MASTER BIT(3)
  598. #define AR933X_ETH_CFG_MII_GE0_SLAVE BIT(4)
  599. #define AR933X_ETH_CFG_MII_GE0_ERR_EN BIT(5)
  600. #define AR933X_ETH_CFG_SW_PHY_SWAP BIT(7)
  601. #define AR933X_ETH_CFG_SW_PHY_ADDR_SWAP BIT(8)
  602. #define AR933X_ETH_CFG_RMII_GE0 BIT(9)
  603. #define AR933X_ETH_CFG_RMII_GE0_SPD_10 0
  604. #define AR933X_ETH_CFG_RMII_GE0_SPD_100 BIT(10)
  605. /*
  606. * AR934X GMAC Interface
  607. */
  608. #define AR934X_GMAC_REG_ETH_CFG 0x00
  609. #define AR934X_ETH_CFG_RGMII_GMAC0 BIT(0)
  610. #define AR934X_ETH_CFG_MII_GMAC0 BIT(1)
  611. #define AR934X_ETH_CFG_GMII_GMAC0 BIT(2)
  612. #define AR934X_ETH_CFG_MII_GMAC0_MASTER BIT(3)
  613. #define AR934X_ETH_CFG_MII_GMAC0_SLAVE BIT(4)
  614. #define AR934X_ETH_CFG_MII_GMAC0_ERR_EN BIT(5)
  615. #define AR934X_ETH_CFG_SW_ONLY_MODE BIT(6)
  616. #define AR934X_ETH_CFG_SW_PHY_SWAP BIT(7)
  617. #define AR934X_ETH_CFG_SW_APB_ACCESS BIT(9)
  618. #define AR934X_ETH_CFG_RMII_GMAC0 BIT(10)
  619. #define AR933X_ETH_CFG_MII_CNTL_SPEED BIT(11)
  620. #define AR934X_ETH_CFG_RMII_GMAC0_MASTER BIT(12)
  621. #define AR933X_ETH_CFG_SW_ACC_MSB_FIRST BIT(13)
  622. /*
  623. * QCA955X GMAC Interface
  624. */
  625. #define QCA955X_GMAC_REG_ETH_CFG 0x00
  626. #define QCA955X_ETH_CFG_RGMII_GMAC0 BIT(0)
  627. #define QCA955X_ETH_CFG_SGMII_GMAC0 BIT(6)
  628. #endif /* __ASM_MACH_AR71XX_REGS_H */