Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5195537rdb; Wed, 13 Dec 2023 01:28:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFj+JsbCwGiXZ4GaLdltb3s7ezN3Vy1s2GmvCYNxEtGve3Kb21zALCO5R894ETkvXGz0VHl X-Received: by 2002:a05:6e02:1aa3:b0:35d:59a2:2c0 with SMTP id l3-20020a056e021aa300b0035d59a202c0mr12113512ilv.96.1702459724150; Wed, 13 Dec 2023 01:28:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702459724; cv=pass; d=google.com; s=arc-20160816; b=KyMaQhGpEUlkQBDIuXahERfxeoEPcY7041sBM98L1WtE3YPV5QLxN4C3WgXAm4mXnI k8U9Yaf4PkINCjDM3oVDS1WJIGlU95aicmMpt6zE/irkHvyYovzq5HY2r+Qva52L3a8G 5mbBg0P1EXyfX9Info2nN/5pcVGjbl35/eCbK4cP0+uZ72qASOmoc8H+843yX+jDJaJB x8E0X6mJsl/PUqOunxV/MBdmVIN8BebPcjigi8YIMXh5EsuLzMjVCuBHBXc7YSgOMspN fJRtaHJqKlE35x3CkpdCFOdipnSvUj/la1nt/OG4Zz3A3JggGEhx9zyi1vlwLAtHUoj3 tNMA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=TphY7wMCZvNGp+zlmJnQqys49yXoeznDKZlafgTDtfc=; fh=l1iWo58bMGw3cZiqltecNTFFfZhXvAIg92WGskXbVMI=; b=ZS2rmPrQlEKwp8lc/p8QtteT2JvR01H1n8BHqeBjDsN+SjCwCC37XcNPnd4ORJqJ/0 EsmVB+wuY/LHf+BHJrAS6nlm1MVQ4X2rpLKzYZF2hNMMBJZGeo0Leyx5PMIdm7ZPrVGw YiF9gv5R40jf5YMuseEt/5xdppsoFBWFt72b7HLx8VGZtMes3QJZADouR282TI3L1Q7Z YWbO/KxNiaP3Untlf2XrecfW0nUhT5gN6TZd+vSVolli8Bz02KVcDMK0h4clLfL214Nr nwCv8GHOaw0g3CnHfdMguhJcqqU9uhQigMvzNl7OWPLLT1wDJfpp6iECfQY9Jn0CEFD8 E1cA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=swa4J2vY; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id p6-20020a170902b08600b001d0acd492fasi9189873plr.512.2023.12.13.01.28.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 01:28:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=swa4J2vY; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id BDD9C81C998C; Wed, 13 Dec 2023 01:28:41 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232428AbjLMJ22 (ORCPT + 99 others); Wed, 13 Dec 2023 04:28:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229975AbjLMJ21 (ORCPT ); Wed, 13 Dec 2023 04:28:27 -0500 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2071.outbound.protection.outlook.com [40.107.247.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59DA2D0; Wed, 13 Dec 2023 01:28:33 -0800 (PST) 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: =?us-ascii?Q?zZJnJq5nUTQht/6K8pRgPIvhZmT/bW3oXktqtQ5iVfCvwVAMOED/LlVEhmQW?= =?us-ascii?Q?AEgN5kRlVUsiJ5al/9oI5o6hg3oyzDr51E7tJWV/62Dt06r87CB+30uxeS8g?= =?us-ascii?Q?sWHF/A8mI8EypcVCnnTqvZ6BIS+QUDA1F1CJ41Ee2Z3OrWBnVz8hjUg9NcZz?= =?us-ascii?Q?D/Egzi/1KnWvyB5DWzVWxJJZOcTBCXkTkW5xDDdEFwYBNdCesxD9lihEeb6x?= =?us-ascii?Q?t1zCXN1XZr9pI4gA/Vnhh4xztsQ4inOY3CFRQSkwoSfIH+maeyAFVSfwHT7G?= =?us-ascii?Q?WU0Heva10FDkDqwy8aLexP7xoDzMjeIlOdK6ihXbKq/atoNS4uPlwx0eO06q?= =?us-ascii?Q?780VKsLHti2di422wIRIBP0oU4mxC03EZ0y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1kFPxj24ZHiWY+y4FuF5lyg/F9g4spZU9bO7mssVCTdJB90BsHQtAt7?= =?us-ascii?Q?6eI/ilGeRfapKiTKgdxZ7gOQfUC8weRrjhpShUIlREGlf/aM9ahGSWFo1k5F?= =?us-ascii?Q?pnNTzl8DlLi9wR2ucGGmxVyrJQpfinjsvmpQ6XkrppKp4FlI89GxzJwbg57r?= =?us-ascii?Q?AXl9D26NQZE6dJ+1HzSvyKG0cySvczeZDaRM5ffO8Jv+faXodpXxqeBH/JpA?= =?us-ascii?Q?eDz3dm7i34x3wWCrhURdRE5Qhd6cZlrBu9bXYTsqC23PmqVk5E27nrwxj3sa?= =?us-ascii?Q?w3bEz6CKQi3iubYScq2gLucOLZkMvdinV/V0X7I+?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ef79a381-a0cd-4174-f7fe-08dbfbbdde57 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-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 13 Dec 2023 01:28:41 -0800 (PST) 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(+) -- 2.34.1