Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1344861lqt; Wed, 20 Mar 2024 00:18:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW6IDAve946XTZwV2Pi78+CGVvhzFxXBAYkQRgcnlTMWJNQSQR/t73JH6NxWBappLWOIY1pRqanYLLXtaTfe0fyOAKLdw0SOiI+lYdGXQ== X-Google-Smtp-Source: AGHT+IGy50HVVxh/go9wUqQcOA5BzPJ2Xof6FHSgvBxcP9LgEpgy2d6t2B159+LNM3/11iRZH2cs X-Received: by 2002:a05:620a:3711:b0:788:3fac:b27a with SMTP id de17-20020a05620a371100b007883facb27amr2944824qkb.39.1710919126373; Wed, 20 Mar 2024 00:18:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710919126; cv=pass; d=google.com; s=arc-20160816; b=w0Tyi8hsukuKybofW+eDKF2EhK5Dqt8xc8q7EL3hVza0lDii8/QrpqGiT9evLmaxq3 MqHgi2r5jSrolZkijVcfuG7iZyFD2WZFP0F/rhZqNDU5Dt1jxNTJuZDSNMtuCd3BLv+t ixbK8+vFv6pmPkrCGVlEAtK15/FQPCH+uX/Yc45tO5bBrF5CUdh4jaUZKSS4a4mMAoiy zHKU9pE818uzRM9ikP/wV4p38USm03fvOtEDvTDNdQeKgw4z5Yq9O/jKdNEUspRIxzzC RQT3I6ElUPvX+bmjju5ud3963Yi7leKWvkMkCZdC2k0kY+XZ7eLBrB1c2/vXvguSrweW 7Gag== 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=dY/GvrmQwRrpRQxywaFZUf2snZsP3/BS7HqmpdE/MfI=; fh=lb9n79GBY/mpBRKGx68oOiLPq/JxuwhSMhUsPSpU9j0=; b=QoCz0i8h93u4s3SDHTq8JQv8K97/hjIpSTEtEEvRitm1cig1VUs/+/yePlLHeo2vA6 /JUao24WTDOV0PD3R0kpdErPe+sGSkUaaJyH7OiFRW63hOITH1qOmwX9qcVhAEpb2pTc REeVIVvinGvCoNgoSbMS2Jk5j8/lsd0oV2mOrnGW9ntnmE1AIGflMb8VNBrgZun8LZKb L61U9nJz9Gb5Fbd5PD5MCginxvNUE8svsyIHyqV7KiFXu1pPMZqYBCD79m/lVgxqDmry i0HfUu9iWSnA1zA+l/cU8mmcOB2jUC2b1NTgw+6XxTq+YhDLqsFMpTDbeQ+EBhSHE3E+ neUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jeghJ6gY; 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-108532-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108532-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 i17-20020ae9ee11000000b00788205afcfesi12655506qkg.661.2024.03.20.00.18.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Mar 2024 00:18:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-108532-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=jeghJ6gY; 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-108532-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-108532-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 1CA7F1C2258E for ; Wed, 20 Mar 2024 07:18:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8877D22064; Wed, 20 Mar 2024 07:18:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="jeghJ6gY" 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 3A2D31DA52; Wed, 20 Mar 2024 07:18:35 +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=1710919117; cv=none; b=hshGso8b2P6R9NZKTLNi7/0UtvuMOk5wKvLUrOtWXwdiDMed8CcwRGNKHci4ZQGKgcsePx2IwWQal6u6FoQEJC5ILYxfKCUSVNFg+5rQOrZdFlDwxTYk3mQfJUQ2VXhLRqermMcUbruXpUeeelYEeHx2be4h6jTgXCR69mq3GJg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710919117; c=relaxed/simple; bh=jqc8a9d42oydseBd3MnOQ/UjUHTr0g9bjfXF7lZPXpw=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Taz/75PaCVO7In3RS29FpOe+IBBXA7D7nrOT9vzbBhGmWHTm1Wnbp1fHDiU4Na68WgBzCC7WBjGTwzN/O1qigioxqNp7E+FOfoLpewFOxiOkYPJbCOm94eBwxhg06aFPAar4fd6mXLoPrl9OBUFqvE/O1rJjRVB+H06ier2bZ1g= 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=jeghJ6gY; 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 (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 42K5FgvE022444; Wed, 20 Mar 2024 07:15:45 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=dY/Gvrm QwRrpRQxywaFZUf2snZsP3/BS7HqmpdE/MfI=; b=jeghJ6gYE9kWO/pvVxU4ZQw SFxSCzVUSdWkKLUjrqIByzEd2goN/FUjSYBBE6lM9VVtlEmQ7hwofv/MKnqOmUi1 hrNxKCNRC3jNJvt1WbidfSkE3SsZdWS2u/q9elxzW1/43umLvCWoYvHxwbwHGTUT H3xwphS9LHhmzbRIkAxFC9KND3Z4gB9vT+gZ9O9GHrJRDbOiVuJTwgKeQKGTBBbc ssG044LoqcsrgtWr5r2UmstqfH5TkZY58zT4Vp+vH/XYYTSgtzXWgyg75oucCVQX LUqj3VjS0OLo9mFSHMFtI7Q5aQy9pudI7Yx9a/nCLWdKW4PyMq9gh6OVuCIsb8g= = Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wyfqbhbfe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2024 07:15:45 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 42K7FiKN011803 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Mar 2024 07:15:44 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.1118.40; Wed, 20 Mar 2024 00:15:43 -0700 From: Shashank Babu Chinta Venkata To: , , , CC: , , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Serge Semin , Yoshihiro Shimoda , Conor Dooley , , , Subject: [PATCH v2 0/3] Add Gen4 equalization and margining settings Date: Wed, 20 Mar 2024 00:14:44 -0700 Message-ID: <20240320071527.13443-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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-ORIG-GUID: cChc3fyZuxQVLduKB9Q4Z_0GMi4-BD5o X-Proofpoint-GUID: cChc3fyZuxQVLduKB9Q4Z_0GMi4-BD5o X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-20_04,2024-03-18_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 adultscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=746 clxscore=1011 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2403140001 definitions=main-2403200057 Add Gen4 specific equalization and rx margining settings. These settings are inline with respective PHY settings for Gen4 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. 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 gen4 PCI: qcom: Add rx margining settings for gen4 drivers/pci/controller/dwc/Kconfig | 5 + drivers/pci/controller/dwc/Makefile | 1 + drivers/pci/controller/dwc/pcie-designware.h | 38 +++++ drivers/pci/controller/dwc/pcie-qcom-cmn.c | 152 +++++++++++++++++++ drivers/pci/controller/dwc/pcie-qcom-cmn.h | 28 ++++ drivers/pci/controller/dwc/pcie-qcom-ep.c | 44 ++---- drivers/pci/controller/dwc/pcie-qcom.c | 72 ++------- 7 files changed, 246 insertions(+), 94 deletions(-) create mode 100644 drivers/pci/controller/dwc/pcie-qcom-cmn.c create mode 100644 drivers/pci/controller/dwc/pcie-qcom-cmn.h -- 2.43.2