Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp391404rwi; Fri, 14 Oct 2022 03:37:40 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4KaG4XiEV1U5JGNGrqZzM2TcOaAbj9ntj7utleuWwLPabGIpmoJKelcRemZ7Qismken1ks X-Received: by 2002:a63:d34c:0:b0:462:589b:b27e with SMTP id u12-20020a63d34c000000b00462589bb27emr4104308pgi.418.1665743860514; Fri, 14 Oct 2022 03:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665743860; cv=none; d=google.com; s=arc-20160816; b=EOdVD3WvacQipvI9h8pfFqrkHairlbW40heuqsAKXF9Z29e6Gv3IRMG/8lk/4+M4L4 SyN/sCeN3XRdlV0kOchf673wF6BziHkS8I1DpAgBMfmR1eWn6EWePuygLrlCFMSlADW7 8V+QzvhV8OrUmHq1lySCOITAg0NkhnIK7kSeXYh+OxwrSLQH93yJ89xllYfkKEO3JU7w NfwX2hkG+qdNFArDST18nkyJE2sieABeMoNVZGTmrkuWl0mKSy4lPZU1RCqY4dxtZvQn ICbCTof6ccNcB0fDWJ7743ZRnulelmcePSjXyx2oEbOfFfH6GLaM8E1JlcK2dr/g6hXh ujlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from :dkim-signature; bh=1EVtCMCEdutuhUNCrNtPVBANOTU4/N44AAt3ryFs7N0=; b=BDV+cWb5ItGRQal5LdFBc/vIE81Jk0wVKF0ygUHm8U6CPNd/wk+3vNF0B0sqTKyqkf 2rPLx0qRrPcRrxfJ72PVzOAY6IOKzYgF3SGAgLOfRRz7pxt/B/Dh4wmpZUTxqNGkiloL z/QxJeJQE7JSMMLgrYZvrarbDy9B/jESxRO5YIqer4eR/f8PBRB29RLik0PuuqiNFcK+ BMwwhPMZxUVKyM1GrxBjvcmIjb/Tx0R6LfyS9GHl2jJWUZavB876YXEaqwCoo2Ks3xIt DSXn737MljF5EbPMQCEgABvuWZatIrV07KCDct17tTTsqZM52y5bxt5Vw23AlL2abMXG se2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=crvxpsJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l1-20020a635701000000b00438d11be245si2180632pgb.429.2022.10.14.03.37.25; Fri, 14 Oct 2022 03:37:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=crvxpsJo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229818AbiJNKWO (ORCPT + 99 others); Fri, 14 Oct 2022 06:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229633AbiJNKWM (ORCPT ); Fri, 14 Oct 2022 06:22:12 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A66C1B867E; Fri, 14 Oct 2022 03:22:06 -0700 (PDT) X-UUID: 1c96c13c1224425bb2747da53a5f5f47-20221014 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:Message-ID:Date:Subject:CC:To:From; bh=1EVtCMCEdutuhUNCrNtPVBANOTU4/N44AAt3ryFs7N0=; b=crvxpsJocBUOzCEOqnQJSd01HAN9UMcKjOQri5P39mQxzI2wIqCnZE2P0noLDNGPZFsIT3hLrSJeefFnTGNtesT7NZGIG4pGRC92rpwR4f6G48gW+3Cn4tCQ4GbtkPxT6tNGyFKDFixWxBipsSChwDfP/L7R2GevDhehc9TXudY=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.11,REQID:bf3a6cab-0045-4e2b-91cd-101521b671be,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:39a5ff1,CLOUDID:965d17b6-a023-44ff-92b1-76c504f71c7a,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:1,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0 X-UUID: 1c96c13c1224425bb2747da53a5f5f47-20221014 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 2005646948; Fri, 14 Oct 2022 18:22:00 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 14 Oct 2022 18:21:59 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 14 Oct 2022 18:21:59 +0800 From: Allen-KH Cheng To: Matthias Brugger CC: , , , , , , Chun-Jie Chen , Allen-KH Cheng Subject: [PATCH] soc: mediatek: pm-domains: Fix the power glitch issue Date: Fri, 14 Oct 2022 18:20:29 +0800 Message-ID: <20221014102029.1162-1-allen-kh.cheng@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chun-Jie Chen Power reset maybe generate unexpected signal. In order to avoid the glitch issue, we need to enable isolation first to guarantee the stable signal when power reset is triggered. Fixes: 59b644b01cf4 ("soc: mediatek: Add MediaTek SCPSYS power domains") Signed-off-by: Chun-Jie Chen Signed-off-by: Allen-KH Cheng Reviewed-by: Chen-Yu Tsai Reviewed-by: Miles Chen --- Resend a PATCH from https://patchwork.kernel.org/project/linux-mediatek/patch/20220310011548.2487-1-chun-jie.chen@mediatek.com/ [Allen-KH Cheng ] --- --- drivers/soc/mediatek/mtk-pm-domains.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/mediatek/mtk-pm-domains.c b/drivers/soc/mediatek/mtk-pm-domains.c index 09e3c38b8466..474b272f9b02 100644 --- a/drivers/soc/mediatek/mtk-pm-domains.c +++ b/drivers/soc/mediatek/mtk-pm-domains.c @@ -275,9 +275,9 @@ static int scpsys_power_off(struct generic_pm_domain *genpd) 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); regmap_set_bits(scpsys->base, pd->data->ctl_offs, PWR_ISO_BIT); regmap_set_bits(scpsys->base, pd->data->ctl_offs, PWR_CLK_DIS_BIT); + regmap_clear_bits(scpsys->base, pd->data->ctl_offs, PWR_RST_B_BIT); regmap_clear_bits(scpsys->base, pd->data->ctl_offs, PWR_ON_2ND_BIT); regmap_clear_bits(scpsys->base, pd->data->ctl_offs, PWR_ON_BIT); -- 2.18.0