hi6220_regs_pmctrl.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef HI6220_REGS_PMCTRL_H
  7. #define HI6220_REGS_PMCTRL_H
  8. #define PMCTRL_BASE 0xF7032000
  9. #define PMCTRL_ACPUPLLCTRL (PMCTRL_BASE + 0x000)
  10. #define PMCTRL_ACPUPLLFREQ (PMCTRL_BASE + 0x004)
  11. #define PMCTRL_DDRPLL1CTRL (PMCTRL_BASE + 0x010)
  12. #define PMCTRL_DDRPLL0CTRL (PMCTRL_BASE + 0x030)
  13. #define PMCTRL_MEDPLLCTRL (PMCTRL_BASE + 0x038)
  14. #define PMCTRL_ACPUPLLSEL (PMCTRL_BASE + 0x100)
  15. #define PMCTRL_ACPUCLKDIV (PMCTRL_BASE + 0x104)
  16. #define PMCTRL_ACPUSYSPLLCFG (PMCTRL_BASE + 0x110)
  17. #define PMCTRL_ACPUCLKOFFCFG (PMCTRL_BASE + 0x114)
  18. #define PMCTRL_ACPUPLLFRAC (PMCTRL_BASE + 0x134)
  19. #define PMCTRL_ACPUPMUVOLUPTIME (PMCTRL_BASE + 0x360)
  20. #define PMCTRL_ACPUPMUVOLDNTIME (PMCTRL_BASE + 0x364)
  21. #define PMCTRL_ACPUVOLPMUADDR (PMCTRL_BASE + 0x368)
  22. #define PMCTRL_ACPUVOLUPSTEP (PMCTRL_BASE + 0x36c)
  23. #define PMCTRL_ACPUVOLDNSTEP (PMCTRL_BASE + 0x370)
  24. #define PMCTRL_ACPUDFTVOL (PMCTRL_BASE + 0x374)
  25. #define PMCTRL_ACPUDESTVOL (PMCTRL_BASE + 0x378)
  26. #define PMCTRL_ACPUVOLTTIMEOUT (PMCTRL_BASE + 0x37c)
  27. #define PMCTRL_ACPUPLLCTRL_EN_CFG (1 << 0)
  28. #define PMCTRL_ACPUCLKDIV_CPUEXT_CFG_MASK (3 << 0)
  29. #define PMCTRL_ACPUCLKDIV_DDR_CFG_MASK (3 << 8)
  30. #define PMCTRL_ACPUCLKDIV_CPUEXT_STAT_MASK (3 << 16)
  31. #define PMCTRL_ACPUCLKDIV_DDR_STAT_MASK (3 << 24)
  32. #define PMCTRL_ACPUPLLSEL_ACPUPLL_CFG (1 << 0)
  33. #define PMCTRL_ACPUPLLSEL_ACPUPLL_STAT (1 << 1)
  34. #define PMCTRL_ACPUPLLSEL_SYSPLL_STAT (1 << 2)
  35. #define PMCTRL_ACPUSYSPLL_CLKDIV_CFG_MASK 0x7
  36. #define PMCTRL_ACPUSYSPLL_CLKEN_CFG (1 << 4)
  37. #define PMCTRL_ACPUSYSPLL_CLKDIV_SW (3 << 12)
  38. #define PMCTRL_ACPUSYSPLLCFG_SYSPLL_CLKEN (1 << 4)
  39. #define PMCTRL_ACPUSYSPLLCFG_CLKDIV_MASK (3 << 12)
  40. #define PMCTRL_ACPUDESTVOL_DEST_VOL_MASK 0x7f
  41. #define PMCTRL_ACPUDESTVOL_CURR_VOL_MASK (0x7f << 8)
  42. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_en_cfg_START (0)
  43. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_en_cfg_END (0)
  44. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_rst_START (2)
  45. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_rst_END (2)
  46. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_time_START (4)
  47. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_time_END (27)
  48. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_timeout_START (28)
  49. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_timeout_END (28)
  50. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_lock_START (29)
  51. #define SOC_PMCTRL_ACPUPLLCTRL_acpupll_lock_END (29)
  52. #define SOC_PMCTRL_ACPUPLLFRAC_ADDR(base) ((base) + (0x134))
  53. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_subsys_clk_div_sw_START (12)
  54. #define SOC_PMCTRL_ACPUPLLSEL_acpu_pllsw_cfg_START (0)
  55. #define SOC_PMCTRL_ACPUPLLSEL_acpu_pllsw_cfg_END (0)
  56. #define SOC_PMCTRL_ACPUPLLSEL_acpu_pllsw_stat_START (1)
  57. #define SOC_PMCTRL_ACPUPLLSEL_acpu_pllsw_stat_END (1)
  58. #define SOC_PMCTRL_ACPUPLLSEL_syspll_sw_stat_START (2)
  59. #define SOC_PMCTRL_ACPUPLLSEL_syspll_sw_stat_END (2)
  60. #define SOC_PMCTRL_ACPUCLKDIV_cpuext_clk_div_cfg_START (0)
  61. #define SOC_PMCTRL_ACPUCLKDIV_cpuext_clk_div_cfg_END (1)
  62. #define SOC_PMCTRL_ACPUCLKDIV_acpu_ddr_clk_div_cfg_START (8)
  63. #define SOC_PMCTRL_ACPUCLKDIV_acpu_ddr_clk_div_cfg_END (9)
  64. #define SOC_PMCTRL_ACPUCLKDIV_cpuext_clk_div_stat_START (16)
  65. #define SOC_PMCTRL_ACPUCLKDIV_cpuext_clk_div_stat_END (17)
  66. #define SOC_PMCTRL_ACPUCLKDIV_acpu_ddr_clk_div_stat_START (24)
  67. #define SOC_PMCTRL_ACPUCLKDIV_acpu_ddr_clk_div_stat_END (25)
  68. #define SOC_PMCTRL_ACPUDESTVOL_acpu_dest_vol_START (0)
  69. #define SOC_PMCTRL_ACPUDESTVOL_acpu_dest_vol_END (6)
  70. #define SOC_PMCTRL_ACPUDESTVOL_acpu_vol_using_START (8)
  71. #define SOC_PMCTRL_ACPUDESTVOL_acpu_vol_using_END (14)
  72. #define SOC_PMCTRL_ACPUVOLTIMEOUT_acpu_vol_timeout_START (0)
  73. #define SOC_PMCTRL_ACPUVOLTIMEOUT_acpu_vol_timeout_END (0)
  74. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_div_cfg_START (0)
  75. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_div_cfg_END (2)
  76. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_clken_cfg_START (4)
  77. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_clken_cfg_END (4)
  78. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_subsys_clk_div_cfg_START (8)
  79. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_subsys_clk_div_cfg_END (9)
  80. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_div_stat_START (16)
  81. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_div_stat_END (19)
  82. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_clken_stat_START (20)
  83. #define SOC_PMCTRL_ACPUSYSPLLCFG_acpu_syspll_clken_stat_END (20)
  84. #endif /* HI6220_REGS_PMCTRL_H */