Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp59516lqo; Tue, 7 May 2024 12:05:19 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8GA4TneDk56YdFlIV4OE7WReSZmaYwVavwlO4IRfniEwRHbwmcAYENKICR1GlBsacP5/cs/NVJN+k30uzBGFAH5TdtPVm0raZ5VErCQ== X-Google-Smtp-Source: AGHT+IF7C5c5xVZAv/W+2FNaDQnfsuID4eM4jUgLZ7D1Bi36Ghx+n3Y06RkmzWwLY465+GZWPFI3 X-Received: by 2002:a17:90b:506:b0:2b4:abc7:d642 with SMTP id 98e67ed59e1d1-2b61639b687mr502345a91.6.1715108718998; Tue, 07 May 2024 12:05:18 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id e15-20020a17090a684f00b002af7954075fsi9621350pjm.102.2024.05.07.12.05.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 12:05:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=pj48bWJx; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-172009-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172009-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 3C158B23ACD for ; Tue, 7 May 2024 18:50:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A75D0174EE4; Tue, 7 May 2024 18:47:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="pj48bWJx" Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-vi1eur04on2047.outbound.protection.outlook.com [40.107.8.47]) (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 920B616D9AC; Tue, 7 May 2024 18:47:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.8.47 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107647; cv=fail; b=W8KQJ4Q5+h40ZvpZfZaF68T9PHFNg3mPSoAPQPZsEaylvKsnWJq2p+c1TwcSW8EUX9NHms4+lhPu12kT3b6kpa4x/8LMVKpj7jz2C2gjo4Wi7Yt9QIn9FDhReZ/DUxHpgl/RlqWP0bkY6F7dYqus+P/OlaWW7tS894kkYcnZ7n0= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715107647; c=relaxed/simple; bh=rRm5SujhEiX9hVYVjrxBprduIqi9bHP431kr+qPwfZU=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=FelqPxWTz34Cb6my9812JjQU+SohXLexrNO1/OZaxOlC19gJITP/RefXojUfq+bObGJHy6bLyYd+c/2MztzYB9KPuBphduEbK8Onz2Px1iG3CbAM7iHmswzr9gYux0jXWY6qA69iqDzFSEee6MOx5Arb58LYB8tNrDb69NwfyGk= 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=pj48bWJx; arc=fail smtp.client-ip=40.107.8.47 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 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BVC0slsCU7m6rwCaqyU0zemLyqnpdMNp4/iBP1A0gATqMJ1S/lok8CgSg/V/C78FNhHI8JZmSa8tJ4S3fX6L1mer3lx24/ZrpnWzNr2NTvqRfusiAQQCLt+puocB4OJ/1Xd4eiDXAj2kKYivPI56CtMD5QSwoOJsIMWZ3Bmxt12AbLWIt/Bi5ptzvJXTum0Rxg6xVFXO30zUmj8N+w38Im9WegGGgKT25AO8akFGhnPXMmyx8NHxsflfOZA8FP5zzK7ZGX5vVTILiJ2zm0ybv66Um5TiXCgko87QcMyRJCXoRfDt1rSM682gF1YnJGz5fbSyh2dpleYS+6Fm/WUO1g== 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=3gTTDoBfA/yf91PPA7MqT/q+r+bNwi1FVYdnjZCH/pM=; b=AY2iTw9Rt+1nZPoVfXCpaRXzhL+ij8CHgco5qb7EqRaCAG3mT86wFxS1C2y+yqEwvJaOUvmx17q/8JVp0pmWVxsygSqGsC7TBHMUW77nhXg3lq5ePgFpltsQ2nZKd6dqvBuE27cMGT6c9GdmcH5VDBsLrJWt3nJmiFZN9NoaTR9sgxhD3EDq/dCsiJ+hdWWY1NSg9MOv6O93foeVRqnXtqxJfzxXZywcmTFImsip/D9TU6YXY6BJz+fFFnpFng+BeCOb2htK6Kn1TzH3Y1sWvKdVduDhpaWsIRavXLfFg9NCMLfhBOiRZJIRn0kkeWjkpCJjdSeQbXTR4hegnYDlww== 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=3gTTDoBfA/yf91PPA7MqT/q+r+bNwi1FVYdnjZCH/pM=; b=pj48bWJx3lGiBnoAHuTDveo/2hVXXWvQXRKRg8ZhyodlObgQiMLuQ9dTCJ0NQXPRhPXICQbejmbCAg8o7Q3EWryvI40z7FpRgu0QKlYLJioMsNY/ZSeGeMkGuHu1lcBThziwXGc4iAe+p7WtSRV+958TekhI9LpCN2H9bURyPgM= 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 DU0PR04MB9636.eurprd04.prod.outlook.com (2603:10a6:10:320::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Tue, 7 May 2024 18:47:22 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7544.041; Tue, 7 May 2024 18:47:22 +0000 From: Frank Li Date: Tue, 07 May 2024 14:45:49 -0400 Subject: [PATCH v4 11/12] PCI: imx6: Call: Common PHY API to set mode, speed, and submode Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240507-pci2_upstream-v4-11-e8c80d874057@nxp.com> References: <20240507-pci2_upstream-v4-0-e8c80d874057@nxp.com> In-Reply-To: <20240507-pci2_upstream-v4-0-e8c80d874057@nxp.com> To: Richard Zhu , Lucas Stach , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=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=1715107574; l=2344; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=rRm5SujhEiX9hVYVjrxBprduIqi9bHP431kr+qPwfZU=; b=WnHtWsp2PCQ89Q1ObmF3XJCsbhZXA9pISVqfFPDcdZvNNlXxL+QnVzS9Awh0VaZGnDJc4pQFV LpJsjSeWcV8AYCsOyL7PfeeZ2dJyupXyMN5LEntzJxC+NB0RcLE+lhY X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR17CA0026.namprd17.prod.outlook.com (2603:10b6:a03:1b8::39) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU0PR04MB9636:EE_ X-MS-Office365-Filtering-Correlation-Id: 577e8acb-a1d5-4427-4e5e-08dc6ec62161 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|376005|7416005|52116005|366007|921011|38350700005; X-Microsoft-Antispam-Message-Info: =?utf-8?B?Z3BGYkdRMFE4QnUyS2RHN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EakdpZ21L?= =?utf-8?Q?+vCZ4EclE0+r+0aNCD7nMV6kpUmSh4B9pDLSk=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:(13230031)(1800799015)(376005)(7416005)(52116005)(366007)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Uit2UVRWYjdIZ1VwSVhJaE1tUlJtdFI3bVN0TWEvMnJXUmlBeXZONXNYaUxU?= =?utf-8?B?V1MyQ1RodFBPMWczWWpxZCtJTWVCMWlUSzR4OEFGVFdMN0JiZjYrY0EwZytt?= =?utf-8?B?Y2FwM0dDLzNjNFZ4bUVidUNnaUtUdkZXYlBUU2huZnhxenhnaXQ1Y2RYaHhH?= =?utf-8?B?dEFCMFBhcnRNOEVaZWN4SUJsNkc4TUN1WTNSUnc2L29FSzY3TjhjTWltK2gx?= =?utf-8?B?SmcreWcvVWdiVjRCMXkzVVVnS2YvNWYxMGJXK1hGbFpwb0JSeWxyS1k1Zk9S?= =?utf-8?B?aWk0OWZwY2c1MUN0U1BGM0c3SEV1TnVsMDlMN3gvL2NhakU2RE9QUWpaSmxZ?= =?utf-8?B?UEE2ZVFrSDlJRWZWWGxUSzJrOWhlSVZVMlBObkI4M3JGb3k0MkU2ajk5ZThW?= =?utf-8?B?aE4wdk53RFZJQmRmcGxFOXZrS1JDa1N1amp0Wjh4Ym5OOE5QclplWnRONGFq?= =?utf-8?B?N1FNM3MxUS9tUEFvZU5ScVpFajNLY3o2SzNIaTBKYUVDMUI5NURqRUJPKzdl?= =?utf-8?B?bExsN3dPR3J1MDQzeHlkeldBeUwyVS9SRE5NSm1oMUhqUnVIeUxvanVFS3NX?= =?utf-8?B?ejFJczRGWlQ0a3VyelhrVDJPWFhRUnlWV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FwQjduYVJRNXg5MnhEV0VkeElac3BWTW9jeGtvYU10bkZwWUdGT3ZrL3V4?= =?utf-8?B?b2o1czRMTXZTUndOeEx4U2hUdUFBeU02Z05XVEJZeGI1YXYycmRDSXpwRncw?= =?utf-8?B?SWdzMGJMcUlqL05kT1lxdzk0RENaSmJuWk1QeEpUb3Fwdi9HaUxYcTFJS2Qv?= =?utf-8?B?Y21tYmhQdS9qTDJNNVVXMWhlTlJmdkNZUGdsQjNtb0RVbE84MWV1OUFWbUg5?= =?utf-8?B?VkxtVHNQMm9XVWNZMFNNL3hPUldpNFVvVzNpejhPMHhFM1R6dVBCUndpRStZ?= =?utf-8?B?Uk5RWVVsZjB3c1E0cElGMzh3STV1TjFpTk5SaHhKeGl1S0YxZWl0enZBUklx?= =?utf-8?B?cHQ4bFZHTkJYb2NHVGJUTDNCZFF1SEJUTHZuVWdJSHFWc0VCY1MrUkVpV3ZT?= =?utf-8?B?M1RybVA0WjNEWUtDaVlCV0hEcmFUKytXck9Eak5CTGZyM21VR0pWemRyMEI4?= =?utf-8?B?ZTVVMTVoMXhMY08ramlVNmFRYzBYTXdFQWx2TzN0ZnhXeUtHaGpQUlhRUjA4?= =?utf-8?B?U0YvZjFFdCtvdTdCSGNlZGR1M0YwdEFCQWNKQk5vWU85dmFNV05WOUhWWXN1?= =?utf-8?Q?t6AQfuVyj9HMWxwjwCZzJ9Xj5?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 577e8acb-a1d5-4427-4e5e-08dc6ec62161 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 18:47:22.3242 (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: nvrNUWcSTYaHBRMGb/2tH2Oe3m8IcLfb1K1D352gy2T62g3yZIPHSLBCLJfG77LzK/rhBQvymM9HjEJa/MGoyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR04MB9636 Invoke the common PHY API to configure mode, speed, and submode. While these functions are optional in the PHY interface, they are necessary for certain PHY drivers. Lack of support for these functions in a PHY driver does not cause harm. Signed-off-by: Frank Li --- drivers/pci/controller/dwc/pci-imx6.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 9d53b545540c6..df623977d8fe6 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -308,6 +309,10 @@ static void imx_pcie_configure_type(struct imx_pcie *imx_pcie) id = imx_pcie->controller_id; + /* If mode_mask[0] is 0, means use phy driver to set mode */ + if (!drvdata->mode_mask[0]) + return; + /* If mode_mask[id] is zero, means each controller have its individual gpr */ if (!drvdata->mode_mask[id]) id = 0; @@ -887,6 +892,7 @@ static void imx_pcie_ltssm_enable(struct device *dev) struct imx_pcie *imx_pcie = dev_get_drvdata(dev); const struct imx_pcie_drvdata *drvdata = imx_pcie->drvdata; + phy_set_speed(imx_pcie->phy, PCI_EXP_LNKCAP_SLS_2_5GB); if (drvdata->ltssm_mask) regmap_update_bits(imx_pcie->iomuxc_gpr, drvdata->ltssm_off, drvdata->ltssm_mask, drvdata->ltssm_mask); @@ -899,6 +905,7 @@ static void imx_pcie_ltssm_disable(struct device *dev) struct imx_pcie *imx_pcie = dev_get_drvdata(dev); const struct imx_pcie_drvdata *drvdata = imx_pcie->drvdata; + phy_set_speed(imx_pcie->phy, 0); if (drvdata->ltssm_mask) regmap_update_bits(imx_pcie->iomuxc_gpr, drvdata->ltssm_off, drvdata->ltssm_mask, 0); @@ -1034,6 +1041,12 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp) goto err_clk_disable; } + ret = phy_set_mode_ext(imx_pcie->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); + if (ret) { + dev_err(dev, "unable to set pcie PHY mode\n"); + goto err_phy_off; + } + ret = phy_power_on(imx_pcie->phy); if (ret) { dev_err(dev, "waiting for PHY ready timeout!\n"); -- 2.34.1