Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2226113/?format=api
{ "id": 2226113, "url": "http://patchwork.ozlabs.org/api/patches/2226113/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260422093549.407022-4-sherry.sun@nxp.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260422093549.407022-4-sherry.sun@nxp.com>", "list_archive_url": null, "date": "2026-04-22T09:35:40", "name": "[V14,03/12] PCI: imx6: Assert PERST# before enabling regulators", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "62d1ebc7c98301a0f45a12b0e2759bcf378331ba", "submitter": { "id": 77063, "url": "http://patchwork.ozlabs.org/api/people/77063/?format=api", "name": "Sherry Sun", "email": "sherry.sun@nxp.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260422093549.407022-4-sherry.sun@nxp.com/mbox/", "series": [ { "id": 500954, "url": "http://patchwork.ozlabs.org/api/series/500954/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=500954", "date": "2026-04-22T09:35:40", "name": "pci-imx6: Add support for parsing the reset property in new Root Port binding", "version": 14, "mbox": "http://patchwork.ozlabs.org/series/500954/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2226113/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2226113/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-52936-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256\n header.s=selector1 header.b=j/YZYv8n;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-52936-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=\"j/YZYv8n\"", "smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=40.107.162.17", "smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=nxp.com", "dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nxp.com;" ], "Received": [ "from sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0vFS0Rk7z1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 19:34:35 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id 1D3493002B66\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 09:34:33 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 140492EA754;\n\tWed, 22 Apr 2026 09:34:32 +0000 (UTC)", "from PA4PR04CU001.outbound.protection.outlook.com\n (mail-francecentralazon11013017.outbound.protection.outlook.com\n [40.107.162.17])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F815372B3C;\n\tWed, 22 Apr 2026 09:34:30 +0000 (UTC)", "from VI0PR04MB12114.eurprd04.prod.outlook.com\n (2603:10a6:800:315::13) by PA2PR04MB10129.eurprd04.prod.outlook.com\n (2603:10a6:102:3ff::12) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.18; Wed, 22 Apr\n 2026 09:34:27 +0000", "from VI0PR04MB12114.eurprd04.prod.outlook.com\n ([fe80::feda:fd0e:147f:f994]) by VI0PR04MB12114.eurprd04.prod.outlook.com\n ([fe80::feda:fd0e:147f:f994%6]) with mapi id 15.20.9818.032; Wed, 22 Apr 2026\n 09:34:27 +0000" ], "ARC-Seal": [ "i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776850472; cv=fail;\n b=n/+k1i+/yelmopjzlRysm/L5TK/sOCro/5xhGJdZhrwe8dFC6HA27c0p9rhBXdSRlIYa26M/N9vYF4pKlGRN0vxeAjnVSVuFntKkwFQcAw38z9sITDGu/iRfBcbxmu3bQnMnamcl5w339SokuUQbd9lcZ6EqwZcUAJ4/dkOuRx8=", "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=ZS0X5Gcjfs4cCVzBJSFfApERq7kQvEVZ1Asm+6WlZxJQRtf2Hq8dk8LLY748XyYT8xS8/ShS6qY9ZpMwtgVEBbkmzAnR3Gi37HuzpSdxKpm368r5gFRAzVXxs4O03Qq7j58GI7AUMT3fU47hWocMoHNLAD/XRUlkWXacxYLbRngcjDV/2PQvEWSbP1r3Ifh4hDeKyxBWlVpZNjdmBRK0UNjsZpcfXjq+s2ogV29Wbywz7qO/43TiTCWqhsA3BPNj13n/AX6hjkFEZPg3iF+K0RGoiaE4rkntisAJ+HEiaoFbA9ed5gOLULrPutnbm6XxJsC19FPLW48hKoPUdaZUIw==" ], "ARC-Message-Signature": [ "i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776850472; c=relaxed/simple;\n\tbh=B+IUcdsIJ2cNFPRVaG+xcPg4bNSXo9vHqnC7VOsbhpA=;\n\th=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:\n\t Content-Type:MIME-Version;\n b=Pfk4/Dcktb/Kgk53AhppUJzsc6+CTwPnNbZ+ez7bOwEZiTXhvlSxmeYKGJF0emsMFuGkds4vBrhy3ke4HF5uJyJ1siHuQoFdcStnqYovgSckJfKbFKXTOXtTF14DX8G8vcMePGLOjZMZOYQ5X73MfbAD2zdKUuGVRyVQDiHC/zA=", "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n 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;\n bh=jGVHqOPs/4jMGkcftvgjRX5BCFrejfz9iGaZzDJBg8s=;\n b=Ied39/cpu7eTksWed5N9ISONZJ7BHpQGty74WgqxtFIMwuf+EcngIBF5gDxy/2IsKtAAgzfkeiNuKB2i+MLrwcRo3FF6Sg+Fetu+25Cw6qpF4eFOUguV6WSAe+JpaG6nG64avN2iQwv3OQoEdgVHy/8JYwg7k7cWwHbHM/PZOaNJE2lwZQj7FX7SDXsuwbjSkScNOwLeQigZQdnr7YHIgJNBvaDWMszWCya2l6TfOytbKtRotF0hDiK2TECVJMV6ctfK5M+IRdejHjCGwLXNgxsRv2fwtH+qy1Bg0qYHhNdf+6gNKWG0+8QAGcf0uspxVEWV+n5Sd45+Jy7VUthMqQ==" ], "ARC-Authentication-Results": [ "i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=none dis=none) header.from=nxp.com;\n spf=pass smtp.mailfrom=nxp.com;\n dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com\n header.b=j/YZYv8n; arc=fail smtp.client-ip=40.107.162.17", "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass\n header.d=nxp.com; arc=none" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=jGVHqOPs/4jMGkcftvgjRX5BCFrejfz9iGaZzDJBg8s=;\n b=j/YZYv8ngScfy3zjJAID/Qgy/9dh50tGjrDNBLsrygAi91AZOc333VZsmHlux3adTUL9VZF/fajHcToY1jMpKTAPpP6J8Qrn5hTFnVjIwq19xE52QApZ7YobUIDye0m/tK+/unKtmasKQ2wBggXU3ji52iaf7+kmLjMkeyLIKaPIHBuJJbA9SuvYY0ISNeRkgCtDjcZQue6MAhb92opCdqFz0BO2qCVkLj2EZA5DasCQbY0OcfeL7dmtx8xyFbDAX0Kp1DKMMIUcwPdMZLTaxg1cyh2Q0dkB9ullk8fIN7QlEYTdD+WyqDSpZ0qMNQF8J2fEm4V0C2J9S2+klAPxDQ==", "From": "Sherry Sun <sherry.sun@nxp.com>", "To": "robh@kernel.org,\n\tkrzk+dt@kernel.org,\n\tconor+dt@kernel.org,\n\tFrank.Li@nxp.com,\n\ts.hauer@pengutronix.de,\n\tkernel@pengutronix.de,\n\tfestevam@gmail.com,\n\tlpieralisi@kernel.org,\n\tkwilczynski@kernel.org,\n\tmani@kernel.org,\n\tbhelgaas@google.com,\n\thongxing.zhu@nxp.com,\n\tl.stach@pengutronix.de", "Cc": "imx@lists.linux.dev,\n\tlinux-pci@vger.kernel.org,\n\tlinux-arm-kernel@lists.infradead.org,\n\tdevicetree@vger.kernel.org,\n\tlinux-kernel@vger.kernel.org", "Subject": "[PATCH V14 03/12] PCI: imx6: Assert PERST# before enabling regulators", "Date": "Wed, 22 Apr 2026 17:35:40 +0800", "Message-Id": "<20260422093549.407022-4-sherry.sun@nxp.com>", "X-Mailer": "git-send-email 2.37.1", "In-Reply-To": "<20260422093549.407022-1-sherry.sun@nxp.com>", "References": "<20260422093549.407022-1-sherry.sun@nxp.com>", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain", "X-ClientProxiedBy": "SG2PR01CA0140.apcprd01.prod.exchangelabs.com\n (2603:1096:4:8f::20) To VI0PR04MB12114.eurprd04.prod.outlook.com\n (2603:10a6:800:315::13)", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "VI0PR04MB12114:EE_|PA2PR04MB10129:EE_", "X-MS-Office365-Filtering-Correlation-Id": "da00a706-4c09-46bd-3ac8-08dea05258f2", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "\n\tBCL:0;ARA:13230040|376014|7416014|52116014|19092799006|1800799024|366016|56012099003|22082099003|18002099003|921020|38350700014;", "X-Microsoft-Antispam-Message-Info": "\n\tFCcQiBNkgCYUAqiJVcTc4NnP0PNtw6JdErqQXc9AH0m2gXbE2a+0CdtoS5c/AlPq/gTP9+bnJJSd+b+KM7Mgt2Ml7AH7ux73fC97aH8hHVKDhM/bgjzciNvy6Vr6f6xtkUL4XU0baKWvQwF+3Ra56n0zYfbUjPELtn94uwpB62eicHjHGuFjikivJD3nssv2Ti2SSAfYL3z0Wqivlk/7d+sA35KFJdxZy+CF8C5/NZnMlxWrj5JwkTWJ7luXbbHCAMPKQ6T+6CoOmcEOLHh4wVH1EP6XgMRUSUe2nwmbu/DX1MfbIyrdUau5okHXZI1qSZOLR+IocVtRGvUKLwlFizzspDy4xU0W/GGyAt9trsz9JSCwzy5BT+NxHnEt36lJ3Uvg1IOjYTEBtaXI3nA3Xmr+ee9dzEf0ZYDG5zVzAT/px4tfT+rYLYUgTjKjR5UxQ/mXoQoGQxMU22DgWvENWBioZ3G3eXL8J0++e2c7fIEhnh+TCEtM1/357DK4O1B+icF7vT3Jh5gpBpn1V1EsNaTpAGNKRlhPpkh1PrEpZxYJhDQRtRZIBKMAi/MU3Xp+Rv0kVZ0hEblkkB7XZmIVg/K+XK8UldLQV30UtdSPNxVvnW48OMM+8WucHB0+3Nxv8vxrYJ5tJnYJ4ebmqK/CHqUxJhEc9IM6K896qEoyuN9Uz1IF9Dx+JAR1J4Nsh5EkUqfeA+GOhRJEjK62DBYhGMEU/8QtxkshanpyDZJ2M7V83DL/d8SOHxfN2Wy/ha5WxS2Y1dDw7C+Ud7r+3Eu6MrhNiMMKBlWyK0CCcpJ9AGwg5tFJ2qrmBN0keZnDB5Yn", "X-Forefront-Antispam-Report": "\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI0PR04MB12114.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(52116014)(19092799006)(1800799024)(366016)(56012099003)(22082099003)(18002099003)(921020)(38350700014);DIR:OUT;SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n VRih8NhRVKSboZ/nSwpATq8rUwCxKZqM1s0q9ldfDxfWpPxSLGDBJf+w2Ryv86JnJHLDzpa/akUekgGZXPgqPAjlMB5qh+r/hhJi1x/twbiA02qjZgWJyy9T4EReE3G8HGiUSn+nbyXMcg97xdNjnkhAt5/q+JHCC91/AZ3+SwnnENJOp+xJNk84YqUVJjdPrcVlZBHU8e2JMQTK2ZJLfXVafs87UmJLJf/4InshD39dJv+uM3YS+FaTxcdYgfi8ZQdPGqVq5K90sjsRy1YMqY8ISwGbsxZXGsrWJS7b3xa4VkZ2lnFlwAbUDV2yjHUYgUaSkN3OXowHm/vrTNhJpDc1+WvC1qKwYGUV6pRvqzgmatNT/xu2X9D7GD5uW2GKM/ILxL2O27eCjAUn4S7dJPlNMzZDkrGtiylJTYLrstCbs1y01YydTQPlDRm0J7OiGSTsgoU2YxtW0jUsevb4JoXGBKfn0QD18vSTxA2jEYjDXxhCZjKr41VLCzY7bs346q7QcRQEZ8fhQIh7HstyI+iulJgEZzEyvy/iNSQktUXFzabXUKU+4YqNGT6y9XrQr2BBzUS61rIKkKfK2ynFs+g8SgWqd0YTvceqrGdbAICd8Dit5CB+nljs/w+5bWSNoCOFUlssXMJZLx0bDEAwbSFgndK6fagvNQo8sLZLyeNKLPDYYkE2na555WErSA6ixjNArxS7a6pzoFgZESVAlwghYANM8i+zZdKCgzXkSp7sroZ8y/FsUjB5eTdBQaGz31DDbeo6Tuug9EzoT6Rk3CkoVPJCb0fMIKnCdrE9qp8djYA4OoDMNWox84TXPENTFQz4VTNG/2qz7FHInppK+mMkgO/p3JcMhmsLpe/k+fAmpsE4Tlci/oMJL4Dxka3/EQW+AVaR+MMBy/6c7tZ/BD1jSHOOY7et3ZMKhwSeU5h7iHcGLMvzY77sMWZ41AVYBg6LZbFfQDemMr9BrjaBS9JCn0ehXU9BzyT+RLFqXtoDUnZ3GD4BU44N/Ck16PmIJh195StlKHmqsM/QnRvaaiC3wAO3mve4H98zh/xH4m5uzNfaUSQdxnD7JfZqgyjsyymQociOym44A5Rt3NGnMwH+E/Np9u9zo4OYxW2MaFn1CR2/YDI1U4a9LJX708dmiv9F8ZzOooiBEq3oI3GILh+WJOaNCMFMI/Y+4Lgi4nqmlGyfgkWtuvgaM1Dkvl1KUH0unfQaUVzmIQp/tXV2F+mOpSnA2DdfJ4eRTNIydmv9aLZhZsRY+sYs6QCUfOMBFbCgF2lkw6EwtIcDArMC+Bes1OTurJGeLrUcTJGd55Y208T8CQBBddquAsneDakoYVgnz1HNwJxTWosAdwDz65ctUDijViUvpIDLeHePUVU6KU/IY158FB5maVSxeaxOt5zrnkS43z2c21b+mf9xhLvnCAXH55IHJag873QXS6JB+KDpC/7vuX7955aEKZirDc2VZR3PdTuISKuuDP3Ut6v8eT+nWY1nsGtDxoAAyv3hpZC4FOj0wVlzpkfb+0K8xV4EjejF5cGv5YzKhjrZZNSuKcOLlmzmnQv3UG7Ho9tBeoDBpAAEiu0Kf8k562pCJyFTv1MrkcWnbdqM7DTy1F2zB842SY9yDfPYUWu+UBj2qrjknhXJS/YsPN5KmFa0DI/P08t6RKuarNWPVHHe1dSrVx9MaI0wyFb24kIyNv0j7TihL/tfJOQ/r0BsIDMkxZskLvk/v4/+yXmY9wIv2w==", "X-OriginatorOrg": "nxp.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n da00a706-4c09-46bd-3ac8-08dea05258f2", "X-MS-Exchange-CrossTenant-AuthSource": "VI0PR04MB12114.eurprd04.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "22 Apr 2026 09:34:27.4212\n (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": "\n a2XpXgZWy2BsP06Fwi40calf95hCPvXgxpqm6gtMIlq00vn6mYEYbodBbtJn63hsmk4RGlMpeHQBR4IJS1drDw==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "PA2PR04MB10129" }, "content": "The PCIe endpoint may start responding or driving signals as soon as\nits supply is enabled, even before the reference clock is stable.\nAsserting PERST# before enabling the regulator ensures that the\nendpoint remains in reset throughout the entire power-up sequence,\nuntil both power and refclk are known to be stable and link\ninitialization can safely begin.\n\nCurrently, the driver enables the vpcie3v3aux regulator in\nimx_pcie_probe() before PERST# is asserted in imx_pcie_host_init(),\nwhich may cause PCIe endpoint undefined behavior during early\npower-up. However, there is no issue so far because PERST# is\nrequested as GPIOD_OUT_HIGH in imx_pcie_probe(), which guarantees\nthat PERST# is asserted before enabling the vpcie3v3aux regulator.\n\nThis is prepare for the upcoming changes that will parse the reset\nproperty using the new Root Port binding, which will use GPIOD_ASIS\nwhen requesting the reset GPIO. With GPIOD_ASIS, the GPIO state is not\nguaranteed, so explicit sequencing is required.\n\nFix the power sequencing by:\n1. Moving vpcie3v3aux regulator enable from probe to\n imx_pcie_host_init(), where it can be properly sequenced with PERST#.\n2. Moving imx_pcie_assert_perst() before regulator and clock enable to\n ensure correct ordering.\n\nSigned-off-by: Sherry Sun <sherry.sun@nxp.com>\n---\n drivers/pci/controller/dwc/pci-imx6.c | 49 +++++++++++++++++++++------\n 1 file changed, 39 insertions(+), 10 deletions(-)", "diff": "diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c\nindex e35044cc5218..735127ed1455 100644\n--- a/drivers/pci/controller/dwc/pci-imx6.c\n+++ b/drivers/pci/controller/dwc/pci-imx6.c\n@@ -168,6 +168,8 @@ struct imx_pcie {\n \tu32\t\t\ttx_swing_full;\n \tu32\t\t\ttx_swing_low;\n \tstruct regulator\t*vpcie;\n+\tstruct regulator\t*vpcie_aux;\n+\tbool\t\t\tvpcie_aux_enabled;\n \tstruct regulator\t*vph;\n \tvoid __iomem\t\t*phy_base;\n \n@@ -1222,6 +1224,13 @@ static void imx_pcie_disable_device(struct pci_host_bridge *bridge,\n \timx_pcie_remove_lut(imx_pcie, pci_dev_id(pdev));\n }\n \n+static void imx_pcie_vpcie_aux_disable(void *data)\n+{\n+\tstruct regulator *vpcie_aux = data;\n+\n+\tregulator_disable(vpcie_aux);\n+}\n+\n static void imx_pcie_assert_perst(struct imx_pcie *imx_pcie, bool assert)\n {\n \tif (assert) {\n@@ -1242,6 +1251,24 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)\n \tstruct imx_pcie *imx_pcie = to_imx_pcie(pci);\n \tint ret;\n \n+\timx_pcie_assert_perst(imx_pcie, true);\n+\n+\t/* Keep 3.3Vaux supply enabled for the entire PCIe controller lifecycle */\n+\tif (imx_pcie->vpcie_aux && !imx_pcie->vpcie_aux_enabled) {\n+\t\tret = regulator_enable(imx_pcie->vpcie_aux);\n+\t\tif (ret) {\n+\t\t\tdev_err(dev, \"failed to enable vpcie_aux regulator: %d\\n\",\n+\t\t\t\tret);\n+\t\t\treturn ret;\n+\t\t}\n+\t\timx_pcie->vpcie_aux_enabled = true;\n+\n+\t\tret = devm_add_action_or_reset(dev, imx_pcie_vpcie_aux_disable,\n+\t\t\t\t\t imx_pcie->vpcie_aux);\n+\t\tif (ret)\n+\t\t\treturn ret;\n+\t}\n+\n \tif (imx_pcie->vpcie) {\n \t\tret = regulator_enable(imx_pcie->vpcie);\n \t\tif (ret) {\n@@ -1251,25 +1278,24 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)\n \t\t}\n \t}\n \n+\tret = imx_pcie_clk_enable(imx_pcie);\n+\tif (ret) {\n+\t\tdev_err(dev, \"unable to enable pcie clocks: %d\\n\", ret);\n+\t\tgoto err_reg_disable;\n+\t}\n+\n \tif (pp->bridge && imx_check_flag(imx_pcie, IMX_PCIE_FLAG_HAS_LUT)) {\n \t\tpp->bridge->enable_device = imx_pcie_enable_device;\n \t\tpp->bridge->disable_device = imx_pcie_disable_device;\n \t}\n \n \timx_pcie_assert_core_reset(imx_pcie);\n-\timx_pcie_assert_perst(imx_pcie, true);\n \n \tif (imx_pcie->drvdata->init_phy)\n \t\timx_pcie->drvdata->init_phy(imx_pcie);\n \n \timx_pcie_configure_type(imx_pcie);\n \n-\tret = imx_pcie_clk_enable(imx_pcie);\n-\tif (ret) {\n-\t\tdev_err(dev, \"unable to enable pcie clocks: %d\\n\", ret);\n-\t\tgoto err_reg_disable;\n-\t}\n-\n \tif (imx_pcie->phy) {\n \t\tret = phy_init(imx_pcie->phy);\n \t\tif (ret) {\n@@ -1782,9 +1808,12 @@ static int imx_pcie_probe(struct platform_device *pdev)\n \tof_property_read_u32(node, \"fsl,max-link-speed\", &pci->max_link_speed);\n \timx_pcie->supports_clkreq = of_property_read_bool(node, \"supports-clkreq\");\n \n-\tret = devm_regulator_get_enable_optional(&pdev->dev, \"vpcie3v3aux\");\n-\tif (ret < 0 && ret != -ENODEV)\n-\t\treturn dev_err_probe(dev, ret, \"failed to enable Vaux supply\\n\");\n+\timx_pcie->vpcie_aux = devm_regulator_get_optional(&pdev->dev, \"vpcie3v3aux\");\n+\tif (IS_ERR(imx_pcie->vpcie_aux)) {\n+\t\tif (PTR_ERR(imx_pcie->vpcie_aux) != -ENODEV)\n+\t\t\treturn PTR_ERR(imx_pcie->vpcie_aux);\n+\t\timx_pcie->vpcie_aux = NULL;\n+\t}\n \n \timx_pcie->vpcie = devm_regulator_get_optional(&pdev->dev, \"vpcie\");\n \tif (IS_ERR(imx_pcie->vpcie)) {\n", "prefixes": [ "V14", "03/12" ] }