From patchwork Mon May 31 04:35:00 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: 12288625 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,URIBL_BLOCKED, 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 C16E1C47082 for ; Mon, 31 May 2021 04:36:53 +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 7EB9A61057 for ; Mon, 31 May 2021 04:36:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EB9A61057 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-arm-kernel-bounces+linux-arm-kernel=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=99AlX9CCASvX9mnWA6cXoTTzf0owHU95E2WxcQ6w5og=; b=oENesIfaE+QioO THrz5rQzCiN+uhdz6liT7oAnblzFdCEreB04cFstxsv6sSUiWwpeKNHNqmYYII6e1urfS0zB5BhGv PA91lozE6cmccnH/7KgG5vDw9hnu4/9bpt26pZPjHIwP2YAQsErufEG2u67c1lZN1Oz1H9I4EoJ+4 pbBMmKTHf1w5lfjSFQsRcNTHi72JXb6h0mm28xnSdhY0PjVoZgDuWNZLVldQJZ1rs/hi2qm6gMv1j RtlsXzOPSEwhR22oaNE2bOF45en7ANq+xs245bKRZX4vC12REW/cLQn1LP8zg426OifTKe3jnBDHb U8wthJj9LDnDyJNYFq/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZe1-00AhUw-5x; Mon, 31 May 2021 04:35:17 +0000 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZdu-00AhRk-0X for linux-arm-kernel@lists.infradead.org; Mon, 31 May 2021 04:35:13 +0000 Received: by mail-pl1-x62c.google.com with SMTP id x10so3668059plg.3 for ; Sun, 30 May 2021 21:35:07 -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=EHs8c9vGdjXi2giuywOaumDo2EmlRLA/sn7ZfRaihIo=; b=ZjaTTsW7dChI/1TWMdqo+HJVQgeE4uuo5w5gyenkQ3Ftwqh1OzRaAUqWB6964K/nNT AfeIGJmPE+rEujTOE+nn8NIAHBn8pUCDOM0LtqyT7hXmVgpHjPtLul19Y2wGrk5dNztp XV/o7yASeg5tXM5SjNTFm+P5kpidpK79TJk+g= 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=EHs8c9vGdjXi2giuywOaumDo2EmlRLA/sn7ZfRaihIo=; b=g1/4NOcf20+u5hn9h+1oL8V+B7H50MbXXDKnFqHzJGLdw/AtjaVPahlfWR5fYqdhKd KOrHyzz67yP/8xBGcVVO+gVjXFdPvXDKygJ9xS0pvKeNwqTpavV9AL2bKEExZKn16MT+ 2G6PzGnge/hHqB6mcoLu+8CJ1H+1FV5icPraLkdBgtf9wOfXUqrYxFo2ATdAQHyefUVM OJ8+NWSaoDzHWG6Dj9lA5PnxRuMlzjGjri9xDDYZRP3IQS61PPzgikyIqp5DW5U9bclv rRwYlhCAZ61HxRIeOpwt/Wy7Et+H33rx27XlYFkvli6PJLwrQ73dcg1qWmDON5TTijzd Oh4g== X-Gm-Message-State: AOAM5338pYd5ppX21eID2ArzKoeYqiktm5gcgIvyZhRfUB3ICs97EAq8 cxLhGLNt4laK4AGzDyMudDTqlQ== X-Google-Smtp-Source: ABdhPJxxgSMWMTn772k1ysuWnGkE1QOeHgmac5qTvTSd6ojr5RCWo9CeIZwcl08Tbiyh7nLDB3cKVQ== X-Received: by 2002:a17:90a:5d93:: with SMTP id t19mr17272027pji.116.1622435706373; Sun, 30 May 2021 21:35:06 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:c929:9e58:1e99:bfb5]) by smtp.gmail.com with ESMTPSA id a9sm9366811pfo.69.2021.05.30.21.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 May 2021 21:35:06 -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 1/3] soc: mtk-pm-domains: Fix the clock prepared issue Date: Mon, 31 May 2021 12:35:00 +0800 Message-Id: <20210531043502.2702645-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-20210530_213510_064380_81C51346 X-CRM114-Status: GOOD ( 16.97 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Weiyi Lu In this new power domain driver, when adding one power domain it will prepare the depenedent 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 preapred. 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. 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 Mon May 31 04:35:01 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: 12288629 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,URIBL_BLOCKED, 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 030C5C4708F for ; Mon, 31 May 2021 04:37:00 +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 BFC7D61057 for ; Mon, 31 May 2021 04:36:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFC7D61057 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-arm-kernel-bounces+linux-arm-kernel=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=7RUO2GQfAp4/ZnEyZQFWYDHMNUREEcV3rHou+ketqeM=; b=IZwe6/bVA+prXA BaODz82bNAFIDzo1xeKYVvlOey5KXmUV+yHDvstoloUt7kZqznGXaUh4CB3A4cgvBzLnajHpuJVk+ D/f6rjSTjgDyMun8C1AqzsD8/ts9azTK8rrxEhmZ7XsWlghdw/+F+7n8jJDh4FNbt/USm4aIaEHuv LQse7KgNPbq7gjqioIaGzLbAhqhoPnlfpIBpjat4jsqij7I2umgPQXUFP/oH050qVokoZU0dxgz8D YUW8FGBb/2usslOFNUhyeP2QmnNiQefz9CjdYgCDr3/nk+3gbKI/ceSqszJm6AJD+pwxNDK9Tm77L /y8Uart+5NddOwynOXAg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZeO-00AhaK-34; Mon, 31 May 2021 04:35:40 +0000 Received: from mail-pj1-x102f.google.com ([2607:f8b0:4864:20::102f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZdu-00AhRr-As for linux-arm-kernel@lists.infradead.org; Mon, 31 May 2021 04:35:13 +0000 Received: by mail-pj1-x102f.google.com with SMTP id k22-20020a17090aef16b0290163512accedso1068103pjz.0 for ; Sun, 30 May 2021 21:35:08 -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=8TCxgyYQSr5o3I78mldH5Z9lcyNNYCjL0+Xcvw5BpHc=; b=c2reybcrNCcfCPjUCkeuvpe3yKi/hqDQxkdLaYqMtpdB1ihkdJ/Ee6lG3gARI5Tsn6 dmWLsn8v2A2NK1XB/35IHqY6VaBEVdLMmndFSX/EZsvOQhOz+nZhcfeCRTbp2DyFwVD0 cKJIZOyZZxC22NNizE2huExt08h9WKwASPX4o= 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=8TCxgyYQSr5o3I78mldH5Z9lcyNNYCjL0+Xcvw5BpHc=; b=L2GCt/PQnJaOcd5NO08j/7hz2rUce1iP2YHLh/+Um5qHTjA28XxhGkm74BvhRaw5II AwPkzByEFHsRGPa5PKWaN4ECknT8cbQUkiZTztvSMrl5Au/LhonvP7YQiW09CmsiZR2D GzLBK7imJKHMJWEdj6OXZlEKDjesH20DLBpL9kSkmF+lqzzvkv7yWOWixMjETOflrtTT jJ6FIIBhsAcHma85rb/lbjGiVhOMPPGGB+naQcZ2HGBo1KwCz8FC73CTCjbLg58k4Nay w5d3G2Ba4BZhuFe2WzNBbl40R0p4/GVTt6/pkxwQYIPdCDCf+zoEVkiyP+0t1IW4Jqng NjoQ== X-Gm-Message-State: AOAM533GgL0e2w+uDLnPETFCejLC6pYNdlGG0CCXCbp396Tt49fjGpgm +vAV2RtMFZOmktvVI54Iq8PEnA== X-Google-Smtp-Source: ABdhPJyFU9b17OROMPbkumQ0tReN4Qd93C+lb9YAfo3Zv09ruH6iQtxzuayQHC3u8LL7xGiLs5hG0g== X-Received: by 2002:a17:90b:f07:: with SMTP id br7mr10601569pjb.141.1622435708158; Sun, 30 May 2021 21:35:08 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:c929:9e58:1e99:bfb5]) by smtp.gmail.com with ESMTPSA id a9sm9366811pfo.69.2021.05.30.21.35.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 May 2021 21:35:07 -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 2/3] soc: mtk-pm-domains: do not register smi node as syscon Date: Mon, 31 May 2021 12:35:01 +0800 Message-Id: <20210531043502.2702645-2-hsinyi@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog In-Reply-To: <20210531043502.2702645-1-hsinyi@chromium.org> References: <20210531043502.2702645-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210530_213510_422897_150CB611 X-CRM114-Status: GOOD ( 16.04 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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 unstabke suspend resume. Signed-off-by: Hsin-Yi Wang Reviewed-by: chun-jie.chen Reviewed-by: Enric Balletbo i Serra --- drivers/soc/mediatek/mtk-pm-domains.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c index 536d8c64b2b4..a9ba71eee4bb 100644 --- a/drivers/soc/mediatek/mtk-pm-domains.c +++ b/drivers/soc/mediatek/mtk-pm-domains.c @@ -296,7 +296,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 *root_node = scpsys->dev->of_node, *smi_node; struct property *prop; const char *clk_name; int i, ret, num_clks; @@ -352,9 +352,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 Mon May 31 04:35:02 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: 12288627 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,URIBL_BLOCKED, 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 B6328C4708F for ; Mon, 31 May 2021 04:36:56 +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 7A05D61057 for ; Mon, 31 May 2021 04:36:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A05D61057 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-arm-kernel-bounces+linux-arm-kernel=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=Cq0Wthq+7jgAQCnhXqfaOiCeaWAl9X1fz7YBj0z8/bU=; b=zmfzrvNABSGeUA r+5UH3gR1EXFOkLw9R2DUMIQM+Ra1x0pteYIqNZOxKAAV8gwTGVN4ObwWrqG9IsLTRbBhKhie4JHF 9gGCuz+eaL9sDxxJu/kmY3O5N+aSyGMEn1p58HaiBHsa7JDB+9Iw7lUeHNuifNLCaJJNrJgpUrj3I jX2B0e4icrc6Yj70a60gSrfix8pW1i5w7tjS6nEcfHWw5Ynjx9RNgCWs6K6heG+OP5JtNERg7jV93 oscZoL6Mod1+Zt1eYK40cP6wOY5YbRaZsuDERqmPDWuExjM7+QALblpWIRPxDm7H2TL07QB2NxQ9C WOsZqN0NfaUcVa4Km4GA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZeC-00AhXN-Bb; Mon, 31 May 2021 04:35:28 +0000 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lnZdu-00AhSa-Pj for linux-arm-kernel@lists.infradead.org; Mon, 31 May 2021 04:35:13 +0000 Received: by mail-pg1-x532.google.com with SMTP id i5so7466729pgm.0 for ; Sun, 30 May 2021 21:35: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:in-reply-to:references :mime-version:content-transfer-encoding; bh=wS5m2z0kdK64AV2ytOX+ndcFkQ/Q87q9VVh0RznGUCE=; b=ohNQUgiFv/Fr1yPgaH6iA4nF1fNcnSHZKFgxhEAFnwjZTEMCaINRq9c/T5U3EIuJaE 3ZNmPQWOsv0nGdzItO5F+G3bx6lLHnTVI+Fn5/VX4bVdNu7QbF+hCAXbOT2jy7Ft++jN IBXZsCeuCvycV5LrSpzECRpKsV4+PI8V9kk8I= 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=wS5m2z0kdK64AV2ytOX+ndcFkQ/Q87q9VVh0RznGUCE=; b=C9GQjOKyrIPNMvttGPTIaFXNffy9siLaFo4zb4ypobLE6VAd+lAbrX7OIqo157bWrD AvmBOlbVdEz6azbNIjTAzdFSjkHf9z+4+zZDQtSdYjMRE3n0ldfsYFQnMXFZS60RkNo+ bzj+uznPMCasJmfpYNOGVDlVXXjUWXS824gbeWKsJDq9GpWuVZ7FZwmt8xTBqDQKZmWc NeXoNr0GR7bROqIBoU++Gz+8oMX/ijAqigXGewNEdkHydWlAwKjVatIymHB/8S9H9bhi AXFgqw93uciQ91KUFoZtttAwzWO/2so2E3jBkRGvZpw6oF86VQcekWviEQhW/Nsw7XQb zciA== X-Gm-Message-State: AOAM530MRaNDvqzK9gBU6DL/u5mWQ9RJRsnC1JeBmbgsYRTfU8xTroZN 1UiRKHRq3l1qWAO890vxlNjS3A== X-Google-Smtp-Source: ABdhPJzOiquBBIDE4EvMprzcLUHuBhRfUOPzESEydjqntsXKkuvRcoC9aC3UWo9/twaTctBSY393ig== X-Received: by 2002:a63:7d4:: with SMTP id 203mr7910265pgh.348.1622435709911; Sun, 30 May 2021 21:35:09 -0700 (PDT) Received: from hsinyi-z840.tpe.corp.google.com ([2401:fa00:1:10:c929:9e58:1e99:bfb5]) by smtp.gmail.com with ESMTPSA id a9sm9366811pfo.69.2021.05.30.21.35.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 30 May 2021 21:35: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 3/3] arm64: dts: mt8183: remove syscon from smi_common node Date: Mon, 31 May 2021 12:35:02 +0800 Message-Id: <20210531043502.2702645-3-hsinyi@chromium.org> X-Mailer: git-send-email 2.32.0.rc0.204.g9fa02ecfa5-goog In-Reply-To: <20210531043502.2702645-1-hsinyi@chromium.org> References: <20210531043502.2702645-1-hsinyi@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210530_213510_842744_001D5265 X-CRM114-Status: GOOD ( 12.00 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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 {