From nobody Sun Dec 14 12:18:13 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 079DA17A302 for ; Sat, 19 Apr 2025 05:19:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039983; cv=none; b=Oh0VKTQPcIUYsLwZR79/7h/BCL84PUYan591DAE7YuaDnrQC1WCEoeHimiKoJbL5Y24IS07LYYEbuqLhCZCbVtuI8pSeNie/WhyRkGf5+JrIF+EN+aRaGSqU+JEJAFqQLsDrvJxdZ4AJxoFXPJfD+wUm4kblqL++eqo/K5pnIbY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039983; c=relaxed/simple; bh=nE7IjJhMRhNyIuWq7+m22BFxM13wxFoka3TTlw1/Y/k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=p8xvHpvRQLEpfjtQ3pVvQZtFzul3GHoihAz31tXVgOMTuj0Z4TwF02RnmtKdad3/wquOvv7EkVvmCM9lsUWNyUgKygyoasZDpFGxA0gYHGGgUsiwENs8Kff7O/ipYvQxEtkJtvKAXkk3Lg5n3Q9tt0Qmfv9K6fTm1aXNTbRSdss= 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=mwgxfDsz; arc=none smtp.client-ip=205.220.180.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="mwgxfDsz" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53J4BS8G027688 for ; Sat, 19 Apr 2025 05:19:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= TLU2POU7c4DnlLOSszh8lb+fHxRv3wzsnmbCELHaQdQ=; b=mwgxfDszGfEHRJIf pnfSqi5wrdTEfQWeEygI7ml0EnIx2eRlt1bd3MAdJw/HqCrdiW/cfAoS1yCe+TyC s2uXGNyCt9vFfQsqf7H3HQ8EaVu6CT/B1KoYGWtCVxjb3LBQvrVkpdCviIKp9iEC LH/xaflb5JuzGkh/Du1nqX9P8qVmCmTK377AdDp0WMO/ibYDJp49SwWB/osres7m Jgho3RC7JfMobT5w2gZmB/VExW8y/mVYfULNxySjrgNiB17X7U7viSP9hzHiBens Jo+bmcJWg+/+l6YAVyqGjK3prv+TT0nzL74ypp3wgOHqjLSR/bR5/zWpOiFPDvZw qTdDlA== Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46416qr9kk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 19 Apr 2025 05:19:40 +0000 (GMT) Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-2265a09dbfcso36214165ad.0 for ; Fri, 18 Apr 2025 22:19:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745039979; x=1745644779; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TLU2POU7c4DnlLOSszh8lb+fHxRv3wzsnmbCELHaQdQ=; b=tllnz4FsbrfeIifQdgFEeOLay+wsysUXpdIu7He2Z2i1Qdy7inbybj/F7skCf/CWzd f2XPA71F9/TkRV+iWfxL1jFcDikYDXZ9fOCxRbZ1nt5YAZQBN3VEonQLZzOpQ+jUblZV pC6lORKzCjHoFJs0t2fbOdfp/A+6GEIScDJUUcixbubs/d0IN/nlE5x7Zdg7ty7Hwe9e noUCmL4kdv/7+lSGadTA4acTFd2J358eHBDxdhSsFi9uMfIBpWoboxcTWOfvsAN/AX8P yQIhOw8ye9y6O/PDo4G/Dzfi2VsFjxPNKc5Fh+onJPSDCOsUg0KlWDiwnG4NTRXGokxz QyZA== X-Forwarded-Encrypted: i=1; AJvYcCUbtBHlEIw3AzwGalyfE00MhjuRnZ3fE5ViKmKxpRHkasFLQdxQF1Nd075keArUHOx5miDYt2+3Eq7wDkI=@vger.kernel.org X-Gm-Message-State: AOJu0Yw7CXJPha/aTwv6H2of+CghOpn7xBJv79vrShDS36LNkj7vUl+B nSsO3xbVajBnp6gigKJ0pFDSCBlU3HhzThOi95OHKpeFgbOe3yTNb4ow+1DnDmZWz4p4Her1v8q ybiOTsBbxDian6BaSxBmhikhpt//k/syynCHYX11NPomuIBjZ4GCtIjyCiByKRVc= X-Gm-Gg: ASbGncunqH6+YgL8/KyabWMz31z0YRcvReXWWqo6NBUq3dJNMbm6512ZP/jqdUU7JvR b33IjvJIjzHYKc4ZJqfBfnTakcCBbdTq01SP1Kg0hncOz03p5XiLwg7FUsIihtOQboWO5pl9FSu HyXcCQtGxwuZ+SQHZtn7Cs+1sApSFE9RSsrT6un+h+AE0UeakJokH6at+qSJd9ZoR4Qp6o7X3Qg 8brBom1htdvLzBfAIw26DiAq+DxT2JEAzA5DJBZ0lGGwrGFkNv/9Aw3v/NUgtK7u85oCyiBGEjO 1wj1O1k4rWMjOnGSfhGDI2LddmHnoX+W9o2E/EqTlqIsYvQ= X-Received: by 2002:a17:903:2451:b0:224:1c41:a4bc with SMTP id d9443c01a7336-22c5358123dmr75029355ad.12.1745039979633; Fri, 18 Apr 2025 22:19:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3X5l3b/pEi4aT+9a3cQflRBBkyCuwkE36I24LsP/TkO2/xmEsZO4B/kwr/OjIaYdZeHRTzw== X-Received: by 2002:a17:903:2451:b0:224:1c41:a4bc with SMTP id d9443c01a7336-22c5358123dmr75029035ad.12.1745039979247; Fri, 18 Apr 2025 22:19:39 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73dbfaac258sm2607932b3a.144.2025.04.18.22.19.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 22:19:38 -0700 (PDT) From: Krishna Chaitanya Chundru Date: Sat, 19 Apr 2025 10:49:24 +0530 Subject: [PATCH v3 1/3] dt-bindings: PCI: qcom: Move phy, wake & reset gpio's to root port 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: quoted-printable Message-Id: <20250419-perst-v3-1-1afec3c4ea62@oss.qualcomm.com> References: <20250419-perst-v3-0-1afec3c4ea62@oss.qualcomm.com> In-Reply-To: <20250419-perst-v3-0-1afec3c4ea62@oss.qualcomm.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org Cc: linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_vbadigan@quicinc.com, quic_mrana@quicinc.com, Krishna Chaitanya Chundru X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1745039969; l=4358; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=nE7IjJhMRhNyIuWq7+m22BFxM13wxFoka3TTlw1/Y/k=; b=H82j7c4p3tWE1YGpV61jcSCWDogj71ruiOk3nh6IgF8P6eYre6j3+90AWZbZlKyDSvE9X3NIi 2CwtEJJGPpwCXp1dSqc+ai57Dibvly8Wh+w5g2jJ9m3Dm9mwPGOHBz5 X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Authority-Analysis: v=2.4 cv=N7UpF39B c=1 sm=1 tr=0 ts=6803326c cx=c_pps a=cmESyDAEBpBGqyK7t0alAg==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=zZdbXEcupTeRExCOI60A:9 a=QEXdDO2ut3YA:10 a=1OuFwYUASf3TG4hYMiVC:22 X-Proofpoint-GUID: gFUSmPMgb3ye9zxMZal4R7GgQBNH9Cuz X-Proofpoint-ORIG-GUID: gFUSmPMgb3ye9zxMZal4R7GgQBNH9Cuz X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-19_01,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504190040 Move the phy, phy-names, wake-gpio's to the pcie root port node instead of the bridge node, as agreed upon in multiple places one instance is[1]. Update the qcom,pcie-common.yaml to include the phy, phy-names, and wake-gpios properties in the root port node. There is already reset-gpios defined for PERST# in pci-bus-common.yaml, start using that property instead of perst-gpio. For backward compatibility, do not remove any existing properties in the bridge node. [1] https://lore.kernel.org/linux-pci/20241211192014.GA3302752@bhelgaas/ Signed-off-by: Krishna Chaitanya Chundru Reviewed-by: Rob Herring (Arm) --- .../devicetree/bindings/pci/qcom,pcie-common.yaml | 36 ++++++++++++++++++= ++-- .../devicetree/bindings/pci/qcom,pcie-sc7280.yaml | 16 +++++++--- 2 files changed, 46 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml b/= Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml index 0480c58f7d998adbac4c6de20cdaec945b3bab21..e5f60faa18ad68a29900a66fbfc= ba3d4f8e88e7b 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml @@ -51,10 +51,18 @@ properties: =20 phys: maxItems: 1 + deprecated: true + description: + This property is deprecated, instead of referencing this property fr= om + the controller node, use the property from the PCIe root port node. =20 phy-names: items: - const: pciephy + deprecated: true + description: + Phandle to the register map node. This property is deprecated, and n= ot + required to add in the root port also, as the root port has only one= phy. =20 power-domains: maxItems: 1 @@ -71,12 +79,18 @@ properties: maxItems: 12 =20 perst-gpios: - description: GPIO controlled connection to PERST# signal + description: GPIO controlled connection to PERST# signal. This propert= y is + deprecated, instead of referencing this property from the controller= node, + use the reset-gpios property from the root port node. maxItems: 1 + deprecated: true =20 wake-gpios: - description: GPIO controlled connection to WAKE# signal + description: GPIO controlled connection to WAKE# signal. This property= is + deprecated, instead of referencing this property from the controller= node, + use the property from the PCIe root port node. maxItems: 1 + deprecated: true =20 vddpe-3v3-supply: description: PCIe endpoint power supply @@ -85,6 +99,24 @@ properties: opp-table: type: object =20 +patternProperties: + "^pcie@": + type: object + $ref: /schemas/pci/pci-pci-bridge.yaml# + + properties: + reg: + maxItems: 1 + + phys: + maxItems: 1 + + wake-gpios: + description: GPIO controlled connection to WAKE# signal + maxItems: 1 + + unevaluatedProperties: false + required: - reg - reg-names diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml b/= Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml index 76cb9fbfd476fb0412217c68bd8db44a51c7d236..eb70cc6b6618af43fb03e124db2= 0e2ade26a95ae 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-sc7280.yaml @@ -162,9 +162,6 @@ examples: iommu-map =3D <0x0 &apps_smmu 0x1c80 0x1>, <0x100 &apps_smmu 0x1c81 0x1>; =20 - phys =3D <&pcie1_phy>; - phy-names =3D "pciephy"; - pinctrl-names =3D "default"; pinctrl-0 =3D <&pcie1_clkreq_n>; =20 @@ -173,7 +170,18 @@ examples: resets =3D <&gcc GCC_PCIE_1_BCR>; reset-names =3D "pci"; =20 - perst-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply =3D <&pp3300_ssd>; + pcie1_port0: pcie@0 { + device_type =3D "pci"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + phys =3D <&pcie1_phy>; + + reset-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; + }; }; }; --=20 2.34.1 From nobody Sun Dec 14 12:18:13 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 5B38818D63E for ; Sat, 19 Apr 2025 05:19:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039989; cv=none; b=ZfNVx6ANKOtm0i7AojGZIgXXV0WdhspG0CeuIo0xskac9c6QlSgqfH0nB4u+i0+aEiEWhI7d7U4wk/ZzJLg60gP8MPJHP533LAN1ULp8p1rD38vKprO6eO7BSLE4q1JNojfgnSPNqw+OwdcKehQzWTIRlp9hO/ykepwFPYay5zc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039989; c=relaxed/simple; bh=D316g5aWbCAO9Vig+hOWDXQ413eJGS6rGu5Q1O3MWFA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=etNPYtb+kcHDfYAlL4Nsy1vy3LrU+2Rt9A5kkXiZuMYwIlL62hv7MSH9GsqyqiIWAPtylw6oZN2UxLkKRLwZXylOoGVHDmIfdT/JLga1Jqqe2ZII84VIBgWJiVwTZowbw0/OKi+3pnHT8923Ya577hRNAU7+PEdyXwzKQKWANZg= 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=AuzFEXd7; arc=none smtp.client-ip=205.220.180.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="AuzFEXd7" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53J1aDo4024685 for ; Sat, 19 Apr 2025 05:19:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= wKr5iCxtrLgnSa5yWtBwsbzzzyWFbruUEa8PkiNudHk=; b=AuzFEXd7ulYYS0ig 8POFxtdJ/MJok65yxLB9JcRRN32z6RsgmaOobz3VKbKmYzDrOa5zcTdR8+KHC5Y/ xKf31yCvpZM0ZAT9Anjb2xIUVIHzkik2l6n6IhWerC6jJHUNHDl0YHlav74EspjA niJsWACH/vNmHdKlWQ1AOVC/KEhqZ9AhiqQ4fcKTdJoZqouhKSDeCUPqV2ipBG0B XEOfWU/X6xcMhsJsKklwD7fpQW8WvhYYLnfuPlLj7NFUR+U4uJUy7/HqoXkrQeqM sxxyoLdBfd4PjGcC6tTkcbE3Z0Cby1IReT+3ihrCoyAVoK+4RBNvJq3NJdJY6nvB TI2CDQ== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 46416qr9kp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 19 Apr 2025 05:19:45 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-7377139d8b1so1707879b3a.0 for ; Fri, 18 Apr 2025 22:19:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745039984; x=1745644784; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wKr5iCxtrLgnSa5yWtBwsbzzzyWFbruUEa8PkiNudHk=; b=wYy2qmTyghot0qpQUNeamZy7Uhw6AIsiWy4/g3DVn/23FUAbJrfMWr+YVQ1sOe39qb EPZK3OD3Xmz2KbV/umAO7+TV9etWnKWfGar2TNwDQ+YRoBNjdYrB491J2jJq14KHIpRU xQPk46OYqtqac2QQcocmJ1CUBYp0pEXQef+xgln5I2u6B7h/9bqOonR9SZLoTps3Ifnd bFGt/0BrbkReHQa7BWglSXGGrwqxn08JzObKFKM8CIfKCaN6AYq7jqjhSjOLWzJN4YzW YRMCauisrdpnNMnnb4NNH7+W0S5ZZdq6wE/AAjkDurDs/iKJLDa2si/ZPyrMsgAtax3/ o7PA== X-Forwarded-Encrypted: i=1; AJvYcCWAE8ymAwqOxLtHlswFgLdO+po1Ww3hGIlZNxV/FXUx0O19qOeCpes8PZ2AmbHAATgHSh7k7cxKCIhrrK0=@vger.kernel.org X-Gm-Message-State: AOJu0YwnHwJNbmeCLG0cAM6ElUE32afw4fzYmVJysVcl1uuxmOu684Ld WHJH1aqwbjv7jY8gPzCWwUJEGDxVkF+Rv1JcVRdUsEJVyOmFcDELTQjgTJWX8iSjvUGQYoXa93y FPLy/sjkqKuH98YqjnqweFjPYeaj1GgbYAq5aKTh5Te7/TYMeUaisQsR9jVjhp0E= X-Gm-Gg: ASbGncuPHabDRAi6vCiyzKI3oSM2Lb8Iu4C0yd55yIASgbFTtoE0DEAY7feT522TZDc djH5F5PJzNOORC4eRkQDjgwkICpXAGtgfZ+PalOz8cH3sJeqE0b95LyhHb4yBzO5OnSYrD7hhkF rcB/Ph5J+ag1Ldha4x8aALCSd+a2LIAH6OCabrCPOeqik06zAVS6Al4mErAchDwc/3Yzuyh7doz Q++3YH6afylqoYtBkpo0qB3iUjhXR0EANppBL/pBlrM+ADLuQeXH/09VLM/gQKT88+kYJCBjghc B00KisB6bZFoAWT2mczNjzGuXe9h+6AjL8X87CtMRpaOAa4= X-Received: by 2002:a05:6a00:4acc:b0:736:b9f5:47c6 with SMTP id d2e1a72fcca58-73dc1566938mr6532781b3a.16.1745039984542; Fri, 18 Apr 2025 22:19:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPh2UeIFjUcCzHCt69mzwi3ZCMKTL2uPeLdpaaSj3UslSxHPnSkJhYpDWJ3gVtSp9W80kOGA== X-Received: by 2002:a05:6a00:4acc:b0:736:b9f5:47c6 with SMTP id d2e1a72fcca58-73dc1566938mr6532756b3a.16.1745039984023; Fri, 18 Apr 2025 22:19:44 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73dbfaac258sm2607932b3a.144.2025.04.18.22.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 22:19:43 -0700 (PDT) From: Krishna Chaitanya Chundru Date: Sat, 19 Apr 2025 10:49:25 +0530 Subject: [PATCH v3 2/3] PCI: qcom: Add support for multi-root port 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: quoted-printable Message-Id: <20250419-perst-v3-2-1afec3c4ea62@oss.qualcomm.com> References: <20250419-perst-v3-0-1afec3c4ea62@oss.qualcomm.com> In-Reply-To: <20250419-perst-v3-0-1afec3c4ea62@oss.qualcomm.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org Cc: linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_vbadigan@quicinc.com, quic_mrana@quicinc.com, Krishna Chaitanya Chundru X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1745039969; l=8331; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=D316g5aWbCAO9Vig+hOWDXQ413eJGS6rGu5Q1O3MWFA=; b=dbnVmQwuH+/3RhmySFa2p8x9QvpRGzH0cB4aK3JGzGeJ6d0bzTr7YgegXUa/8+iue5zdUIu7z qSonHf1j5vGDLCYoNglIwLByPU2q68eMsq1Oh88kENgjNgNV3qbGTvB X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Authority-Analysis: v=2.4 cv=N7UpF39B c=1 sm=1 tr=0 ts=68033272 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=kQczSkNYjdDqFxC5ROQA:9 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-GUID: YZSZo6LKJLwC0ynEbcg8gUamwNGEIEhB X-Proofpoint-ORIG-GUID: YZSZo6LKJLwC0ynEbcg8gUamwNGEIEhB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-19_01,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 mlxscore=0 clxscore=1015 lowpriorityscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 bulkscore=0 spamscore=0 malwarescore=0 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504190040 Move phy, perst handling to root port and provide a way to have multi-port logic. Currently, qcom controllers only support single port, and all properties are present in the controller node itself. This is incorrect, as properties like phy, perst, wake, etc. can vary per port and should be present in the root port node. To maintain DT backwards compatibility, fallback to the legacy method of parsing the controller node if the port parsing fails. pci-bus-common.yaml uses reset-gpios property for representing PERST, use same property instead of perst-gpios. Signed-off-by: Krishna Chaitanya Chundru --- drivers/pci/controller/dwc/pcie-qcom.c | 169 +++++++++++++++++++++++++++--= ---- 1 file changed, 142 insertions(+), 27 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controlle= r/dwc/pcie-qcom.c index dc98ae63362db0422384b1879a2b9a7dc564d091..e97e5076f5f77acbbdfb982af7a= cc69daf9bf307 100644 --- a/drivers/pci/controller/dwc/pcie-qcom.c +++ b/drivers/pci/controller/dwc/pcie-qcom.c @@ -262,6 +262,11 @@ struct qcom_pcie_cfg { bool no_l0s; }; =20 +struct qcom_pcie_port { + struct list_head list; + struct gpio_desc *reset; + struct phy *phy; +}; struct qcom_pcie { struct dw_pcie *pci; void __iomem *parf; /* DT parf */ @@ -276,22 +281,35 @@ struct qcom_pcie { struct dentry *debugfs; bool suspended; bool use_pm_opp; + struct list_head ports; }; =20 #define to_qcom_pcie(x) dev_get_drvdata((x)->dev) =20 -static void qcom_ep_reset_assert(struct qcom_pcie *pcie) +static void qcom_perst_assert_deassert(struct qcom_pcie *pcie, bool assert) { - gpiod_set_value_cansleep(pcie->reset, 1); + struct qcom_pcie_port *port, *tmp; + int val =3D assert ? 1 : 0; + + if (list_empty(&pcie->ports)) + gpiod_set_value_cansleep(pcie->reset, val); + else + list_for_each_entry_safe(port, tmp, &pcie->ports, list) + gpiod_set_value_cansleep(port->reset, val); + usleep_range(PERST_DELAY_US, PERST_DELAY_US + 500); } =20 +static void qcom_ep_reset_assert(struct qcom_pcie *pcie) +{ + qcom_perst_assert_deassert(pcie, true); +} + static void qcom_ep_reset_deassert(struct qcom_pcie *pcie) { /* Ensure that PERST has been asserted for at least 100 ms */ msleep(100); - gpiod_set_value_cansleep(pcie->reset, 0); - usleep_range(PERST_DELAY_US, PERST_DELAY_US + 500); + qcom_perst_assert_deassert(pcie, false); } =20 static int qcom_pcie_start_link(struct dw_pcie *pci) @@ -1229,6 +1247,59 @@ static int qcom_pcie_link_up(struct dw_pcie *pci) return !!(val & PCI_EXP_LNKSTA_DLLLA); } =20 +static void qcom_pcie_phy_exit(struct qcom_pcie *pcie) +{ + struct qcom_pcie_port *port, *tmp; + + if (list_empty(&pcie->ports)) + phy_exit(pcie->phy); + else + list_for_each_entry_safe(port, tmp, &pcie->ports, list) + phy_exit(port->phy); +} + +static void qcom_pcie_phy_off(struct qcom_pcie *pcie) +{ + struct qcom_pcie_port *port, *tmp; + + if (list_empty(&pcie->ports)) { + phy_power_off(pcie->phy); + } else { + list_for_each_entry_safe(port, tmp, &pcie->ports, list) + phy_power_off(port->phy); + } +} + +static int qcom_pcie_phy_power_on(struct qcom_pcie *pcie) +{ + struct qcom_pcie_port *port, *tmp; + int ret =3D 0; + + if (list_empty(&pcie->ports)) { + ret =3D phy_set_mode_ext(pcie->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); + if (ret) + goto out; + + ret =3D phy_power_on(pcie->phy); + if (ret) + goto out; + } else { + list_for_each_entry_safe(port, tmp, &pcie->ports, list) { + ret =3D phy_set_mode_ext(port->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); + if (ret) + goto out; + + ret =3D phy_power_on(port->phy); + if (ret) { + qcom_pcie_phy_off(pcie); + goto out; + } + } + } +out: + return ret; +} + static int qcom_pcie_host_init(struct dw_pcie_rp *pp) { struct dw_pcie *pci =3D to_dw_pcie_from_pp(pp); @@ -1241,11 +1312,7 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp) if (ret) return ret; =20 - ret =3D phy_set_mode_ext(pcie->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); - if (ret) - goto err_deinit; - - ret =3D phy_power_on(pcie->phy); + ret =3D qcom_pcie_phy_power_on(pcie); if (ret) goto err_deinit; =20 @@ -1268,7 +1335,7 @@ static int qcom_pcie_host_init(struct dw_pcie_rp *pp) err_assert_reset: qcom_ep_reset_assert(pcie); err_disable_phy: - phy_power_off(pcie->phy); + qcom_pcie_phy_off(pcie); err_deinit: pcie->cfg->ops->deinit(pcie); =20 @@ -1281,7 +1348,7 @@ static void qcom_pcie_host_deinit(struct dw_pcie_rp *= pp) struct qcom_pcie *pcie =3D to_qcom_pcie(pci); =20 qcom_ep_reset_assert(pcie); - phy_power_off(pcie->phy); + qcom_pcie_phy_off(pcie); pcie->cfg->ops->deinit(pcie); } =20 @@ -1579,11 +1646,41 @@ static irqreturn_t qcom_pcie_global_irq_thread(int = irq, void *data) return IRQ_HANDLED; } =20 +static int qcom_pcie_parse_port(struct qcom_pcie *pcie, struct device_node= *node) +{ + struct device *dev =3D pcie->pci->dev; + struct qcom_pcie_port *port; + struct gpio_desc *reset; + struct phy *phy; + + reset =3D devm_fwnode_gpiod_get(dev, of_fwnode_handle(node), + "reset", GPIOD_OUT_HIGH, "PERST#"); + if (IS_ERR(reset)) + return PTR_ERR(reset); + + phy =3D devm_of_phy_get(dev, node, NULL); + if (IS_ERR(phy)) + return PTR_ERR(phy); + + port =3D devm_kzalloc(dev, sizeof(*port), GFP_KERNEL); + if (!port) + return -ENOMEM; + + port->reset =3D reset; + port->phy =3D phy; + INIT_LIST_HEAD(&port->list); + list_add_tail(&port->list, &pcie->ports); + + return 0; +} + static int qcom_pcie_probe(struct platform_device *pdev) { const struct qcom_pcie_cfg *pcie_cfg; unsigned long max_freq =3D ULONG_MAX; + struct qcom_pcie_port *port, *tmp; struct device *dev =3D &pdev->dev; + struct device_node *of_port; struct dev_pm_opp *opp; struct qcom_pcie *pcie; struct dw_pcie_rp *pp; @@ -1611,6 +1708,8 @@ static int qcom_pcie_probe(struct platform_device *pd= ev) if (ret < 0) goto err_pm_runtime_put; =20 + INIT_LIST_HEAD(&pcie->ports); + pci->dev =3D dev; pci->ops =3D &dw_pcie_ops; pp =3D &pci->pp; @@ -1619,12 +1718,6 @@ static int qcom_pcie_probe(struct platform_device *p= dev) =20 pcie->cfg =3D pcie_cfg; =20 - pcie->reset =3D devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH); - if (IS_ERR(pcie->reset)) { - ret =3D PTR_ERR(pcie->reset); - goto err_pm_runtime_put; - } - pcie->parf =3D devm_platform_ioremap_resource_byname(pdev, "parf"); if (IS_ERR(pcie->parf)) { ret =3D PTR_ERR(pcie->parf); @@ -1647,12 +1740,6 @@ static int qcom_pcie_probe(struct platform_device *p= dev) } } =20 - pcie->phy =3D devm_phy_optional_get(dev, "pciephy"); - if (IS_ERR(pcie->phy)) { - ret =3D PTR_ERR(pcie->phy); - goto err_pm_runtime_put; - } - /* OPP table is optional */ ret =3D devm_pm_opp_of_add_table(dev); if (ret && ret !=3D -ENODEV) { @@ -1699,9 +1786,35 @@ static int qcom_pcie_probe(struct platform_device *p= dev) =20 pp->ops =3D &qcom_pcie_dw_ops; =20 - ret =3D phy_init(pcie->phy); - if (ret) - goto err_pm_runtime_put; + for_each_available_child_of_node(dev->of_node, of_port) { + ret =3D qcom_pcie_parse_port(pcie, of_port); + of_node_put(of_port); + if (ret) + break; + } + + /* + * In the case of failure in parsing the port nodes, fallback to the + * legacy method of parsing the controller node. This is to maintain DT + * backwards compatibility. + */ + if (ret) { + pcie->phy =3D devm_phy_optional_get(dev, "pciephy"); + if (IS_ERR(pcie->phy)) { + ret =3D PTR_ERR(pcie->phy); + goto err_pm_runtime_put; + } + + pcie->reset =3D devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH); + if (IS_ERR(pcie->reset)) { + ret =3D PTR_ERR(pcie->reset); + goto err_pm_runtime_put; + } + + ret =3D phy_init(pcie->phy); + if (ret) + goto err_pm_runtime_put; + } =20 platform_set_drvdata(pdev, pcie); =20 @@ -1746,10 +1859,12 @@ static int qcom_pcie_probe(struct platform_device *= pdev) err_host_deinit: dw_pcie_host_deinit(pp); err_phy_exit: - phy_exit(pcie->phy); + qcom_pcie_phy_exit(pcie); err_pm_runtime_put: pm_runtime_put(dev); pm_runtime_disable(dev); + list_for_each_entry_safe(port, tmp, &pcie->ports, list) + list_del(&port->list); =20 return ret; } --=20 2.34.1 From nobody Sun Dec 14 12:18:13 2025 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 AE1B5171E43 for ; Sat, 19 Apr 2025 05:19:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039993; cv=none; b=BWxXaLK3qF9gX6GzivIbu8XxznALFxRwl1EBJMDl7lUEoTVRvU9YPww4kTYvzCMIgwuoV9NeEvdB2k72clhpo659JH1eecOn32QbWqtp5NTxrHg7E5KboqZAwv9rJvSapPmlYBg9vlK4L0nmXXGiylBsSWvn1xQmHRp7yaVE3r0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039993; c=relaxed/simple; bh=3DnAtxNAZDqNQqcmKUvx3DsvQPY0Kl35D9B1JCC1B6M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=FQ3qb/U5couwbodYDNQk1jK+if9YErrZ7A+wI/7xboDPHQ7AViCBysFxeNqbMWGpR2s7rqfgFSBSgUnTju5E+5StaAacZF9wo+BORJKkuKYw62zjMghPsELTD84pTQgHUvuncZVHTZbHTVSacwup3RchZHAiDh4eHDlEPEMqEqI= 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=GsLwM/GA; arc=none smtp.client-ip=205.220.180.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="GsLwM/GA" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53J516L6030337 for ; Sat, 19 Apr 2025 05:19:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= A1E51ikRCckN3+MRKz4vJMd+7q93fNBoH3GorSYwEec=; b=GsLwM/GAh8tkbf+K my46CeZWf0wqzJuHOg2NxtV+cO/Y1TAHsE83FhArRpYlsMW8EFPNpIyIRYXDPVXT JxUWslA1m24r6cdVLIprGClbDNPgC2inP87YfsRxNUqAmMGqOoPP7FnEmHnFvCQ1 cWLszwJD8WLbgiqAhlZ0QXtYlTHjgrEkLjSJRUi4nprrUWX6Dy4BdZHU9hsqCfRL GkKrupESNXoenzRhEKnu+2QPkF9QhsOETIA9YBNZAlwbVgqNEc2zcQ/AVuXc7E1a duHBZGfTfBaRE0N/+hL2KT5NLYQhfgI4TcbFya1LA0P3qxY5Cl4np/AIToxtlVYk 606Dcg== Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 464478r2rg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 19 Apr 2025 05:19:50 +0000 (GMT) Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-736c7df9b6cso2971380b3a.3 for ; Fri, 18 Apr 2025 22:19:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745039989; x=1745644789; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A1E51ikRCckN3+MRKz4vJMd+7q93fNBoH3GorSYwEec=; b=Rg7HAQC0mRKuJxwdvp//uU90I9yAFBLqpctKbPMG+hNXRKVSBHkSEWOvFgeLDPmL9r urHx+nOc67MX7zejZ8Oec9Onn+E67ePGX1hKOJyFWiwUJbEbKZKGPQa6NurGdX8zinMR bH7NuJUO0muwdoAL6/zTAFECma1aXfX4DMbig5PiZrPGyfIe79zduKHo0EpcCNDGIV1A P6iXatWg+/6dz0s56+byNeKT2jSmgrSgx7qMjiUxmERlZShxJHbY9OB8B5LK1vWOW4e8 +B8E3P4VdQQrSIDWlzgJaO+NX1KWM4TvtFTa9Kc3xGT7OFqcPBMcpG/XM3dVWtKNTpIr bw5g== X-Forwarded-Encrypted: i=1; AJvYcCURheWev6wkP5GvMGLT0QuELzsBE3j5SC2myR2E0diHA7A7B7pfh+kgd+ft2JwEu7qvQw61jIipWiTjcKk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz1zjr/esY9ofh/mE4He6t0wqGaRsogPFxeeGhj9KgQkRmUu7Ei DXL64zy16831S/2QAETxGW61VNg3HfjmD2+p5jLzj0bhfiEmOQF5Lhe+lxVlOeTXYDu0GYsR06O ydPsbbjcLJ4Ugn/xOByOrhWu+bYbUF4lhiK1+iHvbfyoy3xDEM66C4lmjCpisWqw= X-Gm-Gg: ASbGncv1qcCt6fopW6E3hBWBouHuun/FUQK6jDHRvzgsT8jxYNqUypRho8Qb1kTES7Q JbrZla1ICTSfOhhesuChrX2PLx7muApuneQvFdD7cWOoD/7ewhaVJgsRMjNxmLSCp7ehFmheSQ7 3AJHrj1Mz2VJqeCYzHXPNxj85ASQW24q8zIY2cdeBEVyke54gkc8IUgr2jBeIm1kslYrB/yeJF2 uLeC4rTSyEvrgWku5jNU80L7gxDH86tQF+S4BzlTV/bgbOFTvrsMmAxinMsmUiOhFwy++3Xasnb o3cPVn0i02yczLL9B/hdnl7xop3mJeFNwJQwLSNihtdH7V8= X-Received: by 2002:a05:6a20:c90e:b0:1f5:9098:e446 with SMTP id adf61e73a8af0-203cbc0573emr8333327637.2.1745039989174; Fri, 18 Apr 2025 22:19:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHRbu7EqDkT1Nj/uU8mVqGS+zdhQm81Ykk2C//aenToa25p2Tc/dc5T7ALGhEC7c4FKDOyS6w== X-Received: by 2002:a05:6a20:c90e:b0:1f5:9098:e446 with SMTP id adf61e73a8af0-203cbc0573emr8333308637.2.1745039988817; Fri, 18 Apr 2025 22:19:48 -0700 (PDT) Received: from hu-krichai-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-73dbfaac258sm2607932b3a.144.2025.04.18.22.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Apr 2025 22:19:48 -0700 (PDT) From: Krishna Chaitanya Chundru Date: Sat, 19 Apr 2025 10:49:26 +0530 Subject: [PATCH v3 3/3] arm64: qcom: sc7280: Move phy, perst to root port node 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: quoted-printable Message-Id: <20250419-perst-v3-3-1afec3c4ea62@oss.qualcomm.com> References: <20250419-perst-v3-0-1afec3c4ea62@oss.qualcomm.com> In-Reply-To: <20250419-perst-v3-0-1afec3c4ea62@oss.qualcomm.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org Cc: linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, quic_vbadigan@quicinc.com, quic_mrana@quicinc.com, Krishna Chaitanya Chundru X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1745039969; l=3429; i=krishna.chundru@oss.qualcomm.com; s=20230907; h=from:subject:message-id; bh=3DnAtxNAZDqNQqcmKUvx3DsvQPY0Kl35D9B1JCC1B6M=; b=DkSLSP7iTAUMhyijELwXlNgBv5oqQeFeYWwepFB2dZoS6R8mMcJt/WlFR72Rni98O5mLUSOEt I91VDY8Pa5yA8+u/2AHDaN1UzlvOeEfsYAXRomY41Exvys59O681HAi X-Developer-Key: i=krishna.chundru@oss.qualcomm.com; a=ed25519; pk=10CL2pdAKFyzyOHbfSWHCD0X0my7CXxj8gJScmn1FAg= X-Proofpoint-GUID: sCSV2rBh2aG0Hw3kNKXyUtlx-6Sj5Zqy X-Authority-Analysis: v=2.4 cv=CYgI5Krl c=1 sm=1 tr=0 ts=68033276 cx=c_pps a=WW5sKcV1LcKqjgzy2JUPuA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=qQkGquXN9PvF_GGjQ98A:9 a=QEXdDO2ut3YA:10 a=OpyuDcXvxspvyRM73sMx:22 X-Proofpoint-ORIG-GUID: sCSV2rBh2aG0Hw3kNKXyUtlx-6Sj5Zqy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-19_01,2025-04-17_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 clxscore=1015 phishscore=0 adultscore=0 suspectscore=0 bulkscore=0 impostorscore=0 malwarescore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504190040 There are many places we agreed to move the wake and perst gpio's and phy etc to the pcie root port node instead of bridge node[1]. So move the phy, phy-names, wake-gpio's in the root port. There is already reset-gpio defined for PERST# in pci-bus-common.yaml, start using that property instead of perst-gpio. [1] https://lore.kernel.org/linux-pci/20241211192014.GA3302752@bhelgaas/ Signed-off-by: Krishna Chaitanya Chundru --- arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts | 5 ++++- arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 5 ++++- arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 5 ++++- arch/arm64/boot/dts/qcom/sc7280.dtsi | 6 ++---- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts b/arch/arm64/boot= /dts/qcom/qcs6490-rb3gen2.dts index 7a36c90ad4ec8b52f30b22b1621404857d6ef336..3dd58986ad5da0f898537a51715= bb5d0fecbe100 100644 --- a/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts +++ b/arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts @@ -709,8 +709,11 @@ &mdss_edp_phy { status =3D "okay"; }; =20 +&pcie1_port0 { + reset-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pcie1 { - perst-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; =20 pinctrl-0 =3D <&pcie1_reset_n>, <&pcie1_wake_n>; pinctrl-names =3D "default"; diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/bo= ot/dts/qcom/sc7280-herobrine.dtsi index 2ba4ea60cb14736c9cfbf9f4a9048f20a4c921f2..ff11d85d015bdab6a90bd8a0eb9= 113a339866953 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -472,10 +472,13 @@ &pcie1 { pinctrl-names =3D "default"; pinctrl-0 =3D <&pcie1_clkreq_n>, <&ssd_rst_l>, <&pe_wake_odl>; =20 - perst-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply =3D <&pp3300_ssd>; }; =20 +&pcie1_port0 { + reset-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pm8350c_pwm { status =3D "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts= /qcom/sc7280-idp.dtsi index 7370aa0dbf0e3f9e7a3e38c3f00686e1d3dcbc9f..3209bb15dfec36299cabae07d34= f3dc82db6de77 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi @@ -414,9 +414,12 @@ &lpass_va_macro { vdd-micb-supply =3D <&vreg_bob>; }; =20 +&pcie1_port0 { + reset-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pcie1 { status =3D "okay"; - perst-gpios =3D <&tlmm 2 GPIO_ACTIVE_LOW>; =20 vddpe-3v3-supply =3D <&nvme_3v3_regulator>; =20 diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qco= m/sc7280.dtsi index 0f2caf36910b65c398c9e03800a8ce0a8a1f8fc7..376fabf3b4eac34d75bb79ef902= c9d83490c45f7 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -2271,9 +2271,6 @@ pcie1: pcie@1c08000 { =20 power-domains =3D <&gcc GCC_PCIE_1_GDSC>; =20 - phys =3D <&pcie1_phy>; - phy-names =3D "pciephy"; - pinctrl-names =3D "default"; pinctrl-0 =3D <&pcie1_clkreq_n>; =20 @@ -2284,7 +2281,7 @@ pcie1: pcie@1c08000 { =20 status =3D "disabled"; =20 - pcie@0 { + pcie1_port0: pcie@0 { device_type =3D "pci"; reg =3D <0x0 0x0 0x0 0x0 0x0>; bus-range =3D <0x01 0xff>; @@ -2292,6 +2289,7 @@ pcie@0 { #address-cells =3D <3>; #size-cells =3D <2>; ranges; + phys =3D <&pcie1_phy>; }; }; =20 --=20 2.34.1