From patchwork Tue Aug 14 16:50:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10565871 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41C511515 for ; Tue, 14 Aug 2018 16:51:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 319302A4AF for ; Tue, 14 Aug 2018 16:51:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 24C672A4B3; Tue, 14 Aug 2018 16:51:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1431C2A4AF for ; Tue, 14 Aug 2018 16:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=LFdH8OFjMQMe3Mvd57VZ6Hy/HZXgdv9Aic/Qlj9Ksww=; b=WguleAkba+7krd nOZAml7tII67xniUyQpvDUC/Iq8NheHfEXM52u6oAiBaM97HpU8cLyehxfGUqrgrbaJl4YZ0znEz5 GsPiNPFZcfRJvYKxaj1WY/3HsCYtJe2Savmgvofxq3WkV0uGbwugwVnjZG6peLIOYO9RGF/h5RRT2 hmfJOBLZTGEYFVrgddFYFiyFJRGXrwyvztOqmubDJGjF4ULpL8MVvfOWQZC1X6gTjpIuNESFz6azZ 3LLwrb1yuxd/l1VF+56KeB40pA63/d2vw6tSm6yw8o5IPF943RBn7o4mg31AI8T9JUHYEX5+SxDt4 4x7W9gwJz+GBCfJFo17w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpcXZ-00027s-Sg; Tue, 14 Aug 2018 16:51:29 +0000 Received: from mail-eopbgr60052.outbound.protection.outlook.com ([40.107.6.52] helo=EUR04-DB3-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpcXK-00024S-2h for linux-arm-kernel@lists.infradead.org; Tue, 14 Aug 2018 16:51:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ie/kTMYpBWQQqKOwLD4wEyD0F9kpfXMhyme2+Omy+ZI=; b=K2FMFkELsyfiE+VdxV9xjPEwk9KboG3JBsjUXC36bpeScV32cmn6yDuRnz3126UuyRfnqQTcn9VHCOVbcbuXZa2Suhu1TRoHF66I8cV0TbEhFteS+sqCOupvUas/oBV4+Exan8mBigduBELl4QL0UEsQOPSScod5BUAaM94kmBQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; Received: from localhost.localdomain (95.76.156.53) by AM6PR04MB4293.eurprd04.prod.outlook.com (2603:10a6:209:4f::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.22; Tue, 14 Aug 2018 16:50:57 +0000 From: Leonard Crestez To: Shawn Guo , Lorenzo Pieralisi , Philipp Zabel , Lucas Stach Subject: [PATCH v4 0/6] PCI: imx: Initial imx7d suspend/resume support Date: Tue, 14 Aug 2018 19:50:14 +0300 Message-Id: X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-Originating-IP: [95.76.156.53] X-ClientProxiedBy: VI1PR0102CA0077.eurprd01.prod.exchangelabs.com (2603:10a6:803:15::18) To AM6PR04MB4293.eurprd04.prod.outlook.com (2603:10a6:209:4f::31) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e1ff076e-df2b-41ce-6ce6-08d602061c5f X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989117)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:AM6PR04MB4293; X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4293; 3:7WQcM5lo+qcgiaei+3+2XJh4u0XkIjIsUeuKyZFL3mMdzGCEb6J4PaO5s5/vIlmue7mPhb0/TQb+fswPyOpcsP9G0UWz4QM1TvGKNqn5U49bRjHBHP2tkSpF3WxUCN6KQgbBnXdBNUxAtsFUeY9+C5TklxmnEXH5cWP5VzIKlpgejNrjEY/vyH3OZ7EkI04W0iNyS5z/Sf3mg0Ih3CND+SJ2FP1SV7HXc4mDrvZ3Cuo9XU5HbbnJ1VJIGvWgBKaN; 25:57yjIdSEkPZMx2ZgKHb4oeflRxUyW6HUq5OabLwK5uLdx8kDIjfswFIx2pVVqsUZdVTX3oEmWjwQ+/v7HvaS1bZvKa36BhKOtwIu6obZpGRFSZzUqifxrp+P4WYqEhMHptgDDfLYr/08dMQHVYro+7gpMR5ISlAHdtvHWW+EqSGIkb7JXq01ZhGC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76IgCVNbi/hzD/HQo8vIx64DFPq19NwLs0+9faSx0cGj0lZIkUFELdWY4rdgUqpDtm9GK9DcLsL8DLmOliZT4Kg1IpG3DPf5Lr9H0LTj0yTEbhIEZkk8RjvM17jIzeOWtdqXykIFx4xjLxZs2VhMSrCXhUdp31HkU+VtsWQRmVBSMb0d6tiugcjdyLTOfg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(6055026)(149027)(150027)(6041310)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011)(7699016); SRVR:AM6PR04MB4293; BCL:0; PCL:0; RULEID:; SRVR:AM6PR04MB4293; X-Forefront-PRVS: 0764C4A8CD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(396003)(366004)(136003)(376002)(39860400002)(346002)(189003)(199004)(16586007)(6116002)(3846002)(966005)(50226002)(478600001)(36756003)(16526019)(316002)(386003)(26005)(186003)(97736004)(6506007)(15650500001)(86362001)(2906002)(68736007)(54906003)(8676002)(81166006)(81156014)(8936002)(110136005)(66066001)(25786009)(50466002)(48376002)(6306002)(105586002)(106356001)(47776003)(486006)(44832011)(476003)(2616005)(6486002)(53936002)(51416003)(52116002)(7736002)(14444005)(956004)(5660300001)(6666003)(4326008)(7416002)(305945005)(39060400002)(6512007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR04MB4293; H:localhost.localdomain; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM6PR04MB4293; 23:oFlKhhJ1G+EpVGb2PA6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FdCGRPVRhYGijXiongZSCTbgkMLTuIuCc6SLYmf//vxGV5roNtFx1CgekL+zbZnpEFW7gdnyIHLUAkfia0dshyILH+f6wyeEpe4Py7FapekXJxHK6SqvKmXjVQiivKHXr980+STTGwpEDY+YWdudVrvAvx0ozJlf1uMwX1a0SIIKtvnyf60lPUT5bvwNNQmlTJw== X-Microsoft-Antispam-Message-Info: vjxmXSc3ro3Zc7BLdKEJzZpmqZTM2fz/17/pH/yjUnOmAsTYiae5nVfM576fWACsO2g/1P2gdotMSS2vr30MDscf6eN8OY6AcwnTtR1C2iQtcvcBg/M3wi+tFfjYxVihtwpYY6DVL8PrFzARzNM06WW8mA6di3f6bObt4lIh3ufOhM+pr2hP1SPZhQWtR6wDKOgEX30+R+0LoiWiFLChGbRQocObAruAD7tYVIPUyng+QcDWkYeD79/JTw8todxkNewTj7s9pn1zeTYsNOuFqEQaWBEdhWK0qm7PzZ2VBCpgUweX4TfKxZwGctN8xm3mlNPoZnD/yORMmZc3IVJ+toImURKadevhZMv5WjaYE/s= X-Microsoft-Exchange-Diagnostics: 1; AM6PR04MB4293; 6:PkYD+ctBi0P+u0rBe0bEKiTfgY8pP0kLoyjO3ELy6hi/tad1IVdF6R0lNu0jmBk0QjOM/R2iaRMLkgl55SFiOhmkx69Szb+9T1mkKf8uAsWMGI6ipS0x84G4grAZGibXwHQShWDpqcD2nVPndV80ofH58f0b/MfrdQ1GsFq4z5m3o5rMYRRUTngeS4zp/5SJIzTDKRmWzu6vhb8sSIq5MW07g6/PPWcKt+DCHt3BV6h2TTDdyC+EOHgt2++3NJ3WuGKn1dtNZAGeVwxO6quAn+gSpHuSN/KVL5SlEyL39OfQSsquM6l4DiTARhtiOlx8cMAQR68iLoBHzHM584YAfRzOOFM5belFfwIdh/v3Aeb/68f6NcjyIOtCiAelAYpcNVNYRcJ7QmASVd6ipx4cqAh9qTDctaJsDzUzvxlv6YO84cyb09Lxa9WOMl83p5GefFWNNjtZ81V0TnLUyuOakw==; 5:Mm0PDoknPyAb2U23oXTsUaJRAL65y/BVvqSnceUdeaWUZAo3V8XOdtbq0MdIgXARj1twhcHh5D2pP31zYmyKLfzTlPO+QhEFY1LnkmEIvxmUk3MJZPy1l7ofjnkk9s+fbkVBhv7GnEJFPn7eZToTmuD3uWDYWp4AO4FOx2arOt0=; 7:GqB+0GqVoOy1H+D8ZG5TUdRfY1yFOlFc7SQW3eFV2a8gV4MZDETcIHmKbPnFEAjU/sKEwpFwMqw03RNyJdLP5OBBHTte+nhGpNEYIn7y2l9K5JnsHyAoNKg66cDDT3BwBZ0LPh6Q9w2FnXX18t9yup+qFfO958QwUCpvGgqx7VWxKWDDdWxPOWzspppDlcplk3XakQMtX7+kMsp7lpRxIKMBK+76VITxZtjYU6IJuXvzJO9VUkrcVOCgmYZPmMo0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2018 16:50:57.7431 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e1ff076e-df2b-41ce-6ce6-08d602061c5f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR04MB4293 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180814_095114_264041_8169F5F5 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Joao Pinto , Richard Zhu , Anson Huang , Andrey Smirnov , Jingoo Han , linux-kernel@vger.kernel.org, Rob Herring , linux-imx@nxp.com, kernel@pengutronix.de, linux-pci@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP On imx7d the pcie-phy power domain is turned off in suspend and this can make the system hang on resume when attempting any read from PCI. Fix this by adding PM_SLEEP support to the imx6 pci driver. This is currently only enabled for imx7d but the suspend/resume sequence also applies to other socs. V3 of this series was reviewed by Lucas but stalled because the merge window opened. There was also some confusion about how to deal with the dependence on commit 26fce0557fa6 ("reset: imx7: Fix always writing bits as 0"). To clarify: both patch 2 and 26fce0557fa6 are required to fix imx7d suspend but merging one without the other shouldn't cause other issues. V4 adds 4 more patches with PME_Turn_Off support on top, using a new reset bit. I generally try to keep series short but in this case some planning might be needed to get patches into 4.20. Since the new reset is treated as optional with old DTB there should be again no problem if reset and pci are merged out of order. Shawn/Philipp/Lorenzo: Would it make sense to merge this series through a single specific tree, such as the one for imx? Link to v3: https://lkml.org/lkml/2018/7/24/713 Leonard Crestez (6): Revert "ARM: dts: imx7d: Invert legacy PCI irq mapping" PCI: imx: Initial imx7d pm support reset: imx7: Add PCIE_CTRL_APPS_TURNOFF dt-bindings: imx6q-pcie: Add turnoff reset for imx7d ARM: dts: imx7d: Add turnoff reset PCI: imx: Add PME_Turn_Off support .../bindings/pci/fsl,imx6q-pcie.txt | 1 + arch/arm/boot/dts/imx7d.dtsi | 17 ++- drivers/pci/controller/dwc/pci-imx6.c | 112 +++++++++++++++++- drivers/reset/reset-imx7.c | 1 + include/dt-bindings/reset/imx7-reset.h | 4 +- 5 files changed, 123 insertions(+), 12 deletions(-)