From patchwork Thu Oct 4 16:34:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10626439 X-Patchwork-Delegate: bhelgaas@google.com 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 907E215E8 for ; Thu, 4 Oct 2018 16:35:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7EC9C292B6 for ; Thu, 4 Oct 2018 16:35:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71E202940A; Thu, 4 Oct 2018 16:35:05 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F201A292B6 for ; Thu, 4 Oct 2018 16:35:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727850AbeJDX2d (ORCPT ); Thu, 4 Oct 2018 19:28:33 -0400 Received: from mail-db5eur01on0043.outbound.protection.outlook.com ([104.47.2.43]:38976 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727524AbeJDX2c (ORCPT ); Thu, 4 Oct 2018 19:28:32 -0400 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=BDrAp+cboQA/EoDak40SoOwiJpneIok3Dg+h6kIrRXA=; b=duGyzMLqXW9kQqa8iAcVU0oI7t1BP6IVizwnjr/NP4VLCB4IduPAPkdZUwmFTQTwK1CUHFRhwoOVw9JVxAFwJeTrbiJSFpdvRPfvH8fEtvOPzKovFsRB3ZKdExxSu1VYGMbbmCirQHximRy8iw9MHCiy1iW1QoATMtOS1r9MxQs= Received: from AM0PR04MB4290.eurprd04.prod.outlook.com (52.134.126.145) by AM0PR04MB4628.eurprd04.prod.outlook.com (52.135.149.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.24; Thu, 4 Oct 2018 16:34:25 +0000 Received: from AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef]) by AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef%3]) with mapi id 15.20.1207.022; Thu, 4 Oct 2018 16:34:25 +0000 From: Leonard Crestez To: Lucas Stach , Philipp Zabel , Lorenzo Pieralisi , Richard Zhu CC: Andrey Smirnov , Gustavo Pimentel , Jingoo Han , Bjorn Helgaas , Shawn Guo , Fabio Estevam , dl-linux-imx , "kernel@pengutronix.de" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v2 1/4] reset: imx7: Add PCIE_CTRL_APPS_TURNOFF Thread-Topic: [PATCH v2 1/4] reset: imx7: Add PCIE_CTRL_APPS_TURNOFF Thread-Index: AQHUXAAcrEeeoawteEW641mP0pOSYQ== Date: Thu, 4 Oct 2018 16:34:25 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [95.76.156.53] x-mailer: git-send-email 2.17.1 x-clientproxiedby: DB6PR02CA0003.eurprd02.prod.outlook.com (2603:10a6:6:15::16) To AM0PR04MB4290.eurprd04.prod.outlook.com (2603:10a6:208:67::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB4628;6:CxUD3TV2R+FHdmBa2iRTcNQXuY7dAlNqD8QHuCuH+5Mhqua0kfJoGvwABwvej8A15yoEjMyvXrvwl07ph8PBXj+9yXLe7J/xRpqWQCVkSznjHH6/6kHCknhbe9jLyEkFAAs21cEwQlvsJPczRqk+CdLrzAFeEi9kTZMKYD/qwp0AWijp6+owk1/f7FzPO5abklUFpzDb1t+XpHkOBc3jCkSWIHD4177toYt56hCpKXQPOVRbobI0pYUTTmch2RZc4EyGFDBVvD7awCLynfNkOHzoiKTKh/Ox029cswXrkezZ8sp2ZtkIfUoRtWXZq6Bg74lwhz0WjPkksOgsx9KmiMHgspg0rLsmiQnP1MPCTgc/cWAq4qp2MSS6wgBDoZ0JhB5vu07qZYWpKcaRWsUs8SXuSwY5xfp1nIZiJsIshP9DBqZGSF+DSxLIVzfq8D0l6FpUxXhhEzF889UAbt60yw==;5:DPZt+5XIlEdIqCaFEhcrrTQTzPoGDzTUxsi43TJX2/NPhYcAENOMYqsD7dF/74ThOfzb0YxbI9EHyWA1+QNo2tFUMG8HdJvyKUMixo4hwVhY/sfgaMALtS0wP9F0O62lZwWBK8kUqinWy0ui8G67HNcU5Ib9PEi4pRHWxaEP1T4=;7:XfJVw52o3xwX38iq1bSNACP4ujPvOwYJW4ZL+JepHOrnqFQeuLmxhb5axiUE1qpGuSh2/kTvxk0Wo58YoS7z4T6uSKG3ZCw2LATkJwUha9WKvSZ0GygWuN3BYnoY/cgFlmbOkJldOQmXi//YgOF4vJq+3Gcn95p4G0F+TXASWDs4PN/tzKcLhvmoURMEj0fQoDnaGvb6wR+AsyNG3OFBkxHwXFfUZH8jPWidJQRDQnI/suALcTKnTm9xAbmeiQ96 x-ms-office365-filtering-correlation-id: 4b26697f-5062-46e7-7b62-08d62a173f3b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB4628; x-ms-traffictypediagnostic: AM0PR04MB4628: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123560045)(201708071742011)(7699051);SRVR:AM0PR04MB4628;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB4628; x-forefront-prvs: 0815F8251E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(366004)(396003)(376002)(39860400002)(136003)(189003)(199004)(39060400002)(6486002)(110136005)(54906003)(76176011)(25786009)(6512007)(4326008)(81156014)(81166006)(53936002)(6506007)(14454004)(478600001)(102836004)(6436002)(386003)(52116002)(86362001)(8676002)(7736002)(99286004)(118296001)(66066001)(316002)(305945005)(2906002)(8936002)(26005)(44832011)(186003)(3846002)(5250100002)(36756003)(106356001)(14444005)(71200400001)(6636002)(11346002)(256004)(71190400001)(6116002)(105586002)(486006)(50226002)(97736004)(68736007)(7416002)(5660300001)(2900100001)(446003)(476003)(2616005);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB4628;H:AM0PR04MB4290.eurprd04.prod.outlook.com;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-antispam-message-info: D9hX8HUVJmBc+3ek+g3qx/WMkpxya44Bfe3Vjc+DflCunzqOD2orBUoSOnD0vCTACd94qBXX3Sk1D/EA88MsWEwFGFqvN+tSdT0Aj9Z3NCSuzdl/8FLph24wqNDXfKM6afj2T3I95LN3INVY5iuXUu3UfkDz6hwNzNNKZ8xrrJj6KDShSh7okdiPpi8MbUtHZVTp/2m28l13N5/c2TnUoOZsLuBSPzzQdOP1pmtvC4fEWx4vB4FRdQcnNBWodYBzoDu7gDoDSzSGiDWqr2VsDZk/NpJtBDhPERYxSjgYBub8waVafpuJzSB8SH+pSLy80NP8F1RE/N0umNVKn9GSdvdU746HM/MZzm87HNRTX3Y= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b26697f-5062-46e7-7b62-08d62a173f3b X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2018 16:34:25.5743 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB4628 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is required for the imx pci driver to send the PME_Turn_Off TLP. Signed-off-by: Leonard Crestez Acked-by: Rob Herring Acked-by: Philipp Zabel --- drivers/reset/reset-imx7.c | 1 + include/dt-bindings/reset/imx7-reset.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/reset/reset-imx7.c b/drivers/reset/reset-imx7.c index 97d9f08271c5..77911fa8f31d 100644 --- a/drivers/reset/reset-imx7.c +++ b/drivers/reset/reset-imx7.c @@ -65,10 +65,11 @@ static const struct imx7_src_signal imx7_src_signals[IMX7_RESET_NUM] = { [IMX7_RESET_MIPI_PHY_MRST] = { SRC_MIPIPHY_RCR, BIT(1) }, [IMX7_RESET_MIPI_PHY_SRST] = { SRC_MIPIPHY_RCR, BIT(2) }, [IMX7_RESET_PCIEPHY] = { SRC_PCIEPHY_RCR, BIT(2) | BIT(1) }, [IMX7_RESET_PCIEPHY_PERST] = { SRC_PCIEPHY_RCR, BIT(3) }, [IMX7_RESET_PCIE_CTRL_APPS_EN] = { SRC_PCIEPHY_RCR, BIT(6) }, + [IMX7_RESET_PCIE_CTRL_APPS_TURNOFF] = { SRC_PCIEPHY_RCR, BIT(11) }, [IMX7_RESET_DDRC_PRST] = { SRC_DDRC_RCR, BIT(0) }, [IMX7_RESET_DDRC_CORE_RST] = { SRC_DDRC_RCR, BIT(1) }, }; static struct imx7_src *to_imx7_src(struct reset_controller_dev *rcdev) diff --git a/include/dt-bindings/reset/imx7-reset.h b/include/dt-bindings/reset/imx7-reset.h index 63948170c7b2..31b3f87dde9a 100644 --- a/include/dt-bindings/reset/imx7-reset.h +++ b/include/dt-bindings/reset/imx7-reset.h @@ -54,9 +54,11 @@ */ #define IMX7_RESET_PCIE_CTRL_APPS_EN 22 #define IMX7_RESET_DDRC_PRST 23 #define IMX7_RESET_DDRC_CORE_RST 24 -#define IMX7_RESET_NUM 25 +#define IMX7_RESET_PCIE_CTRL_APPS_TURNOFF 25 + +#define IMX7_RESET_NUM 26 #endif From patchwork Thu Oct 4 16:34:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10626441 X-Patchwork-Delegate: bhelgaas@google.com 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 7D8621731 for ; Thu, 4 Oct 2018 16:35:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6AF4C292B6 for ; Thu, 4 Oct 2018 16:35:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E68A2940A; Thu, 4 Oct 2018 16:35:06 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9AEF292B6 for ; Thu, 4 Oct 2018 16:35:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727822AbeJDX2d (ORCPT ); Thu, 4 Oct 2018 19:28:33 -0400 Received: from mail-eopbgr80058.outbound.protection.outlook.com ([40.107.8.58]:50486 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727415AbeJDX2c (ORCPT ); Thu, 4 Oct 2018 19:28:32 -0400 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=DyOr3KhjVhrtaIigEqzfqh2MmL6BiTpih628112q038=; b=yI8lAW745KstGC1PU0ocFI5rt0zm90LR3w34XIi10PlVryE+cL69+mb1/v5djbFbzAQlYrLXc9a83spzg9m01vRYa3uQOjNUwjx0U1JHhlot8gl2/D/k6vnADH8pkvvIBP0RZWnOwAbkWxVo93pmulAnRmzlbHdLmjxgdHXTle0= Received: from AM0PR04MB4290.eurprd04.prod.outlook.com (52.134.126.145) by AM0PR04MB5266.eurprd04.prod.outlook.com (20.177.42.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Thu, 4 Oct 2018 16:34:27 +0000 Received: from AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef]) by AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef%3]) with mapi id 15.20.1207.022; Thu, 4 Oct 2018 16:34:27 +0000 From: Leonard Crestez To: Lucas Stach , Philipp Zabel , Lorenzo Pieralisi , Richard Zhu CC: Andrey Smirnov , Gustavo Pimentel , Jingoo Han , Bjorn Helgaas , Shawn Guo , Fabio Estevam , dl-linux-imx , "kernel@pengutronix.de" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v2 2/4] dt-bindings: imx6q-pcie: Add turnoff reset for imx7d Thread-Topic: [PATCH v2 2/4] dt-bindings: imx6q-pcie: Add turnoff reset for imx7d Thread-Index: AQHUXAAdyMDIGjrm5kyzw/2wqGXRFg== Date: Thu, 4 Oct 2018 16:34:27 +0000 Message-ID: <19537dfb0750a342b1aa645934325d4c6a3176fb.1538670431.git.leonard.crestez@nxp.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [95.76.156.53] x-mailer: git-send-email 2.17.1 x-clientproxiedby: DB6PR02CA0003.eurprd02.prod.outlook.com (2603:10a6:6:15::16) To AM0PR04MB4290.eurprd04.prod.outlook.com (2603:10a6:208:67::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB5266;6:CjckKvNXTxFajzeNuBerbB54mrJk7YD9RFCgC+9y9v0A3ImhqdYLVVoSw6akX/yMiZMJWQeqwOtUAMDzfS6WW9UcAf9y/zHegGUHThvuoKZPfqz5hDqh/76Iy3spD9IImPCZfskKPUcBni6gRa5na4dcn9iqJAQy2e9V/HWLotzditm0UpuRVL4icIUcZyZcibmqRhfQ9n1kh5SdYJerZhvZViUI3r8dfHQSWmcYQ0TaqT3o9ifCq66a7NEA4+jJbufnGVclDkyDljuMQRrknEyUbTmvEvcuBZQEPKCyE4b4Jk7U7CWFH6R9jRL9wn74/E5u9/JZbXUHTlxEubv0NdW8AUa5exzzUlVPMVwkrMQYdohA4ZcGTwksh5Z14xdSLwMkV0ZKEUAFEK9wKJ4nA6IkXHvgYO4t0fxPmHspsQ37oqs4w2A3yhc8ovr67D0WCeS4lUeJbKGkU8CQoxGTXQ==;5:9eY3ERKYlGi+HtQqO90FpG3eVH6LcnY5BlKK3vPvrh6wv0pYX1z+wWH+8WdOCxIHUU8OlPWgbveQTiwHjU/oY7f9uKMBBuSOiZHRhbzvT5xUYhGa4UDT8slI3l5ahrDcGvR3LE9knZhFmIlSvzPyrV7DZlV/v0b7oRuQdNtAoCE=;7:whOgIEowZzb75zUzSc4uNbqI93XLsWj0NMVzGse/gZiDl0kEiDt6r50g+vsB8M42W/vqB6bchjNPtvq8eus6WzbG/gxCoBXLd049uIxKXhrlO2gbWFsrg6o83m9yvB5d/1SyGlhLX2+evR9n+qbJGvL0QFZVfjtTpk59UWzUWZmcKcKgXYpn5Wyl/WqExw8QIUliBoL+6wBV2QGvFSWLk+H/4tAgSjE6JmSQTvlAyDlTqJYSBWKK4tOkh90cJQBp x-ms-office365-filtering-correlation-id: f51891de-e6d4-4ccb-0372-08d62a17401d x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB5266; x-ms-traffictypediagnostic: AM0PR04MB5266: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231355)(944501410)(52105095)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051);SRVR:AM0PR04MB5266;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB5266; x-forefront-prvs: 0815F8251E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(396003)(39860400002)(346002)(376002)(199004)(189003)(86362001)(66066001)(14454004)(50226002)(39060400002)(4326008)(6436002)(256004)(8936002)(106356001)(81156014)(81166006)(5660300001)(105586002)(316002)(2906002)(68736007)(478600001)(476003)(2616005)(44832011)(36756003)(26005)(3846002)(486006)(6116002)(11346002)(446003)(186003)(2900100001)(102836004)(8676002)(6506007)(386003)(54906003)(76176011)(53936002)(71200400001)(71190400001)(52116002)(97736004)(99286004)(6512007)(6636002)(118296001)(7416002)(110136005)(5250100002)(25786009)(7736002)(305945005)(6486002)(32563001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5266;H:AM0PR04MB4290.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: OwRRQEH5RD9KkJv3ESHf6STJ1yL3P1C7OVlFviR/KHZtizTUryYh55AwDkr/mXtjeJz/aK9dyPlye6XgEifjqrq0vfSJLFMXmfWTDbpxlucnh0wi6N5p5koK2w9SMGrNpSQOjWTuvIzzqeheHbaJKrmd2sdibbXR2KFLPRGpTXCLalP8o1X9yBKGV6/OurvsVzrUPGGwHnXVx4fzoZkoR2sHLv3dOviWyDRcTiZDUwuOd1/DLD3rZK/AFNcE6GK0Bg6m+nRndpiVCvhLaqbhW3pnPLvZUHlFKRp/LzGIC7iarFDvQ0try3vFgtX9htbmSK108iOLBlDqSUb/rYB1A/RQqRIpdfmkL/yVYCf8hHg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f51891de-e6d4-4ccb-0372-08d62a17401d X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2018 16:34:27.0673 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5266 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is documented as "required" but won't be present in old dtbs. These resets are also present on other imx chips but right now only imx7d implements them through the reset controller subsystem. Signed-off-by: Leonard Crestez Acked-by: Rob Herring --- Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt index cb33421184a0..f37494d5a7be 100644 --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt @@ -48,10 +48,11 @@ Additional required properties for imx7d-pcie: - resets: Must contain phandles to PCIe-related reset lines exposed by SRC IP block - reset-names: Must contain the following entires: - "pciephy" - "apps" + - "turnoff" Example: pcie@01000000 { compatible = "fsl,imx6q-pcie", "snps,dw-pcie"; From patchwork Thu Oct 4 16:34:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10626435 X-Patchwork-Delegate: bhelgaas@google.com 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 253981731 for ; Thu, 4 Oct 2018 16:34:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 13FF2292B6 for ; Thu, 4 Oct 2018 16:34:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06A6C29404; Thu, 4 Oct 2018 16:34:41 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9CF92292B6 for ; Thu, 4 Oct 2018 16:34:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727524AbeJDX2e (ORCPT ); Thu, 4 Oct 2018 19:28:34 -0400 Received: from mail-eopbgr80058.outbound.protection.outlook.com ([40.107.8.58]:50486 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727813AbeJDX2e (ORCPT ); Thu, 4 Oct 2018 19:28:34 -0400 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=Qn4hBjO7NrJFEg/Ip7ptTelJJHAA8a9JWtALIk5oNmY=; b=EdQwizzdANMuhjWSMAHg5as7y072zS+nv79yXZZmZ7VEazYU8vHmHFN2b8i3PkObcRXk43cgAfs5HM/bpMjpgorqle6mcN65iZOFHlavrpmZ4yXcqzGSfF3Xe0YeEn0zR0xH2+433Rx+NzKyNiPFs3cikkEOYLHEIYHgo8+Ncdc= Received: from AM0PR04MB4290.eurprd04.prod.outlook.com (52.134.126.145) by AM0PR04MB5266.eurprd04.prod.outlook.com (20.177.42.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Thu, 4 Oct 2018 16:34:28 +0000 Received: from AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef]) by AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef%3]) with mapi id 15.20.1207.022; Thu, 4 Oct 2018 16:34:28 +0000 From: Leonard Crestez To: Lucas Stach , Philipp Zabel , Lorenzo Pieralisi , Richard Zhu CC: Andrey Smirnov , Gustavo Pimentel , Jingoo Han , Bjorn Helgaas , Shawn Guo , Fabio Estevam , dl-linux-imx , "kernel@pengutronix.de" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v2 3/4] ARM: dts: imx7d: Add turnoff reset Thread-Topic: [PATCH v2 3/4] ARM: dts: imx7d: Add turnoff reset Thread-Index: AQHUXAAe8hWKFiAorkay2cnqivCEnQ== Date: Thu, 4 Oct 2018 16:34:28 +0000 Message-ID: <5f80136e703a35193d5e33168c1a66593bd8f96f.1538670431.git.leonard.crestez@nxp.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [95.76.156.53] x-mailer: git-send-email 2.17.1 x-clientproxiedby: DB6PR02CA0003.eurprd02.prod.outlook.com (2603:10a6:6:15::16) To AM0PR04MB4290.eurprd04.prod.outlook.com (2603:10a6:208:67::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB5266;6:kx58aaJKwnUudsYhpdnjbG1qWgVWnvzWRRliaj1uMBwvjif4X3ULuJAEwaI79t7mUdhgOJY3yG2oiTf88wHpgY6Ne1kSlAOzYAe/pEWRdoWOgshhUZ3KToPxtGWZ7LyGlW+Ke0QJ3FwgC1TrvEFJYxuJ+UrVGgBI72hf+E+HFgsUHtlezeBBZvPE7AD2rdwafCmPxsLTYkb8ATZet+HGIaKZLPOv1Gb4tiu3s2HWA+H1lchOovSNaeka/Vqisxs4ZX2hrh969HP77zLcqFOfadTdRZkIQwEjQV5GsHpPcn/OPHWcXGyi1gvGtf68m9lw7n1SIpXtgBNoF5BTH32sfMoKvOOdwZ2b11lnetsQrbdYxaW9U6C6HIsaAt3ftZ/UHPuW4kwz3W/2bdR+IxgOCvd62aEENfc33CzXCjBD4MJXDST6gt5RujYdsvVzJFOOG3xqzI4I0tYIAE2w2kPNwQ==;5:BLwLTdONmykZS8evRMJakZk6v9cZTnClfo4ow2xFrrA3KpsY5wLPek9kaBW8CECLBBYoIIvT81ZmCtOXl6aqfW5LkyNwETqT/FEPCefcC0aFncZl+ellsSa2+mWsk0rb8uqSp1XgOvpnyKratruDY+/d92HDF1QDE3YMbmvkuWs=;7:Wu7OIzWqI/QQy+jOBHh1og7EA2o4EBuPBfPSPbDnVPk0khIHy5jeb+g1l5IqAT5mQux92G1dvW2cyXe8gQg9dnhAk/VSkDPqqd92m25m1N14ynVRKROXdRv3DRGOagzLCMNz03KmyUGCBDUiQV+n1UNXwJqsQffn5xEtXqPTL1FEzwzhi99bUTlGWuYOywg54vJ9mEKFaDl7CeCDIn+ktrn7EacH27JvU1y0xdTUwjf4LcvhGv4pB+OU1gVEW9MA x-ms-office365-filtering-correlation-id: 774d40b3-5305-4581-fcf2-08d62a174100 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB5266; x-ms-traffictypediagnostic: AM0PR04MB5266: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231355)(944501410)(52105095)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051);SRVR:AM0PR04MB5266;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB5266; x-forefront-prvs: 0815F8251E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(396003)(39860400002)(346002)(376002)(199004)(189003)(86362001)(66066001)(14454004)(50226002)(39060400002)(4326008)(6436002)(14444005)(256004)(8936002)(106356001)(81156014)(81166006)(5660300001)(105586002)(316002)(2906002)(68736007)(478600001)(476003)(2616005)(44832011)(36756003)(26005)(3846002)(486006)(6116002)(11346002)(446003)(186003)(2900100001)(102836004)(8676002)(6506007)(386003)(54906003)(76176011)(53936002)(71200400001)(71190400001)(52116002)(97736004)(99286004)(6512007)(6636002)(118296001)(7416002)(110136005)(5250100002)(25786009)(7736002)(305945005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5266;H:AM0PR04MB4290.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: zRAmaI7/eIPmvfGrJpupypCJADHBbpGtnljmJigiOHl+a7Q5UDa2wFajdOy34VnqGQ6yXeVc/QClleZVlH9POY2BKo9drfGoj3zADJyS1dFuyaOadbQqK3/A6SAXXUUEYozsE3Fcu8ahbcLnAg70L+7UI7t0334cXxt0cDUZwgiC5Pd/GjVlmlXz+jrI/PlxbpeSNVrN4L7NwHaKTct/kxCk4Z/gaGqGmh8fpQjfCoicnbyuJ1ywu793RRxyk0UvRieag70PVA5KccXO5Ws9qnDJHD7bBI/fdRI+/DVyWIxaR1NT8YRuoG12Ki44D/dAGSLwjorTPy6jdM3UjRYKd68EhKH3xfZK2rB+my+CjNw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 774d40b3-5305-4581-fcf2-08d62a174100 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2018 16:34:28.6844 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5266 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This is required for the imx pci driver to send the PME_Turn_Off TLP. Signed-off-by: Leonard Crestez Acked-by: Shawn Guo --- arch/arm/boot/dts/imx7d.dtsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx7d.dtsi b/arch/arm/boot/dts/imx7d.dtsi index 73c35939e07c..826224bf7f4f 100644 --- a/arch/arm/boot/dts/imx7d.dtsi +++ b/arch/arm/boot/dts/imx7d.dtsi @@ -147,12 +147,13 @@ <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>; fsl,max-link-speed = <2>; power-domains = <&pgc_pcie_phy>; resets = <&src IMX7_RESET_PCIEPHY>, - <&src IMX7_RESET_PCIE_CTRL_APPS_EN>; - reset-names = "pciephy", "apps"; + <&src IMX7_RESET_PCIE_CTRL_APPS_EN>, + <&src IMX7_RESET_PCIE_CTRL_APPS_TURNOFF>; + reset-names = "pciephy", "apps", "turnoff"; status = "disabled"; }; }; &ca_funnel_in_ports { From patchwork Thu Oct 4 16:34:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Crestez X-Patchwork-Id: 10626437 X-Patchwork-Delegate: bhelgaas@google.com 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 479A61731 for ; Thu, 4 Oct 2018 16:34:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 349C1292B6 for ; Thu, 4 Oct 2018 16:34:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 241A529404; Thu, 4 Oct 2018 16:34:53 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 925D4292B6 for ; Thu, 4 Oct 2018 16:34:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728077AbeJDX2x (ORCPT ); Thu, 4 Oct 2018 19:28:53 -0400 Received: from mail-eopbgr80058.outbound.protection.outlook.com ([40.107.8.58]:50486 "EHLO EUR04-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727810AbeJDX2w (ORCPT ); Thu, 4 Oct 2018 19:28:52 -0400 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=iTbqyO0fLgcear2T3IwYWkna0x3/qAXQuYdQ+1SYwcw=; b=lYKEOPxbvFgKAOKDLDKzHV9cPzU9qzapv/1QcvC+KWNiUy8WL8u+AuaWPIBNHzrObWI5E0KQuUuUMnwOQstG4r2wsv2XTBaaR5DghisQdhsF1Rp6myZGOWlSlM+7HrWm/Z0q499eM1aQd5/TPjDCLQbLQ3pU8/7E1l7MG2w7kF4= Received: from AM0PR04MB4290.eurprd04.prod.outlook.com (52.134.126.145) by AM0PR04MB5266.eurprd04.prod.outlook.com (20.177.42.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1185.25; Thu, 4 Oct 2018 16:34:30 +0000 Received: from AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef]) by AM0PR04MB4290.eurprd04.prod.outlook.com ([fe80::3836:6416:4ebd:34ef%3]) with mapi id 15.20.1207.022; Thu, 4 Oct 2018 16:34:30 +0000 From: Leonard Crestez To: Lucas Stach , Philipp Zabel , Lorenzo Pieralisi , Richard Zhu CC: Andrey Smirnov , Gustavo Pimentel , Jingoo Han , Bjorn Helgaas , Shawn Guo , Fabio Estevam , dl-linux-imx , "kernel@pengutronix.de" , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH v2 4/4] PCI: imx: Add PME_Turn_Off support Thread-Topic: [PATCH v2 4/4] PCI: imx: Add PME_Turn_Off support Thread-Index: AQHUXAAfuxXhw+LsYE6gE8iU25MszA== Date: Thu, 4 Oct 2018 16:34:30 +0000 Message-ID: <37d60fe2119361381a6a81f439fa1c3ad29db45e.1538670431.git.leonard.crestez@nxp.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [95.76.156.53] x-mailer: git-send-email 2.17.1 x-clientproxiedby: DB6PR02CA0003.eurprd02.prod.outlook.com (2603:10a6:6:15::16) To AM0PR04MB4290.eurprd04.prod.outlook.com (2603:10a6:208:67::17) authentication-results: spf=none (sender IP is ) smtp.mailfrom=leonard.crestez@nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;AM0PR04MB5266;6:+j2bP5nHl86TuqUfHVN+QnNatU5a5HlzBKqQgfyAOmYVI/dxjGWbUulPdqkDLGwsJEq4fEG2DyOTuv7LczA9z+olxoZ7DthgfhA6umuGly8K/JJSeRLT5ljYJaI/11K7kRa4lpF0azQ9MdZ1r2asvTVNidpT2+UJo4X9qtXe7A8lDWMO2/X0SE5OUgDizxuWihaPFwUv6bO8AiZAMup+7W2QnAA6oAJ50J/AcSECf6XBfzKUmdjSzFChJHx652dtUwGtTt/RhIXb+HxEx6nVPD4S44uAXvHJdGUpThkc+FRrqnzro6hURlmQbTrESxsvGlgnC1f/BScxepa75EN97L3EZZ3HTLQYv+8qws2B2SEu3rIEBMmhChoNbLqbpUNWmy5NKfxwNROivKOM/vWE/6FLzJVNVi8klY0t6ZE1BKOtCG/d7f/MHNwrrSOCtjZS0GLCFQ9hwCVWN/acTxkl+w==;5:TjO851GbQYD7U3m72ZGKmZdb8/48sF/VfeDWWGmszNAE+SMgxiz6FJSqOsyO+gNVZNaNJ37XynDmfoqQrRsPwSZYJQXobrpgvuc/S+ahuy8QNavUXeuV9Kj6jqIGuq2c515lQ29v5hG2RDqYrygja9W1h14lkIZwMaCpKMIILlE=;7:F6AvALCK++s4HDDfOKXdDGz0qpYp/JNEDX22R0MPSPpre+NBpM5+qh6bmPw8WYR691mffQ8AOIEzkjHzkebA8ttGX5h+4iy5GTY2p+E4ZmrfpxIb7u7pVlNuCTQAz0NC+mQYugtawN5pkJNEvasxYldQQdduV5cyA43mAXQN+62ZONzJI+amk41SrOrGqzV2DtUNxVr/7Wbm+ESDQtRwGjqYUNG4ndd91nIKMQa/jIDD8uMPar2A15UdesbSpCS2 x-ms-office365-filtering-correlation-id: 6a17609b-d0a5-4356-1e5c-08d62a1741f9 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020);SRVR:AM0PR04MB5266; x-ms-traffictypediagnostic: AM0PR04MB5266: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231355)(944501410)(52105095)(93006095)(93001095)(6055026)(149066)(150057)(6041310)(20161123560045)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051);SRVR:AM0PR04MB5266;BCL:0;PCL:0;RULEID:;SRVR:AM0PR04MB5266; x-forefront-prvs: 0815F8251E x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(366004)(136003)(396003)(39860400002)(346002)(376002)(199004)(189003)(86362001)(66066001)(14454004)(50226002)(39060400002)(4326008)(6436002)(14444005)(256004)(8936002)(106356001)(81156014)(81166006)(5660300001)(105586002)(316002)(2906002)(68736007)(478600001)(476003)(2616005)(44832011)(36756003)(26005)(3846002)(486006)(6116002)(11346002)(446003)(186003)(2900100001)(102836004)(8676002)(6506007)(386003)(54906003)(76176011)(53936002)(71200400001)(71190400001)(52116002)(97736004)(99286004)(6512007)(6636002)(118296001)(7416002)(110136005)(5250100002)(25786009)(7736002)(305945005)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:AM0PR04MB5266;H:AM0PR04MB4290.eurprd04.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: KXPGTBxcpyNaDCpVCzrQxQP3Xd9xd6p+R7jIdwfz3FhTGtjqRFhBnF8EWRDNj9kY3tCiTuXZa7B/9aLRX8xvGgjhO41bH8uf1tADKU6fSEjaQne/Xv5fX8KJedUwgqvH0bZ90W8DgJshvOBBrzg43vMD5SYfK7Ou1dTKE2dSvE8pOiCQmwxoWQopv+Bv2bu074h8EXxW1/9UbTHf6hhQ3RjAfd7VKKfKaVCUS1RPpVWH2etCi6PCE/ZHjA/86pw69gZvC76ttBwTMv5WODwi3pygHpvk10dJPNu0H2HofibMu40ne6EkVmkUsjmuXFZs1bcICe+StdRwCPjhlGV4KFR+0Jlg8YQgqEZYbwyx8YU= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a17609b-d0a5-4356-1e5c-08d62a1741f9 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2018 16:34:30.2135 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB5266 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When the root complex suspends it must send a PME_Turn_Off TLP. Implement this by asserting the "turnoff" reset. On imx7d this functionality is part of the SRC and exposed through the linux reset-controller subsystem. On imx6 equivalent bits are in the IOMUXC GPR area which the imx6-pcie driver accesses directly. This is only for imx7d right now but it's deliberately implemented as an optional reset, ignoring the chip variant: * Older dtbs won't have this reset so it will be ignored. * Future chips might also expose this as a reset controller. For example imx8m (not yet supported) has the exact same PCIE_CTRL_APPS_TURNOFF bit in the same location. Signed-off-by: Leonard Crestez Reviewed-by: Lucas Stach --- drivers/pci/controller/dwc/pci-imx6.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 6ba16fd1373c..2bf80f1ad852 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -50,10 +50,11 @@ struct imx6_pcie { struct clk *pcie_inbound_axi; struct clk *pcie; struct regmap *iomuxc_gpr; struct reset_control *pciephy_reset; struct reset_control *apps_reset; + struct reset_control *turnoff_reset; enum imx6_pcie_variants variant; u32 tx_deemph_gen1; u32 tx_deemph_gen2_3p5db; u32 tx_deemph_gen2_6db; u32 tx_swing_full; @@ -812,10 +813,25 @@ static void imx6_pcie_ltssm_disable(struct device *dev) default: dev_err(dev, "ltssm_disable not supported\n"); } } +static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie) +{ + reset_control_assert(imx6_pcie->turnoff_reset); + reset_control_deassert(imx6_pcie->turnoff_reset); + + /* + * Components with an upstream port must respond to + * PME_Turn_Off with PME_TO_Ack but we can't check. + * + * The standard recommends a 1-10ms timeout after which to + * proceed anyway as if acks were received. + */ + usleep_range(1000, 10000); +} + static void imx6_pcie_clk_disable(struct imx6_pcie *imx6_pcie) { clk_disable_unprepare(imx6_pcie->pcie); clk_disable_unprepare(imx6_pcie->pcie_phy); clk_disable_unprepare(imx6_pcie->pcie_bus); @@ -832,10 +848,11 @@ static int imx6_pcie_suspend_noirq(struct device *dev) struct imx6_pcie *imx6_pcie = dev_get_drvdata(dev); if (imx6_pcie->variant != IMX7D) return 0; + imx6_pcie_pm_turnoff(imx6_pcie); imx6_pcie_clk_disable(imx6_pcie); imx6_pcie_ltssm_disable(dev); return 0; } @@ -959,10 +976,17 @@ static int imx6_pcie_probe(struct platform_device *pdev) break; default: break; } + /* Grab turnoff reset */ + imx6_pcie->turnoff_reset = devm_reset_control_get_optional_exclusive(dev, "turnoff"); + if (IS_ERR(imx6_pcie->turnoff_reset)) { + dev_err(dev, "Failed to get TURNOFF reset control\n"); + return PTR_ERR(imx6_pcie->turnoff_reset); + } + /* Grab GPR config register range */ imx6_pcie->iomuxc_gpr = syscon_regmap_lookup_by_compatible("fsl,imx6q-iomuxc-gpr"); if (IS_ERR(imx6_pcie->iomuxc_gpr)) { dev_err(dev, "unable to find iomuxc registers\n");