Message ID | 20210506010440.7016-10-peng.fan@oss.nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=qdH4=KB=lists.infradead.org=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@kernel.org> 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.4 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=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 62FBDC433ED for <linux-arm-kernel@archiver.kernel.org>; Thu, 6 May 2021 00:36:04 +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 D65A2610FB for <linux-arm-kernel@archiver.kernel.org>; Thu, 6 May 2021 00:36:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D65A2610FB 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=9rEpqkshMG6azGrUuu4CH39lslZZuNZcHhtzAdWPyp0=; b=Ngh7zlYcND9IqrxqKd+4UdDti O+Lbj8/bNqNkMzmrkyktWstHkX0JJaMstySjPgUuYo/JDknr7YbeREjKlnyhXIECC09UhRPBkv5c1 SZH945faA2HzOIcA9AZCwRuTUNpCs/+8Di8/FXptelNyRoDOhUzgylWvz3INix6nJcf8G5/RaZWCz JUF8Q+9xGn1c6bJYCKFJvPzwXPEGYoahniiSPLZcPooOR9GaTJzrFV0/9tpgw1NaYKKfIUXQijvx8 CG0xMCrN78OfFfY+DK7+8r+phWT2BrwSv2saq1gwNx5pv8aYQNmk0te+hW4S/6CvRaQCQbfojXH+a pcsAtDYzg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1leRyA-002hqZ-6Z; Thu, 06 May 2021 00:34:22 +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 1leRxF-002hdK-IP for linux-arm-kernel@desiato.infradead.org; Thu, 06 May 2021 00:33:25 +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=IPE/rxdTRtEJdBlQ2Ie6VPB8afos6/Z8WEhpD5L4zBM=; b=EzmD9YiBAcHr1QJ6NUgZr3/+Xm MNKQK9vZpjqFV8d+Mb8VxkT5KbUd5fJSwLbfvxkYZ8A0IvYEoMHhSjOQ0F87dK+uTO3j3zXqo22RW dF9L3CzGMXfVXqSzwube2y8MJhpXkS0sg+iQN8xLCKyUOqHBHMtN2v7xbOAiCbP4bqIrOXDYwEN0i 5meNPt7uFKMS231JN0ErAqWx1YdQTydPXJyZFEzhz8vJFKzFjLgPyk4HJLmi8qcKYuoI/e36eXPTO dI2TujjstuqI4/xI0NQFiGcCcco6HcVOtSM5DLkU5X0cg2HYJl37HBYarVbNNujjLyYgTSEIlJ0ug CzfVakCA==; Received: from mail-eopbgr00089.outbound.protection.outlook.com ([40.107.0.89] helo=EUR02-AM5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1leRxC-005RGt-UC for linux-arm-kernel@lists.infradead.org; Thu, 06 May 2021 00:33:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=meT8QILuKZFejbT9JuxQO+nIRiu4eD1MwMXlJ652q/guEX95JjzWDn5UJis5Nz7Dy2TTMgc9rYKQ3ZxiPPJUw9c++BnPmsp6mbPmGE58MBNF2IS/GjKlbSmO5h7jW2s/6WnIpdLZlKWelUngsoyyF37nXBMnFA4ZVGv2qahJyt7RDKkOEsmFCJNfETOwh2iV1rlh9rPnWiQQhGp75WiHSR7Npi4L6NdJ6DPY7sOHeY+76J52YWLGh6a3H8TP1jAe/IUdXM1+jaWkp4VJHhyJjzsvd9IygmophqBZ3P9AYjbPcDHFIOG0ElHkWJMBbcqVpqacFlLNoMuZQF6/+Znp0w== 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=IPE/rxdTRtEJdBlQ2Ie6VPB8afos6/Z8WEhpD5L4zBM=; b=AfQt1lta/wseO6XRTANjhN/dxIAn+hszSS0gQJOJNVNH6gGokEMhjGFxHe9F6aXwsdeX0e7mzMQt8cjDY8ETZ95b9UDu1Qv1NkNePqPx3WBTGR5jiAwowBvFfO9w88Fs3ozscuGbgoTCyBMARpKcwzY3P+oiphhiTN1ZTn5h4t4QH8FHV8dZFEvU4XTfJM5cOioyqqsKH+0MVjX4PmZrWrgkTUiQ9JZgIODexsHe+idZ97tiI3cLE75qJXs2IlUT+Ef8/SaFQSstNhw4DCJmQIh1HE+KW00baCkfVhSWG3/SZ1UHrnmqSeZ2cJgfsTX+zXY6gqeDTHQXuwplMFcxaA== 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=IPE/rxdTRtEJdBlQ2Ie6VPB8afos6/Z8WEhpD5L4zBM=; b=h8CZRH2kRbMoLYcInqHIN4az1maEeMq0SxdxNjVrIFml9MDDD64jkfqxV95b1VQBqjXTAuUpV3eSSgw44CuiDbVpipf9h3TZWN7QBYGki6bm/lQhjsQGiiwfrCE2J5+4xJEuWcFWo9A1AGVmVZ5LuwwhAkRCy5cJuWE9L6djKuo= 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 DB8PR04MB6714.eurprd04.prod.outlook.com (2603:10a6:10:10e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25; Thu, 6 May 2021 00:33:19 +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.039; Thu, 6 May 2021 00:33:19 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> 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 <peng.fan@nxp.com> Subject: [PATCH V2 09/13] soc: imx: gpcv2: add support for optional resets Date: Thu, 6 May 2021 09:04:36 +0800 Message-Id: <20210506010440.7016-10-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210506010440.7016-1-peng.fan@oss.nxp.com> References: <20210506010440.7016-1-peng.fan@oss.nxp.com> X-Originating-IP: [119.31.174.71] X-ClientProxiedBy: SGAP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::22) 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 SGAP274CA0010.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24 via Frontend Transport; Thu, 6 May 2021 00:33:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6a886ec2-1d8f-4762-8175-08d910268bd3 X-MS-TrafficTypeDiagnostic: DB8PR04MB6714: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: <DB8PR04MB6714B985BE34F116D562D984C9589@DB8PR04MB6714.eurprd04.prod.outlook.com> X-MS-Oob-TLC-OOBClassifiers: OLM:3383; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /khaKrQHtmBtGiRMl/kOajzuoxpoO+loJaNnEeNuE0+aUaDNdp3J9SLpaIb5cjab4SLpyqM5UsAM9CdtVIDq5vKg/ix8IDPzm9+mdT6m3mTV2MHn0xuS1gykFThKPFGBDJHlc6yro/+05BfohwMaTXQe5cQdIl1gm67I0QnKDOFlee4mlsIT55PirkNSmmoPbisT51bKdP6MEpiHwRerxmeHBQ33YZN214xf+RuR6jZnaVJqMHm+mP3TfaRs9wupd9U4bBrQpzE6XLKImaqiT5oRfWpoBHddqq4It9qfOnDUT7xJtyWt8R+Z/VfKrApQBr/OAgWlxNesf5T3YZzSg3Pf9UttVCMjH7q1PrIxTGE9xfJtWDPA2ASvOINOtgXGRv0xrIQsNeIqmK5hEYxxWAFAGFekT9yMoB/5E2fvwYQPZ7NJ5JQg5O4vYO9CY5RLSAy7OdiQspKzDp4m46N3ZStkTA6HNoeIXadCAd/c9DYS3rVZponkfE8xdI/NhegH+VRFRr2OnD4yz7vhFlshRROFH/YneyBEWNnlQePP/MtOCC25dH9RUaxbnuPCbAzaX60qXI+AwDCEbkt316rOpOZsCThvRXszDQ1vE3Elkj9Ih65FftjlQj3WI2OkmTRvaiGfpRJH6HDFCsSzsM+Www== 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)(136003)(396003)(376002)(346002)(39860400002)(366004)(52116002)(86362001)(2616005)(16526019)(83380400001)(956004)(6506007)(8936002)(5660300002)(7416002)(6512007)(6486002)(316002)(186003)(4326008)(2906002)(6666004)(478600001)(26005)(1076003)(38350700002)(38100700002)(8676002)(66946007)(66476007)(66556008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: FP5hNO/ts8C2Wjwj7yHv3AByHjgIFPVDHAB9UrBtSOLzpiRXjq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heeXF0p9cY735g26OL33oeosybpSaPmDNg//ENcXTKCKtc3C7sjEs1BbjILxq+9SBTrP1X6Aq9CNeVE/CTBxDbeTTbG/akoxjyuiWmS27KpxrKOX+mDgm18HFp81yX9EjSEeUnH8wie0pJprDnlm0rSGZpglGal9cZ+J+dP228e1QluAtat7P/EnDF9Zgn+WC+rtyO4aUwHDLdn+92HG X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a886ec2-1d8f-4762-8175-08d910268bd3 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0402MB2760.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2021 00:33:19.2070 (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: MfZHTaw/JSjlELj6noDYjTujdl35PR7uoagyCCg1yMXJWyTvqRd4HEGRHHbJlwsW6+coJvuyd9xdrnY39qs0zw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB6714 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210505_173322_998281_D99365E8 X-CRM114-Status: GOOD ( 14.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
soc: imx: gpcv2: support i.MX8MM
|
expand
|
diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c index 0428f0eddee0..341c2352ca08 100644 --- a/drivers/soc/imx/gpcv2.c +++ b/drivers/soc/imx/gpcv2.c @@ -15,6 +15,7 @@ #include <linux/pm_runtime.h> #include <linux/regmap.h> #include <linux/regulator/consumer.h> +#include <linux/reset.h> #include <linux/sizes.h> #include <dt-bindings/power/imx7-power.h> #include <dt-bindings/power/imx8mq-power.h> @@ -108,6 +109,7 @@ struct imx_pgc_domain { struct generic_pm_domain genpd; struct regmap *regmap; struct regulator *regulator; + struct reset_control *reset; struct clk_bulk_data *clks; int num_clks; @@ -163,6 +165,8 @@ 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, @@ -185,6 +189,11 @@ static int imx_pgc_power_up(struct generic_pm_domain *genpd) GPC_PGC_CTRL_PCR); } + /* delay for reset to propagate */ + udelay(5); + + reset_control_deassert(domain->reset); + /* request the ADB400 to power up */ if (domain->bits.hskreq) { regmap_update_bits(domain->regmap, GPC_PU_PWRHSK, @@ -540,6 +549,11 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) return dev_err_probe(domain->dev, domain->num_clks, "Failed to get domain's clocks\n"); + domain->reset = devm_reset_control_array_get_optional_exclusive(domain->dev); + if (IS_ERR(domain->reset)) + return dev_err_probe(domain->dev, PTR_ERR(domain->reset), + "Failed to get domain's resets\n"); + pm_runtime_enable(domain->dev); if (domain->bits.map)