From patchwork Mon Jun 17 20:16:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13701371 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2050.outbound.protection.outlook.com [40.107.20.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1F2F1991BB; Mon, 17 Jun 2024 20:17:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718655473; cv=fail; b=t/jPgsGbODTQzRwxn2IGjuBzLvXwHVYTg95WL6ZKzXUp8FrcsXaPmucv2m4khCH+CDJPpyCF3eYfnsFeDqkKTabfNc6tyVap3XxqxUxrS5EPb36SALI3SkZIm10qrbxrfg6JCDGLxq/SG0++5Hst4wsqUrIkgTscNZZzrTAwqRo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718655473; c=relaxed/simple; bh=mnFz1Xd8RiST3TqF6ybWEJkLf/FgE3r/PVt/jRqbg2o=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=OEZp/nYazEpoBTsmNoR2y0mnRzDl5y3gi/E9cH0XuLE/WSu5RwAc17ILX+VZo2StKfUYA5SnWSFv1SQpoyw/0YwqacnyqqJNIK578v0okxfaNhCrFz0UAgyi9CjGq+UsVmtczFK5GZIkEcnSRE4yk83i7iE9/mCjW/BvUbHdb5A= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=XFtfueXI; arc=fail smtp.client-ip=40.107.20.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="XFtfueXI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=THLP7NZqpt8eU92wXI0xMttBQ4PTdBqRvfexAJqMk/SJPZ/o6LSJbiiHH0vzS6kjSwgkr4L1ysSolugAlCjm7GIYcG2SWbU5SRsjAry/IIrTkWtPXi/7mkVXnjvTa2u+ingKgfPtqAedFpTvQFkr+BRtylqAlCbvVms5KJOryKD8e8ov0CcaP7v3jp9v6JQaJTcZxjBO4uToiGyHA2v/uvYAXZXSC7qXOxg5aGeGl3EzkPnCDs1iuXPh8tt+AdobNP2m74NoyHXoye4ITJfWIfEukySUUaTVE537UhT4Z+R2l1aprflXwQJnoXQdVAadT+cDaGtYRU1M5wofc9Ut7Q== 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=zwAMUUjuy8B9SJn+L8NdgbW98Y2i2AV2KsWbe85MDfU=; b=V/VKt/pOmXzjVDsLm6fCEhFtzcomlWEfkz7FDghlysfXU6iTWsbmCsnqeE0DZYuEwUTIdHj8NdU7SEfYw7sWs+miw7UXKFiv9W9HM/fBli429mYN5ruN9m45TXD3gxGPh1Fu1tgxPdehukJjGq/0HKI0NYFCtJBBn2/qZELUJYaebLD5Odok1c0owLFpLSKX/zFY+bZn91UwQUxDMoi0vzuilm+B2VF36x2ijwPjPzLRVxGsjljLrCpCRaalsp7zfseSNfdde8wYdgP/hhTpyjl9obbU/ctPOb2Yan1cqwH6gPw8gfIDjCaEY8DZOwrzgJv2lHo76lFlZoom0sOhbg== 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=zwAMUUjuy8B9SJn+L8NdgbW98Y2i2AV2KsWbe85MDfU=; b=XFtfueXILBCkErOuPVFdYdIu9sKLASNpTO8X+ckG3+PUTdg77T3QhEUTC7B1+4gHODvSRdpFtKid5yGKd7F2CC0Iw0xq58lewPyHiBCsecuVXyFeIqEKZrFXZeip03/Nd/9mGHDCkaQSLbS+DJGUkGsF1uX9FBGexJHdtQvy3mM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PA4PR04MB7997.eurprd04.prod.outlook.com (2603:10a6:102:c9::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 20:17:47 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%2]) with mapi id 15.20.7677.030; Mon, 17 Jun 2024 20:17:47 +0000 From: Frank Li Date: Mon, 17 Jun 2024 16:16:42 -0400 Subject: [PATCH v6 06/10] PCI: imx6: Improve comment for workaround ERR010728 Message-Id: <20240617-pci2_upstream-v6-6-e0821238f997@nxp.com> References: <20240617-pci2_upstream-v6-0-e0821238f997@nxp.com> In-Reply-To: <20240617-pci2_upstream-v6-0-e0821238f997@nxp.com> To: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Rob Herring , Bjorn Helgaas , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Philipp Zabel , Liam Girdwood , Mark Brown , Manivannan Sadhasivam , Krzysztof Kozlowski , Conor Dooley Cc: linux-pci@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bpf@vger.kernel.org, devicetree@vger.kernel.org, Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1718655424; l=1779; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=mnFz1Xd8RiST3TqF6ybWEJkLf/FgE3r/PVt/jRqbg2o=; b=d7kv+4s8ZI9/jGyk1E9QJq1B8H2e4cB59kq2tnocyN10+2CQAvCxmX3bTWC7ZW+c/UCvrbCHX c6wP9zr7l7bBWYEC5uXlDkTKv6bw+p5NBKpL3KZ3Nv92zW34pDMxrI0 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0116.namprd05.prod.outlook.com (2603:10b6:a03:334::31) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|PA4PR04MB7997:EE_ X-MS-Office365-Filtering-Correlation-Id: 37b3b580-7441-4305-980b-08dc8f0a8db7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|376011|7416011|1800799021|366013|52116011|38350700011|921017; X-Microsoft-Antispam-Message-Info: =?utf-8?q?L9bV7qAwl3dV5Jujr09TehsGLwPYuBv?= =?utf-8?q?jlOUqK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FyZF7bKvuIG83a0PbIWAfmQ+LAzaHgMmjmiEGhOEslm5jO+xCDOSPFH/TH/X2H?= =?utf-8?q?OnqvN3F0UYuYe/IffAC+sQ1IFkfKLIJbRjlmTRa9l4SphMoryeZ5RISP9s3QSQAY1?= =?utf-8?q?28IImlCo28RXlhzXBvyQCZ0tkQoe0+abvLfi2gGwxKMP6kfiLQIf60qb/54TAHjji?= =?utf-8?q?ua2pWFwazrnE4vKhP7oU/HmppPC7srCqSfEGqy9K6wCc7vi3PfmcS3BW1EyokilNE?= =?utf-8?q?Ia9QbQln1I3NpdpbWenhErGsDWdvkd8O7fMRZ2yxBp0kA00Ka0Cs/DrtwZWMRybz5?= =?utf-8?q?PomfmNAeEO+u/LxTCGozjtH80c+8vLGiBG+zyHkWHCltK8NPEtZ08Bu11WVy+x4aO?= =?utf-8?q?XqEl/kth0uskY8iWupvpqMf76yJha8P/vlfEtmaFusfT2yrYeQoPffftJ7S+8yQHF?= =?utf-8?q?uLVDYkcEx4j4?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230037)(376011)(7416011)(1800799021)(366013)(52116011)(38350700011)(921017);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?zmw+IcumFKGACYocUaQJS/Zm0NH9?= =?utf-8?q?goYQHg+wSM2p9vp3FNfAa61fYIcMGZGjOl0xFf8P+nC0q4p3EU1ArNuUittf7x1+n?= =?utf-8?q?JE8qD0X5J9G4cVQ3dONwiedfIr0zPvEBF09joDVTmKDnrJxbkGGEnmsdwoI+on8HF?= =?utf-8?q?Oh50z31Ai8SCCfMfn9OnSiOOG/eeuq2fKuvqrFCojiS4Onsa8dnx8plnsKiSABj3c?= =?utf-8?q?Z6dVTYRx9vp6kc/Y5sivV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CC/yhGVbKctr6HyOqnoqcT6WczmjDm8uBC2zvpaOvhy20Ha1p6?= =?utf-8?q?YfUx9KMMvVIH+KMgP2b+CnHGBpD0YIGA+XeLkMXpVMS/gZKFxof/7a/RJ59iFKZX7?= =?utf-8?q?jV9QXu+ZPsHrAqQgTiszrZMmOZJ6Sl+ZSiUKVzRouyqa4yaKl2Xa9y7yMKE3IFmu/?= =?utf-8?q?8bFBoH6MqEh2HGA2B0C31V9MNz9J8yS1iW4Ahg1JwGTamMF2tVderZnIclqz8ouJk?= =?utf-8?q?VmgHTyNVkKPn2/nZaaTcRKAugBoE0J8p4WlbGSWieFdoukyH/2IugFr2oPvCyeBHu?= =?utf-8?q?4/24bIGtP7bFA/hORX+PGlK052oD/3mRTj2EwjUMLSuMeKgMHm/AdcR9OBJRz1PgH?= =?utf-8?q?5RySRci1q9Fem+1Ci9/SRzmqd/VK0mAKBvjIjtzPLSlXxmwth25yri5lNTjSPHw7h?= =?utf-8?q?YUQ+JAqwsC5Y?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 37b3b580-7441-4305-980b-08dc8f0a8db7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 20:17:47.0815 (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: ipr5kw5ZRNMFsRDRgfjOvpMBztyVFzKeRVGFs50aiaWTWwfTkV6skjWKNyRtxcubBVIYI6MZiv89lL/eFINBfA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7997 Improve comment about workaround ERR010727 by using official errata document content. Signed-off-by: Frank Li --- drivers/pci/controller/dwc/pci-imx6.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 6f68bee111029..6e3ac3fc33745 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -715,9 +715,25 @@ static int imx7d_pcie_core_reset(struct imx_pcie *imx_pcie, bool assert) return 0; /* - * Workaround for ERR010728, failure of PCI-e PLL VCO to - * oscillate, especially when cold. This turns off "Duty-cycle - * Corrector" and other mysterious undocumented things. + * Workaround for ERR010728 (IMX7DS_2N09P, Rev. 1.1, 4/2023): + * + * PCIe: PLL may fail to lock under corner conditions Initial VCO + * oscillation may fail under corner conditions such as cold + * temperature which will cause the PCIe PLL fail to lock in the + * initialization phase. + * + * The Duty-cycle Corrector calibration must be disabled. + * + * 1. De-assert the G_RST signal by clearing + * SRC_PCIEPHY_RCR[PCIEPHY_G_RST]. + * 2. De-assert DCC_FB_EN by writing data “0x29” to the register + * address 0x306d0014 (PCIE_PHY_CMN_REG4). + * 3. Assert RX_EQS, RX_EQ_SEL by writing data “0x48” to the register + * address 0x306d0090 (PCIE_PHY_CMN_REG24). + * 4. Assert ATT_MODE by writing data “0xbc” to the register + * address 0x306d0098 (PCIE_PHY_CMN_REG26). + * 5. De-assert the CMN_RST signal by clearing register bit + * SRC_PCIEPHY_RCR[PCIEPHY_BTN] */ if (likely(imx_pcie->phy_base)) {