Received: by 10.223.185.116 with SMTP id b49csp1537741wrg; Wed, 21 Feb 2018 21:50:26 -0800 (PST) X-Google-Smtp-Source: AH8x227Ku/8PUJfjhanX07gXc4yZIfYcRv06WBzQiN/04Y5N+PzU4N0fNR82HEW0USS/mbNI7Nkf X-Received: by 10.101.86.1 with SMTP id l1mr4774139pgs.140.1519278626586; Wed, 21 Feb 2018 21:50:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519278626; cv=none; d=google.com; s=arc-20160816; b=x402bWDwXRYyOQomemOcGQRX4ptEcsKI8SLl8uOTHhU7gLjzLk0+nF+513KMOPGhyX k0m754iDQcAMI7u/OV+pXDGnORrlOTwTbLJJXoLIW2k4ZL+kXBskn+6n5OUVu10+4e7w WTrkeNEbOQ4ZQZXNPSh04qhnDETnThruHKyNX7lRze2XBl+396V2Zs+xKAHHr79NtUgZ aBb6bynLk2nVZcmiTlAjf4V9GTM8CKc2HSX5BCbniKxFfGmn7XFYA6eA+Ns4eSVA5Xhe q2TZAxIonRtSe1r1h3reCQPu4Q9U4s5dmmVirFtqPiXMYrJnkMbkiWq2q6HMaXyOSBcT pfKg== 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=glcxl+pG4inAS06l6iKUe93rcKrmcVzD0lNodN8GQ3Pu/DIlwVzJElpdb0FjPFjOp3 JSRD6Eg4qDy+8pUk/r+93hn8ypEjeoDPeO9sqB2MnjVgugN3Nyy/P0o5tjrr41CIh8Pp LjmBnBdojxxMLbLHGa/xVcXXI30RibtY9pFTtghvxYDgJ/MZC7Eet6Gk9FaH1rov64nn Fo/MIGHsNM84bJuEW4PuVN3Inbq1CqzD7ZcUJyN63cypTB6tnzJoVdxKy1m+bFb7cZjF u/QSb8RERY3fFmnAW9/eJRks1DOs9gMjMq/3mjRTs84Zr/o+rB1oystd0ilDwWK4VUfx 9ZkA== 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 z2-v6si784455plk.240.2018.02.21.21.50.10; Wed, 21 Feb 2018 21:50:26 -0800 (PST) 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 S1752542AbeBVFtS (ORCPT + 99 others); Thu, 22 Feb 2018 00:49:18 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:28463 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751594AbeBVFtI (ORCPT ); Thu, 22 Feb 2018 00:49:08 -0500 X-UUID: fd3143f42b0745c691267b93d51be434-20180222 Received: from mtkcas09.mediatek.inc [(172.21.101.178)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 683213900; Thu, 22 Feb 2018 13:49:00 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Thu, 22 Feb 2018 13:48:59 +0800 Received: from mtkslt210.mediatek.inc (10.21.14.14) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Thu, 22 Feb 2018 13:48:59 +0800 From: Weiyi Lu To: Matthias Brugger , Stephen Boyd , Mike Turquette , Rob Herring CC: James Liao , Fan Chen , , , , , , , Weiyi Lu Subject: [PATCH v1 2/5] soc: mediatek: update power domain data of MT2712 Date: Thu, 22 Feb 2018 13:48:48 +0800 Message-ID: <20180222054851.26096-4-weiyi.lu@mediatek.com> X-Mailer: git-send-email 2.12.5 In-Reply-To: <20180222054851.26096-1-weiyi.lu@mediatek.com> References: <20180222054851.26096-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