mt6795-pm-domains.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. #ifndef __SOC_MEDIATEK_MT6795_PM_DOMAINS_H
  3. #define __SOC_MEDIATEK_MT6795_PM_DOMAINS_H
  4. #include "mtk-pm-domains.h"
  5. #include <dt-bindings/power/mt6795-power.h>
  6. /*
  7. * MT6795 power domain support
  8. */
  9. static const struct scpsys_domain_data scpsys_domain_data_mt6795[] = {
  10. [MT6795_POWER_DOMAIN_VDEC] = {
  11. .name = "vdec",
  12. .sta_mask = PWR_STATUS_VDEC,
  13. .ctl_offs = SPM_VDE_PWR_CON,
  14. .pwr_sta_offs = SPM_PWR_STATUS,
  15. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  16. .sram_pdn_bits = GENMASK(11, 8),
  17. .sram_pdn_ack_bits = GENMASK(12, 12),
  18. },
  19. [MT6795_POWER_DOMAIN_VENC] = {
  20. .name = "venc",
  21. .sta_mask = PWR_STATUS_VENC,
  22. .ctl_offs = SPM_VEN_PWR_CON,
  23. .pwr_sta_offs = SPM_PWR_STATUS,
  24. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  25. .sram_pdn_bits = GENMASK(11, 8),
  26. .sram_pdn_ack_bits = GENMASK(15, 12),
  27. },
  28. [MT6795_POWER_DOMAIN_ISP] = {
  29. .name = "isp",
  30. .sta_mask = PWR_STATUS_ISP,
  31. .ctl_offs = SPM_ISP_PWR_CON,
  32. .pwr_sta_offs = SPM_PWR_STATUS,
  33. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  34. .sram_pdn_bits = GENMASK(11, 8),
  35. .sram_pdn_ack_bits = GENMASK(13, 12),
  36. },
  37. [MT6795_POWER_DOMAIN_MM] = {
  38. .name = "mm",
  39. .sta_mask = PWR_STATUS_DISP,
  40. .ctl_offs = SPM_DIS_PWR_CON,
  41. .pwr_sta_offs = SPM_PWR_STATUS,
  42. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  43. .sram_pdn_bits = GENMASK(11, 8),
  44. .sram_pdn_ack_bits = GENMASK(12, 12),
  45. .bp_infracfg = {
  46. BUS_PROT_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MM_M0 |
  47. MT8173_TOP_AXI_PROT_EN_MM_M1),
  48. },
  49. },
  50. [MT6795_POWER_DOMAIN_MJC] = {
  51. .name = "mjc",
  52. .sta_mask = BIT(20),
  53. .ctl_offs = 0x298,
  54. .pwr_sta_offs = SPM_PWR_STATUS,
  55. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  56. .sram_pdn_bits = GENMASK(11, 8),
  57. .sram_pdn_ack_bits = GENMASK(15, 12),
  58. },
  59. [MT6795_POWER_DOMAIN_AUDIO] = {
  60. .name = "audio",
  61. .sta_mask = PWR_STATUS_AUDIO,
  62. .ctl_offs = SPM_AUDIO_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. [MT6795_POWER_DOMAIN_MFG_ASYNC] = {
  69. .name = "mfg_async",
  70. .sta_mask = PWR_STATUS_MFG_ASYNC,
  71. .ctl_offs = SPM_MFG_ASYNC_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 = 0,
  76. },
  77. [MT6795_POWER_DOMAIN_MFG_2D] = {
  78. .name = "mfg_2d",
  79. .sta_mask = PWR_STATUS_MFG_2D,
  80. .ctl_offs = SPM_MFG_2D_PWR_CON,
  81. .pwr_sta_offs = SPM_PWR_STATUS,
  82. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  83. .sram_pdn_bits = GENMASK(11, 8),
  84. .sram_pdn_ack_bits = GENMASK(13, 12),
  85. },
  86. [MT6795_POWER_DOMAIN_MFG] = {
  87. .name = "mfg",
  88. .sta_mask = PWR_STATUS_MFG,
  89. .ctl_offs = SPM_MFG_PWR_CON,
  90. .pwr_sta_offs = SPM_PWR_STATUS,
  91. .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND,
  92. .sram_pdn_bits = GENMASK(13, 8),
  93. .sram_pdn_ack_bits = GENMASK(21, 16),
  94. .bp_infracfg = {
  95. BUS_PROT_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MFG_S |
  96. MT8173_TOP_AXI_PROT_EN_MFG_M0 |
  97. MT8173_TOP_AXI_PROT_EN_MFG_M1 |
  98. MT8173_TOP_AXI_PROT_EN_MFG_SNOOP_OUT),
  99. },
  100. },
  101. };
  102. static const struct scpsys_soc_data mt6795_scpsys_data = {
  103. .domains_data = scpsys_domain_data_mt6795,
  104. .num_domains = ARRAY_SIZE(scpsys_domain_data_mt6795),
  105. };
  106. #endif /* __SOC_MEDIATEK_MT6795_PM_DOMAINS_H */