mtk_apusys.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Copyright (c) 2021, MediaTek Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef __MTK_APUSYS_H__
  7. #define __MTK_APUSYS_H__
  8. #include <stdint.h>
  9. /* setup the SMC command ops */
  10. #define MTK_SIP_APU_START_MCU 0x00U
  11. #define MTK_SIP_APU_STOP_MCU 0x01U
  12. /* AO Register */
  13. #define AO_MD32_PRE_DEFINE (APUSYS_APU_S_S_4_BASE + 0x00)
  14. #define AO_MD32_BOOT_CTRL (APUSYS_APU_S_S_4_BASE + 0x04)
  15. #define AO_MD32_SYS_CTRL (APUSYS_APU_S_S_4_BASE + 0x08)
  16. #define AO_SEC_FW (APUSYS_APU_S_S_4_BASE + 0x10)
  17. #define PRE_DEFINE_CACHE_TCM 0x3U
  18. #define PRE_DEFINE_CACHE 0x2U
  19. #define PRE_DEFINE_SHIFT_0G 0U
  20. #define PRE_DEFINE_SHIFT_1G 2U
  21. #define PRE_DEFINE_SHIFT_2G 4U
  22. #define PRE_DEFINE_SHIFT_3G 6U
  23. #define SEC_FW_NON_SECURE 1U
  24. #define SEC_FW_SHIFT_NS 4U
  25. #define SEC_FW_DOMAIN_SHIFT 0U
  26. #define SYS_CTRL_RUN 0U
  27. #define SYS_CTRL_STALL 1U
  28. /* Reviser Register */
  29. #define REVISER_SECUREFW_CTXT (APUSYS_SCTRL_REVISER_BASE + 0x300)
  30. #define REVISER_USDRFW_CTXT (APUSYS_SCTRL_REVISER_BASE + 0x304)
  31. uint64_t apusys_kernel_ctrl(uint64_t x1, uint64_t x2, uint64_t x3, uint64_t x4,
  32. uint32_t *ret1);
  33. #endif /* __MTK_APUSYS_H__ */