From patchwork Mon Jul 8 17:08:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13726899 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012055.outbound.protection.outlook.com [52.101.66.55]) (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 C394D14EC60; Mon, 8 Jul 2024 17:08:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.55 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720458541; cv=fail; b=J8+kdb8HgZZrkFiD7KK5BVAEtYptj6RBY/kBvIpMuK4tcG7R5OnFmzP/o8XxMgbi4zY64zpjybOKKWeeKVpoI3sh/e7cBE+bNW2urWIkSX4EvB5JwKMOhVmF9UDM0B0akT5gUKgAjpt6CXg4ygQIQsS0Imzuxfty9GJEQ8XH9jY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720458541; c=relaxed/simple; bh=HYIAvJfigWxKO1L6Jz/0Zv4JYey1PVy/pjpLATwS5So=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=aL4U+XAn+qywrcDG2YTWVr6VA+M5C/UJMpIfCO+q8CtERZGKA7rPfxpCAqlwm+A3P1bPChs8MZbQ960LVKS5Ns0rd9oay6E8W99KQCtZl120YucNhTm809aU4cAcfnV8+lFhRH84NFKJS08TkoYi72CEXgDrOt7pRXZRm2ajyGs= 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=XzdfQSpI; arc=fail smtp.client-ip=52.101.66.55 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="XzdfQSpI" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LsniRIGsMcxs+kbx1tDEGCDoMQzY+efFZzDujfozsVDEFjvkL/TdmLzdqG/ePtYwBOl9WOQZ6uQMRy8Bn/bCYcVDNdhKi0d9mizGvQRoK6n3XhtNMiXNamrqXM4qR/NLkyEaMXhnSOKQzqepXmY2DzV5yzFM/fFrkqcXWpQ0ly+a2ynCNOOSPg0II0tA88WnoakKxytNNzGn7itQnwen/xeFUSh8wz5Xc2NZRv32LQzohXEwLK9lKSNZkd+iclmNoRUJHhl2oBM0NDiW9Cbw/G22BGAZLd1YHDUIGvaxPzQiAMkv6/AII2jG2g1/tetVMhyU5/a4IHRDWOYaygXdAQ== 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=sKBaLEu48LO14iN2nWWWFdsRQ8bFoavwOXruitucuM8=; b=ZEA5fKyrkcEKUyivJEVDQfOPi+o0eok7VUNndvcKVKZbY5wSUDrHGRSk5m7Dqf7bc6efr5c1bIVkQxcHIQaxvijn/FdeSFpFYnMZ5U4koUoSGTsXGVkZdHwHURLBI8H1WzbBaDOyr0Sgae4UZ4OiO9ka9paZ0y3ZoLOTec7ihh8s8adnkwQXbxhPMpLsbZQTfmqN/gX32x41+cjqClZm+wGqJ17UzW3gsvG2znc05n8GFXGxqAyR8He4Abw+dZcy3ZrWgb5yLToREfE2XPHFwU3lzhqGtjMG0fmLpTmDhD14LzQXBkeIpRyZRb9IiOsJb2fFVaZWAryijnKJcEfIHA== 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=sKBaLEu48LO14iN2nWWWFdsRQ8bFoavwOXruitucuM8=; b=XzdfQSpIzLChIyVoCCKHvfA34fbPcdsusOZKmGMce8Dn4x0TQ52+XSoWKe+GoiQrq9X5nrPYxH4QzvfrOegC0RMTex1iFmNBrBccBhs2Wveb8LpRiuscNf4BtGg9Bmm7UN3Xp4UxXzqV1m+8P+hqKePNoMjB74OwnIF+L23KH2A= 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 DBBPR04MB7867.eurprd04.prod.outlook.com (2603:10a6:10:1e5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7741.35; Mon, 8 Jul 2024 17:08:57 +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.7741.033; Mon, 8 Jul 2024 17:08:57 +0000 From: Frank Li Date: Mon, 08 Jul 2024 13:08:10 -0400 Subject: [PATCH v7 06/10] PCI: imx6: Improve comment for workaround ERR010728 Message-Id: <20240708-pci2_upstream-v7-6-ac00b8174f89@nxp.com> References: <20240708-pci2_upstream-v7-0-ac00b8174f89@nxp.com> In-Reply-To: <20240708-pci2_upstream-v7-0-ac00b8174f89@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=1720458497; l=1845; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=HYIAvJfigWxKO1L6Jz/0Zv4JYey1PVy/pjpLATwS5So=; b=zB561uGqJm9nhTZui6MMM1U68PXwoHQH8BtR2EZBHf3Rpp0ST6FWxRN8C+vTIapey65ukx+sv +lZ8aYZ8JQ3BE9WmsC8srI8gRS5oQ8BINS8GldYQ1YI+RbVPjchD9g9 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0198.namprd13.prod.outlook.com (2603:10b6:a03:2c3::23) 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_|DBBPR04MB7867:EE_ X-MS-Office365-Filtering-Correlation-Id: 0523e833-4fe4-420b-7ee0-08dc9f70a72c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|52116014|7416014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?Pz047fmUOpDjYbqTTJ3O8pFaVT3tCA9?= =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8?q?bQ+MHuA+q25qghtVA+heYwtpDBuruZCKHn+NRw2PZHZqb5gMamqtfpq+hEHmATpTC?= =?utf-8?q?cvcpIG4/SOa1gDz59LxTBNnqiKye7lb9gYOGKec7e1XUYQweuWRjIjXR/2t86/m4v?= =?utf-8?q?5RY2t/2Fk6c0HfSPGliAFY2fmzrvAVoqkA/JNNvEAhe4nCWEc+yST8rDp4mZ03ZcO?= =?utf-8?q?z6fcrDy0M8xaAxc37ZvrKqDBtNxKE94qkVI6/Na/gV1O+i8jlBMhpDRfxLujm+tTP?= =?utf-8?q?icZhKAKZdv0UWmhEvzqPCGFPXV6CflRjhlHkUOCDLfItRPB8MfJ+H7vzXMHrSu2hb?= =?utf-8?q?RT1yLOgA97NBOV0hHGtMlmYR24cm9mK+kEZ6Ko0p9a6qBQg6L+M/xfx4yQhG2auCt?= =?utf-8?q?hLeN5mkZ003eIIlG4IA+l6tHYOVxAkg43gacarubEaiFvcYQFW1GUvYM=3D?= 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:(13230040)(366016)(376014)(52116014)(7416014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?+FQ30/mSxNHeGj+UDvvF/tQ5GfDa?= =?utf-8?q?QBtYwLPfDF+6XWB+5lrHHSiLlg92yoExIOTFaw0EwEkY9Ia6PssBENuC+47Y2jEKM?= =?utf-8?q?t5ndAt95/3AFLEV7XcLyFK9mQhPIbRPW3L4HHDE5UC8JnaJZaliy6kLOk5J6kDubd?= =?utf-8?q?LDtP04gSacwDP8j86gbB/+YpOONzHevCyO956i9l27EqwIlS2UWVCp6HvCUfse5yA?= =?utf-8?q?zOZRLYRO0GPrvctgKFD6KnX0P1jGC+OOpUexzyqBF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idnicLtKCCCTpgc3Ix6xjvoeNmICN3U4/opy?= =?utf-8?q?BZdKEqGZIlANKt0bfEjqimqnGUsh8ijSCj2K3VZm8HAfVoCXoupQK2hLwKonuK2Iu?= =?utf-8?q?iTo5omXaJPAqhGD/3rx8m7O6Q3nR8irPfxhXzqI6CfakPrQDlVb+aYxouPc9aadvi?= =?utf-8?q?SmI1cOUdkCBInWq/9yJXmpvQdqUpeohtmgC5rX3frWf16LjfxsCwsrTSMK2lGSzh2?= =?utf-8?q?XWmul6wtgKRnV6gqvSR11WVADbu+Nju+vJbGrUGItf7Q3Yn+ci8YiR/5KNU7/Z/tq?= =?utf-8?q?7l1WPex19rfo+qw867kUYeq/MuufjcRfnGPTuLPQTBbbQHJNyobDN6VSQ0eenRybO?= =?utf-8?q?voX1Q3A38iuvkHonkKoOWLpYm6AEMpx9WXWVQi9cciwdXwkTbfKBdmJo=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0523e833-4fe4-420b-7ee0-08dc9f70a72c X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Jul 2024 17:08:57.0643 (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: th4zguyJI8cE/hKvw1Y2X2JX+ipMsljqKK6y4tmObOIcdEMTs3zEavs/u2XIaOcDPzSlA8LU6T4UqWbumb7GZw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7867 Improve comment about workaround ERR010728 by using official errata document content(https://www.nxp.com/webapp/Download?colCode=IMX7DS_2N09P). Signed-off-by: Frank Li Reviewed-by: Manivannan Sadhasivam --- drivers/pci/controller/dwc/pci-imx6.c | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 2c60858b74a09..2b95c41f8907e 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -714,9 +714,26 @@ 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)) {