Received: by 10.213.65.68 with SMTP id h4csp1193236imn; Sun, 18 Mar 2018 18:57:47 -0700 (PDT) X-Google-Smtp-Source: AG47ELvhscS1cdpH/7RxlXnFGmkJ76Hf1/e51Fr28ZLbMrNKMiKfUP+vYjM1qEH+ct5Qaj1qw1c8 X-Received: by 2002:a17:902:7102:: with SMTP id a2-v6mr10511978pll.87.1521424667832; Sun, 18 Mar 2018 18:57:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521424667; cv=none; d=google.com; s=arc-20160816; b=r7JZ4e7g9TYPr+w7WVV8I6UZNCfTFz1Kiwh8SqJeATfv5YnqnWHT8hEb9HOMqxUYg4 iPFOTqpWEedeY7K7hZFn0BVd+M+N3wF/IvceulPlzYiOlzf5VrjhqwFCMcV6V1RL7EZc E0YvxlXZMqGeVc4K94haJYjEsXjtKGqvfIJMbH4yO38bZQmCDaFdzG8lqJXdHVk3SHDF jYEJx9c1XTOGA1ieu7LVi8WEtBqcBgsS5ud7VRSzOP+QSR0iJZS/uVexTv7xWaiOasrS kxs+kH6mcxvGk5ZDdP2tvCxAtQB1Fa0epEdOY3OceCRiLZOHwptY2/gQT+uIhNtAKUFR WRlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=ag0uyWa/V75ySO7AHumZ5topH4OmwpLIC45y+1dhaFc=; b=KFbzNnPP0j2UvU5oagW/HvjWNtUwBSKk3PHbfuWX6ciF/G4DqAVW+B7uBBgDV6p9gY 49k5BN1ogNjVPUY4q+yP0Qs9o6nzsVjoa1QqTPnBrf5zNTAOQpSq3aR05kMZVkuwjehW 4CiwLWMJB57HCzVuLoJ6porqfiscsRn0syy9AbHMJh6c7i6mbAhLWAIOVdbbulO5993h XctOP6Nm8Ar/geO/myJpyhIfKG9wp2QUyo3kHViV06fmuvlWrzKdQloKUEYWlvplPKNy iTeE5IcDWj5Vkfzi08xDjrDbAUrHJRhtViX1DhtW1OjJplzAvaPCwV369h6HMtqeQXvB eu9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DDVTQB7a; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j8si8831492pgq.293.2018.03.18.18.57.33; Sun, 18 Mar 2018 18:57:47 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=DDVTQB7a; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755118AbeCSBdN (ORCPT + 99 others); Sun, 18 Mar 2018 21:33:13 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:40526 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755069AbeCSBdK (ORCPT ); Sun, 18 Mar 2018 21:33:10 -0400 Received: by mail-wr0-f195.google.com with SMTP id z8so7234565wrh.7; Sun, 18 Mar 2018 18:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ag0uyWa/V75ySO7AHumZ5topH4OmwpLIC45y+1dhaFc=; b=DDVTQB7ak2x5Pkp1voMwFRvAkW4xUseaN/Wm05CS1UIoI51NRBL3AxJT3itFidoLSO 49Hw16xo64tEkmeZd/rC3VFPCjhQuUIrBVOt4pG2l+vAyRHtYKz/CoTEMLXYn+Q9cM0v WUdmw8yM2Wer7svr4feZeVPPtnkIT1AhyURIjN4Fe9YrZdoraLwENgD2XSdFwfPuRXXV c526HWYy025xFKHm8gftCO3Q/qeAyD3SSw/c7WQezUw/ZYs3l6aVrDmoXVKgYSw+Y3kV FB7XTA0el9R9yK68Ne0CKf2L8XiBwOF79qxsRqDyzBQWq+8Q3pR5t9phB2jnREE+g4j6 n8XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ag0uyWa/V75ySO7AHumZ5topH4OmwpLIC45y+1dhaFc=; b=ekkkuCFb2vTiZQki3PqvqBCb6y1gp02S2hrwsguGm86REdYKzeZLigV8QpLq5s743v 6RNMdbWv7r9P9uDzDHtZ366yTp9fY1USSHkiaO5j7IcDbgMch7A0s7tKAkzDHIg+3Oaw Xj7sK7FyeBxbeQJPGBQSQimrTka+XJ5+SD4UE+nLc9PoKeHOh+H2/L3r15nL7Jf1PMh+ nD+DIhPgiWuMub1KiI00BM53wRpC128IoEkcGx1cj+a38kxxJT4tU7Zo83uujsN1iLKp d5r/zPijiuby2P1jEfGeSmTmIbFM6TVn8xoTHAtBwDYvy35BEIobX+B4TdKHK2OFHIAt XXfA== X-Gm-Message-State: AElRT7Gk5kMBqHW+MNrhOpAla1RB+LLSK+ahgtkz+dL4VD8cdG2c+m3U 5hdl0BuUlYYBHPba7pTXZZY= X-Received: by 10.223.160.182 with SMTP id m51mr4757516wrm.187.1521423188390; Sun, 18 Mar 2018 18:33:08 -0700 (PDT) Received: from ziggy.stardust ([93.176.145.166]) by smtp.gmail.com with ESMTPSA id m7sm5019012wrb.86.2018.03.18.18.33.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Mar 2018 18:33:07 -0700 (PDT) Subject: Re: [PATCH v2 2/5] soc: mediatek: update power domain data of MT2712 To: Weiyi Lu , Stephen Boyd , Mike Turquette , Rob Herring Cc: James Liao , Fan Chen , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-clk@vger.kernel.org, srv_heupstream@mediatek.com References: <20180312070342.4335-1-weiyi.lu@mediatek.com> <20180312070342.4335-4-weiyi.lu@mediatek.com> From: Matthias Brugger Message-ID: Date: Mon, 19 Mar 2018 02:33:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180312070342.4335-4-weiyi.lu@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/12/2018 08:03 AM, Weiyi Lu wrote: > 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 Pushed to v4.16-next/soc Thanks! > --- > 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 >