From patchwork Wed Dec 13 09:28:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sherry Sun X-Patchwork-Id: 13490591 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 D3541C4167D for ; Wed, 13 Dec 2023 09:29:05 +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=9OWH/Nklf2nq7Dxyfosj/6YJ2yZ8o3uPSimM85TbC/s=; b=vzlqaQ3eL1mupW yjNq6o57iy/V2+9u3DRI+IvmXpkyy7+vhie/EIHDsMZX2oM3mG4+BGnKFNaKX67GOYJQmY7n3HyS4 EXZk1O5Q2b9rz6wNs1C1/s76qNSSbRcMpUHiHZyRZlqJ6tV6mO8xc9USVkBevZwU9NQslwtBN4DIl 4nKqFrZuXmiIzHgHiwJd0jvYjwF9vbFH+3lB1t2HLLewiAMh+ugGQmNclCOFuPHd/L3EILODuPwhJ 9uFj3NYwhhsDr+WnIHqE0cm3rfJSgHhx3kxkSBeUydqqzFCF1c+mih2Kf9WXEKXduI8DyhByqIEl2 Kcv6G6wW1bOheDx5u4sA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rDLXo-00E8wl-0K; Wed, 13 Dec 2023 09:28:44 +0000 Received: from mail-am0eur02on20600.outbound.protection.outlook.com ([2a01:111:f403:2606::600] helo=EUR02-AM0-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rDLXl-00E8uq-0l for linux-arm-kernel@lists.infradead.org; Wed, 13 Dec 2023 09:28:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=R4sQCQTFSXJGCgcQbo/GYg5tZvohC/dU1/FUTDriypbL9MZ1tWn7eJAlE0XwQA/pxxa7GyeH3x020WjMvjJOTmBO2IQY+PL7VJwva07zpgUlZNPAM8z9btnjR83tQGVKtKhaajFfbYcR6nEcrJumV9Mrfq5RaK8cCEFO1vr5eluYLV2mW/eZ56vK1NgOrffl3MApsnEAmi6qEfgso+XWs2zgAES1yHgK5RRvYDIuOsS9vXHxFmbqvDy8mmSFUS5yl3gY0mvai8uv0G+cwvHKNzN5m++0DFcLt2Hj763IswFIz7AUFOueNUeBnYqFHVedK6g1mj69MWGBpkv7RIea+w== 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=TphY7wMCZvNGp+zlmJnQqys49yXoeznDKZlafgTDtfc=; b=gIhx0kmveTMqXDXMxxDPNIyUxr5zIkkPxXLGyDR8TvDjKi6aFnzK+oI/hvw7DTdCwyLmHMKZGCw1qIFtQhVnVFGCgWy432m4tI094O4IdS6GCxMtfgUVZpGRihqVBM+Tk4KovhSyQw2MFdc5XqNf1ieFf46EKMAhEMI98gzL43lI6up/lSyMuWX0Z8dbnSIblKn2q0LMozDVrWi2i3X5+dXPmiJJ+c+jCiktdXU0wpDxQmUWY78f1ncs5Twv2edjX9e7ZJou02hJyfbw7ofs6Wnv0P8IKy7zLD76V4AGwmIeZWVm/yjBQNaBXndfslc7x3PO2qparfy/aFr9OJzzqA== 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=TphY7wMCZvNGp+zlmJnQqys49yXoeznDKZlafgTDtfc=; b=swa4J2vYEkY+izxlMjGsx+ql0G7LAwRvfgNPamF0BFxaPwsef2ut2NWzHG6cou1VFxvCu4HZyyizF7+IlEhRqV4AtV2oSbnI2Nb7eYcFv+Ch5inOlMt7H/bcHDcV25hqGvtm81uCwYtcLF/2r3mafmX5E7UI4kfmS0zCLm34oKk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) by PA4PR04MB7933.eurprd04.prod.outlook.com (2603:10a6:102:b9::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7068.33; Wed, 13 Dec 2023 09:28:30 +0000 Received: from AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::3627:208e:4d62:1e2a]) by AS8PR04MB8404.eurprd04.prod.outlook.com ([fe80::3627:208e:4d62:1e2a%7]) with mapi id 15.20.7091.022; Wed, 13 Dec 2023 09:28:30 +0000 From: Sherry Sun To: hongxing.zhu@nxp.com, l.stach@pengutronix.de, lpieralisi@kernel.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com Cc: linux-imx@nxp.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V2 0/4] PCI: imx6: Add pci host wakeup support Date: Wed, 13 Dec 2023 17:28:46 +0800 Message-Id: <20231213092850.1706042-1-sherry.sun@nxp.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2P153CA0021.APCP153.PROD.OUTLOOK.COM (2603:1096:4:c7::8) To AS8PR04MB8404.eurprd04.prod.outlook.com (2603:10a6:20b:3f8::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8404:EE_|PA4PR04MB7933:EE_ X-MS-Office365-Filtering-Correlation-Id: ef79a381-a0cd-4174-f7fe-08dbfbbdde57 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: grxh4vLVMeuDnhgCbKmEry4Prn0vsfUDkuLEnYIuWU/nI8s3Lhn3lpe5/7LbSC1tEVN0hnVMGtwXRPNBGBN62kW/FW8ilezxPb8R2ShB2kcV/0t0VGyiARxwbl+yCsoKWTmdbO9RN7zF+da2ocrE0Q6Td+m8IlzeRSnALqyZU2eUhdaPQ/QfCcTJj3RgfqPh3FOkGpPr76HM06yM2rH35Sqz+C28J89YEHxodlcbUt57668xWZNGDnR06sE35b0iRGguMrfrpcOF+NCEx63R2BBM431YjlLmLsR3Rc7bJlfjzNN5aboJkNDx9SeM4uWDwkiz4n7ODZ8Ent2OzycdN9hF41o37IJkaJE01fFg2KN/Py/oHt/8RaJxmDiHjh2xBtPWJ5Y/YKyJmPuwYNUzo4dB9GwTpBt1UmIWbXNOZ7TPE1oHuaAbRu5CoZRXGcL/6Td76xtOz4YEZXJXER+Jb15NryqV6eFIknvkUoWt+kMv20QLxd+VR7iyI59BXHwRkqkQJW64G5qctf+PAR7jPbyn/lU4kmVXtrP4LxoSeEqIRi29CANyBe2XreoNg4urZpx37pWWFUd/22Ha6fTDbCyMIZMEwxewU3Riiq95IPWoDxAqPiaEHsi2HK0aLFRdnBdCcYdDrV5SVQa0bzFAew== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR04MB8404.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(39860400002)(366004)(346002)(136003)(376002)(230922051799003)(186009)(64100799003)(451199024)(1800799012)(41300700001)(2906002)(316002)(7416002)(5660300002)(8676002)(44832011)(4326008)(66946007)(66476007)(66556008)(36756003)(921008)(86362001)(38350700005)(8936002)(6486002)(38100700002)(2616005)(6506007)(6512007)(478600001)(52116002)(6666004)(1076003)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zZJnJq5nUTQht/6K8pRgPIvhZmT/bW3oXktqtQ5iVfCvwVAMOED/LlVEhmQWAEgN5kRlVUsiJ5al/9oI5o6hg3oyzDr51E7tJWV/62Dt06r87CB+30uxeS8gsWHF/A8mI8EypcVCnnTqvZ6BIS+QUDA1F1CJ41Ee2Z3OrWBnVz8hjUg9NcZzD/Egzi/1KnWvyB5DWzVWxJJZOcTBCXkTkW5xDDdEFwYBNdCesxD9lihEeb6xt1zCXN1XZr9pI4gA/Vnhh4xztsQ4inOY3CFRQSkwoSfIH+maeyAFVSfwHT7GWU0Heva10FDkDqwy8aLexP7xoDzMjeIlOdK6ihXbKq/atoNS4uPlwx0eO06q780VKsLHti2di422wIRIBP0oU4mxC03EZ0yRnxSA6SBoraNE0oJKPxdCW7Le+120MkupChA9/REKB1anEFgnYYGOoBwaVnWskjL1TkwRq8KLnlyY3umQaBvMF0wy2UaFWtMbAIhcknnW35l8RXYVQYy6bFVG4MzLjcOz+a0X0z75a5afgrlxnEGbwxhMcmZVTDJDU7WlLOySW+yixkuK7E5hcdrFcKpH4H4gj5k81jg3Pprg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X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8404.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2023 09:28:30.8309 (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: s/Zoyu9lAXbjtHQ9f4riHJfJAPpRRva/oPdAzupb0J2drORuYtomz1Ebo8iMoul/FXtJylDkrKeJ3LNVGq6F3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7933 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231213_012841_298033_678FD20B X-CRM114-Status: UNSURE ( 8.52 ) X-CRM114-Notice: Please train this message. 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 Add pci host wakeup feature for imx platforms. The host wake pin is a standard feature in the PCIe bus specification, so we can add this property under PCI dts node to support the host gpio wakeup feature. Example of configuring the corresponding dts property under the PCI node: wake-gpios = <&gpio5 21 GPIO_ACTIVE_LOW>; --- changes in V2: 1. Rename host-wake-gpio property to wake-gpios. 2. Improve the wake-gpios property description in the dt-binding doc to avoid confusion. 3. Remove unnecessary debugging info in host_wake_irq_handler(). 4. Remove unnecessary imx6_pcie->host_wake_irq = -1 resetting in error paths. 5. Use dev_err_probe() to simplify error path code. --- Sherry Sun (4): PCI: imx6: Add pci host wakeup support on imx platforms. dt-bindings: imx6q-pcie: Add wake-gpios property arm64: dts: imx8mp-evk: add wake-gpios property for pci bus arm64: dts: imx8mq-evk: add wake-gpios property for pci bus .../bindings/pci/fsl,imx6q-pcie.yaml | 6 ++ arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 2 + arch/arm64/boot/dts/freescale/imx8mq-evk.dts | 2 + drivers/pci/controller/dwc/pci-imx6.c | 60 +++++++++++++++++++ 4 files changed, 70 insertions(+)