From patchwork Thu Oct 27 13:08:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13022118 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2ED72FA3740 for ; Thu, 27 Oct 2022 13:11:55 +0000 (UTC) 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=FG3nDdWFaHRq+AP/JGdTbz92cVbTHQuindIsOa2NvBk=; b=4ocqyGnjt8fPFN PQ+lKFpF+e/7nDN8JUcfWQzm1tZukbYXv0hC37rIlLYMx+N2QZsDud8fs8ZA8AWMKeLWE3Q/xDBXH qWF5kAFbWRCtIPpUg3EVp0xWhZsmzCJxKl6NxVBKrHljipIT7q6gZxhFj12I72Q4Cbq1a10ICFggb 9PpN4qq62ZXel9o3rtv8TdE7CM0Vwhhsnrh5imyzaNRwKKGuCxKXDFLuO4zuDPern4s6QzpGgZxzN gdHvtUV35dGKyAHu1ljfRG0fYl+8RokggCgWYcSUMRG4IeiFIqYh1eqFT2yS9he495zjByBg9QcLj dwhoUBr9pd3xDXcfbNRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oo2ds-00DMUz-Tr; Thu, 27 Oct 2022 13:09:53 +0000 Received: from mail-vi1eur05on2058.outbound.protection.outlook.com ([40.107.21.58] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oo2dj-00DMRs-U5 for linux-arm-kernel@lists.infradead.org; Thu, 27 Oct 2022 13:09:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EQttXIq0mmlLbj9g1d2xDtLcAKTCXXIi76Pj7aXO7dofEvMhUHF0RMXnQ6TT6ZOD5RKJl102ysbnLuIFyz4JDuXzcc1YoPzWGwaS9/ovDP82y2fyvk4iRFhem2ZiQHyLXqL0AWUPGXpeM7s4PRYAR8O23EwVh3qcTeoTbTwFJU/Bc6H9JvIRaAxT36OHYYb8XRV0W5Z6g442lOdqC+4SU04Stz2fmYhVqxgErEv7qjweZqmKGClE28uTM+a2kDztUjnUBp9eogVs9Bc3cj2IE/dQpX9eEPjZ9bRzqUdx03rowf1h6/rDpNOWGfIv7D89djYFSHBXvcsFvQEzqlHV1g== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=51WfmV3RvovoancdvUSZfJs+kVNsfjP6ZLXw2Wo0G2o=; b=bsJc6C/Cjp/b7stPecdsrmFghL6jH4zIoXtuqptUza03O3AsESyaUu7p8ztUTIqgJBe6/svAGR7tGCBcXG6DpzOBFTdnX1EkDJ3vX2iPusexhlYxXUUg3t+TpmPqbbDbi+s0cfM1xxY5MdPlmfeMqWEovI/sEfbRUo7/ne57yVb2kZc/C8jrDWKKC4xeoQBUkMiCw1vH8MkD+BXSr+s8jeuHi2Q6N91VlqCay+7fOdl+wcQdLt2vjq823nZSPf4v+smbKJB1JVKcf0SU6Lj11dhAFmMer00LOrSaTYrkeeY0VnUncz25gmw13XQNHWUT4hkdNxY2YXKZk346gcqT9w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=51WfmV3RvovoancdvUSZfJs+kVNsfjP6ZLXw2Wo0G2o=; b=DP3H1y0gqk7PyIdvgk487h7eeMTpajVsmw2rYV/gTO9YFD0x3awFehUJuwUcrCo9XTFjk7/CYsVNsHDfDYRWq7btKF1+sLtX/MRDFoffXsMG6QnPuaEZjAZ4eHHRzvHq1sUOWnpvB0B9RrrQLr30S+fQ12VISN4mkxdw6AaFC8A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) by AM7PR04MB6807.eurprd04.prod.outlook.com (2603:10a6:20b:104::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Thu, 27 Oct 2022 13:09:40 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::b1ab:dd4f:9237:d9f8]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::b1ab:dd4f:9237:d9f8%3]) with mapi id 15.20.5769.014; Thu, 27 Oct 2022 13:09:39 +0000 From: Shenwei Wang To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Sascha Hauer , Linus Walleij , Bartosz Golaszewski , Dong Aisheng , Jacky Bai Cc: Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Shenwei Wang , Peng Fan , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev Subject: [PATCH v4 0/5] gpio: add suspend/resume support for i.mx8x SoCs Date: Thu, 27 Oct 2022 08:08:54 -0500 Message-Id: <20221027130859.1444412-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BY3PR10CA0012.namprd10.prod.outlook.com (2603:10b6:a03:255::17) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|AM7PR04MB6807:EE_ X-MS-Office365-Filtering-Correlation-Id: 00fcc593-91fe-4cbc-a5fc-08dab81c814c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XzPwaMZkkTfNPiZ7fqZ7GbzR7FJ57iFeJb1j3CJ2B/r1sNJ+JhhyvaCmi5TW/y0rjmy4KTMetHQYOWakKsbzJZRnvoy0U399MoWtsAbUQT1jwIOjREKv2MWBUooAx/vsl9vcZhKRP05Lij8cY4JpsO6E60tc5+XAzZ0Lb+saV4ynSQefA6/2ZstNQ5V2jU4tvkHJ60uqkX3BUW+JLYBIR5kuxAx1iysVvnQLDhVAb/u99XAJ45SdYZbZBlKjhlY2c/r2V2NmHuj0k/MGTa9djuknI3ZwnvcvWSK9Y1GE/iOsj4E+VzdevZyWAceIRj5VwiP/8Hm5OX83k057ZwxygVaLxNVPspZHdeDYBGdXKyzWkFSNO4zKh9pRYPu0v4Zh5eSFrLiC4FfdcjJQyNMVoKkI4yKOgWgp0Qv/ER4045epJoEjdD7fYVj82bh7zgasBavTYJc2rL0SAbNiZJvwBpkCr7mJylzJKl+Um88H1r/wyrywFDQi2teakRQ4bCalUBVShJ+Q7pkTsGZL4+yVSx7U5GKCv5icfdDajI2TtXvQ7j0WhM787zJJMJY8mMMLPMx1ncu6SOR/dwVRb9Sg943UvwpzH5YAVC/RTn5kco8DIQLWOX+ts3tfZ5ZJh13x51WDhRFhtvJu6WHquOFGtFUvJz/lt0IImSUD9NT1CCmR5iqZvKAfTUORIOr2pQxE5erKEawgQFu4UFAbtywxRICQI0yr8s62Qg98sueGbQ+mgUmtswpNHXqW5y5ndfi9 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9185.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(6029001)(4636009)(136003)(376002)(396003)(39860400002)(366004)(346002)(451199015)(55236004)(1076003)(6512007)(26005)(52116002)(6666004)(83380400001)(6506007)(478600001)(186003)(15650500001)(2616005)(44832011)(2906002)(6636002)(5660300002)(54906003)(8676002)(110136005)(6486002)(316002)(41300700001)(66556008)(7416002)(66946007)(66476007)(4326008)(8936002)(36756003)(86362001)(38350700002)(38100700002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vZ9AHKgk9O6DgaLVwI6ERaEmFFKQIL8SmdB1r7u5Aumex5tJhIc9oOBIN97JjOJhSU7qC0GLK8A37V/uTJQ2+KWq4G1qh4j6LPdm5W8h5La3Y/yIzDIBS0/ad9y3UdJWd4YhXPY+nhgzf2o4BrqNE1Q0yURZRvHSax9kLkeKp3Ul+hzYAap8ClpTomJ61eiQXYRM2lxl8xZsgIuMgB3WHugsQ3+ClgfEogv/KW+I83sp1DRF/TeZR0icWxUwYETcnUD6buZxSkQTTJVnLlfLD9D/fadyfgXLu7FkFXYDukP5qbYH8vRziPR87AdWOwdbGdf1F11+DaXN1smBoF5yX7pI3Iu9D6bOj28Xqg2eAyM0Md6md25qxJjoLDWInTV209yXD9wAzjddYgdUMnwvAu82OJESQ1htciMmkzKT7wlOx/Ia6znGVGa93ElO9X3iFJBc1Qdj34A+URhdX7b2ePdI8rGVyM2my/iRiA+IXayTB8so8lk8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nfn5UOwizmMLMuSh8JNJRl1WZjdT7FN X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 00fcc593-91fe-4cbc-a5fc-08dab81c814c X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Oct 2022 13:09:39.7818 (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: Q3ZPLMkni9A6//9UYDUIX3P7sHO5iP4Qp33xiQU7WI3M1tWnfHpd0afopUiF0MKJKu4QVNZB8WbX3mgPNK/UEA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6807 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221027_060944_243174_4ABA40C5 X-CRM114-Status: GOOD ( 11.69 ) 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 On i.MX8QM/QXP/DXL SoCs, even a GPIO is selected as the wakeup source, the GPIO block will be powered off when system enters into suspend state. This can greatly reduce the power consumption of suspend state because the whole partition can be shutdown. This is called PAD wakeup feature on i.MX8x platform. This series of patches enable this wakeup feature on i.MX8QM/QXP/DXL platforms. Changes in v4: - fixed the format issues reported by Peng Fan. - change the return type of mxc_gpio_generic_config, and limit the suspend/resume behavior changes only on i.MX8QM/QXP/DXL platform. Changes in v3: - According to the feedback from Linus Walleij, the wakeup feature is moved to pinctrl driver, and the array of gpio-pin mapping is moved to gpio device node and initialized via gpio-ranges property. Shenwei Wang (5): arm64: dts: imx8dxl-ss-lsio: add gpio-ranges property arm64: dts: imx8qm-ss-lsio: add gpio-ranges property arm64: dts: imx8qxp-ss-lsio: add gpio-ranges property pinctrl: freescale: add pad wakeup config gpio: mxc: enable pad wakeup on i.MX8x platforms .../boot/dts/freescale/imx8dxl-ss-lsio.dtsi | 41 +++++++++ .../boot/dts/freescale/imx8qm-ss-lsio.dtsi | 38 ++++++++ .../boot/dts/freescale/imx8qxp-ss-lsio.dtsi | 25 +++++ drivers/gpio/gpio-mxc.c | 92 ++++++++++++++++++- drivers/pinctrl/freescale/pinctrl-scu.c | 30 ++++++ 5 files changed, 225 insertions(+), 1 deletion(-) --- 2.34.1