From patchwork Sat Apr 19 05:19:24 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya Chundru X-Patchwork-Id: 14057780 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 7B59C17A2E8 for ; Sat, 19 Apr 2025 05:19:41 +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=1745039984; cv=none; b=RDEmlgpT4KltKNsnRWTfxdH5SSGQA6KQWj/wOcwAuh21i+QUYLPFpvUpLC/JklhnZZkjC7/1eyQnTXoRkiJf/kaYCUjTb47SkQmPwolMSfg/ZT2WGXe3SoG/D2CwM7Hox4sn8bJZnS5XAQPulSxFNSaSpm/xabgl9X9fZcedwCk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039984; 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=jJxiRairWQOyTE0IZRyyrvjJ54tpdC/EACVH3W45FEuqZy7wpS/OmHAlqfNu2bZgNdIro9KZLq40TSzsvmKYv9yK9NM6+/f6nxl6u9w2k02/ReDcIYdbE7srCbdGWQtqZzr5k5VhIkSOg9aNAsAnhXSYsjySmzkmfH8jIdgcLnw= 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.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="mwgxfDsz" 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 53J2B3JP003202 for ; Sat, 19 Apr 2025 05:19:40 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-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4642sv85qy-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-f200.google.com with SMTP id d9443c01a7336-2265a09dbfcso36214185ad.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=1745039980; x=1745644780; 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=xO0M3m9BVCIam9s8wRE1mo21qfc8FOETtH1MsQN2Yg+DtWB6xNhvTL6xC4IVOJc5q1 l1CHjy5tGMAvaEHzMbyIYdUaLoo78Iyedl0qoLRy0szA0riEow9a2O3Ht47Eg9RyAXYi 4kIqA1P10+wANVX+W10t+dZNJ6zR73EGDUs3m1UiprPG5bI4lWMf1dk8qUF2lprCUwc9 /wGxp5KId13ghZxYE6kXKk8bwZ7iw46LZCpdYfL3VAveAGQS3BnAaTi6u6Gh+2k/4e1N m3rYQq/SZp9kf4DACBafvTXsw+whcrPw4yPRdbgAPXCVVI8VuAFyUPaPdDhMatRDFjbp jrPQ== X-Gm-Message-State: AOJu0YwLzcpQUeFtLvEX44o/GJRb9AJfh8+S5c4QYMVYdoDc32MZCXR3 Sl5PAf/LNMXQvvPC2R02Nb4NdxA01b+/1P4KjbafOM4eK2UmoI+37a1/JNqpoAdjVBqdu0jrYnN mXqG0bpMCv8NlukpbrAwVaZ+vyMGHGrXn+keTumQTOeE9johgVlygR2MQQ4g2nogN X-Gm-Gg: ASbGnctWVW9MSlk4+jKg5e384s20nPj9g3av/NmtJWcYkYTM/Sm4Cv90yncmev2WUM7 JzMfoKrUHkVLgVatVmALqSjCRxGNVG5FBgrHd3SovwQFcLRKzssbr22aGOP13A/IAc9PsjAwJCW XTaLjhHunyx6BszXvuzuEVCxQ3PK/WOgoq9yUx+Ky35aqHgSUvdio0vhw2DcIdVsOcdLx5CO4OH EPs91j+W6p6YjtolE1jC4zkrdsjy51MeIJbeGk2ZZS/hOJVVBBWaMdNheWnp7dYOeq6XxUdoukr uk5c33mz5a6oX/xaA+TKhIFKyF3thMj5HJhbjP3IEtde9ks= X-Received: by 2002:a17:903:2451:b0:224:1c41:a4bc with SMTP id d9443c01a7336-22c5358123dmr75029265ad.12.1745039979628; 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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?= =?utf-8?q?=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-Proofpoint-GUID: g6H6gmw17H3geBSq8J7NeddhW018ifyK X-Proofpoint-ORIG-GUID: g6H6gmw17H3geBSq8J7NeddhW018ifyK X-Authority-Analysis: v=2.4 cv=QLJoRhLL c=1 sm=1 tr=0 ts=6803326c cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=zZdbXEcupTeRExCOI60A:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 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 bulkscore=0 lowpriorityscore=0 mlxscore=0 spamscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 phishscore=0 suspectscore=0 impostorscore=0 priorityscore=1501 clxscore=1015 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 --- .../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..e5f60faa18ad68a29900a66fbfcba3d4f8e88e7b 100644 --- a/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/qcom,pcie-common.yaml @@ -51,10 +51,18 @@ properties: phys: maxItems: 1 + deprecated: true + description: + This property is deprecated, instead of referencing this property from + the controller node, use the property from the PCIe root port node. phy-names: items: - const: pciephy + deprecated: true + description: + Phandle to the register map node. This property is deprecated, and not + required to add in the root port also, as the root port has only one phy. power-domains: maxItems: 1 @@ -71,12 +79,18 @@ properties: maxItems: 12 perst-gpios: - description: GPIO controlled connection to PERST# signal + description: GPIO controlled connection to PERST# signal. This property 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 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 vddpe-3v3-supply: description: PCIe endpoint power supply @@ -85,6 +99,24 @@ properties: opp-table: type: object +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..eb70cc6b6618af43fb03e124db20e2ade26a95ae 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 = <0x0 &apps_smmu 0x1c80 0x1>, <0x100 &apps_smmu 0x1c81 0x1>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_clkreq_n>; @@ -173,7 +170,18 @@ examples: resets = <&gcc GCC_PCIE_1_BCR>; reset-names = "pci"; - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&pp3300_ssd>; + pcie1_port0: pcie@0 { + device_type = "pci"; + reg = <0x0 0x0 0x0 0x0 0x0>; + bus-range = <0x01 0xff>; + + #address-cells = <3>; + #size-cells = <2>; + ranges; + phys = <&pcie1_phy>; + + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; + }; }; }; From patchwork Sat Apr 19 05:19:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya Chundru X-Patchwork-Id: 14057781 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 5B32E18CC15 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 (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53J3PwTa013132 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-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4643wwg3fj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 19 Apr 2025 05:19:46 +0000 (GMT) Received: by mail-pf1-f197.google.com with SMTP id d2e1a72fcca58-739515de999so2072387b3a.1 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=1745039985; x=1745644785; 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=vThQvNJg5PCB/ytPb6sX1kQl6fmHNDKrtzC47SmSZebVqSiBwDtYKgeham4gdyfCna JdH1tip2uyMDU8HBFLYCeJ8LM0/rcmX5bL5mMa3OjNYIN6g8bOlGxwKJc7nficcmc049 mgJJTfPkI0Wx6cT+1w0QxYW2SRcN4TAZ+8fMsyuDcmmGgBau/nGUJhi+VLan/Lto5pSE yd30lBwqOst4fMSTH4xeMtDWp05WNLJ/j0Ae/gcEfLbc7/mFbUT6mcWOT5QCupqgaxoa pPj9SptKyne7j+4jsP2qjXH0r1FsYdxMqDLxEaK2Jo12gW64Mb/168w9879GZYIerFNL 5AjQ== X-Gm-Message-State: AOJu0Yw5uM+pRPjS3IdG2qLZOFmxrZUERiXj7TjzsqtE9+erHJ3n9hhN qzbCP515LNJm4WgS5jW9n12UxLEjz4vdm33J54w5Ibl+dcMcrgzG1yJ61AhYSulahPpmnuVJsia nFIwx24MuCQ0gBfE+5RulsF07hKu+MXZw7mPI7MXR5bRPInNPPpNxHHReTRrkbPk/ X-Gm-Gg: ASbGncu3CvFumRH2xEyFWalVXsTNyGfrO3I6Ad7yjI1xXz4RT235STpXQ96xnHjgJpU aHHp9ChJL0Q07g1TkaAjGaIhTxvmlWLR4n2+6v5AFtPjhdrUce0dAw7AxBeIsDveuwjxg711ioD kA6EVFt2SMjD+bcNVDEzFQHCe8xzVWGJmVmo0QscnT7HWsuHj31HN43DojZJs3YfseusFgCKKM8 0Q4QrID9Dwvsalh3fcan46NzDKySuOCk1isjyXbbm7lcS8Odoj3D4b1q1xAyDQv5WLGUlsj0hko O58QhOy+yaq7XGY8LSvMT/wU3D9KmeV4D9Mr9eJJeyXHAYw= X-Received: by 2002:a05:6a00:4acc:b0:736:b9f5:47c6 with SMTP id d2e1a72fcca58-73dc1566938mr6532792b3a.16.1745039984549; 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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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?= =?utf-8?q?=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=IpEecK/g c=1 sm=1 tr=0 ts=68033272 cx=c_pps a=rEQLjTOiSrHUhVqRoksmgQ==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=kQczSkNYjdDqFxC5ROQA:9 a=QEXdDO2ut3YA:10 a=2VI0MkxyNR6bbpdq8BZq:22 X-Proofpoint-GUID: V6X_1wgqbjLkIy6-Eds9HoXIbnkRq2Wb X-Proofpoint-ORIG-GUID: V6X_1wgqbjLkIy6-Eds9HoXIbnkRq2Wb 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 lowpriorityscore=0 spamscore=0 adultscore=0 clxscore=1015 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 mlxscore=0 mlxlogscore=999 impostorscore=0 phishscore=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/controller/dwc/pcie-qcom.c index dc98ae63362db0422384b1879a2b9a7dc564d091..e97e5076f5f77acbbdfb982af7acc69daf9bf307 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; }; +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; }; #define to_qcom_pcie(x) dev_get_drvdata((x)->dev) -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 = 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); } +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); } 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); } +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 = 0; + + if (list_empty(&pcie->ports)) { + ret = phy_set_mode_ext(pcie->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); + if (ret) + goto out; + + ret = phy_power_on(pcie->phy); + if (ret) + goto out; + } else { + list_for_each_entry_safe(port, tmp, &pcie->ports, list) { + ret = phy_set_mode_ext(port->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); + if (ret) + goto out; + + ret = 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 = 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; - ret = phy_set_mode_ext(pcie->phy, PHY_MODE_PCIE, PHY_MODE_PCIE_RC); - if (ret) - goto err_deinit; - - ret = phy_power_on(pcie->phy); + ret = qcom_pcie_phy_power_on(pcie); if (ret) goto err_deinit; @@ -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); @@ -1281,7 +1348,7 @@ static void qcom_pcie_host_deinit(struct dw_pcie_rp *pp) struct qcom_pcie *pcie = to_qcom_pcie(pci); qcom_ep_reset_assert(pcie); - phy_power_off(pcie->phy); + qcom_pcie_phy_off(pcie); pcie->cfg->ops->deinit(pcie); } @@ -1579,11 +1646,41 @@ static irqreturn_t qcom_pcie_global_irq_thread(int irq, void *data) return IRQ_HANDLED; } +static int qcom_pcie_parse_port(struct qcom_pcie *pcie, struct device_node *node) +{ + struct device *dev = pcie->pci->dev; + struct qcom_pcie_port *port; + struct gpio_desc *reset; + struct phy *phy; + + reset = devm_fwnode_gpiod_get(dev, of_fwnode_handle(node), + "reset", GPIOD_OUT_HIGH, "PERST#"); + if (IS_ERR(reset)) + return PTR_ERR(reset); + + phy = devm_of_phy_get(dev, node, NULL); + if (IS_ERR(phy)) + return PTR_ERR(phy); + + port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL); + if (!port) + return -ENOMEM; + + port->reset = reset; + port->phy = 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 = ULONG_MAX; + struct qcom_pcie_port *port, *tmp; struct device *dev = &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 *pdev) if (ret < 0) goto err_pm_runtime_put; + INIT_LIST_HEAD(&pcie->ports); + pci->dev = dev; pci->ops = &dw_pcie_ops; pp = &pci->pp; @@ -1619,12 +1718,6 @@ static int qcom_pcie_probe(struct platform_device *pdev) pcie->cfg = pcie_cfg; - pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH); - if (IS_ERR(pcie->reset)) { - ret = PTR_ERR(pcie->reset); - goto err_pm_runtime_put; - } - pcie->parf = devm_platform_ioremap_resource_byname(pdev, "parf"); if (IS_ERR(pcie->parf)) { ret = PTR_ERR(pcie->parf); @@ -1647,12 +1740,6 @@ static int qcom_pcie_probe(struct platform_device *pdev) } } - pcie->phy = devm_phy_optional_get(dev, "pciephy"); - if (IS_ERR(pcie->phy)) { - ret = PTR_ERR(pcie->phy); - goto err_pm_runtime_put; - } - /* OPP table is optional */ ret = devm_pm_opp_of_add_table(dev); if (ret && ret != -ENODEV) { @@ -1699,9 +1786,35 @@ static int qcom_pcie_probe(struct platform_device *pdev) pp->ops = &qcom_pcie_dw_ops; - ret = phy_init(pcie->phy); - if (ret) - goto err_pm_runtime_put; + for_each_available_child_of_node(dev->of_node, of_port) { + ret = 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 = devm_phy_optional_get(dev, "pciephy"); + if (IS_ERR(pcie->phy)) { + ret = PTR_ERR(pcie->phy); + goto err_pm_runtime_put; + } + + pcie->reset = devm_gpiod_get_optional(dev, "perst", GPIOD_OUT_HIGH); + if (IS_ERR(pcie->reset)) { + ret = PTR_ERR(pcie->reset); + goto err_pm_runtime_put; + } + + ret = phy_init(pcie->phy); + if (ret) + goto err_pm_runtime_put; + } platform_set_drvdata(pdev, pcie); @@ -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); return ret; } From patchwork Sat Apr 19 05:19:26 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krishna Chaitanya Chundru X-Patchwork-Id: 14057782 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 EDEA718D643 for ; Sat, 19 Apr 2025 05:19:50 +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=1745039992; cv=none; b=kjqueqFzxp8522EPf6gfSuprGYoQkQXud5857diei8X9qeITRVv0u0oCekQX6f8ZRrixN/HJOzwpS8u/CAcVFQqKKdsPp0m9TNaPdoyhi2slbHaN42Zr4H3dgF2jK/7tOnYgOjMP8oBw9dYYqkvduY1yaNBjvPydPMNeffcAk6c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1745039992; c=relaxed/simple; bh=3DnAtxNAZDqNQqcmKUvx3DsvQPY0Kl35D9B1JCC1B6M=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=SMKEKUpgFXlRI4SvPZMbGKNh4EMCW/1HPAXX6RCJNys4ByO3VZFhk945JJBA7gQRfdZ9KZR2tbPPy/X/B5c6I/G2ERdXe/1mVgTdm6Rd2zPFLLLxVthi0QZYXRqeYKpx63aCelleu94g85ZUzk2PaNYYneWg86udf7H+ABkdG04= 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.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="GsLwM/GA" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 53J3oNjA023524 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-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 464426g31n-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-pg1-f200.google.com with SMTP id 41be03b00d2f7-af5156fbe79so2516465a12.1 for ; Fri, 18 Apr 2025 22:19:49 -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=QnNqAz3xelNfBrAxCBa+UNKHMQmDcLHajt+Xm69kDBMcUBP/W8+AEj6OU9FOYhpLJm EJt+PjHc1G5NpzBoDEonMHRcqeWRO/UfNLPBh2F4cNttfwiz7F9F/5AGEViprRcV2Zgy DrYvsaAY7I4mEv+ivE2NfZnCmbm+o6t6tj2e8hzXan6s5kJRsLu2pnebxqd1o/xxQMBH 3lZSQTlB831AUGbawNzVSJDtiuhYK+a5QhKleJkdTxwiblDoL4trSQcJXUF0cihvRTtq 3dXvZ5dY6/mU8H5uHL0jNQJj4RVbJOfZwBGoiV2fSmGnPTQl7y5G0TjULnu3Pa/x96rS cy0w== X-Gm-Message-State: AOJu0YxP/SDOzusNkqhz0xuV7Mya3OCQHM7nV+oAZuZKhjv90kTiB4hM A770AGplwr7xAwLPdgdN1TLAycsQ6bLB/A/oA3irNjBuy1dUCM9GQYsV+LUtNZbZ0Pp1953NRSt 1w1v7tWcd/d6TuynDN2ZHZp8t0W4BOR0RoPwjcxj6yBbOiok9uW8IXvVE5JmsxAzt X-Gm-Gg: ASbGncvn1y6Og0VpUBVCo1XYdR2c5EIS2uiMAbnIL6DQ1vqTPv2T8CB4PE0pJ15ddGk tsJ5ZbUtS9Ab2HVUgKilOPMQeVGVsN50bl0jLJQJ6H9Cpt4YMY9/qx/R/zR23HwK8f2e0zce26U e0sVtBj9AXmkAHcpQoAwKyLORo6hlxQiwiwymb2kjrnQmIWZ59LIYWrDxdi5EuEZRmayrLpbR+i JlJ7LN5xuYSQqo7f90rX368wCjhHG9sfraQlxOH4EjYrSOGyQmGmnaCc8v0MeFlqRTP0VwgsV15 JoCbCUkfUb2SxP7v61GvQdFXDhjYCtdFVSZI0/KMZaAG2as= X-Received: by 2002:a05:6a20:c90e:b0:1f5:9098:e446 with SMTP id adf61e73a8af0-203cbc0573emr8333328637.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-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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?= =?utf-8?q?=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-ORIG-GUID: UiLIRTBEaSWPpnvof4V-ApQ6Vu08vP35 X-Proofpoint-GUID: UiLIRTBEaSWPpnvof4V-ApQ6Vu08vP35 X-Authority-Analysis: v=2.4 cv=IP8CChvG c=1 sm=1 tr=0 ts=68033276 cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==: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=3WC7DwWrALyhR5TkjVHa:22 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 mlxlogscore=999 spamscore=0 mlxscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 bulkscore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 adultscore=0 impostorscore=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..3dd58986ad5da0f898537a51715bb5d0fecbe100 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 = "okay"; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pcie1 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; pinctrl-0 = <&pcie1_reset_n>, <&pcie1_wake_n>; pinctrl-names = "default"; diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi index 2ba4ea60cb14736c9cfbf9f4a9048f20a4c921f2..ff11d85d015bdab6a90bd8a0eb9113a339866953 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 = "default"; pinctrl-0 = <&pcie1_clkreq_n>, <&ssd_rst_l>, <&pe_wake_odl>; - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&pp3300_ssd>; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pm8350c_pwm { status = "okay"; }; diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi index 7370aa0dbf0e3f9e7a3e38c3f00686e1d3dcbc9f..3209bb15dfec36299cabae07d34f3dc82db6de77 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 = <&vreg_bob>; }; +&pcie1_port0 { + reset-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; +}; + &pcie1 { status = "okay"; - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; vddpe-3v3-supply = <&nvme_3v3_regulator>; diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi index 0f2caf36910b65c398c9e03800a8ce0a8a1f8fc7..376fabf3b4eac34d75bb79ef902c9d83490c45f7 100644 --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi @@ -2271,9 +2271,6 @@ pcie1: pcie@1c08000 { power-domains = <&gcc GCC_PCIE_1_GDSC>; - phys = <&pcie1_phy>; - phy-names = "pciephy"; - pinctrl-names = "default"; pinctrl-0 = <&pcie1_clkreq_n>; @@ -2284,7 +2281,7 @@ pcie1: pcie@1c08000 { status = "disabled"; - pcie@0 { + pcie1_port0: pcie@0 { device_type = "pci"; reg = <0x0 0x0 0x0 0x0 0x0>; bus-range = <0x01 0xff>; @@ -2292,6 +2289,7 @@ pcie@0 { #address-cells = <3>; #size-cells = <2>; ranges; + phys = <&pcie1_phy>; }; };