From mboxrd@z Thu Jan 1 00:00:00 1970 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 01700439356 for ; Thu, 9 Jul 2026 06:35:33 +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=1783578935; cv=none; b=M1qo7khgngf9xzTx6KzX0xbZoa1qGGqCGnAWnyNjMvR/UfsE+tEEnICGuJmsLMo+lTUsj8gPvZguotcat9+zij5qTGVPnPHoomrdIzV5+k/4V+FPOIz4if/BWx6z8/DOYV8klfE2KCshWQLJd8bdTDqPfDLvKfYXs93BxQjY/JA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783578935; c=relaxed/simple; bh=sF+5+mlvT40t4Oa7kCgpbppxkmIb7GFh+GBtlhUHWg0=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=bsNI7UL53ib1iM4h/pUrojlgopXVlQdRPjzZT5ZIeZrzfQlizkN604mx3OPfrkE+W+G9mEd/KsBYF6/nOJbvVG4Q8KkNMLZCgn2kAJa/YFuWxRiBF6pJDjTev6PZ9YOIHjgYvha7OMpiiLQU62a3WoAGqHJI141g4jGeV0F+lJA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=bmslssIa; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=YY+NvwZ3; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="bmslssIa"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="YY+NvwZ3" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66960L6C916679 for ; Thu, 9 Jul 2026 06:35:33 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=VWOut9Y+gjUFIHIxTYgSGy NQ1g4rRooiLUtEV7k3qB4=; b=bmslssIawUWwwQYrjm4vV5J6Jbd++0vXyO4tuX K1NsLSUDti/yC4Xr3wSVUwD4c8KLevWZPkYsW03qsoH01zAMIBkixNJMR/CGg6Ap TNNk1tG+dx8+6ABSyYhcx66+EzQbCo1ExqrUSmR8gRQuxLvAsZU3cR/F7uhLmAHC oal5KLU0xUoaVJPM7qDfe9zWeLEmxEDYZzGr2eR3oyOxdI5YZQfkjJlpnKcS0chW O3a1zostOgz6zUth5+QwMkxacYVA+68YWiissBGEJxmNeL08nU2G6KxbH5UkS8KJ Gcg1Fv4tAshS2TScvOQ8tCd3HnJIb6S1wx3ATK4jXTL+o1Pg== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4f9hnv58w3-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 09 Jul 2026 06:35:33 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-c88ab059052so684445a12.1 for ; Wed, 08 Jul 2026 23:35:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1783578932; x=1784183732; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=VWOut9Y+gjUFIHIxTYgSGyNQ1g4rRooiLUtEV7k3qB4=; b=YY+NvwZ3lLCkfOyHIsIKGev4m981G2jwA6w41MCWhGzs2TZY+sawY+PKLLLSNi1F7d 0cMovQAsGvbP38xAS7H55qo/+ckBEsPclSOPI/7e4jfMyQn3kTlM/pwDjKHopO7IS/nk 0cgA4LI1BCAYRrLMn2xQRejIUCaE4KF+d9CoEljpDXz5I91NgGsBu5YgDmBgBT8EhBrP gp12u6Kr6yYsChjcuSYhb5AYTsSVm9xImGlvGcCW/RqNfPjmN+7Rhf+kNwHJdfPilmBd 6fxOKqzRJwasrNDyykrt77Xqj+4tHN8Ia/AU8FO/+9L2dHerKv0wbN4DI2dS04+mTjxf epZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783578932; x=1784183732; h=cc:to:content-transfer-encoding:content-type:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to:content-type; bh=VWOut9Y+gjUFIHIxTYgSGyNQ1g4rRooiLUtEV7k3qB4=; b=W8GIrsf/nkL3cJUkcwlchX74e+9mmxZd/Is6ad8eE7eRusx6jDEEhZmTsF+rusAafK KMMuK8rMqjKbEYoSRdOie2JrZItjbA945Sjgip77qoCw/38NyOrqLhdbDY3XccWc0cb8 jtvIqKnwGzlSwoM48++zsM11XaNjU5/h3zGR+xiy6hoNoYo2HEpL60/w4BphgIxz6e9d oJ4M1IjVY/FxBbyDV/gkwnHD4H3Y3JXtd+NhRNOdyFxbj3YYZ2RJUvHNa4bNa5ebwZvf 6MSnt9uSw5hexYZmbKlI0cTdNqcI2jiuptX8Wf75pTUnwSPjVXNlpR2vPMuPRSwwp9Wj zlfw== X-Forwarded-Encrypted: i=1; AHgh+RpjL+NTQM7VeHqquw8G6udH5ddfCpF0k9nK9tbj/cgsTR4dyPobsGWSbO9tp5eVyzRKCmtKeMwe/bvzsy8=@vger.kernel.org X-Gm-Message-State: AOJu0Yw1MS/8GhlNsmjcJrkRbp5vmN4oT5ZFF0sLkNmpQhoc+p3zaLVd fFzPrjuWU49fYH++g/HwRXe2yWezQ/d0RYcltAEIOeQydeEyW1wMvB5rHEwE19xpqzlXAUYC12W oX+QjUO/Kg5pxeYLIdSa/sk9DxONuPMbPtAoQjO+TudArLXB/P4iYUD62g/yc+uPRtDGrmOCrG3 8= X-Gm-Gg: AfdE7cknIKBCR3rZ8sBatyfeH0le0NweRbBTP63KD0hXTcXYk86pLgHmsBjKgVdMe0q 0GgAC5UQT9Eid0RxhV2r68GfSJP9nKvYroUY1MDhb8AFkUozBBpIBM77dJCXnhXOrCPsodOk/Ia 79q4dCcUEaYmFHJRPMGB+3vOkcMQXhQod2M/WXquPxqWqIH4LEyo2jSHZqGt+jsJKQDU++L7aBh 90DdZKrXBV8XPf/FgG+L7o/F8WqKH+s7uHw/VK2SFPXNi34k46BT9Uw7NiBI8q4s44Q/D4jQ5Ns DOTvcqiSyWRfU7967FDKLzI7LYttlOSXnjvxq8fz9rb7H8F6LGqrGhNYc8BSAtyuwJbbGMTsJck Tl6L6br5ecC2UWIFmcniZ6rEqv54RXaLQcnrvUEn0Xf8KnQ== X-Received: by 2002:a05:6a20:a10a:b0:3a0:c246:bb98 with SMTP id adf61e73a8af0-3c0d6b91578mr2421119637.29.1783578932504; Wed, 08 Jul 2026 23:35:32 -0700 (PDT) X-Received: by 2002:a05:6a20:a10a:b0:3a0:c246:bb98 with SMTP id adf61e73a8af0-3c0d6b91578mr2421065637.29.1783578931952; Wed, 08 Jul 2026 23:35:31 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31174a56848sm28304294eec.16.2026.07.08.23.35.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2026 23:35:31 -0700 (PDT) From: Krishna Chaitanya Chundru Subject: [PATCH v3 0/4] PCI: qcom: Add link retention support Date: Thu, 09 Jul 2026 12:05:15 +0530 Message-Id: <20260709-link_retain-v3-0-81a9d187bb61@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACNBT2oC/23OSwqDMBCA4atI1o1MYjSxq96jlOJjrKGatIkNL eLdG90UoZuBf2A+ZiYenUZPjslMHAbttTUxskNCmr4yN6S6jU048JwBMDpoc786nCptaMcUy0C WQqIg8eLhsNPvTTtfYvfaT9Z9Njywdbs6BTAod05gFKjEQirOM+hEfbLep89XNTR2HNM4yMoF/ iNyvn8l8EiAwlYIVYNizR9iWZYvOcJmwPAAAAA= X-Change-ID: 20251001-link_retain-f181307947e4 To: Vinod Koul , Neil Armstrong , Philipp Zabel , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas Cc: linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, Krishna Chaitanya Chundru , Abel Vesa , Konrad Dybcio , Qiang Yu X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1783578926; l=3032; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=sF+5+mlvT40t4Oa7kCgpbppxkmIb7GFh+GBtlhUHWg0=; b=4WF8KeneP5kDFrwQawQN2JEQpi2M5tVjiuO/q/KkGovSi6O5wQNu7o/BGrMJ7isY9467o2KyL GQouKH0G4YnBmpJvPbT8rxsoCS3EE3Prt7deLSEjjmwPAIHqfDXmQm0 X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Authority-Analysis: v=2.4 cv=KNNqylFo c=1 sm=1 tr=0 ts=6a4f4135 cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=bC-a23v3AAAA:8 a=EUspDBNiAAAA:8 a=VwQbUJbxAAAA:8 a=fuwIWhs0SkhWFt5P5XoA:9 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 a=FO4_E8m0qiDe52t0p3_H:22 X-Proofpoint-Spam-Info: AW1haW4tMjYwNzA5MDA2MCBTYWx0ZWRfX8DDnF37FPAr1 Sp1cDqpa9HuU8gGm23SFp3bX2ustW739ryQgoxHakvr5lX8tKEEtfR1SP/dmEjQ2hiU+/ps2hGT e2aBg6UInlelhg7k/aGaKL1SAgSpBUc= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzA5MDA2MCBTYWx0ZWRfX4Z5Y1F7WW/U5 JGEKnLX0U34UFHFWFLjksSdFxT024AJ0ConwB3SiDFoMM9ZB4jwJlFa+0MHowkm4W9g7LmHAkul Meah2wuoMj0I9g391RhQ0Ek7DjpggmkvuO5bh9R+z4E5Xpdo0H6h2OKdXWBVGqBfGYRMoy5EjQR PqEF7GU87uFnD33kLqyiF4TDwAy4oKBzInIk2NynGWYwe10p+McWk/Qt5oq5v2yGh+0yw9a1WJN AYR8kPbKGd7qWsPlD7jN4XFPx5GY/bfMtI0tRBlEGxqSBDHFwkzsuODVRCju1ZPRienGH5T8Qji xWBGm6ZhxtbpJ+CpQNDW90U3cnlDthTbWvAejYMPbNZHlPxkxULjrt98grB+nf/lUVd75fnqWwq PurIUWEYlfkDxnqCwpU0umeJxSSTHtZpF30ENqfnnIhjKZ4iYaUtz1T/nMHqHObnLBjeHbDKzsG YzziQDl0k2YHcQLFYSg== X-Proofpoint-ORIG-GUID: swhki4q7uWPslgGt_k-EEt9SCvfwbL_A X-Proofpoint-GUID: swhki4q7uWPslgGt_k-EEt9SCvfwbL_A X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-09_01,2026-07-08_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 suspectscore=0 spamscore=0 malwarescore=0 phishscore=0 clxscore=1015 priorityscore=1501 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607090060 This patch series introduces support for retaining the PCIe link across bootloader and kernel handoff on Qualcomm platforms, specifically X1E80100. The goal is to reduce boot time and avoid unnecessary link reinitialization when the link is already up. We are not enabling link retantion support for all the targets, as there is no guarantee that the bootloader on all targets has initialized the PCIe link in max supported speed. So we are enabling for hamoa & glymur target only for now based on the config flag. If the link is up and has link_retain is set to true in the ithe driver config data then enable retain logic in the controller. In phy as we already have skip init logic, the phy patch uses same assumption that if there is phy no csr and bootloader has done the init then driver can skip resetting the phy when phy status indicates it is up. Problem:- 1) As part of late init calls of clock the framework is disabling all the unvoted resources by that time and also there is no sync state to keep them enabled till the probe is completed. Due to dependencies with regulators and phy, qcom pcie probe is happening after late init which is causing the resources(clocks) to be off which causes the link to go down. To avoid this we need to use this kernel command line argument (clk_ignore_unused) to skip disabling clocks as part of late init for initial version. Once it is resolved we can avoid those kernel command line argument. Signed-off-by: Krishna Chaitanya Chundru --- Changes in v3: - Updated the max link speed and current link speed logic for link retain. - Fixed l1ss_support & probe deffer fix as pointed by sashiko. - Link to v2: https://patch.msgid.link/20260521-link_retain-v2-0-08ed448b081c@oss.qualcomm.com Changes in v2: - Rebased with latest changes - GENPD/power domains are not longer getting turned off with the latest kernel, only issue is with the clocks. - Removed the patch [2/5] PCI: dwc: Add support for retaining link during host init as we are not seeing much difference with this or without this (Bjorn). - couple of nits in commit & prints (Mani). - Remove skip_reset for the long term (Dmitry). - Link to v1: https://lore.kernel.org/r/20260109-link_retain-v1-0-7e6782230f4b@oss.qualcomm.com --- Krishna Chaitanya Chundru (4): phy: qcom: qmp-pcie: Skip PHY reset if already up PCI: qcom: Keep PERST# GPIO state as-is during probe PCI: qcom: Add link retention support PCI: qcom: enable Link retain logic for Hamoa drivers/pci/controller/dwc/pcie-designware.h | 1 + drivers/pci/controller/dwc/pcie-qcom.c | 80 +++++++++++++++++++++++++--- drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 31 +++++++---- 3 files changed, 96 insertions(+), 16 deletions(-) --- base-commit: ce1f20ceb245f81cc147bf4fd570c09f9f720ab2 change-id: 20251001-link_retain-f181307947e4 Best regards, -- Krishna Chaitanya Chundru