From patchwork Tue Jun 1 03:59:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12290387 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 394ADC4708F for ; Tue, 1 Jun 2021 03:59:21 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA8E160E08 for ; Tue, 1 Jun 2021 03:59:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA8E160E08 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=iYPLGKcS7RzTCMWybMCCQSm9Z/fPK5dVSWw4Zp2MHPk=; b=eAUF36XxzYRj/i D/oRpd4rkYjMH4g/hmjZsQc8Uw0WtTxRbdN1V+1KhD4lLaW9AZTdTnwAvDYGWn43NCoFw+KpJ5Adh Cd4l3IC3rPQzDmSKIzdbU6mOEAtDt7NUxQm1sPzc+BZSxjgv4qeZe0FiyvZ/JnxI0rEoqiXxTctgo NrJQ8HkBA1fp0jLKgqx9f0cjFgki+cXPjRNMMG+ohpxytvOoiVMqpsnpEgegWQELnDjuYOnV435S6 PO+zewM3u/2JTYjJoYCTPN14j22PkHBmQ4M5FXzJSS1fqp596c9eeFNdrMkK7fWZNCLPV0uomLvRP PzdKQWOW5gqubLTH6XAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnvYf-00ESV0-0A; Tue, 01 Jun 2021 03:59:13 +0000 Received: from mail-pl1-x632.google.com ([2607:f8b0:4864:20::632]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnvYc-00ESTs-HE for linux-mediatek@lists.infradead.org; Tue, 01 Jun 2021 03:59:12 +0000 Received: by mail-pl1-x632.google.com with SMTP id e7so4085796plj.7 for ; Mon, 31 May 2021 20:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SXwwYLYnJsnDBREbEY1ZpSah/5rCANgCAGvtHU5EDV4=; b=DsX8PTvp7nRUwWpmJC/wVYpd2qd27HE9+ililwcm6lIVdQUi9680xucnTRbHskC424 4jzAahY89yDIZXjMVmTPI60eQtmBwedVlnIydqpIHXLzs9/fdhkwKvRWe+HyeTtQ3Yl4 TBaYQLe+nTcwnF7mtZjJI84eVmu1oVIqLBgTg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SXwwYLYnJsnDBREbEY1ZpSah/5rCANgCAGvtHU5EDV4=; b=IMrga5T8K0z7lVxYXu7W6XE9IuBntCbBWMGhbIrRCGDPlpHrosXQwWGv1dq+NCM+QS opA5gSqz6xoceer4aUJcIgBguRShpBQLc8jrpWBVd1ujL/TNjil6mL39S0tRWEVBTuhR FAYtXS8K+B8pB+fkNyOJ6l/GU1ShPG1eytcRu/jPekCY3CFjRnjnQOY+SsXfa8wCnuJh Hbz4dH5lrvG/yL++p2mgGeIp//IWTp1L+FwX8yYWUwk/le/JsgJwKMxIABoBKeb58/H1 LhBEnsS7hflRST2CyfWYuuLiZsdddy8jA0yI4jyq2ii/RBFG2ttaEazZtSMv0tBxfkg8 HJ6w== X-Gm-Message-State: AOAM5332ThV2Gjp0vwam9b01hngUeVEbH9cIqykNfMfT5elF0cdklVNn ST/2T8jEPjtTNG5iO/rcrXxG+Q== X-Google-Smtp-Source: ABdhPJwG6Rn5CV9j8+8zdP9BMbU2vg1FdpBVA8VXDgHafS3v4vMRxLv5l7xQojLafjQKMt1nbXQANA== X-Received: by 2002:a17:90b:2250:: with SMTP id hk16mr2434435pjb.95.1622519949734; Mon, 31 May 2021 20:59:09 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:5f83:3563:b780:4d82]) by smtp.gmail.com with ESMTPSA id 203sm2779735pfw.124.2021.05.31.20.59.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 May 2021 20:59:09 -0700 (PDT) From: Hsin-Yi Wang To: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Enric Balletbo i Serra , chun-jie.chen@mediatek.corp-partner.google.com, Yong Wu Subject: [PATCH v2 1/3] soc: mtk-pm-domains: Fix the clock prepared issue Date: Tue, 1 Jun 2021 11:59:03 +0800 Message-Id: <20210601035905.2970384-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210531_205910_631400_37DFA019 X-CRM114-Status: GOOD ( 16.15 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Weiyi Lu In this new power domain driver, when adding one power domain it will prepare the dependent clocks at the same. So we only do clk_bulk_enable/disable control during power ON/OFF. When system suspend, the pm runtime framework will forcely power off power domains. However, the dependent clocks are disabled but kept prepared. In MediaTek clock drivers, PLL would be turned ON when we do clk_bulk_prepare control. Clock hierarchy: PLL --> DIV_CK --> CLK_MUX (may be dependent clocks) --> SUBSYS_CG (may be dependent clocks) It will lead some unexpected clock states during system suspend. This patch will fix by doing prepare_enable/disable_unprepare on dependent clocks at the same time while we are going to power on/off any power domain. Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains") Signed-off-by: Weiyi Lu Signed-off-by: Hsin-Yi Wang Reviewed-by: chun-jie.chen Reviewed-by: Enric Balletbo i Serra --- drivers/soc/mediatek/mtk-pm-domains.c | 31 +++++++-------------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c index 0af00efa0ef8..536d8c64b2b4 100644 --- a/drivers/soc/mediatek/mtk-pm-domains.c +++ b/drivers/soc/mediatek/mtk-pm-domains.c @@ -211,7 +211,7 @@ static int scpsys_power_on(struct generic_pm_domain *genpd) if (ret) return ret; - ret = clk_bulk_enable(pd->num_clks, pd->clks); + ret = clk_bulk_prepare_enable(pd->num_clks, pd->clks); if (ret) goto err_reg; @@ -229,7 +229,7 @@ static int scpsys_power_on(struct generic_pm_domain *genpd) regmap_clear_bits(scpsys->base, pd->data->ctl_offs, PWR_ISO_BIT); regmap_set_bits(scpsys->base, pd->data->ctl_offs, PWR_RST_B_BIT); - ret = clk_bulk_enable(pd->num_subsys_clks, pd->subsys_clks); + ret = clk_bulk_prepare_enable(pd->num_subsys_clks, pd->subsys_clks); if (ret) goto err_pwr_ack; @@ -246,9 +246,9 @@ static int scpsys_power_on(struct generic_pm_domain *genpd) err_disable_sram: scpsys_sram_disable(pd); err_disable_subsys_clks: - clk_bulk_disable(pd->num_subsys_clks, pd->subsys_clks); + clk_bulk_disable_unprepare(pd->num_subsys_clks, pd->subsys_clks); err_pwr_ack: - clk_bulk_disable(pd->num_clks, pd->clks); + clk_bulk_disable_unprepare(pd->num_clks, pd->clks); err_reg: scpsys_regulator_disable(pd->supply); return ret; @@ -269,7 +269,7 @@ static int scpsys_power_off(struct generic_pm_domain *genpd) if (ret < 0) return ret; - clk_bulk_disable(pd->num_subsys_clks, pd->subsys_clks); + clk_bulk_disable_unprepare(pd->num_subsys_clks, pd->subsys_clks); /* subsys power off */ regmap_clear_bits(scpsys->base, pd->data->ctl_offs, PWR_RST_B_BIT); @@ -284,7 +284,7 @@ static int scpsys_power_off(struct generic_pm_domain *genpd) if (ret < 0) return ret; - clk_bulk_disable(pd->num_clks, pd->clks); + clk_bulk_disable_unprepare(pd->num_clks, pd->clks); scpsys_regulator_disable(pd->supply); @@ -405,14 +405,6 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no pd->subsys_clks[i].clk = clk; } - ret = clk_bulk_prepare(pd->num_clks, pd->clks); - if (ret) - goto err_put_subsys_clocks; - - ret = clk_bulk_prepare(pd->num_subsys_clks, pd->subsys_clks); - if (ret) - goto err_unprepare_clocks; - /* * Initially turn on all domains to make the domains usable * with !CONFIG_PM and to get the hardware in sync with the @@ -427,7 +419,7 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no ret = scpsys_power_on(&pd->genpd); if (ret < 0) { dev_err(scpsys->dev, "%pOF: failed to power on domain: %d\n", node, ret); - goto err_unprepare_clocks; + goto err_put_subsys_clocks; } } @@ -435,7 +427,7 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no ret = -EINVAL; dev_err(scpsys->dev, "power domain with id %d already exists, check your device-tree\n", id); - goto err_unprepare_subsys_clocks; + goto err_put_subsys_clocks; } if (!pd->data->name) @@ -455,10 +447,6 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no return scpsys->pd_data.domains[id]; -err_unprepare_subsys_clocks: - clk_bulk_unprepare(pd->num_subsys_clks, pd->subsys_clks); -err_unprepare_clocks: - clk_bulk_unprepare(pd->num_clks, pd->clks); err_put_subsys_clocks: clk_bulk_put(pd->num_subsys_clks, pd->subsys_clks); err_put_clocks: @@ -537,10 +525,7 @@ static void scpsys_remove_one_domain(struct scpsys_domain *pd) "failed to remove domain '%s' : %d - state may be inconsistent\n", pd->genpd.name, ret); - clk_bulk_unprepare(pd->num_clks, pd->clks); clk_bulk_put(pd->num_clks, pd->clks); - - clk_bulk_unprepare(pd->num_subsys_clks, pd->subsys_clks); clk_bulk_put(pd->num_subsys_clks, pd->subsys_clks); } From patchwork Tue Jun 1 03:59:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12290389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 741FFC47080 for ; Tue, 1 Jun 2021 03:59:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E8C16127C for ; Tue, 1 Jun 2021 03:59:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E8C16127C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5rgT12uP23ZwaSJCFadUhv/Vu1jaS08G2Smm4CYnk0I=; b=hOErrnSkXX6CMH BE0Xdf+Y3X69dFgM+gLCC4niQRwlJbNEQafmStRO8XzGLSoSZ5vJquRBzslugxe0kL4tjCUD22Npj oV4ESQ+N63b5g2kSz/Px1gFbpNGFrhGO2jq9+bODmCFWB5L0Zb4ElNf7uZoyHKvlx8fDkvpDpeisY kS6Itzxn/QO0IVpd4HuwAgKmeIMQn8Knt5BAcjj1BNqJwZtKZjgLw+s38vKTBNslhT4cmV89GPwBh /QhqFAKqNcio2ryl+ihiHxDxNWaRDPyX9mPKeRWtiN1H5D89a0xoGUWys22TyJnDsB5W114+Fqgmb hElw97hX77qM9UMNgKUA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnvYt-00ESYY-05; Tue, 01 Jun 2021 03:59:27 +0000 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnvYo-00ESX9-Nu for linux-mediatek@lists.infradead.org; Tue, 01 Jun 2021 03:59:24 +0000 Received: by mail-pl1-x629.google.com with SMTP id h12so6149613plf.11 for ; Mon, 31 May 2021 20:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UB61Gzn/MRwmod4oJCljeygOUa03KL82epqgxkhg2kk=; b=H4cPMG+N+viqUaTM+Qp5Ik0G0yuzXdhgb8vf+8ySTT1fiEy+L0O4tCybFkjAt1C0as 3p2tGK3Qbmf+oanC78Ooe7YsL3nsu59z1snFEkgVy4iEzLsPbNBNg1pqvk2zZYkWT3Q/ +bBHkWZDzeKjlgvslHU0KBs7V51Gph8ngIDZQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UB61Gzn/MRwmod4oJCljeygOUa03KL82epqgxkhg2kk=; b=I4luWN4gAWwQxR3Z7+VgTd6jW9i0sk8jBSOUGSiSdXKHfgZcpuNMGHHy7ZKs+/bbGh 2VSUcUGYvHFPL1O7+jIr5ZhofgE1BMkJIBkTl1FAR0+nPOf9c3mqPapnIgiEkoMSu51P a1+Eqcrwj5jD/LXwj4d+34KU9dPyNENZXc727LooAf/9QkVj7uCChzO7N/WooObtZvJl 7mZaOAxgyA7YfrvQqvlYX0pPD5Qm5ISVqBL1BvQYyfYCU04ZGuAeHyWsxOyabK+ye5f2 wBJNtJipM4MXORTcfFnLGrzntFqD93X4Kjz8P2Y8pvpIpnYg3YAzMnkJ28RWSISMZnr1 6vhw== X-Gm-Message-State: AOAM530Mq7WIalw/dZqjJwUy5kBDExvbWb8FSTuZqyTwFrBQ+XAupWBn FPu//Wc05nrlrU/sGRdis2AQMuiOcSnxXw== X-Google-Smtp-Source: ABdhPJwOeJ2sbNS0QZkH6Mt8lSTze0NTU7Hsqwrxy08Rr31iBqCYesAg4OhMUcsdKDFei8oXIvVr/A== X-Received: by 2002:aa7:8119:0:b029:2b5:7e51:274b with SMTP id b25-20020aa781190000b02902b57e51274bmr19960434pfi.32.1622519951510; Mon, 31 May 2021 20:59:11 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:5f83:3563:b780:4d82]) by smtp.gmail.com with ESMTPSA id 203sm2779735pfw.124.2021.05.31.20.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 May 2021 20:59:11 -0700 (PDT) From: Hsin-Yi Wang To: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Enric Balletbo i Serra , chun-jie.chen@mediatek.corp-partner.google.com, Yong Wu Subject: [PATCH v2 2/3] soc: mtk-pm-domains: do not register smi node as syscon Date: Tue, 1 Jun 2021 11:59:04 +0800 Message-Id: <20210601035905.2970384-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog In-Reply-To: <20210601035905.2970384-1-hsinyi@chromium.org> References: <20210601035905.2970384-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210531_205922_803701_FFF9242C X-CRM114-Status: GOOD ( 14.18 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Mediatek requires mmsys clocks to be unprepared during suspend, otherwise system has chances to hang. syscon_regmap_lookup_by_phandle_optional() will attach and prepare the first clock in smi node, leading to additional prepare to the clock which is not balanced with the prepare/unprepare pair in resume/suspend callbacks. If a power domain node requests an smi node and the smi node's first clock is an mmsys clock, it will results in an unstable suspend resume. Fixes: f414854c8843 ("soc: mediatek: pm-domains: Add SMI block as bus protection block") Signed-off-by: Hsin-Yi Wang Reviewed-by: chun-jie.chen Reviewed-by: Enric Balletbo i Serra --- drivers/soc/mediatek/mtk-pm-domains.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c index 536d8c64b2b4..b762bc40f56b 100644 --- a/drivers/soc/mediatek/mtk-pm-domains.c +++ b/drivers/soc/mediatek/mtk-pm-domains.c @@ -297,6 +297,7 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no const struct scpsys_domain_data *domain_data; struct scpsys_domain *pd; struct device_node *root_node = scpsys->dev->of_node; + struct device_node *smi_node; struct property *prop; const char *clk_name; int i, ret, num_clks; @@ -352,9 +353,13 @@ generic_pm_domain *scpsys_add_one_domain(struct scpsys *scpsys, struct device_no if (IS_ERR(pd->infracfg)) return ERR_CAST(pd->infracfg); - pd->smi = syscon_regmap_lookup_by_phandle_optional(node, "mediatek,smi"); - if (IS_ERR(pd->smi)) - return ERR_CAST(pd->smi); + smi_node = of_parse_phandle(node, "mediatek,smi", 0); + if (smi_node) { + pd->smi = device_node_to_regmap(smi_node); + of_node_put(smi_node); + if (IS_ERR(pd->smi)) + return ERR_CAST(pd->smi); + } num_clks = of_clk_get_parent_count(node); if (num_clks > 0) { From patchwork Tue Jun 1 04:00:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hsin-Yi Wang X-Patchwork-Id: 12290391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D11F4C4708F for ; Tue, 1 Jun 2021 04:00:48 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 983546127C for ; Tue, 1 Jun 2021 04:00:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 983546127C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5Oen5Q4YEeGb26mXCccZ4P/JOrgEJ8I8oDNXMSvVxhY=; b=vx5/U83MLdjUtK 7SglJEJiapwZar7On6gEtLSDNiogkVN8oQt/GTFgTNE/LqTQh5FTKcGnr61gsufL6zXK0rqQV2DX8 ms3Twv7r4VXdhFv8IAC7SApIrEf90plnt1h/LvKZtw9OKSLqvSmfOAnNE6boy0SrM8+7k4zPWjNeA uVClLczP+y04EtE+j++rX5TRtBx21h0IuF0RkuEFUPvpYXlxcLx0eUuQI2s6fTZ5gv9K/U3N4hm4f P8NuSbbm0CkPWUEfAbgHoWzFNXXT0UoQIqRU/rGYF2SYC9EdN+QVJYV37CX62Oya/y8mX4J6qOU0G scD/RjEOY5vXcNrG4B6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnva3-00ESsu-Og; Tue, 01 Jun 2021 04:00:39 +0000 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnvZp-00ESo5-E1 for linux-mediatek@lists.infradead.org; Tue, 01 Jun 2021 04:00:26 +0000 Received: by mail-pj1-x1034.google.com with SMTP id lx17-20020a17090b4b11b029015f3b32b8dbso678773pjb.0 for ; Mon, 31 May 2021 21:00:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k3CXuIHvguEKDy/ECWlq3WX2NJbLw9/l4D5j8nQaStQ=; b=UPTILnt9B7+RBltwKhRkE3pDiFM447zC45wGOtGp30p7Gacb2MTU7rMY3naqzhfpLz VH4yJnFNaFN5lr1cF4PURM4D81wWhql55YMgqGbvu9NflrxWS1MnLdwlj5TPlHefOIO4 Yt2BOQjYlm0lzGkyu7DibJv5p+gDjuJLdvj4E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=k3CXuIHvguEKDy/ECWlq3WX2NJbLw9/l4D5j8nQaStQ=; b=EniRdzDCR5ZkS5Pwb9BMoCXf4Ma/uHtQCYW4gBX8WxJTz+AAWavsE9Ure3ZTuMVNJT rxhUJNHhVlwnkaxTJuDzQn6fZP5hxBtOp04eGx97112i93Ie1b25noB2H6CAEyvANbQ8 JWPlO/4F6Nc5qzcEEjGU1/mTmbbf4MZrJh20JIM/4CfQnS5p0WD0kB8vnMLCL343V+/Q lfiChK320WxvRrUQ6nWsr0ow60uFT9Rl3wccBMcJEKeTQJufhue/wjrbD4IGAcI6nqCF Utt/ShibNOVVfBbs4bo/FadAUGuTNB++QAG3OQWLvZUfghvva2Om0+y4Oqa60VTPd+Vz SS9g== X-Gm-Message-State: AOAM5311f24ibCCi0mEz3WFzqko98Hg35DQRdxefi5kCIXoAkjkD6vIH uJbMKwvAwkNxK88rNIUFzeZ0Fw== X-Google-Smtp-Source: ABdhPJxVRZNWrzNMHtMZqws3k5caqBWHpgoq/Euc0BFxsKp0hxH4Lc9Fj8WdYMvbSZCNfIab89LMoQ== X-Received: by 2002:a17:90a:9517:: with SMTP id t23mr2477148pjo.130.1622520019059; Mon, 31 May 2021 21:00:19 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:5f83:3563:b780:4d82]) by smtp.gmail.com with ESMTPSA id 191sm11866953pfx.121.2021.05.31.21.00.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 May 2021 21:00:18 -0700 (PDT) From: Hsin-Yi Wang To: Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring , Enric Balletbo i Serra , chun-jie.chen@mediatek.corp-partner.google.com, Yong Wu Subject: [PATCH v2 3/3] arm64: dts: mt8183: remove syscon from smi_common node Date: Tue, 1 Jun 2021 12:00:14 +0800 Message-Id: <20210601040014.2970805-1-hsinyi@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210531_210025_505806_D06E0EBF X-CRM114-Status: UNSURE ( 9.83 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org We don't need to register smi_common as syscon. Also add required property power-domains for this node. Signed-off-by: Hsin-Yi Wang Reviewed-by: Enric Balletbo i Serra --- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi index c5e822b6b77a..e074c0d402ff 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi @@ -1263,13 +1263,14 @@ larb0: larb@14017000 { }; smi_common: smi@14019000 { - compatible = "mediatek,mt8183-smi-common", "syscon"; + compatible = "mediatek,mt8183-smi-common"; reg = <0 0x14019000 0 0x1000>; clocks = <&mmsys CLK_MM_SMI_COMMON>, <&mmsys CLK_MM_SMI_COMMON>, <&mmsys CLK_MM_GALS_COMM0>, <&mmsys CLK_MM_GALS_COMM1>; clock-names = "apb", "smi", "gals0", "gals1"; + power-domains = <&spm MT8183_POWER_DOMAIN_DISP>; }; imgsys: syscon@15020000 {