imx_snvs.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. * Copyright (C) 2018-2019, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef IMX_SNVS_H
  7. #define IMX_SNVS_H
  8. #include <cdefs.h>
  9. #include <stdint.h>
  10. #include <arch.h>
  11. struct snvs {
  12. uint32_t hplr;
  13. uint32_t hpcomr;
  14. uint32_t hpcr;
  15. uint32_t hpsicr;
  16. uint32_t hpsvcr;
  17. uint32_t hpsr;
  18. uint32_t hpsvsr;
  19. uint32_t hphacivr;
  20. uint32_t hphacr;
  21. uint32_t hprtcmr;
  22. uint32_t hprtclr;
  23. uint32_t hptamr;
  24. uint32_t hptalr;
  25. uint32_t lplr;
  26. uint32_t lpcr;
  27. uint32_t lpmkcr;
  28. uint32_t lpsvcr;
  29. uint32_t lptgfcr;
  30. uint32_t lptdcr;
  31. uint32_t lpsr;
  32. uint32_t lpsrtcmr;
  33. uint32_t lpsrtclr;
  34. uint32_t lptar;
  35. uint32_t lpsmcmr;
  36. uint32_t lpsmclr;
  37. uint32_t lppgdr;
  38. uint32_t lpgpr0_alias;
  39. uint8_t lpzmkr[32];
  40. uint16_t res0;
  41. uint32_t lpgpr0[4];
  42. uint32_t lptdc2r;
  43. uint32_t lptdsr;
  44. uint32_t lptgf1cr;
  45. uint32_t lptgf2cr;
  46. uint32_t res1[4];
  47. uint32_t lpat1cr;
  48. uint32_t lpat2cr;
  49. uint32_t lpat3cr;
  50. uint32_t lpat4cr;
  51. uint32_t lpat5cr;
  52. uint32_t res2[3];
  53. uint32_t lpatctlr;
  54. uint32_t lpatclkr;
  55. uint32_t lpatrc1r;
  56. uint32_t lpatrc2r;
  57. uint32_t res3[706];
  58. uint32_t hpvidr1;
  59. uint32_t hpvidr2;
  60. } __packed;
  61. /* Define the HPCOMR bits */
  62. #define HPCOMR_NPSWA_EN BIT(31)
  63. #define HPCOMR_HAC_STOP BIT(19)
  64. #define HPCOMR_HAC_CLEAR BIT(18)
  65. #define HPCOMR_HAC_LOAD BIT(17)
  66. #define HPCOMR_HAC_EN BIT(16)
  67. #define HPCOMR_MKS_EN BIT(13)
  68. #define HPCOMR_PROG_ZMK BIT(12)
  69. #define HPCOMR_SW_LPSV BIT(10)
  70. #define HPCOMR_SW_FSV BIT(9)
  71. #define HPCOMR_SW_SV BIT(8)
  72. #define HPCOMR_LP_SWR_DIS BIT(5)
  73. #define HPCOMR_LP_SWR BIT(4)
  74. #define HPCOMR_SSM_SFNS_DIS BIT(2)
  75. #define HPCOMR_SSM_ST_DIS BIT(1)
  76. #define HPCOMR_SSM_ST BIT(0)
  77. void imx_snvs_init(void);
  78. #endif /* IMX_SNVS_H */