rk3588_clk.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /*
  2. * Copyright (c) 2024, Rockchip, Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef __CLOCK_H__
  7. #define __CLOCK_H__
  8. /* scmi-clocks indices */
  9. #define SCMI_CLK_CPUL 0
  10. #define SCMI_CLK_DSU 1
  11. #define SCMI_CLK_CPUB01 2
  12. #define SCMI_CLK_CPUB23 3
  13. #define SCMI_CLK_DDR 4
  14. #define SCMI_CLK_GPU 5
  15. #define SCMI_CLK_NPU 6
  16. #define SCMI_CLK_SBUS 7
  17. #define SCMI_PCLK_SBUS 8
  18. #define SCMI_CCLK_SD 9
  19. #define SCMI_DCLK_SD 10
  20. #define SCMI_ACLK_SECURE_NS 11
  21. #define SCMI_HCLK_SECURE_NS 12
  22. #define SCMI_TCLK_WDT 13
  23. #define SCMI_KEYLADDER_CORE 14
  24. #define SCMI_KEYLADDER_RNG 15
  25. #define SCMI_ACLK_SECURE_S 16
  26. #define SCMI_HCLK_SECURE_S 17
  27. #define SCMI_PCLK_SECURE_S 18
  28. #define SCMI_CRYPTO_RNG 19
  29. #define SCMI_CRYPTO_CORE 20
  30. #define SCMI_CRYPTO_PKA 21
  31. #define SCMI_SPLL 22
  32. #define SCMI_HCLK_SD 23
  33. #define SCMI_CRYPTO_RNG_S 24
  34. #define SCMI_CRYPTO_CORE_S 25
  35. #define SCMI_CRYPTO_PKA_S 26
  36. #define SCMI_A_CRYPTO_S 27
  37. #define SCMI_H_CRYPTO_S 28
  38. #define SCMI_P_CRYPTO_S 29
  39. #define SCMI_A_KEYLADDER_S 30
  40. #define SCMI_H_KEYLADDER_S 31
  41. #define SCMI_P_KEYLADDER_S 32
  42. #define SCMI_TRNG_S 33
  43. #define SCMI_H_TRNG_S 34
  44. #define SCMI_P_OTPC_S 35
  45. #define SCMI_OTPC_S 36
  46. #define SCMI_OTP_PHY 37
  47. #define SCMI_OTPC_AUTO_RD 38
  48. #define SCMI_OTPC_ARB 39
  49. /******** DSUCRU **************************************/
  50. #define DSUCRU_CLKSEL_CON(n) (0x0300 + (n) * 4)
  51. /********Name=DSUCRU_CLKSEL_CON04,Offset=0x310********/
  52. #define PCLK_DSU_ROOT_SEL_SHIFT 5
  53. #define PCLK_DSU_ROOT_SEL_MASK 0x3
  54. #define PCLK_DSU_ROOT_SEL_GPLL 0x3
  55. /********Name=SECURE_SOFTRST_CON00,Offset=0xA00********/
  56. #define SRST_A_SECURE_NS_BIU 10
  57. #define SRST_H_SECURE_NS_BIU 11
  58. #define SRST_A_SECURE_S_BIU 12
  59. #define SRST_H_SECURE_S_BIU 13
  60. #define SRST_P_SECURE_S_BIU 14
  61. #define SRST_CRYPTO_CORE 15
  62. /********Name=SECURE_SOFTRST_CON01,Offset=0xA04********/
  63. #define SRST_CRYPTO_PKA 16
  64. #define SRST_CRYPTO_RNG 17
  65. #define SRST_A_CRYPTO 18
  66. #define SRST_H_CRYPTO 19
  67. #define SRST_KEYLADDER_CORE 25
  68. #define SRST_KEYLADDER_RNG 26
  69. #define SRST_A_KEYLADDER 27
  70. #define SRST_H_KEYLADDER 28
  71. #define SRST_P_OTPC_S 29
  72. #define SRST_OTPC_S 30
  73. #define SRST_WDT_S 31
  74. /********Name=SECURE_SOFTRST_CON02,Offset=0xA08********/
  75. #define SRST_T_WDT_S 32
  76. #define SRST_H_BOOTROM 33
  77. #define SRST_A_DCF 34
  78. #define SRST_P_DCF 35
  79. #define SRST_H_BOOTROM_NS 37
  80. #define SRST_P_KEYLADDER 46
  81. #define SRST_H_TRNG_S 47
  82. /********Name=SECURE_SOFTRST_CON03,Offset=0xA0C********/
  83. #define SRST_H_TRNG_NS 48
  84. #define SRST_D_SDMMC_BUFFER 49
  85. #define SRST_H_SDMMC 50
  86. #define SRST_H_SDMMC_BUFFER 51
  87. #define SRST_SDMMC 52
  88. #define SRST_P_TRNG_CHK 53
  89. #define SRST_TRNG_S 54
  90. #define SRST_INVALID 55
  91. void pvtplls_suspend(void);
  92. void pvtplls_resume(void);
  93. void rockchip_clock_init(void);
  94. #endif