ptp3_plat.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (c) 2021-2022, MediaTek Inc. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef PTP3_PLAT_H
  7. #define PTP3_PLAT_H
  8. #include <lib/mmio.h>
  9. #include <lib/utils_def.h>
  10. #include <ptp3_common.h>
  11. /* CPU info */
  12. #define NR_PTP3_CFG_CPU U(8)
  13. #define PTP3_CFG_CPU_START_ID_L U(0)
  14. #define PTP3_CFG_CPU_START_ID_B U(4)
  15. #define PTP3_CFG_CPU_END_ID U(7)
  16. #define NR_PTP3_CFG1_DATA U(2)
  17. #define PTP3_CFG1_MASK 0x3000
  18. #define NR_PTP3_CFG2_DATA U(5)
  19. #define PTP3_CFG3_MASK1 0x1180
  20. #define PTP3_CFG3_MASK2 0x35C0
  21. #define PTP3_CFG3_MASK3 0x3DC0
  22. /* Central control */
  23. static unsigned int ptp3_cfg1[NR_PTP3_CFG1_DATA][NR_PTP3_CFG] = {
  24. {0x0C53A2A0, 0x1000},
  25. {0x0C53A2A4, 0x1000}
  26. };
  27. static unsigned int ptp3_cfg2[NR_PTP3_CFG2_DATA][NR_PTP3_CFG] = {
  28. {0x0C530404, 0x3A1000},
  29. {0x0C530428, 0x13E0408},
  30. {0x0C530434, 0xB22800},
  31. {0x0C53043C, 0x750},
  32. {0x0C530440, 0x0222c4cc}
  33. };
  34. static unsigned int ptp3_cfg3[NR_PTP3_CFG] = {0x0C530400, 0x2D80};
  35. static unsigned int ptp3_cfg3_ext[NR_PTP3_CFG] = {0x0C530400, 0xC00};
  36. #endif /* PTP3_PLAT_H */