soc.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (c) 2023, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef __SOC_H__
  7. #define __SOC_H__
  8. #define RKFPGA_DEV_RNG0_BASE 0xf8000000
  9. #define RKFPGA_DEV_RNG0_SIZE 0x07fff000
  10. #define CRU_MODE_CON00 0x00c0
  11. #define PMUCRU_MODE_CON00 0x0080
  12. #define CRU_GLB_SRST_FST 0x00d4
  13. #define GLB_SRST_FST_CFG_VAL 0xfdb9
  14. #define PMU_GRF_GPIO0A_IOMUX_L 0x00
  15. #define PMU_GRF_SOC_CON(i) (0x0100 + i * 4)
  16. #define CRU_SOFTRST_CON 0x300
  17. #define CRU_SOFTRSTS_CON(n) (CRU_SOFTRST_CON + ((n) * 4))
  18. #define CRU_SOFTRSTS_CON_CNT 26
  19. #define GRF_DDR_CON3 0x000c
  20. #define SGRF_FIREWALL_SLV_CON(i) (0x240 + i * 4)
  21. #define FIREWALL_DDR_FW_DDR_CON_REG 0x80
  22. /* low 32 bits */
  23. #define TIMER_LOAD_COUNT0 0x00
  24. #define TIMER_LOAD_COUNT1 0x04
  25. #define TIMER_CURRENT_VALUE0 0x08
  26. #define TIMER_CURRENT_VALUE1 0x0c
  27. #define TIMER_CONTROL_REG 0x10
  28. #define TIMER_INTSTATUS 0x18
  29. #define TIMER_DIS 0x0
  30. #define TIMER_EN 0x1
  31. #define STIMER0_CHN_BASE(n) (STIME_BASE + 0x20 * (n))
  32. #define PMU_GRF_GPIO0B_IOMUX_L 0x0008
  33. #define PMUCRU_PMUCLKSEL_CON00 0x0100
  34. #define PMUPVTM_BASE 0xfdd80000
  35. #define PVTM_CON0 0x0004
  36. #define PVTM_CON1 0x0008
  37. #define PVTM_STATUS0 0x0080
  38. #define PVTM_STATUS1 0x0084
  39. #define PMUCRU_PMUGATE_CON01 0x0184
  40. #define PVTM_CALC_CNT 0x200
  41. #define PMU_GRF_DLL_CON0 0x0180
  42. enum cru_mode_con00 {
  43. CLK_APLL,
  44. CLK_DPLL,
  45. CLK_CPLL,
  46. CLK_GPLL,
  47. CLK_REVSERVED,
  48. CLK_NPLL,
  49. CLK_VPLL,
  50. CLK_USBPLL,
  51. };
  52. #endif /* __SOC_H__ */