pmu.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * Copyright 2021 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #ifndef PMU_H
  8. #define PMU_H
  9. /* PMU Registers' OFFSET */
  10. #define PMU_PCPW20SR_OFFSET 0x830
  11. #define PMU_CLL2FLUSHSETR_OFFSET 0x1110
  12. #define PMU_CLSL2FLUSHCLRR_OFFSET 0x1114
  13. #define PMU_CLL2FLUSHSR_OFFSET 0x1118
  14. #define PMU_POWMGTCSR_VAL (1 << 20)
  15. /* PMU Registers */
  16. #define CORE_TIMEBASE_ENBL_OFFSET 0x8A0
  17. #define CLUST_TIMER_BASE_ENBL_OFFSET 0x18A0
  18. #define PMU_IDLE_CLUSTER_MASK 0x2
  19. #define PMU_FLUSH_CLUSTER_MASK 0x2
  20. #define PMU_IDLE_CORE_MASK 0xfe
  21. /* pmu register offsets and bitmaps */
  22. #define PMU_POWMGTDCR0_OFFSET 0xC20
  23. #define PMU_POWMGTCSR_OFFSET 0x4000
  24. #define PMU_CLAINACTSETR_OFFSET 0x1100
  25. #define PMU_CLAINACTCLRR_OFFSET 0x1104
  26. #define PMU_CLSINACTSETR_OFFSET 0x1108
  27. #define PMU_CLSINACTCLRR_OFFSET 0x110C
  28. #define PMU_CLL2FLUSHSETR_OFFSET 0x1110
  29. #define PMU_CLL2FLUSHCLRR_OFFSET 0x1114
  30. #define PMU_IPPDEXPCR0_OFFSET 0x4040
  31. #define PMU_IPPDEXPCR1_OFFSET 0x4044
  32. #define PMU_IPPDEXPCR2_OFFSET 0x4048
  33. #define PMU_IPPDEXPCR3_OFFSET 0x404C
  34. #define PMU_IPPDEXPCR4_OFFSET 0x4050
  35. #define PMU_IPPDEXPCR5_OFFSET 0x4054
  36. #define PMU_IPPDEXPCR6_OFFSET 0x4058
  37. #define PMU_IPSTPCR0_OFFSET 0x4120
  38. #define PMU_IPSTPCR1_OFFSET 0x4124
  39. #define PMU_IPSTPCR2_OFFSET 0x4128
  40. #define PMU_IPSTPCR3_OFFSET 0x412C
  41. #define PMU_IPSTPCR4_OFFSET 0x4130
  42. #define PMU_IPSTPCR5_OFFSET 0x4134
  43. #define PMU_IPSTPCR6_OFFSET 0x4138
  44. #define PMU_IPSTPACKSR0_OFFSET 0x4140
  45. #define PMU_IPSTPACKSR1_OFFSET 0x4144
  46. #define PMU_IPSTPACKSR2_OFFSET 0x4148
  47. #define PMU_IPSTPACKSR3_OFFSET 0x414C
  48. #define PMU_IPSTPACKSR4_OFFSET 0x4150
  49. #define PMU_IPSTPACKSR5_OFFSET 0x4154
  50. #define PMU_IPSTPACKSR6_OFFSET 0x4158
  51. #define CLAINACT_DISABLE_ACP 0xFF
  52. #define CLSINACT_DISABLE_SKY 0xFF
  53. #define POWMGTDCR_STP_OV_EN 0x1
  54. #define POWMGTCSR_LPM20_REQ 0x00100000
  55. /* Used by PMU */
  56. #define DEVDISR1_MASK 0x024F3504
  57. #define DEVDISR2_MASK 0x0003FFFF
  58. #define DEVDISR3_MASK 0x0000303F
  59. #define DEVDISR4_MASK 0x0000FFFF
  60. #define DEVDISR5_MASK 0x00F07603
  61. #define DEVDISR6_MASK 0x00000001
  62. #ifndef __ASSEMBLER__
  63. void enable_timer_base_to_cluster(uintptr_t nxp_pmu_addr);
  64. void enable_core_tb(uintptr_t nxp_pmu_addr);
  65. #endif /* __ASSEMBLER__ */
  66. #endif