mt8167-pm-domains.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. #ifndef __SOC_MEDIATEK_MT8167_PM_DOMAINS_H
  3. #define __SOC_MEDIATEK_MT8167_PM_DOMAINS_H
  4. #include "mtk-pm-domains.h"
  5. #include <dt-bindings/power/mt8167-power.h>
  6. #define MT8167_PWR_STATUS_MFG_2D BIT(24)
  7. #define MT8167_PWR_STATUS_MFG_ASYNC BIT(25)
  8. /*
  9. * MT8167 power domain support
  10. */
  11. static const struct scpsys_domain_data scpsys_domain_data_mt8167[] = {
  12. [MT8167_POWER_DOMAIN_MM] = {
  13. .name = "mm",
  14. .sta_mask = PWR_STATUS_DISP,
  15. .ctl_offs = SPM_DIS_PWR_CON,
  16. .pwr_sta_offs = SPM_PWR_STATUS,
  17. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  18. .sram_pdn_bits = GENMASK(11, 8),
  19. .sram_pdn_ack_bits = GENMASK(12, 12),
  20. .bp_infracfg = {
  21. BUS_PROT_UPDATE_TOPAXI(MT8167_TOP_AXI_PROT_EN_MM_EMI |
  22. MT8167_TOP_AXI_PROT_EN_MCU_MM),
  23. },
  24. .caps = MTK_SCPD_ACTIVE_WAKEUP,
  25. },
  26. [MT8167_POWER_DOMAIN_VDEC] = {
  27. .name = "vdec",
  28. .sta_mask = PWR_STATUS_VDEC,
  29. .ctl_offs = SPM_VDE_PWR_CON,
  30. .pwr_sta_offs = SPM_PWR_STATUS,
  31. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  32. .sram_pdn_bits = GENMASK(8, 8),
  33. .sram_pdn_ack_bits = GENMASK(12, 12),
  34. .caps = MTK_SCPD_ACTIVE_WAKEUP,
  35. },
  36. [MT8167_POWER_DOMAIN_ISP] = {
  37. .name = "isp",
  38. .sta_mask = PWR_STATUS_ISP,
  39. .ctl_offs = SPM_ISP_PWR_CON,
  40. .pwr_sta_offs = SPM_PWR_STATUS,
  41. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  42. .sram_pdn_bits = GENMASK(11, 8),
  43. .sram_pdn_ack_bits = GENMASK(13, 12),
  44. .caps = MTK_SCPD_ACTIVE_WAKEUP,
  45. },
  46. [MT8167_POWER_DOMAIN_MFG_ASYNC] = {
  47. .name = "mfg_async",
  48. .sta_mask = MT8167_PWR_STATUS_MFG_ASYNC,
  49. .ctl_offs = SPM_MFG_ASYNC_PWR_CON,
  50. .pwr_sta_offs = SPM_PWR_STATUS,
  51. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  52. .sram_pdn_bits = 0,
  53. .sram_pdn_ack_bits = 0,
  54. .bp_infracfg = {
  55. BUS_PROT_UPDATE_TOPAXI(MT8167_TOP_AXI_PROT_EN_MCU_MFG |
  56. MT8167_TOP_AXI_PROT_EN_MFG_EMI),
  57. },
  58. },
  59. [MT8167_POWER_DOMAIN_MFG_2D] = {
  60. .name = "mfg_2d",
  61. .sta_mask = MT8167_PWR_STATUS_MFG_2D,
  62. .ctl_offs = SPM_MFG_2D_PWR_CON,
  63. .pwr_sta_offs = SPM_PWR_STATUS,
  64. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  65. .sram_pdn_bits = GENMASK(11, 8),
  66. .sram_pdn_ack_bits = GENMASK(15, 12),
  67. },
  68. [MT8167_POWER_DOMAIN_MFG] = {
  69. .name = "mfg",
  70. .sta_mask = PWR_STATUS_MFG,
  71. .ctl_offs = SPM_MFG_PWR_CON,
  72. .pwr_sta_offs = SPM_PWR_STATUS,
  73. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  74. .sram_pdn_bits = GENMASK(11, 8),
  75. .sram_pdn_ack_bits = GENMASK(15, 12),
  76. },
  77. [MT8167_POWER_DOMAIN_CONN] = {
  78. .name = "conn",
  79. .sta_mask = PWR_STATUS_CONN,
  80. .ctl_offs = SPM_CONN_PWR_CON,
  81. .pwr_sta_offs = SPM_PWR_STATUS,
  82. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  83. .sram_pdn_bits = GENMASK(8, 8),
  84. .sram_pdn_ack_bits = 0,
  85. .caps = MTK_SCPD_ACTIVE_WAKEUP,
  86. .bp_infracfg = {
  87. BUS_PROT_UPDATE_TOPAXI(MT8167_TOP_AXI_PROT_EN_CONN_EMI |
  88. MT8167_TOP_AXI_PROT_EN_CONN_MCU |
  89. MT8167_TOP_AXI_PROT_EN_MCU_CONN),
  90. },
  91. },
  92. };
  93. static const struct scpsys_soc_data mt8167_scpsys_data = {
  94. .domains_data = scpsys_domain_data_mt8167,
  95. .num_domains = ARRAY_SIZE(scpsys_domain_data_mt8167),
  96. };
  97. #endif /* __SOC_MEDIATEK_MT8167_PM_DOMAINS_H */