From patchwork Tue Oct 25 18:32:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shenwei Wang X-Patchwork-Id: 13019695 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 BD93AFA373E for ; Tue, 25 Oct 2022 18:34:23 +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=fiRwPvQWnsGGN1Uzi89At5UmjCLuSJAR5FJt+36Bb24=; b=wLjTNN0zS81+Dm jqAMXU4yYzKnc/gcxxnvqF5BoAQADwtuemnj/GF0q5eNwH6pbI4Pg34uKtGhRyAD2ejG+ySNC9tUw 4VFBcar8bTtl7i6VslcA2em0lp42q5j4lnjV8Kh7cqoAPRciDzRcj06dOEMlvL09ADprHp/NeiVEf VGj460MTYso4q0fslEiPaVwWDMZkJ2YE9cL+3EbaVt4nWBuNhH8W5FNaD1bWoyZ6iew6lK6j5Cn4O UPzws+5WSp6SsHI8kEL660e+czMNsvURnOF/7dTcZcUXc2U5QVFWxnbKsMBn7oARIb3bIR3In3OS9 z1SzlWsW9A+jyW3glzRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onOje-006eMF-Bb; Tue, 25 Oct 2022 18:33:10 +0000 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 #2 (Red Hat Linux)) id 1onOjb-006eL7-My for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2022 18:33:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JMtz7apCOxDxthvrBOtIg4H43AfzbBk5AMks4OlQn4Gt12Giq4BNUP3ZSEE5HXhZXs3t9p7ub0TAzDuZ1nZF/o3oF5CKfgCMFsb8v73k4QSW7ZsoRIlhsvo5kKYzSF2PeTmKGlLWMGEQJZsdLLNHrTWoCNpZyhdL4GPHmX7N7TgLWmCd4SpP/qGkCTNbRcuuMJiZXyKvjhCmA+pUVMDaxf8/+qz/oqOM7mfFEdHkPJSDyReJLe0VZnl1tHLZs8UhnUI4rbPq3rRRHEHI77pPNSflc2EaxGo4Z21usxIFhd06pSMkq1HCrthWrQhepAdcCA1kjHpTZUiO16QfBOtLhw== 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=p5vZ51io3rmne9ye6+yjfVJhctjJqiFWsRy4RCg8bZw=; b=W5vopNJvXzS8sCrbeHcdMQb6phGUbXxol0oYcedieJfB7wJiWz/+7HnAxkyYzm9Qmv3xLENgIKC+KtVESD3IU0UrNXEM3vfJ7AmhIKQD4pqsTCbPcJYJkvbU/Fm8s6v3WYJSquZ6VLyoJR7j7gmtuBS1Cwp8p9HyD8wH4UyT7bQhvNH8oJUyXILVkWBmx4VLDLuAHjavDdkAs0OKuAPURZCr3KiR7ClueeeorPJWsWojvk51MkMh1KB3YM+6I0FKAg/8Y4vWnkzKF3+8t/EYUfpyuMi3oojIT2tGYVWqWGfYOPjzIOZWSmx1KKtxZRXM2J35+23i0YpdOC1IR+1WXQ== 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=p5vZ51io3rmne9ye6+yjfVJhctjJqiFWsRy4RCg8bZw=; b=LaI/OFWFl8Z+ywCtcraibkw2trLEKYm84Hlbsm3F5mLJEIEoD2SORll+BW0a9znXWWoICFOdkqPD23Q76EoMmZ4Qa7M5waOv1gWQiL3YszOzOsz1jAbVD04DL78p5N1ohsA5/ke5tfGIjmeuOB0t0DA0ywXmMwuZNohONjOzh/4= 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 AS1PR04MB9581.eurprd04.prod.outlook.com (2603:10a6:20b:470::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.33; Tue, 25 Oct 2022 18:33:02 +0000 Received: from PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4150:173b:56ec:dc6c]) by PAXPR04MB9185.eurprd04.prod.outlook.com ([fe80::4150:173b:56ec:dc6c%9]) with mapi id 15.20.5746.028; Tue, 25 Oct 2022 18:33:02 +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 v3 0/5] add suspend/resume support for i.mx8x SoCs Date: Tue, 25 Oct 2022 13:32:39 -0500 Message-Id: <20221025183244.615318-1-shenwei.wang@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: BY3PR05CA0048.namprd05.prod.outlook.com (2603:10b6:a03:39b::23) To PAXPR04MB9185.eurprd04.prod.outlook.com (2603:10a6:102:231::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9185:EE_|AS1PR04MB9581:EE_ X-MS-Office365-Filtering-Correlation-Id: dfcaf1b1-e2c5-4060-cf4a-08dab6b75972 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2rVS9XGYCW053SY9MIm/ju+XPYYtzcj5zzRYlTfo3J/PHyJCoPqNpz1B70dh4BUiMVFzy7W5yt8yMytN1xYWGiF1IIWTrSWqcERLnI59BNnYTK5FAVZADdIzPMl0OHup8YNhSuO1nyPAPPgttWj+aiNxNSK8lKC9FGaQ4rsyEtqaQ+uAi2UUTBVY72Q3tPCZfRi9dAFlp2QfEuHR5ehg9pMJcv/T//kaO3aBBevXGG57vSDPzxxT1HGK5itiuPre14NeM8Rlo3wudVfwYvIk6qo2FlT7zBIU3xnit1h2gChOoTaZjwz0yifsCnyFewSD6L+xSEYVH6ZpgqEpq1MLesAH3m5+Ng13VFBGhErV4xMggtjA5Bq0pO697J3wFcztKhbLPrKJz1FUe8k2UUbFkA7UUgiyiUxUSeYYLxM10P79D8AQX8CExapkvTP6Ta6cqw4AUZby8i2uhhlD9SNOwvnWHFgpvBR3059T0QMJ9EXww+17uV0oer3P75/cEO3RvKqBHwCfVSitWcQSDlHuBiN8YkJw0kPVBZ1yL0zTdWHr8hNORYN8ATD9ARvx4yV+slCZuA3D0qL382nhsP33P1GqHRAmDL58cNcmYPPOBWZDkTlx4CC883sJApT5iVk1Xyafq7DFm01nsVcxD7EpDMa4FvhAQs7AFA4WZjvs2yopdpdn8zh2AbMO4Fu/CUfxOqQLPT/gzHgIdtngD0shI63W6HvfP+7KPqMJyDdbSufHux0GwqDVQQAAS7SKFVmE 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)(39860400002)(136003)(396003)(366004)(376002)(346002)(451199015)(478600001)(38350700002)(38100700002)(7416002)(55236004)(15650500001)(6486002)(8676002)(86362001)(2906002)(52116002)(36756003)(44832011)(6636002)(66946007)(66476007)(110136005)(6506007)(8936002)(66556008)(4326008)(54906003)(26005)(41300700001)(5660300002)(6512007)(316002)(1076003)(186003)(2616005)(6666004)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: s8XJ8CHIwJ5YAJ8NPJnAuNR3bsSl85bNQkO1dETE0ztoDjWTFhwzC46TrisGLY0cvOPG70Bm2mXfllYnt5oa58TSdsnvJ8NprRrcEAAumWB782gsCVFwFTRrCr2FUCQm2r+ApOeNAMEKP25Fa3DJ7nE82Sb+nyGE8xonZI2W0sHn/EmCG429uwDVgDSLZkJHEKPCv2iZUYVMcbEoGCDQQ9nnKwrhRgMuzptNljxBu9RpM67xjxcS8S+UMxOJdeKdm4+X0evBihVn+Q4r+/I6X3CZ5cGZodwbAjFPioOD7IXwnzQw6gULuruZY3uvci8ZUm0TEouG/mFu/SxJA5N0TFXfx36sNEcp7CdBCSqRPoyM837S9DlCNcmJq/GHr0RmvbaaK5uRqQsu+ZVBCJrcG+fT5o+wj7NCWhvNOvBFZv+kHgrCZrBDujv1X0IpNYC0MoNDwBbOf9rEfXu0RyKBOBU8FwipqyImuww0M1WyG7ACneJjLV+eVR15Xv5+P7vhtRLiJ0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z8sm X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: dfcaf1b1-e2c5-4060-cf4a-08dab6b75972 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9185.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Oct 2022 18:33:02.4968 (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: blowWXArQglYxCp7W0oVq38+o4SnQeXKrYv07h6if3C4X6PxwQoyjjUOYo5EhxokkH2xueaw+ut4vMZgsBGU4g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS1PR04MB9581 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_113308_038410_E8E2C26E X-CRM114-Status: GOOD ( 11.52 ) 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 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 | 91 ++++++++++++++++++- drivers/pinctrl/freescale/pinctrl-scu.c | 30 ++++++ 5 files changed, 224 insertions(+), 1 deletion(-) --- 2.34.1