aon.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // See LICENSE for license details.
  2. #ifndef _SIFIVE_AON_H
  3. #define _SIFIVE_AON_H
  4. /* Register offsets */
  5. #define AON_WDOGCFG 0x000
  6. #define AON_WDOGCOUNT 0x008
  7. #define AON_WDOGS 0x010
  8. #define AON_WDOGFEED 0x018
  9. #define AON_WDOGKEY 0x01C
  10. #define AON_WDOGCMP 0x020
  11. #define AON_RTCCFG 0x040
  12. #define AON_RTCLO 0x048
  13. #define AON_RTCHI 0x04C
  14. #define AON_RTCS 0x050
  15. #define AON_RTCCMP 0x060
  16. #define AON_BACKUP0 0x080
  17. #define AON_BACKUP1 0x084
  18. #define AON_BACKUP2 0x088
  19. #define AON_BACKUP3 0x08C
  20. #define AON_BACKUP4 0x090
  21. #define AON_BACKUP5 0x094
  22. #define AON_BACKUP6 0x098
  23. #define AON_BACKUP7 0x09C
  24. #define AON_BACKUP8 0x0A0
  25. #define AON_BACKUP9 0x0A4
  26. #define AON_BACKUP10 0x0A8
  27. #define AON_BACKUP11 0x0AC
  28. #define AON_BACKUP12 0x0B0
  29. #define AON_BACKUP13 0x0B4
  30. #define AON_BACKUP14 0x0B8
  31. #define AON_BACKUP15 0x0BC
  32. #define AON_PMUWAKEUPI0 0x100
  33. #define AON_PMUWAKEUPI1 0x104
  34. #define AON_PMUWAKEUPI2 0x108
  35. #define AON_PMUWAKEUPI3 0x10C
  36. #define AON_PMUWAKEUPI4 0x110
  37. #define AON_PMUWAKEUPI5 0x114
  38. #define AON_PMUWAKEUPI6 0x118
  39. #define AON_PMUWAKEUPI7 0x11C
  40. #define AON_PMUSLEEPI0 0x120
  41. #define AON_PMUSLEEPI1 0x124
  42. #define AON_PMUSLEEPI2 0x128
  43. #define AON_PMUSLEEPI3 0x12C
  44. #define AON_PMUSLEEPI4 0x130
  45. #define AON_PMUSLEEPI5 0x134
  46. #define AON_PMUSLEEPI6 0x138
  47. #define AON_PMUSLEEPI7 0x13C
  48. #define AON_PMUIE 0x140
  49. #define AON_PMUCAUSE 0x144
  50. #define AON_PMUSLEEP 0x148
  51. #define AON_PMUKEY 0x14C
  52. #define AON_LFROSC 0x070
  53. /* Constants */
  54. #define AON_WDOGKEY_VALUE 0x51F15E
  55. #define AON_WDOGFEED_VALUE 0xD09F00D
  56. #define AON_WDOGCFG_SCALE 0x0000000F
  57. #define AON_WDOGCFG_RSTEN 0x00000100
  58. #define AON_WDOGCFG_ZEROCMP 0x00000200
  59. #define AON_WDOGCFG_ENALWAYS 0x00001000
  60. #define AON_WDOGCFG_ENCOREAWAKE 0x00002000
  61. #define AON_WDOGCFG_CMPIP 0x10000000
  62. #define AON_RTCCFG_SCALE 0x0000000F
  63. #define AON_RTCCFG_ENALWAYS 0x00001000
  64. #define AON_RTCCFG_CMPIP 0x10000000
  65. #define AON_WAKEUPCAUSE_RESET 0x00
  66. #define AON_WAKEUPCAUSE_RTC 0x01
  67. #define AON_WAKEUPCAUSE_DWAKEUP 0x02
  68. #define AON_WAKEUPCAUSE_AWAKEUP 0x03
  69. #define AON_RESETCAUSE_POWERON 0x0000
  70. #define AON_RESETCAUSE_EXTERNAL 0x0100
  71. #define AON_RESETCAUSE_WATCHDOG 0x0200
  72. #define AON_PMUCAUSE_WAKEUPCAUSE 0x00FF
  73. #define AON_PMUCAUSE_RESETCAUSE 0xFF00
  74. #endif /* _SIFIVE_AON_H */