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