From patchwork Thu Apr 29 07:30:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 12230559 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.0 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,MSGID_FROM_MTA_HEADER,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 6A90FC433B4 for ; Thu, 29 Apr 2021 07:10:00 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 CA327613B3 for ; Thu, 29 Apr 2021 07:09:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA327613B3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com 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=desiato.20200630; 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=igtf7IYDxUuMCnpOJuCtBmjuHTcX+GLJtIPWwP0XtUA=; b=EZN60+59zgj7vIxCwukxsSs0n NVGLzn2F5RR5alhblRAQQTC1BYKgH957+nDqoaBhbb12dK9AmmNyfr9zK8uxv4FIiid7yuXXtbXzV +RBsAj4RHbgmOMW4kMOMUAkK/FQDpaEtoA4NbWLWpyschCPYifi5LfzWUpT0BgzKNgxU1LMj/Fdou hnwkYozx8c531x9LwrYxBWrjcCRZi3HRa/z+w5CqQrKaDJQXxfVzWVIgeY10hF3bnkFxnK+zHLS7K 5Z4vQGaQrg7eRHdXfIUZ08UNZzyPJjm2YCSgI9WpUD38694DZQeucENSaC/2xiTGLlT9PQR499hNL XY50E9T6Q==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lc0m7-0059LA-9A; Thu, 29 Apr 2021 07:07:51 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lc0f5-0057fs-TZ for linux-arm-kernel@desiato.infradead.org; Thu, 29 Apr 2021 07:00:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=RHBirtV3NAhw3AiaHaqJ6lCADJMK4dINT7svEGoqJ+4=; b=acXlzYKEBWynlpmE/VPxTb9Ice +BtcgcixPKzuttcx/ow0bhlpJe9HT+yA0Qyp7SdQMrUtH9+IQk0R6cCjJLxcJgpnp6I58xagrVpCq gxvUKA9WBJonkOwaf5Qvfr6LkxT3ZV+cGaPXzQhZW6Mlrfc2d2xAP4sE2Dy26IZCo7ZaXjK/W1xJl GBVDHVKLL07Pra5nxrWuv2blvCDjegy+8BWGDlQ5+LXRcYQxVWapa7EM4xi8X8aOgBhlCDmpdfjdl IkmrxpcJvIvjyrfItHLtvVGnrfq60RDRyaSflEsQeBWA0XUJ1xKtKDGSc8OFosnVlH1W3wLi9AD2D qd9nmM+g==; Received: from mail-vi1eur05on2051.outbound.protection.outlook.com ([40.107.21.51] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lc0f3-000QPN-F6 for linux-arm-kernel@lists.infradead.org; Thu, 29 Apr 2021 07:00:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C3fzDnKk9YY4eLok2lEhRGPMo5xA0dtDrEHuYuQToROPisHgB3RNgwC5Q2vaek11LGLr+QNxQWl/3YmZ0O2CSP5J3YmjsCf4trdJhNCfX7ni+9fJumHck9JBqo1uB3yLzrXUvxHPjDENb9mpUotqI7D+0uxtPK41dJ3zPGF/oMZmAKN4yhBiCBOhP2myDmextjWhhw6pSi/0KkZHuE3q1r+ABwBXhmDoJaGvNB7DH3WWNjjvxdca6UeC9nPpfovP7ih31IeTv7wbpVHQs8V+6bN/d3JYeaAvZ65VVvJMdeeZtRyHswByRM4AKxP4g6Rc2IvU5Mw+xIMi+M1FCA16DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RHBirtV3NAhw3AiaHaqJ6lCADJMK4dINT7svEGoqJ+4=; b=hQYQZ4cIhqHRCCs0M0TWPds0UGGaWGnNPeiMmBdlnpcEXEnwHrbWUWfl8SjjNQU2CWSMCac8adf+1lV86g6X+G6ApGcZzezP1upp9S1Cpgc+Qv4GZSof+mzQIaS3zWHJ3TzXDHjrlc+NcnVhwkL4PQxaN3MHLuT7NKcbZYwNgIohmLME6B0axvo1UUbEjIKMTmbkE7r6iQuvNxBkTGN5zyuRw0Tp9O5zGsx3gaThcSIS6dFDj18Jc2LSbjrCELJUKtosw9V8Yh+WMl050p0/kGQO2ne7UCuPaP2mhRpEKUVDNgc+bWfX7sDzHYhm4L2kxnr8QXD+fdB57TmhPNU4xA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RHBirtV3NAhw3AiaHaqJ6lCADJMK4dINT7svEGoqJ+4=; b=cO5QRugmyT8ryc7LyFoP5RGTO7wAjAXbP0VDLfwtnBR7w56OeT3xF5UrakmM0LPKE6oGT0ImW9QM7ciD/ofrro77IUiOBJipP3y9F5q4aggb65lIVw2UJtitfBRFuHK2k23Hyl+3otGji4IVyyQJjgWrMtLhIvF/un6eZtSreUk= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) by DB7PR04MB5468.eurprd04.prod.outlook.com (2603:10a6:10:86::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.25; Thu, 29 Apr 2021 07:00:26 +0000 Received: from DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64]) by DB6PR0402MB2760.eurprd04.prod.outlook.com ([fe80::45b9:c993:87ec:9a64%8]) with mapi id 15.20.4065.023; Thu, 29 Apr 2021 07:00:26 +0000 From: "Peng Fan (OSS)" To: robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, p.zabel@pengutronix.de, l.stach@pengutronix.de, krzk@kernel.org, agx@sigxcpu.org, marex@denx.de, andrew.smirnov@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, ping.bai@nxp.com, frieder.schrempf@kontron.de, aford173@gmail.com, abel.vesa@nxp.com, Peng Fan Subject: [PATCH 14/16] soc: imx: gpcv2: move reset assert after requesting domain power up Date: Thu, 29 Apr 2021 15:30:48 +0800 Message-Id: <20210429073050.21039-15-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210429073050.21039-1-peng.fan@oss.nxp.com> References: <20210429073050.21039-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: HK2PR02CA0208.apcprd02.prod.outlook.com (2603:1096:201:20::20) To DB6PR0402MB2760.eurprd04.prod.outlook.com (2603:10a6:4:a1::14) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from linux-1xn6.ap.freescale.net (119.31.174.71) by HK2PR02CA0208.apcprd02.prod.outlook.com (2603:1096:201:20::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.29 via Frontend Transport; Thu, 29 Apr 2021 07:00:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ea4b35c-90ee-4a94-b26e-08d90adc7722 X-MS-TrafficTypeDiagnostic: DB7PR04MB5468: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XHwKodM0mHdLdC+G92jbKoGVq+9Y5K8GrlbiVjY34VmG3nauwNpDABZocX/0W7oep/V41jJD+Q2yw98R1mMCIaC4G2BnQDIKQcGA3vfFjDXYU9ZdWc+N/mWsK50sB9wb8mmLvowwyuxDA4w8G0bqkQBTJ/GkVSiIqmQ7C0Pem3CMVkoJK8ApXATqKieHDmH8tpFekKEIv0J3EL4+Z6VzuMDHPX/ZRIVYk94cTCdk2cq+iDshTl1wown4MDgY6JiwNMQt8e+hEnM5BJSa88MGZmB7EWrLjvr7rHEc5HC8dpyJ8EMwjxAPzSCsVIl2CzTM6ngBxxUFiYdlCMfWE8vAovH+jtzS86DeBGUQ7UZ6oj52gpGolzB1DZn9ovUQORr3T16CLZyofmZEQajEKkX9SqF1eSggnlvL/ZPo0WUsEbzsiZHWG3zEYNkTILElTN0XU0EeE5o6WDgJAudiP7WBhU1JlV/MryzS4c3DMTUkwcR+bQrETPFdvWBVBTgv3wR4LGzA/Qni4RxaRLZKn+bELjf5I+sb99sUp3GaBsbCs4qmyYIdwxqN4sx2NoT/BL83DM63rp5Ytn+uLtwNJWneRxjX0vFgfxBWJifTqFEzvx4NvlLkJULSoa4zQsUiM+b108nPMgyzLZxInqyswXyKJA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB6PR0402MB2760.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(396003)(376002)(39860400002)(346002)(136003)(2906002)(8936002)(4326008)(52116002)(38100700002)(38350700002)(6666004)(956004)(6512007)(83380400001)(8676002)(66946007)(66476007)(16526019)(2616005)(1076003)(6506007)(186003)(6486002)(66556008)(7416002)(478600001)(5660300002)(26005)(316002)(86362001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 5YCld2DVre/yPv41wT47rLAH83fjQADRvf44H04gSlRX1x513y3LBYPC/wOmkNFEp5K0PItR6WEf2OF0UmYdu82O4ZEX6ooXQto0yp9eKOzDqXOp0+8wftesTVhfMhfLDHqFLDJkesOJLppvmmOyZktiZ+jERoVWvDWQOvXAwUhniR05BLYL+9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CTxPFn2igCxrcp4ijUSkAded1Yn0XapHqH+EXV0tmi+xQuO/+wiHreWgd5d8pL+2nW+ X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5ea4b35c-90ee-4a94-b26e-08d90adc7722 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2021 07:00:26.1179 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: F6Yw0U72vxymGgVwissWcSWFEGCAs4UB4kENe9pJjAtTiy3o0cvLi/4QmIidf7dWKWV7LbsSE/ooUKzUgPkpNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB5468 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210429_000033_529669_A53FD277 X-CRM114-Status: GOOD ( 12.87 ) 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: Peng Fan The i.MX8MM VPU power up sequence is a bit special, it must follow: 1. request power up 2. reset assert 3. reset deassert This change in this patch will not affect other domains, because the power domain default is in asserted state, unless bootloader deassert the reset. [Note: We expect bootloader leave the domain in asserted state, but this may not always be true, so we might need another solution to address the VPU domain requirements] Signed-off-by: Peng Fan --- drivers/soc/imx/gpcv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index d2ce47a5ebad..072f519462a5 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -217,8 +217,6 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd) goto out_regulator_disable; } - reset_control_assert(domain->reset); - if (domain->bits.pxx) { /* request the domain to power up */ regmap_update_bits(domain->regmap, GPC_PU_PGC_SW_PUP_REQ, @@ -241,6 +239,8 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd) GPC_PGC_CTRL_PCR, 0); } + reset_control_assert(domain->reset); + /* delay for reset to propagate */ udelay(5);