Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp786902lqm; Wed, 1 May 2024 16:17:02 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU+UEfuHJa7LBZXTDfN6+yuUOsOW319k+JtNDxnwP/ha2h9Hbz9c39wo9rgQWFXQBqrJXxAhsq94icli+hX3g0EilP/Pan08LlXbbK1/w== X-Google-Smtp-Source: AGHT+IGrsQTLBfHgxKMkzoLmqOpa0Bhethj2MCD50QiInmmVcmusOn1+JaF5lFpiI2vrZ/yJNhxU X-Received: by 2002:a05:6a00:2ea0:b0:6ea:f05d:d2e9 with SMTP id fd32-20020a056a002ea000b006eaf05dd2e9mr542374pfb.15.1714605420551; Wed, 01 May 2024 16:17:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714605420; cv=pass; d=google.com; s=arc-20160816; b=acTxS5OBAwJ+M/QkMjkjtMw4rrjQW3hey6i/f53dhaFhatDoEJZqurbX5xHp///pCy +WR4BxL7Re1uRgIBqy4lJMmhu/1XciS8Gvv5PuZ+6GDcZP7D2b+w5MMGY+UAx+rbihqy +FPo3KUCcGkDPlxVAmQ5YTsHKyZSy5Z7FlB3tl+PrWclm1o7ENi25vXGeVBV6l7wxyTt A+QR4rhjcmh7PeagB2ssNKiBNDDHaAd0ot92tOUmfdeESJ7mg5OlQLB2EVew+Q+HGVny PmIPotHPWlRss9lOCJIDv6mkBKilP+NDV8TIRrXCXwLdDRJRyII9SKooXU45c3NMpEkx s40w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=Jp5j7VAsVFbBco8tSe/QBTxiO2L2qNjnlYyph8TEINU=; fh=cd66+AIOEV54TrG82IkcxujzOfLfza2eo3T/odSY49o=; b=Zropx067wNg4iJwB5Ezj5/0vYgkKZHtGnlbNiFp6jPn/vhBSHWcrkKXEDXM6UPKAjC 4g1bBqW6dtOI/LFSK9kCMlDzW9hVKVOC6ImM7Q7B2ZOGv02CsRsVGtxBPumWu8si63Xw AufOZ+YIoMhitehG21hqyw5vUMOLUhRgsTlz41WPGVLNhCJtHUXAZV8LrupPN4Vmkd7d mRJJoE9EYRDc9ECZpsH1J4uUKcgtY1dx1Uf21uxV9qUt6vmnCvelLEuJMrs4Lm74j9l8 7eX9HoYioOTgfHNFgUgKBAEatfeS+QQuSc1Zeiz+EaXDjG1bFgg+/4JdXCnZ0zRKd5PB dUXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cEwmYYd2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-165826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b5-20020aa78105000000b006ed4a972427si24699638pfi.246.2024.05.01.16.17.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 May 2024 16:17:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-165826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cEwmYYd2; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-165826-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-165826-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 425322837E7 for ; Wed, 1 May 2024 23:14:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BBC74168AF6; Wed, 1 May 2024 23:13:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="cEwmYYd2" Received: from mail-ej1-f52.google.com (mail-ej1-f52.google.com [209.85.218.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 550C4165FCF for ; Wed, 1 May 2024 23:13:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714605232; cv=none; b=ICKJ+rpJsRbZFGf297ZAPuUS+tpwV75yI5hykUsDvX4XhWCdWhN4BEPRjff3QZUdSzDx2ELImurZrIGS6v2xkG7MnWrNaqR6nbIXM+q40PcSRu66c0JCwF2ObbRyibv7G4pp3q6s6kzctbmRSi28+wRVI2FGkEvem//e9cWhO9w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714605232; c=relaxed/simple; bh=Jp5j7VAsVFbBco8tSe/QBTxiO2L2qNjnlYyph8TEINU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=eVZuS66agtJm3utClr+rMDSN1dmDZJQ6QPeo1hqn9uGbkztOqX7A+jd0PzoRdwgtrGRPezJozuSsSx067z6Ki2sVkyqU56K6UDvsQctyzW+98wTeNiU3e9QO8u7GgAGieLHgVc5r3TV7VMKSwiHWxeKHKgaVB4NAEfwXgSfNL6o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=cEwmYYd2; arc=none smtp.client-ip=209.85.218.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a5200202c1bso939272766b.0 for ; Wed, 01 May 2024 16:13:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714605230; x=1715210030; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=Jp5j7VAsVFbBco8tSe/QBTxiO2L2qNjnlYyph8TEINU=; b=cEwmYYd2eGJgJo8DYjDWvcCGv68Hzs4IBBDJLGfc5AePnC/yv22daJGjG9GHwE3udW yoURiL9o8leCa6nAv0ha07JBpthMs1aDWuh3livgDgxLxwGVbHBwHBlXrFqusx97fa5x 7AxLoQWnTGGMgvc7UaLaUOX65p4AMIGRAYUw5H3nZZTSxZL0OuTgc+5fOob/caZRUxun srw5Vr1e4ezGkzS5oU1fNaDxXvxc7Iwz/R8ejkUyKPc05zbo476UbPbf0Ch3RNj+ls9a oZlrMKCUNq/qd4D3eBo4AhvOv/Ui2WRqWegVVMNx5iccjji7CVHGUn0zri6IuPEllqsY ALkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714605230; x=1715210030; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Jp5j7VAsVFbBco8tSe/QBTxiO2L2qNjnlYyph8TEINU=; b=bUuCEMSOaHzuMdDnQ1/mKrnCzfsgKCtvRMngrMa7Z4zvlfNb9GQQyEBfvNYJCMLM+W UL8+SHb1nYYdkWlTObBt1B3VGaP2iLtdPpyD8f6yuJW2RfKIsPHDiyXF6lYbGOA2GXUZ CUddp9OBi2D2s0q+9rYE+PtYkkpzvwQHIkyhc+yh2GcdjDBXi31KXUL63STFrC5hvcyO 3zXUud2l8huRqvsTOFEPRTKDAz9lgYVEjhpLIhOq7K3/hVV+7HQMX1mgRMP9GKDzjD/W 59irt/3FTTk2wV8HPbtKdsnFY0wq5AKhHGxz9dAHFyR42B1xfxeR4WcNZAqMN2Z5XBK+ yRCQ== X-Forwarded-Encrypted: i=1; AJvYcCXBlXuWhVoksMkMWJ1x7862fioPGSjigolB2YGgUdLX+BA5Nr4OriMPw7WZJP0GC9QlQlVZVkoZqrfkC2RBzGo0BBT6d+Ira48iy32y X-Gm-Message-State: AOJu0YxHNz+tH5awEXginmokGJ2E5t83IwNF4unCVRAZm2JKbZG6s6P0 OuHRWgNLSv84TPXkl3O+Tg4tuRa/RzxTdFAeuY+r6kvlHM5NMhzer2YOJrJEwPI= X-Received: by 2002:a17:906:e08:b0:a55:5ff4:ff4f with SMTP id l8-20020a1709060e0800b00a555ff4ff4fmr238868eji.71.1714605229754; Wed, 01 May 2024 16:13:49 -0700 (PDT) Received: from [192.168.114.15] (078088045141.garwolin.vectranet.pl. [78.88.45.141]) by smtp.gmail.com with ESMTPSA id u14-20020a170906b10e00b00a5534758ef7sm17073698ejy.148.2024.05.01.16.13.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 May 2024 16:13:48 -0700 (PDT) Message-ID: <5a9a0c90-d191-49e1-8cd5-1d45c82040ac@linaro.org> Date: Thu, 2 May 2024 01:13:45 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/3] PCI: qcom: Add rx margining settings for 16GT/s To: Shashank Babu Chinta Venkata , agross@kernel.org, andersson@kernel.org, mani@kernel.org Cc: quic_msarkar@quicinc.com, quic_kraravin@quicinc.com, Lorenzo Pieralisi , =?UTF-8?Q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Serge Semin , Yoshihiro Shimoda , Conor Dooley , linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org References: <20240419001013.28788-1-quic_schintav@quicinc.com> <20240419001013.28788-4-quic_schintav@quicinc.com> <02ae9e6b-b652-433e-b36d-e6106d4fbcd1@linaro.org> <53c0e508-60fe-ee5d-cb2b-a5392c330377@quicinc.com> Content-Language: en-US From: Konrad Dybcio Autocrypt: addr=konrad.dybcio@linaro.org; keydata= xsFNBF9ALYUBEADWAhxdTBWrwAgDQQzc1O/bJ5O7b6cXYxwbBd9xKP7MICh5YA0DcCjJSOum BB/OmIWU6X+LZW6P88ZmHe+KeyABLMP5s1tJNK1j4ntT7mECcWZDzafPWF4F6m4WJOG27kTJ HGWdmtO+RvadOVi6CoUDqALsmfS3MUG5Pj2Ne9+0jRg4hEnB92AyF9rW2G3qisFcwPgvatt7 TXD5E38mLyOPOUyXNj9XpDbt1hNwKQfiidmPh5e7VNAWRnW1iCMMoKqzM1Anzq7e5Afyeifz zRcQPLaqrPjnKqZGL2BKQSZDh6NkI5ZLRhhHQf61fkWcUpTp1oDC6jWVfT7hwRVIQLrrNj9G MpPzrlN4YuAqKeIer1FMt8cq64ifgTzxHzXsMcUdclzq2LTk2RXaPl6Jg/IXWqUClJHbamSk t1bfif3SnmhA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3b5KQRF8Z6XLP0+IEdLOOARkOW7yEgorBgEEAZdVAQUBAQdAwmUx xrbSCx2ksDxz7rFFGX1KmTkdRtcgC6F3NfuNYkYDAQgHwsF2BBgBCAAgFiEEU24if9oCL2zd AAQVR4cBcg5dfFgFAmQ5bvICGwwACgkQR4cBcg5dfFju1Q//Xta1ShwL0MLSC1KL1lXGXeRM 8arzfyiB5wJ9tb9U/nZvhhdfilEDLe0jKJY0RJErbdRHsalwQCrtq/1ewQpMpsRxXzAjgfRN jc4tgxRWmI+aVTzSRpywNahzZBT695hMz81cVZJoZzaV0KaMTlSnBkrviPz1nIGHYCHJxF9r cIu0GSIyUjZ/7xslxdvjpLth16H27JCWDzDqIQMtg61063gNyEyWgt1qRSaK14JIH/DoYRfn jfFQSC8bffFjat7BQGFz4ZpRavkMUFuDirn5Tf28oc5ebe2cIHp4/kajTx/7JOxWZ80U70mA cBgEeYSrYYnX+UJsSxpzLc/0sT1eRJDEhI4XIQM4ClIzpsCIN5HnVF76UQXh3a9zpwh3dk8i bhN/URmCOTH+LHNJYN/MxY8wuukq877DWB7k86pBs5IDLAXmW8v3gIDWyIcgYqb2v8QO2Mqx YMqL7UZxVLul4/JbllsQB8F/fNI8AfttmAQL9cwo6C8yDTXKdho920W4WUR9k8NT/OBqWSyk bGqMHex48FVZhexNPYOd58EY9/7mL5u0sJmo+jTeb4JBgIbFPJCFyng4HwbniWgQJZ1WqaUC nas9J77uICis2WH7N8Bs9jy0wQYezNzqS+FxoNXmDQg2jetX8en4bO2Di7Pmx0jXA4TOb9TM izWDgYvmBE8= In-Reply-To: <53c0e508-60fe-ee5d-cb2b-a5392c330377@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [...] >>>   EXPORT_SYMBOL_GPL(qcom_pcie_common_set_16gt_eq_settings); >>>   +void qcom_pcie_common_set_16gt_rx_margining_settings(struct dw_pcie *pci) >>> +{ >>> +    u32 reg; >>> + >>> +    reg = dw_pcie_readl_dbi(pci, GEN4_LANE_MARGINING_1_OFF); >>> +    reg = MARGINING_MAX_VOLTAGE_OFFSET(0x24) | >>> +        MARGINING_NUM_VOLTAGE_STEPS(0x78) | >>> +        MARGINING_MAX_TIMING_OFFSET(0x32) | >>> +        MARGINING_NUM_TIMING_STEPS(0x10); >>> +    dw_pcie_writel_dbi(pci, GEN4_LANE_MARGINING_1_OFF, reg); >> >> Since this is DW-common, why is this inside the qcom driver? > Though this register space is in dw-common specific, these settings are purely vendor specific . These settings are determined by systems team on vendor hardware, as these settings are used as margin to compensate signal variance due to various physical factors(like connection length, retimers etc). Okay, so: 1. is the register layout vendor-specific too? i.e. are the bitfields DW-common? 2. will these settings work on all Qualcomm devices, regardless of SoC/board/ retimers used etc.? Konrad