162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci 362306a36Sopenharmony_ci#ifndef __SOC_MEDIATEK_MT6795_PM_DOMAINS_H 462306a36Sopenharmony_ci#define __SOC_MEDIATEK_MT6795_PM_DOMAINS_H 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci#include "mtk-pm-domains.h" 762306a36Sopenharmony_ci#include <dt-bindings/power/mt6795-power.h> 862306a36Sopenharmony_ci 962306a36Sopenharmony_ci/* 1062306a36Sopenharmony_ci * MT6795 power domain support 1162306a36Sopenharmony_ci */ 1262306a36Sopenharmony_ci 1362306a36Sopenharmony_cistatic const struct scpsys_domain_data scpsys_domain_data_mt6795[] = { 1462306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_VDEC] = { 1562306a36Sopenharmony_ci .name = "vdec", 1662306a36Sopenharmony_ci .sta_mask = PWR_STATUS_VDEC, 1762306a36Sopenharmony_ci .ctl_offs = SPM_VDE_PWR_CON, 1862306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 1962306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 2062306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 2162306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(12, 12), 2262306a36Sopenharmony_ci }, 2362306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_VENC] = { 2462306a36Sopenharmony_ci .name = "venc", 2562306a36Sopenharmony_ci .sta_mask = PWR_STATUS_VENC, 2662306a36Sopenharmony_ci .ctl_offs = SPM_VEN_PWR_CON, 2762306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 2862306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 2962306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 3062306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(15, 12), 3162306a36Sopenharmony_ci }, 3262306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_ISP] = { 3362306a36Sopenharmony_ci .name = "isp", 3462306a36Sopenharmony_ci .sta_mask = PWR_STATUS_ISP, 3562306a36Sopenharmony_ci .ctl_offs = SPM_ISP_PWR_CON, 3662306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 3762306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 3862306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 3962306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(13, 12), 4062306a36Sopenharmony_ci }, 4162306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_MM] = { 4262306a36Sopenharmony_ci .name = "mm", 4362306a36Sopenharmony_ci .sta_mask = PWR_STATUS_DISP, 4462306a36Sopenharmony_ci .ctl_offs = SPM_DIS_PWR_CON, 4562306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 4662306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 4762306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 4862306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(12, 12), 4962306a36Sopenharmony_ci .bp_infracfg = { 5062306a36Sopenharmony_ci BUS_PROT_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MM_M0 | 5162306a36Sopenharmony_ci MT8173_TOP_AXI_PROT_EN_MM_M1), 5262306a36Sopenharmony_ci }, 5362306a36Sopenharmony_ci }, 5462306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_MJC] = { 5562306a36Sopenharmony_ci .name = "mjc", 5662306a36Sopenharmony_ci .sta_mask = BIT(20), 5762306a36Sopenharmony_ci .ctl_offs = 0x298, 5862306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 5962306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 6062306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 6162306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(15, 12), 6262306a36Sopenharmony_ci }, 6362306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_AUDIO] = { 6462306a36Sopenharmony_ci .name = "audio", 6562306a36Sopenharmony_ci .sta_mask = PWR_STATUS_AUDIO, 6662306a36Sopenharmony_ci .ctl_offs = SPM_AUDIO_PWR_CON, 6762306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 6862306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 6962306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 7062306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(15, 12), 7162306a36Sopenharmony_ci }, 7262306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_MFG_ASYNC] = { 7362306a36Sopenharmony_ci .name = "mfg_async", 7462306a36Sopenharmony_ci .sta_mask = PWR_STATUS_MFG_ASYNC, 7562306a36Sopenharmony_ci .ctl_offs = SPM_MFG_ASYNC_PWR_CON, 7662306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 7762306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 7862306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 7962306a36Sopenharmony_ci .sram_pdn_ack_bits = 0, 8062306a36Sopenharmony_ci }, 8162306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_MFG_2D] = { 8262306a36Sopenharmony_ci .name = "mfg_2d", 8362306a36Sopenharmony_ci .sta_mask = PWR_STATUS_MFG_2D, 8462306a36Sopenharmony_ci .ctl_offs = SPM_MFG_2D_PWR_CON, 8562306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 8662306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 8762306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(11, 8), 8862306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(13, 12), 8962306a36Sopenharmony_ci }, 9062306a36Sopenharmony_ci [MT6795_POWER_DOMAIN_MFG] = { 9162306a36Sopenharmony_ci .name = "mfg", 9262306a36Sopenharmony_ci .sta_mask = PWR_STATUS_MFG, 9362306a36Sopenharmony_ci .ctl_offs = SPM_MFG_PWR_CON, 9462306a36Sopenharmony_ci .pwr_sta_offs = SPM_PWR_STATUS, 9562306a36Sopenharmony_ci .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND, 9662306a36Sopenharmony_ci .sram_pdn_bits = GENMASK(13, 8), 9762306a36Sopenharmony_ci .sram_pdn_ack_bits = GENMASK(21, 16), 9862306a36Sopenharmony_ci .bp_infracfg = { 9962306a36Sopenharmony_ci BUS_PROT_UPDATE_TOPAXI(MT8173_TOP_AXI_PROT_EN_MFG_S | 10062306a36Sopenharmony_ci MT8173_TOP_AXI_PROT_EN_MFG_M0 | 10162306a36Sopenharmony_ci MT8173_TOP_AXI_PROT_EN_MFG_M1 | 10262306a36Sopenharmony_ci MT8173_TOP_AXI_PROT_EN_MFG_SNOOP_OUT), 10362306a36Sopenharmony_ci }, 10462306a36Sopenharmony_ci }, 10562306a36Sopenharmony_ci}; 10662306a36Sopenharmony_ci 10762306a36Sopenharmony_cistatic const struct scpsys_soc_data mt6795_scpsys_data = { 10862306a36Sopenharmony_ci .domains_data = scpsys_domain_data_mt6795, 10962306a36Sopenharmony_ci .num_domains = ARRAY_SIZE(scpsys_domain_data_mt6795), 11062306a36Sopenharmony_ci}; 11162306a36Sopenharmony_ci 11262306a36Sopenharmony_ci#endif /* __SOC_MEDIATEK_MT6795_PM_DOMAINS_H */ 113