Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp592015lqm; Wed, 1 May 2024 09:37:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXUh7v/qiU6p7KGLdBtyyEheJe3u+ZiwXU/4NFgnPYTvV0pScbqOJcCrA+bPrEh+7b7y9awCUeGcao/Ek3o09B3eFKN5bg6xVPXUyg+4w== X-Google-Smtp-Source: AGHT+IGJCsLZAoEfWKWFj4etqPMNP8JIkRx8gj7B09QRUBLwpN9XdtVP5NwXGpupVWGPwocFw3yX X-Received: by 2002:a05:6830:2b29:b0:6eb:7b64:e5c1 with SMTP id l41-20020a0568302b2900b006eb7b64e5c1mr4752916otv.18.1714581442552; Wed, 01 May 2024 09:37:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714581442; cv=pass; d=google.com; s=arc-20160816; b=JrZEqYRXOTiC0pDQXo4qJxrhkXIJKpFpBH66Nh/OPvKrLXQ65pN5UbHG+fp7lhk3BG 3ps5KkBJTYjScrTjcMG/wvyNH5sPT27lWayIgphW9Fqs/GthnNnhkrhtnNDLr8L6ECJI L+SiTdSXBhquOSvY3NKefzjjfkk/YLWlp5dUcOhBqxOwN1sFWixxkqiAe6q4kAaKTpKM I346xo/PKIVfL+X64g+R47xCjglpIdTbmUMYa1m1wgCtyghwfc4ZPPqb1MEycbUmTx6V ftKX54DXs1XzH3CZ3+Z5jnm1aum+KtCtyS2UKzLwsryM4oibOaikluRf4K/8x+c29Z7m h33A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=fSZ/lf27TPgmVrDdD6hg18qXkqJ+CXRl0/aTgcJH90I=; fh=xbeaDNCl8YcKJbI6/XE2roPgiXZcpBDSCfId3pC4uYI=; b=fmM11GXUzt2zaiN3AUnPh7ukDt35xOlZBy8ut4Q95AzB4zVjLid5vSyMLWlYtGqrxo cEadZY5evGyb+V5QkDXcBYa3cPa4NhlzKrFMJanUwz/0d/PTzkLe5Il5QdL8Cn4HXTNF Sg38m26bEbjWJ+sQ1TMCLCSgwEyfcfvaYM1RyrOQVUHZPuUCbAM68vYci10fYCMrab4I D40Lj91iR/V7LFPzBGBMKvk6Q1uJQzDWob/9+yGfA8Evj96Y6vp9BmdgKRezzx89bcYG nULkweTZtp4Z6+EIPX7NOLfZSk+PIPQzM8v0Xp5yje3a9v3NT/S30hX3NKGy1TW3tUwA /XYQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="EiYItbn/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-165590-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id w21-20020a05620a0e9500b00792609b9f91si3296040qkm.621.2024.05.01.09.37.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 09:37:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165590-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="EiYItbn/"; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-165590-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165590-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 9E9091C22E64 for ; Wed, 1 May 2024 16:37:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2B0CD10788; Wed, 1 May 2024 16:36:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="EiYItbn/" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 ECDCCCA40; Wed, 1 May 2024 16:36:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714581414; cv=none; b=ZUDL6QZz5kZZxZwkwRB/0r4evuCx5/RwzsCsS84XFLUnItRXmUDBeoWqz9NZk534VAqCDA8VZhmMRSCJ4TgjiIxLfq5b5JrhCkh1olGsNN1gAvas3Ee5nJH+raG7Z9mAT1iu06lXc7MHIhjd5t03HaRBfxUr920A5BsE7rjHeyQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714581414; c=relaxed/simple; bh=IgMIlSYfvDVdAJDE7T4Vv5E2W0W6APz7aES5P89wtVI=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=gzwDl5JnIslOkgcz4x0Pl4p4BTJvkSAgpDP5kUnl8D0qOHumFJK18yxGNTJGtCSe7BrQAWjbtDWt5xtPsdxUonW5zOd+sF+WHpxeM5hFRW32p/1BTutHvbxh4UnqzM6Yd9EigiKLxgFIlyGg9w21Ako+MkHnDO7evsJomlNo/t8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=EiYItbn/; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 441EP51N009005; Wed, 1 May 2024 16:36:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:content-type; s=qcppdkim1; bh=fSZ/lf2 7TPgmVrDdD6hg18qXkqJ+CXRl0/aTgcJH90I=; b=EiYItbn/axFx6wgtQJkaaTB Tcd/Awv4FNjrYPynH//U2RSDgNnuAJRL+FLqIzGqkRZ8ysy9iZ45LPL/SSKtyKW7 qB732mePnH7jI19HJy+x5bfOVlhUvOpObb8UfTYhXm4znk43w1bqKCjuPTdOnZmu wkuOWfYLjnPgL1GZOlwqhJQ9sG3g8Ji5vJDkoJBXUmvP6B/ppGJp6O/dOCFH/0mi lRQsL9QH0x/04j9Qa7WkUx/5apdD+HFyPEmdOmuvacN3Ag1FhO+RZYpbaoBBPN9J YvTv9Rga2UXOawzwXQIbmdM2pa0T+Jn4bvA0+l83NFBYVD/1oMfTcMfevmVaoKA= = Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3xu71j9yea-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 01 May 2024 16:36:25 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 441GaO5j002665 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 1 May 2024 16:36:24 GMT Received: from adas-linux5.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Wed, 1 May 2024 09:36:23 -0700 From: Shashank Babu Chinta Venkata To: , , , , , , CC: , , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Yoshihiro Shimoda , Serge Semin , Conor Dooley , , , Subject: [PATCH v4 0/3] pci: qcom: Add 16GT/s equalization and margining settings Date: Wed, 1 May 2024 09:35:31 -0700 Message-ID: <20240501163610.8900-1-quic_schintav@quicinc.com> X-Mailer: git-send-email 2.43.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: zZsiEpQCBcyX6PTLPBdAsAnp2nNUFhg_ X-Proofpoint-ORIG-GUID: zZsiEpQCBcyX6PTLPBdAsAnp2nNUFhg_ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1011,Hydra:6.0.650,FMLib:17.11.176.26 definitions=2024-05-01_16,2024-04-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=733 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 clxscore=1015 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2404010003 definitions=main-2405010117 Add 16GT/s specific equalization and rx lane margining settings. These settings are inline with respective PHY settings for 16GT/s operation. In addition, current QCOM EP and RC drivers do not share common codebase which would result in code duplication. Hence, adding common files for code reusability among RC and EP drivers. v3 -> v4: - Addressed review comments from Mani and Konrad. - Preceded subject line with pci: qcom: tags v2 -> v3: - Replaced FIELD_GET/FIELD_PREP macros for bit operations. - Renamed cmn to common. - Avoided unnecessary argument validations. - Addressed review comments from Konrad and Mani. v1 -> v2: - Capitilized commit message to be inline with history - Dropped stubs from header file. - Moved Designware specific register offsets and masks to pcie-designware.h header file. - Applied settings based on bus data rate rather than link generation. - Addressed review comments from Bjorn and Frank. Shashank Babu Chinta Venkata (3): PCI: qcom: Refactor common code PCI: qcom: Add equalization settings for 16 GT/s PCI: qcom: Add RX margining settings for 16 GT/s drivers/pci/controller/dwc/Kconfig | 5 + drivers/pci/controller/dwc/Makefile | 1 + drivers/pci/controller/dwc/pcie-designware.h | 30 ++++ drivers/pci/controller/dwc/pcie-qcom-common.c | 144 ++++++++++++++++++ drivers/pci/controller/dwc/pcie-qcom-common.h | 14 ++ drivers/pci/controller/dwc/pcie-qcom-ep.c | 44 ++---- drivers/pci/controller/dwc/pcie-qcom.c | 74 ++------- 7 files changed, 218 insertions(+), 94 deletions(-) create mode 100644 drivers/pci/controller/dwc/pcie-qcom-common.c create mode 100644 drivers/pci/controller/dwc/pcie-qcom-common.h -- 2.43.2