Received: by 10.213.65.16 with SMTP id m16csp203295imf; Mon, 12 Mar 2018 00:07:13 -0700 (PDT) X-Google-Smtp-Source: AG47ELvCzsYcY6lhbN7o86eqafpmCCji19J7a8hyveCtefUTO4FNHCeqdFTfAC4fNMEkwC7ZkG1N X-Received: by 10.101.89.74 with SMTP id g10mr5757637pgu.415.1520838433359; Mon, 12 Mar 2018 00:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520838433; cv=none; d=google.com; s=arc-20160816; b=LwFBnhiT5V1wwkX8fvGBJyou1StIz9pZeVy7E+AsVTVvlRIMkVPPy8CVaZr6DZ0akx lgIkO64A2vUIDNxibdIWoY1X+synyewUuUk/r76rmnChDxgQVIDGjYDK/Y0LQ7RTOHQh L/Cm0w15Ty578WwfJ85v0oEpW+dzpOhZXjqYOPPXZKBAFbQtjC2NXn2NOaBO2/+T9dUl we5k1THUH56+PPAGT7mjBsLKbf5kTbLCtASMxuTotn0zJwVQnNUj9ENmtU5ixfgxFDtl qScSHJIwtqaiN0PDeYfePPzPhUp8ly/5RMFgDqyGgqjQb4OPf7tz0fmpUhMU49SILBxK r3tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=ll6KUhGOkGNmJUOCnfFiBcxJInMU7GB4ryKDblXki2Q=; b=BVU4kFCGpJEAcR5UhPNJ+jNpGfI6ytlGxK3a/Ac/KXA3rRsk/orStAqqBd9dckifPv 15P20KK7EYZG3ykkLow2GSvXQZ87+a51v762Dv76eRpm10t472YqlVeWYlerNakFHPOI G4bOIMF01NP2RPCt6LLQdB/XH6gu9Sy4MrBBYfy0A2k/Moq9Lv3en/pjqqlAV6qexxhf PRknqjv+15xXgLix2j/ob9nbbVvpbInkzaCgqPZBhjj4tNxK4WbQQcKi9JgpJrjbQz9+ /sEBEggYXav0+kSjUXoRcOW5MN+ohf9PjaMpVFuzthZQ3Rh5SS0weF6EE4KpJwwp1pGk sDbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y18si5405783pfa.9.2018.03.12.00.06.59; Mon, 12 Mar 2018 00:07:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932628AbeCLHFQ (ORCPT + 99 others); Mon, 12 Mar 2018 03:05:16 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:37968 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752113AbeCLHDu (ORCPT ); Mon, 12 Mar 2018 03:03:50 -0400 X-UUID: 773ce1e8198e47db960ff3548a9f5ede-20180312 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1415619312; Mon, 12 Mar 2018 15:03:45 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Mon, 12 Mar 2018 15:03:44 +0800 Received: from mtkslt210.mediatek.inc (10.21.14.14) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Mon, 12 Mar 2018 15:03:44 +0800 From: Weiyi Lu To: Matthias Brugger , Stephen Boyd , Mike Turquette , Rob Herring CC: James Liao , Fan Chen , , , , , , , Weiyi Lu Subject: [PATCH v2 2/5] soc: mediatek: update power domain data of MT2712 Date: Mon, 12 Mar 2018 15:03:39 +0800 Message-ID: <20180312070342.4335-4-weiyi.lu@mediatek.com> X-Mailer: git-send-email 2.12.5 In-Reply-To: <20180312070342.4335-1-weiyi.lu@mediatek.com> References: <20180312070342.4335-1-weiyi.lu@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 1. split MFG power domain into MFG/MFG_SC1/MFG_SC2/MFG_SC3 according to MT2712 ECO design change 2. add subdomain support for MT2712 Signed-off-by: Weiyi Lu --- drivers/soc/mediatek/mtk-scpsys.c | 42 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c index 59bd749c2f25..edf8fd6c2c85 100644 --- a/drivers/soc/mediatek/mtk-scpsys.c +++ b/drivers/soc/mediatek/mtk-scpsys.c @@ -664,12 +664,48 @@ static const struct scp_domain_data scp_domain_data_mt2712[] = { .name = "mfg", .sta_mask = PWR_STATUS_MFG, .ctl_offs = SPM_MFG_PWR_CON, - .sram_pdn_bits = GENMASK(11, 8), - .sram_pdn_ack_bits = GENMASK(19, 16), + .sram_pdn_bits = GENMASK(8, 8), + .sram_pdn_ack_bits = GENMASK(16, 16), .clk_id = {CLK_MFG}, .bus_prot_mask = BIT(14) | BIT(21) | BIT(23), .active_wakeup = true, }, + [MT2712_POWER_DOMAIN_MFG_SC1] = { + .name = "mfg_sc1", + .sta_mask = BIT(22), + .ctl_offs = 0x02c0, + .sram_pdn_bits = GENMASK(8, 8), + .sram_pdn_ack_bits = GENMASK(16, 16), + .clk_id = {CLK_NONE}, + .active_wakeup = true, + }, + [MT2712_POWER_DOMAIN_MFG_SC2] = { + .name = "mfg_sc2", + .sta_mask = BIT(23), + .ctl_offs = 0x02c4, + .sram_pdn_bits = GENMASK(8, 8), + .sram_pdn_ack_bits = GENMASK(16, 16), + .clk_id = {CLK_NONE}, + .active_wakeup = true, + }, + [MT2712_POWER_DOMAIN_MFG_SC3] = { + .name = "mfg_sc3", + .sta_mask = BIT(30), + .ctl_offs = 0x01f8, + .sram_pdn_bits = GENMASK(8, 8), + .sram_pdn_ack_bits = GENMASK(16, 16), + .clk_id = {CLK_NONE}, + .active_wakeup = true, + }, +}; + +static const struct scp_subdomain scp_subdomain_mt2712[] = { + {MT2712_POWER_DOMAIN_MM, MT2712_POWER_DOMAIN_VDEC}, + {MT2712_POWER_DOMAIN_MM, MT2712_POWER_DOMAIN_VENC}, + {MT2712_POWER_DOMAIN_MM, MT2712_POWER_DOMAIN_ISP}, + {MT2712_POWER_DOMAIN_MFG, MT2712_POWER_DOMAIN_MFG_SC1}, + {MT2712_POWER_DOMAIN_MFG_SC1, MT2712_POWER_DOMAIN_MFG_SC2}, + {MT2712_POWER_DOMAIN_MFG_SC2, MT2712_POWER_DOMAIN_MFG_SC3}, }; /* @@ -905,6 +941,8 @@ static const struct scp_soc_data mt2701_data = { static const struct scp_soc_data mt2712_data = { .domains = scp_domain_data_mt2712, .num_domains = ARRAY_SIZE(scp_domain_data_mt2712), + .subdomains = scp_subdomain_mt2712, + .num_subdomains = ARRAY_SIZE(scp_subdomain_mt2712), .regs = { .pwr_sta_offs = SPM_PWR_STATUS, .pwr_sta2nd_offs = SPM_PWR_STATUS_2ND -- 2.12.5