From nobody Mon Sep 28 23:55:40 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 86634483BFF; Fri, 14 Aug 2026 15:39:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721950; cv=none; b=NVp7CJajuk9Qn3g2OHBzg3UVTRyKAwxv2+W1zZln9h9nlkWBAV6Ov13i330P5ahmq4omjrZ7VXsblCJ0+rA6LLKt1iNBXVo07/W9JhBXt5yqXwzzSKLWFsIyGL+TXddn1UVERBi64uYZVYHHftlVc4+o79XPful7ptc5ntBoh64= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721950; c=relaxed/simple; bh=QJBCitYzWwflLrWiDRu78VDpaeC3IQF9C0rZ95zEfi4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UZmNq9gz9bIwHD0ZXQCCe912I00gtRMQobQlTh6F4EFdtL08oExoaFfhKCyoexCYJzdBIgZcOVoiZ+vab7FGmmp/yyWaipNpTSSVnWqmLR+onVedLW75R4iSt664cZbfjfQKL0VQmGnyMqMz88A+SfKnIa+C3ZWKJN0a35OIjkA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PKajM6kc; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PKajM6kc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 818E91F00A3A; Fri, 14 Aug 2026 15:39:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786721948; bh=ezsJClKarQOh1EExGOGVA03VGzcpj4V0a71l4gZZGmg=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=PKajM6kcJl3I7japc3WCR33RxLEeNgt410sKbgxFTzBgDw20/QopQzAQ94Ky/TH8G eF6iJsRDukSIzAJxcAMT20CSz6ZeAOA4vNi5ry72WC06xEQ3GxySrMRsZ1BeW61BMp 0u07f8AkfPgfFQgrDpWdKQpkm/Hs3arwmZjchaCUGKXPdzmKKi0MzTJ1iJxxc4PAfZ duZzggptslHFtDGbDV7xBSUkjsu2SzTl9IBDKr+/h4iYFjVqR4UvcDsZLM69PdC3on 1bFpd278h5Hspyv93ERrFMA7gwIjuarXCcJgK1fHI78SDzsO//2BQyLOI7H1J1oMFf epRPmxJjAAZAw== From: Thierry Reding Date: Fri, 14 Aug 2026 17:38:55 +0200 Subject: [PATCH v10 1/5] dt-bindings: pci: tegra264: Strictly distinguish C0 from C1-C5 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: <20260814-tegra264-pcie-v10-1-05d08c592b05@nvidia.com> References: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> In-Reply-To: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> To: Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Karthikeyan Mitran , Hou Zhiqiang , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Michal Simek , Kevin Xie , Thierry Reding , Aksh Garg Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thierry Reding X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=5710; i=treding@nvidia.com; h=from:subject:message-id; bh=V/CGU66pjhf9XcbdO9F3rm7FTq62By8U5dKmga+Bzyc=; b=owEBbQKS/ZANAwAKAd0jrNd/PrOhAcsmYgBqfzaVGjf4VNRRTS2CBGR3r5fyd6Cd+4AJ3Locy npfa4At5xGJAjMEAAEKAB0WIQSI6sMIAUnM98CNyJ/dI6zXfz6zoQUCan82lQAKCRDdI6zXfz6z oQyUD/9JflgjroQ7fN6CrDfV+fPua4tXi/Z4dHx0aesO2XkO8rKUGmFPxFJQA3fSqXbA8xn3Q8L dMXb+IxVNKV6Y06idWtzi71DK+x2HvX5LX+iD+6AOR9we8Sc0lwWunarxF0s2uoJFf/utxylv3Q jCoXQAuLxlblqVEor5mNPnVhZF54Or5It9LNM3eFY3ehWvT7+p/Z4bgFNjEohGAKDR+MO+UxLqy XaKBjkg4ol6BVjig0RR0ocUxyUei910e2xv4uGxAZKqLjlHIrbccmrJQempIQ4gJ78Uct4kdwz8 Xll8/VVIZJhDwYrK44dv4UvZnYJt5qsHVwhymHDOOZkvsoEEcBHqlsmUuXrIkLDNtzMVdLvE5Ac ikCwR+cbg/VU2io6jepOabs2iPU/xcBSONjzx34xrJom4EhdBcSi7s/eW7uZ00dTmr/bC9hmsya tTB7mxbShNa0EnZqf2I7Yzo3XsitbcR0J1f9qwg9ZoxTLGYMBjTu+0VNLwSmq8NAswtv3LxVEa5 6N1eeXGongPXO6rnNNZuxJmICEQVRpLgFzafCJ42jEV+D6+miWemAVmiioKwEajFQs0S1qy+hzW XM6H26JTbNxmGmlbwzIWSI2giPQkKLId92d89WFJPSQdf+chA7RVkRR0ZkXsnjqXG30p9tQ73rC jPnb4Y0AvWe/atw== X-Developer-Key: i=treding@nvidia.com; a=openpgp; fpr=88EAC3080149CCF7C08DC89FDD23ACD77F3EB3A1 From: Thierry Reding Instead of using the ECAM registers as the first entry, strictly make a distinction between C0 and C1-C5. This is needed because otherwise the unit address doesn't match the first "reg" entry. We also cannot change the ordering of these nodes to follow the ECAM addresses because that would put them outside of their "control bus" hierarchy since the ECAM address space is a global one outside of any of the control busses. Reviewed-by: Rob Herring (Arm) Signed-off-by: Thierry Reding --- Changes in v7: - undo changes suggested by Sashiko, should've trust the dedicated tool rather than the AI Changes in v6: - add maxItems as suggested by Sashiko Changes in v5: - rebase on top of v7.1-rc1, make it into a fix Changes in v4: - ECAM is outside of the controller's region, so it cannot be the first reg entry, otherwise we get warnings because it doesn't match the unit-address, so revert back to oneOf construct Changes in v2: - move ECAM region first and unify C0 vs. C1-C5 - move unevaluatedProperties to right before the examples - add description to clarify the two types of controllers - add examples for C0 and C1-C5 --- .../bindings/pci/nvidia,tegra264-pcie.yaml | 75 ++++++++++++++----= ---- 1 file changed, 50 insertions(+), 25 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yam= l b/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml index dc4f8725c9f5..acb677d477fb 100644 --- a/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml @@ -10,32 +10,23 @@ maintainers: - Thierry Reding - Jon Hunter =20 +description: | + Of the six PCIe controllers found on Tegra264, one (C0) is used for the + internal GPU and the other five (C1-C5) are routed to connectors such as + PCI or M.2 slots. Therefore the UPHY registers (XPL) exist only for C1 + through C5, but not for C0. + properties: compatible: const: nvidia,tegra264-pcie =20 reg: - description: | - Of the six PCIe controllers found on Tegra264, one (C0) is used for = the - internal GPU and the other five (C1-C5) are routed to connectors suc= h as - PCI or M.2 slots. Therefore the UPHY registers (XPL) exist only for = C1 - through C5, but not for C0. minItems: 4 - items: - - description: ECAM-compatible configuration space - - description: application layer registers - - description: transaction layer registers - - description: privileged transaction layer registers - - description: data link/physical layer registers (not available on = C0) + maxItems: 5 =20 reg-names: minItems: 4 - items: - - const: ecam - - const: xal - - const: xtl - - const: xtl-pri - - const: xpl + maxItems: 5 =20 interrupts: minItems: 1 @@ -70,6 +61,40 @@ required: =20 allOf: - $ref: /schemas/pci/pci-host-bridge.yaml# + - oneOf: + - description: C0 controller (no UPHY) + properties: + reg: + items: + - description: application layer registers + - description: transaction layer registers + - description: privileged transaction layer registers + - description: ECAM compatible configuration space + + reg-names: + items: + - const: xal + - const: xtl + - const: xtl-pri + - const: ecam + + - description: C1-C5 controllers (with UPHY) + properties: + reg: + items: + - description: application layer registers + - description: transaction layer registers + - description: privileged transaction layer registers + - description: data link/physical layer registers + - description: ECAM compatible configuration space + + reg-names: + items: + - const: xal + - const: xtl + - const: xtl-pri + - const: xpl + - const: ecam =20 unevaluatedProperties: false =20 @@ -81,11 +106,11 @@ examples: =20 pci@c000000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xd0 0xb0000000 0x0 0x10000000>, - <0x00 0x0c000000 0x0 0x00004000>, + reg =3D <0x00 0x0c000000 0x0 0x00004000>, <0x00 0x0c004000 0x0 0x00001000>, - <0x00 0x0c005000 0x0 0x00001000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri"; + <0x00 0x0c005000 0x0 0x00001000>, + <0xd0 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; @@ -118,12 +143,12 @@ examples: =20 pci@8400000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xa8 0xb0000000 0x0 0x10000000>, - <0x00 0x08400000 0x0 0x00004000>, + reg =3D <0x00 0x08400000 0x0 0x00004000>, <0x00 0x08404000 0x0 0x00001000>, <0x00 0x08405000 0x0 0x00001000>, - <0x00 0x08410000 0x0 0x00010000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri", "xpl"; + <0x00 0x08410000 0x0 0x00010000>, + <0xa8 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "xpl", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; --=20 2.55.0 From nobody Mon Sep 28 23:55:40 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 630C43C584A; Fri, 14 Aug 2026 15:39:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721953; cv=none; b=sJ684z2ag8YUKdPRhgG87fIJE5jOnm4DIR4w5hYKuZnubQXxsWK2EnaubA1M4eUSlfkPUn3IYGVRBHpXGSliiaNXEE2UKJgLZ7gRhmTzJQQLVrpu0OvD9XzyvIrVgv45FLyztnxkg5m77dhiciV/EXGRBV6JWKgBlraqvLpliCg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721953; c=relaxed/simple; bh=AsnbgNmf+HwbifuA45CiG/0EgRpahaLqzN0bLyG+m3c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=cCr/BDDplHV//GhxZDd2jj7UCkqrdWZSA2aE04Jtu7HTalT62fUSehGseRMJVBxFwKBwCOCi+nCkBMmW2wrKhUMjSsCRDmlwVS6opVKVXRFtbu/M1cG1Kd2tMpUA4fs0GIS78m64EMSHNhmRMRPT7IC3pDd70DPuJ848SlQYFWI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HXOp9H8R; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HXOp9H8R" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 606351F000E9; Fri, 14 Aug 2026 15:39:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786721950; bh=EPr4wZRyfVeBp/ECZGrk2k/IiWtBziYaIFZZVuqI5SE=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=HXOp9H8Rxt3iMFkuUnoSHJbphLg+xlUwIKk5m+s6PmeExYwOTDRWvRBV7iUcgOdvF FlVfbEJHEZKRRYL49kW7Gy2MTcofLzRutf6el3FpHdQW7/53UcVSiNDWJWQDgKk7LJ exGQxwpSS/PibjmPfFgLS3ueTYDTs4JdfDWP7Z9aMlhbwNSqwgcFR4c73WNXUdDiD1 MdKCGpiXA7BSn1ghsxnDMSSl5621txqPtZaPnH8Z03KxbTHPGrb9FA9E1fUGmQxJL3 0N0x36IM6MJ/HP1Fh9gVFWduLQwEy/QRV4nkIs/guNi7h3F+4j8Q0n3vEo3BFbVEhI 5bL1DKj4GWaqg== From: Thierry Reding Date: Fri, 14 Aug 2026 17:38:56 +0200 Subject: [PATCH v10 2/5] dt-bindings: pci: tegra264: Switch to PCIe root port bindings 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: <20260814-tegra264-pcie-v10-2-05d08c592b05@nvidia.com> References: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> In-Reply-To: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> To: Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Karthikeyan Mitran , Hou Zhiqiang , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Michal Simek , Kevin Xie , Thierry Reding , Aksh Garg Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thierry Reding X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2568; i=treding@nvidia.com; h=from:subject:message-id; bh=1BWs+HLmBC1XfIce8W+1QZG1x6oT7cno/PFzg2n+ylw=; b=owEBbQKS/ZANAwAKAd0jrNd/PrOhAcsmYgBqfzaVlZvE1dtQtLMoXuQgz5liU0M9u5ehlF94O jzwxJ/Q1s6JAjMEAAEKAB0WIQSI6sMIAUnM98CNyJ/dI6zXfz6zoQUCan82lQAKCRDdI6zXfz6z oXw1D/90cWOkWJ4qrK+jn+292oA7vclTTC4GmrJC296lsRR8YHCRXi+ykPtv/MnrFNIGcZo7XgI OdM9hRQB3xmy0LFREaS5t3Zq3BV/xcRhVw+QDXtDoMOgJJKhB9wyTzl4XiAZbWRjW185uqOBUpU wvMxqJTL+3y7ub3Kl9zmjgnFTZIW3QQYi3aKZ18FzEIG4OHjsGyJgBWVZI9/3jTJT5HElMmg0Uc WchM2F6EFs75TrPRzHj7Y3YUNPduHeBRW4kPMLQVYLpnkn+dH1+F4zKkLpPJaNW/Zg2nY+l29h1 LP8OuoLCvNabPRIbtl1W+9B8TJuvgncznGJ4cRgGo+x+tf5t/rNmvVX5hrOuLbTfznlG2yhVxzu hoU2eezhcGSYwymyZ9UAkBzwwNI05ET6Sk/xyJE3Z3IpnJYWtUEzhVYVv9Q0P+/SEnsDCDRPYPE arKYg4sh1O9Ebu1lZNqK8t7YyES67G22McjdIMNjc6VCtJDM90vHr1knCd7d9ZNQObUrJBFyo1y 3p+5eTa+1LMdoP8vxabvXFQ3okE9aUFLR4OvLboNS/N4M5wqfLobN9qspQDgffOU0NTO6dhW/Np ICdMGvYpvL7737E9nE5OGoMn+BBYjQXXh9OaPgkfGUaNiHY7Nc8Rw3mEcSjECjBJI3kjiDxLfOX fjkonTq3KXsHSZQ== X-Developer-Key: i=treding@nvidia.com; a=openpgp; fpr=88EAC3080149CCF7C08DC89FDD23ACD77F3EB3A1 From: Thierry Reding Switch to using the PCIe root port bindings in preparation for using the standard WAKE# handling. Signed-off-by: Thierry Reding --- .../bindings/pci/nvidia,tegra264-pcie.yaml | 40 +++++++++++++++++-= ---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yam= l b/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml index acb677d477fb..f0114defc04e 100644 --- a/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml +++ b/Documentation/devicetree/bindings/pci/nvidia,tegra264-pcie.yaml @@ -52,12 +52,11 @@ properties: - description: PCIe controller ID maximum: 5 =20 -required: - - interrupt-map - - interrupt-map-mask - - iommu-map - - msi-map - - nvidia,bpmp +patternProperties: + '^pcie@': + type: object + $ref: /schemas/pci/pci-pci-bridge.yaml# + unevaluatedProperties: false =20 allOf: - $ref: /schemas/pci/pci-host-bridge.yaml# @@ -96,6 +95,13 @@ allOf: - const: xpl - const: ecam =20 +required: + - interrupt-map + - interrupt-map-mask + - iommu-map + - msi-map + - nvidia,bpmp + unevaluatedProperties: false =20 examples: @@ -130,9 +136,18 @@ examples: ranges =3D <0x81000000 0x00 0x84000000 0xd0 0x84000000 0x00 0x0020= 0000>, <0x82000000 0x00 0x20000000 0x00 0x20000000 0x00 0x080000= 00>, <0xc3000000 0xd0 0xc0000000 0xd0 0xc0000000 0x07 0xc00000= 00>; - bus-range =3D <0x0 0xff>; =20 nvidia,bpmp =3D <&bpmp 0>; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; }; =20 @@ -167,8 +182,17 @@ examples: ranges =3D <0x81000000 0x00 0x84000000 0xa8 0x84000000 0x00 0x0020= 0000>, <0x82000000 0x00 0x28000000 0x00 0x28000000 0x00 0x080000= 00>, <0xc3000000 0xa8 0xc0000000 0xa8 0xc0000000 0x07 0xc00000= 00>; - bus-range =3D <0x00 0xff>; =20 nvidia,bpmp =3D <&bpmp 1>; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; }; --=20 2.55.0 From nobody Mon Sep 28 23:55:40 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 DE4A6486652; Fri, 14 Aug 2026 15:39:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721958; cv=none; b=ttBNEdf3CF9csZQw5LiQHPBwb/EmYsXYlchPtlz/p7iXPRTHOD4PF6LmQXmvFPz/6V2y8tUh9Iiq+lr02b/8WGb9Z8Mf71ojdywNmCJUL3ZhmwmBkzkzrl7d9rsLUwvyN6RtiHYSbwvrsjx+WZeYdhZ/AmWmxDXHlWCCwdEq4F4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721958; c=relaxed/simple; bh=Tchko3IiFRU8dwEaG4WRm9ghqkIM8I7SpAU/FgScaCM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F+KHo8o/kk41IYZoWD+dP3wzQ0UAJCbPhzYRvc2la6GTtkraby6PJVoHd8eVKxoK627W96FYMackGugTyEm+9HxJ6yxkfdeTOYd6hQIqxFKXe5ve/rhX8qTF545vLRH5R9V3/6Rx8msyqBj1rop21kjwEtzJE/1OXHa/6jbFTkE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NWAZKsWn; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NWAZKsWn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 367F01F000E9; Fri, 14 Aug 2026 15:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786721953; bh=mZbdBIG26ywgCZIMfpjXhI1Y9/UF3PHEA2z4cW5SVWs=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=NWAZKsWniPGPSime2owOhk9VqbnrTME55+yfKD5vGMSHFmNaOhrQzutrZZMk0KTOZ BGiW7yEIqL4ZAbqfKB0suhj9qmCCHROUEowfmlGBI2wHlp2WuhFBWBOPGwuV6w/lED 0EhDv+VgUoM90PuotT4+M38scpkY245gUMe8TSw1FhIKqAIoXbkN7QuQInZE0KEf8m X77PKlRESqEEGs4ezNCa1ofpiprht5rIQ+r+OSz76O7yZS1rA/rwgSQ0lMo04GAUKZ ojjeUZ9mjBbN0MyiwfiQbC5Ui3W+7qY40tvw3hP1hQGpBYu90upMsSFFl1QLjGYxgJ J1HhCDdOBArRg== From: Thierry Reding Date: Fri, 14 Aug 2026 17:38:57 +0200 Subject: [PATCH v10 3/5] PCI: tegra: Add Tegra264 support 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: <20260814-tegra264-pcie-v10-3-05d08c592b05@nvidia.com> References: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> In-Reply-To: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> To: Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Karthikeyan Mitran , Hou Zhiqiang , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Michal Simek , Kevin Xie , Thierry Reding , Aksh Garg Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thierry Reding , Manikanta Maddireddy X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=18799; i=treding@nvidia.com; h=from:subject:message-id; bh=k3NSVFNgt5NCNvyTRobqYHr0aDx+sTUSfIG7s4VkszM=; b=owEBbQKS/ZANAwAKAd0jrNd/PrOhAcsmYgBqfzaWUnLz1K1NFKvAcf38Aa3AnzGa7x/LoxObs XtXNd+xo7eJAjMEAAEKAB0WIQSI6sMIAUnM98CNyJ/dI6zXfz6zoQUCan82lgAKCRDdI6zXfz6z obnDEACsc0kEuHD9gs4gLwsEeR1OUCZzRAB5Q6q7rJeHbzQzU6Jtz78NO41WS9qMbi9Cgakrbo4 VQELPCgLt+nZC8GDJAd03ixLBV35kb1CzeXpYXWzBBgZ1GYYJxs856aFy1+JFZGtfCCjYCDgaP9 +Q3LfsxUzO5DcOlnTt/CFpeW7J0dxP8CgGMmyoKD/yg3/xYYGqW8ye762qXnPmJREL+BbgJxvuF bmy4Jcq2RA7/2M06Ro4CtAO7JLKkypgppWNbK3QGaJnWPEVDIo2lLFi7gJ9nSC2EI4NBYmiaEb+ tAjypP2xQgVcrYulh4GkqNf9N1tXxqpcE6lKb1YOoeqq7VCmxTRpxb5e/CFMax1Z7yKhmg0lYrZ BIQ8T6l4s7yfbTgT6TgncfvEwABfvg4ykXbnRrQXyfUUQgTNIZs2BSWk4Y2X/f37iaHPbA98xNy t9An/V/zZAWNdXrZVWTCitZsKANgTflaBjkynwtbJ3gZr19Or/wSyGEgmhEJiuqvfJWn2ljFNIq xYNcXcn3kliv7ZZ4FDGVr5SjjlGsK2hT6n6Hk/OxYZnqgMx3YEM0QVsWFsJWkxBmmMlxsRd0YV2 rGrplcciKWuY+pNIyBS4xVm0kU80Uwr6WaE0/A0QNoBA1BoJRMO/7cNzPiSRnL/pFdab9ctN0k9 OtOQifzouN3jb6w== X-Developer-Key: i=treding@nvidia.com; a=openpgp; fpr=88EAC3080149CCF7C08DC89FDD23ACD77F3EB3A1 From: Thierry Reding Add a driver for the PCIe controller found on NVIDIA Tegra264 SoCs. The driver is very small, with its main purpose being to set up the address translation registers and then creating a standard PCI host using ECAM. Signed-off-by: Manikanta Maddireddy Signed-off-by: Thierry Reding --- Changes in v10: - read link speed and width from capabilities register if link down Changes in v9: - remove suspend/resume support, it doesn't work on Tegra264 yet - use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() - rename tegra264_pcie_check_ranges() for clarity - remove unused header includes Changes in v8: - remove controller deinitialization, firmware does this already - separately track hotplug support and link up state for clarity - select pinctrl sleep state on suspend for symmetry with resume - fail probe if the link is down and not hotplug-capable - remove WAKE# IRQ support - add err_ prefix to gotos Changes in v7: - select PCI_ECAM to satisfy the build dependency (Jonathan Hunter) - remove pre-silicon support patch to avoid extra build dependency Changes in v6: - remove unneeded pm_runtime_disable() call (Sashiko) - do not use noirq suspend/resume callbacks (Sashiko) - wrap PM ops in pm_ptr() macro (Sashiko) - use standard wait times with msleep() (Lukas Wunner) - properly check errors for wake IRQs - fix build failures /o\ Changes in v5: - make PCIE_TEGRA264 symbol tristate - drop dependency on PCI_MSI - reorganize tegra264_pcie struct - use standard wake-gpios property - rename tegra264_pcie_bpmp_set_rp_state() to tegra264_pcie_power_off() - use dev_err() instead of dev_info() for some error messages - add clarifying comment as to why bandwidth requests aren't fatal - address some compiler warnings on 32-bit physical address platforms - drop needless comments - explicitly deinitialize controller on suspend - use devm_pm_runtime_active_enabled() - rename "free" label to "free_ecam" - use dev_err_probe() in more places - reselect default pin state during resume, not probe - return early on absence of wake GPIO - simplify BW value calculation Changes in v2: - specify generations applicable for PCI_TEGRA driver to avoid confusion - drop SPDX-FileCopyrightText tag - rename link_state to link_up to clarify meaning - replace memset() by an empty initializer - sanity-check only enable BAR regions - bring PCI link out of reset in case firmware didn't - use common wait times instead of defining our own - use core helpers to parse and print PCI link speed - fix multi-line comment - use dev_err_probe() more ubiquitously - fix probe sequence and error cleanup - use DEFINE_NOIRQ_DEV_PM_OPS() to avoid warnings for !PM_SUSPEND - reuse more standard registers and remove unused register definitions - use %pe and ERR_PTR() to print symbolic errors - add signed-off-by from Manikanta as the original author - add myself as author after significantly modifying the driver --- drivers/pci/controller/Kconfig | 10 +- drivers/pci/controller/Makefile | 1 + drivers/pci/controller/pcie-tegra264.c | 467 +++++++++++++++++++++++++++++= ++++ 3 files changed, 477 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 8a3a31b2bc12..b20d84290f7e 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -255,7 +255,15 @@ config PCI_TEGRA select IRQ_MSI_LIB help Say Y here if you want support for the PCIe host controller found - on NVIDIA Tegra SoCs. + on NVIDIA Tegra SoCs (Tegra20 through Tegra186). + +config PCIE_TEGRA264 + tristate "NVIDIA Tegra264 PCIe controller" + depends on ARCH_TEGRA || COMPILE_TEST + select PCI_ECAM + help + Say Y here if you want support for the PCIe host controller found + on NVIDIA Tegra264 SoCs. =20 config PCIE_RCAR_HOST bool "Renesas R-Car PCIe controller (host mode)" diff --git a/drivers/pci/controller/Makefile b/drivers/pci/controller/Makef= ile index ac8db283f0fe..d478743b5142 100644 --- a/drivers/pci/controller/Makefile +++ b/drivers/pci/controller/Makefile @@ -7,6 +7,7 @@ obj-$(CONFIG_PCI_HYPERV_INTERFACE) +=3D pci-hyperv-intf.o obj-$(CONFIG_PCI_MVEBU) +=3D pci-mvebu.o obj-$(CONFIG_PCI_AARDVARK) +=3D pci-aardvark.o obj-$(CONFIG_PCI_TEGRA) +=3D pci-tegra.o +obj-$(CONFIG_PCIE_TEGRA264) +=3D pcie-tegra264.o obj-$(CONFIG_PCI_RCAR_GEN2) +=3D pci-rcar-gen2.o obj-$(CONFIG_PCIE_RCAR_HOST) +=3D pcie-rcar.o pcie-rcar-host.o obj-$(CONFIG_PCIE_RCAR_EP) +=3D pcie-rcar.o pcie-rcar-ep.o diff --git a/drivers/pci/controller/pcie-tegra264.c b/drivers/pci/controlle= r/pcie-tegra264.c new file mode 100644 index 000000000000..7774ce10544a --- /dev/null +++ b/drivers/pci/controller/pcie-tegra264.c @@ -0,0 +1,467 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * PCIe host controller driver for Tegra264 SoC + * + * Copyright (c) 2022-2026, NVIDIA CORPORATION. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "../pci.h" + +/* XAL registers */ +#define XAL_RC_ECAM_BASE_HI 0x00 +#define XAL_RC_ECAM_BASE_LO 0x04 +#define XAL_RC_ECAM_BUSMASK 0x08 +#define XAL_RC_IO_BASE_HI 0x0c +#define XAL_RC_IO_BASE_LO 0x10 +#define XAL_RC_IO_LIMIT_HI 0x14 +#define XAL_RC_IO_LIMIT_LO 0x18 +#define XAL_RC_MEM_32BIT_BASE_HI 0x1c +#define XAL_RC_MEM_32BIT_BASE_LO 0x20 +#define XAL_RC_MEM_32BIT_LIMIT_HI 0x24 +#define XAL_RC_MEM_32BIT_LIMIT_LO 0x28 +#define XAL_RC_MEM_64BIT_BASE_HI 0x2c +#define XAL_RC_MEM_64BIT_BASE_LO 0x30 +#define XAL_RC_MEM_64BIT_LIMIT_HI 0x34 +#define XAL_RC_MEM_64BIT_LIMIT_LO 0x38 +#define XAL_RC_BAR_CNTL_STANDARD 0x40 +#define XAL_RC_BAR_CNTL_STANDARD_IOBAR_EN BIT(0) +#define XAL_RC_BAR_CNTL_STANDARD_32B_BAR_EN BIT(1) +#define XAL_RC_BAR_CNTL_STANDARD_64B_BAR_EN BIT(2) + +/* XTL registers */ +#define XTL_RC_PCIE_CFG_LINK_CAPS 0x56 +#define XTL_RC_PCIE_CFG_LINK_STATUS 0x5a + +#define XTL_RC_MGMT_PERST_CONTROL 0x218 +#define XTL_RC_MGMT_PERST_CONTROL_PERST_O_N BIT(0) + +#define XTL_RC_MGMT_CLOCK_CONTROL 0x47c +#define XTL_RC_MGMT_CLOCK_CONTROL_PEX_CLKREQ_I_N_PIN_USE_CONV_TO_PRSNT BIT= (9) + +struct tegra264_pcie { + struct device *dev; + + /* I/O memory */ + void __iomem *xal; + void __iomem *xtl; + void __iomem *ecam; + + /* bridge configuration */ + struct pci_config_window *cfg; + struct pci_host_bridge *bridge; + + /* BPMP and bandwidth management */ + struct icc_path *icc_path; + struct tegra_bpmp *bpmp; + u32 ctl_id; + + bool supports_hotplug; + bool link_up; +}; + +static void tegra264_pcie_power_off(struct tegra264_pcie *pcie) +{ + struct tegra_bpmp_message msg =3D {}; + struct mrq_pcie_request req =3D {}; + int err; + + req.cmd =3D CMD_PCIE_RP_CONTROLLER_OFF; + req.rp_ctrlr_off.rp_controller =3D pcie->ctl_id; + + msg.mrq =3D MRQ_PCIE; + msg.tx.data =3D &req; + msg.tx.size =3D sizeof(req); + + err =3D tegra_bpmp_transfer(pcie->bpmp, &msg); + if (err) + dev_err(pcie->dev, "failed to turn off PCIe #%u: %pe\n", + pcie->ctl_id, ERR_PTR(err)); + + if (msg.rx.ret) + dev_err(pcie->dev, "failed to turn off PCIe #%u: %d\n", + pcie->ctl_id, msg.rx.ret); +} + +static void tegra264_pcie_icc_set(struct tegra264_pcie *pcie) +{ + u32 value, speed, width; + int err; + + /* + * If the link is up, read the negotiated speed and width fields from + * the link status register. Otherwise, read the corresponding values + * from the link capabilities register to ensure the link works after + * hotplug. + * + * Ideally we'll want to update this dynamically, either on hotplug + * or bandwidth change notifications. Neither of those are currently + * possible, so this is as good as it gets for now. + */ + if (pcie->link_up) { + value =3D readw(pcie->ecam + XTL_RC_PCIE_CFG_LINK_STATUS); + speed =3D FIELD_GET(PCI_EXP_LNKSTA_CLS, value); + width =3D FIELD_GET(PCI_EXP_LNKSTA_NLW, value); + } else { + value =3D readw(pcie->ecam + XTL_RC_PCIE_CFG_LINK_CAPS); + speed =3D FIELD_GET(PCI_EXP_LNKCAP_SLS, value); + width =3D FIELD_GET(PCI_EXP_LNKCAP_MLW, value); + } + + value =3D Mbps_to_icc(width * PCIE_SPEED2MBS_ENC(pcie_link_speed[speed])); + + /* + * We don't want to error out here because a boot-critical device + * could be connected to this root port. Failure to set the bandwidth + * request may have an adverse impact on performance, but it is not + * generally fatal, so we opt to continue regardless so that users + * get a chance to fix things. + */ + err =3D icc_set_bw(pcie->icc_path, value, value); + if (err < 0) + dev_err(pcie->dev, + "failed to request bandwidth (%u kBps): %pe\n", + value, ERR_PTR(err)); +} + +/* + * The various memory regions used by the controller (I/O, memory, ECAM) a= re + * set up during early boot and have hardware-level protections in place. = If + * the DT ranges don't match what's been setup, the controller won't be ab= le + * to write the address endpoints properly, so make sure to validate that = DT + * and firmware programming agree on these ranges. + */ +static bool tegra264_pcie_valid_ranges(struct platform_device *pdev) +{ + struct tegra264_pcie *pcie =3D platform_get_drvdata(pdev); + struct device_node *np =3D pcie->dev->of_node; + struct of_pci_range_parser parser; + phys_addr_t phys, limit, hi, lo; + struct of_pci_range range; + struct resource *res; + bool status =3D true; + u32 value; + int err; + + err =3D of_pci_range_parser_init(&parser, np); + if (err < 0) + return false; + + for_each_of_pci_range(&parser, &range) { + unsigned int addr_hi, addr_lo, limit_hi, limit_lo, enable; + unsigned long type =3D range.flags & IORESOURCE_TYPE_BITS; + phys_addr_t start, end, mask; + const char *region =3D NULL; + + end =3D range.cpu_addr + range.size - 1; + start =3D range.cpu_addr; + + switch (type) { + case IORESOURCE_IO: + addr_hi =3D XAL_RC_IO_BASE_HI; + addr_lo =3D XAL_RC_IO_BASE_LO; + limit_hi =3D XAL_RC_IO_LIMIT_HI; + limit_lo =3D XAL_RC_IO_LIMIT_LO; + enable =3D XAL_RC_BAR_CNTL_STANDARD_IOBAR_EN; + mask =3D SZ_64K - 1; + region =3D "I/O"; + break; + + case IORESOURCE_MEM: + if (range.flags & IORESOURCE_PREFETCH) { + addr_hi =3D XAL_RC_MEM_64BIT_BASE_HI; + addr_lo =3D XAL_RC_MEM_64BIT_BASE_LO; + limit_hi =3D XAL_RC_MEM_64BIT_LIMIT_HI; + limit_lo =3D XAL_RC_MEM_64BIT_LIMIT_LO; + enable =3D XAL_RC_BAR_CNTL_STANDARD_64B_BAR_EN; + region =3D "prefetchable memory"; + } else { + addr_hi =3D XAL_RC_MEM_32BIT_BASE_HI; + addr_lo =3D XAL_RC_MEM_32BIT_BASE_LO; + limit_hi =3D XAL_RC_MEM_32BIT_LIMIT_HI; + limit_lo =3D XAL_RC_MEM_32BIT_LIMIT_LO; + enable =3D XAL_RC_BAR_CNTL_STANDARD_32B_BAR_EN; + region =3D "memory"; + } + + mask =3D SZ_1M - 1; + break; + } + + /* not interested in anything that's not I/O or memory */ + if (!region) + continue; + + /* don't check regions that haven't been enabled */ + value =3D readl(pcie->xal + XAL_RC_BAR_CNTL_STANDARD); + if ((value & enable) =3D=3D 0) + continue; + + hi =3D readl(pcie->xal + addr_hi); + lo =3D readl(pcie->xal + addr_lo); + phys =3D ((hi << 16) << 16) | lo; + + hi =3D readl(pcie->xal + limit_hi); + lo =3D readl(pcie->xal + limit_lo); + limit =3D ((hi << 16) << 16) | lo | mask; + + if (phys !=3D start || limit !=3D end) { + dev_err(pcie->dev, + "%s region mismatch: %pap-%pap -> %pap-%pap\n", + region, &phys, &limit, &start, &end); + status =3D false; + } + } + + res =3D platform_get_resource_byname(pdev, IORESOURCE_MEM, "ecam"); + if (!res) + return false; + + hi =3D readl(pcie->xal + XAL_RC_ECAM_BASE_HI); + lo =3D readl(pcie->xal + XAL_RC_ECAM_BASE_LO); + phys =3D ((hi << 16) << 16) | lo; + + value =3D readl(pcie->xal + XAL_RC_ECAM_BUSMASK); + limit =3D phys + ((value + 1) << 20) - 1; + + if (phys !=3D res->start || limit !=3D res->end) { + dev_err(pcie->dev, + "ECAM region mismatch: %pap-%pap -> %pap-%pap\n", + &phys, &limit, &res->start, &res->end); + status =3D false; + } + + return status; +} + +static bool tegra264_pcie_supports_hotplug(struct tegra264_pcie *pcie) +{ + u32 value =3D readl(pcie->xtl + XTL_RC_MGMT_CLOCK_CONTROL); + + return (value & XTL_RC_MGMT_CLOCK_CONTROL_PEX_CLKREQ_I_N_PIN_USE_CONV_TO_= PRSNT) !=3D 0; +} + +static bool tegra264_pcie_link_up(struct tegra264_pcie *pcie, + enum pci_bus_speed *speed) +{ + u16 value =3D readw(pcie->ecam + XTL_RC_PCIE_CFG_LINK_STATUS); + + if (value & PCI_EXP_LNKSTA_DLLLA) { + if (speed) + *speed =3D pcie_link_speed[FIELD_GET(PCI_EXP_LNKSTA_CLS, + value)]; + + return true; + } + + return false; +} + +static void tegra264_pcie_init(struct tegra264_pcie *pcie) +{ + enum pci_bus_speed speed; + unsigned int i; + u32 value; + + /* bring the endpoint out of reset */ + value =3D readl(pcie->xtl + XTL_RC_MGMT_PERST_CONTROL); + value |=3D XTL_RC_MGMT_PERST_CONTROL_PERST_O_N; + writel(value, pcie->xtl + XTL_RC_MGMT_PERST_CONTROL); + + for (i =3D 0; i < PCIE_LINK_WAIT_MAX_RETRIES; i++) { + if (tegra264_pcie_link_up(pcie, NULL)) + break; + + msleep(PCIE_LINK_WAIT_SLEEP_MS); + } + + pcie->supports_hotplug =3D tegra264_pcie_supports_hotplug(pcie); + pcie->link_up =3D tegra264_pcie_link_up(pcie, &speed); + + if (pcie->link_up) { + msleep(PCIE_RESET_CONFIG_WAIT_MS); + dev_info(pcie->dev, "PCIe #%u link is up (speed: %s)\n", + pcie->ctl_id, pci_speed_string(speed)); + tegra264_pcie_icc_set(pcie); + } else { + dev_info(pcie->dev, "PCIe #%u link is down\n", pcie->ctl_id); + + /* + * Make sure to reset the bandwidth requirements if the link + * is down but hotplug-capable. + */ + if (pcie->supports_hotplug) + tegra264_pcie_icc_set(pcie); + } +} + +static int tegra264_pcie_probe(struct platform_device *pdev) +{ + struct device *dev =3D &pdev->dev; + struct pci_host_bridge *bridge; + struct tegra264_pcie *pcie; + struct resource_entry *bus; + struct resource *res; + int err; + + bridge =3D devm_pci_alloc_host_bridge(dev, sizeof(struct tegra264_pcie)); + if (!bridge) + return dev_err_probe(dev, -ENOMEM, + "failed to allocate host bridge\n"); + + pcie =3D pci_host_bridge_priv(bridge); + platform_set_drvdata(pdev, pcie); + pcie->bridge =3D bridge; + pcie->dev =3D dev; + + pcie->xal =3D devm_platform_ioremap_resource_byname(pdev, "xal"); + if (IS_ERR(pcie->xal)) + return dev_err_probe(dev, PTR_ERR(pcie->xal), + "failed to map XAL memory\n"); + + pcie->xtl =3D devm_platform_ioremap_resource_byname(pdev, "xtl-pri"); + if (IS_ERR(pcie->xtl)) + return dev_err_probe(dev, PTR_ERR(pcie->xtl), + "failed to map XTL-PRI memory\n"); + + bus =3D resource_list_first_type(&bridge->windows, IORESOURCE_BUS); + if (!bus) + return dev_err_probe(dev, -ENODEV, + "failed to get bus resources\n"); + + res =3D platform_get_resource_byname(pdev, IORESOURCE_MEM, "ecam"); + if (!res) + return dev_err_probe(dev, -ENXIO, + "failed to get ECAM resource\n"); + + pcie->icc_path =3D devm_of_icc_get(dev, "write"); + if (IS_ERR(pcie->icc_path)) + return dev_err_probe(dev, PTR_ERR(pcie->icc_path), + "failed to get ICC\n"); + + pcie->bpmp =3D tegra_bpmp_get_with_id(dev, &pcie->ctl_id); + if (IS_ERR(pcie->bpmp)) + return dev_err_probe(dev, PTR_ERR(pcie->bpmp), + "failed to get BPMP\n"); + + err =3D devm_pm_runtime_set_active_enabled(dev); + if (err < 0) { + dev_err_probe(dev, err, "failed to enable runtime PM\n"); + goto err_put_bpmp; + } + + err =3D pm_runtime_resume_and_get(dev); + if (err < 0) { + dev_err_probe(dev, err, "failed to power on device\n"); + goto err_put_bpmp; + } + + /* sanity check that programmed ranges match what's in DT */ + if (!tegra264_pcie_valid_ranges(pdev)) { + err =3D -EINVAL; + goto err_put_pm; + } + + pcie->cfg =3D pci_ecam_create(dev, res, bus->res, &pci_generic_ecam_ops); + if (IS_ERR(pcie->cfg)) { + err =3D dev_err_probe(dev, PTR_ERR(pcie->cfg), + "failed to create ECAM\n"); + goto err_put_pm; + } + + bridge->ops =3D (struct pci_ops *)&pci_generic_ecam_ops.pci_ops; + bridge->sysdata =3D pcie->cfg; + pcie->ecam =3D pcie->cfg->win; + + tegra264_pcie_init(pcie); + + /* + * Fail if the link isn't up and doesn't support hotplug, no device + * will ever be able to be added on this bus. + */ + if (!pcie->link_up && !pcie->supports_hotplug) { + err =3D dev_err_probe(pcie->dev, -ENODEV, + "PCIe #%u link is down and not hotplug-capable, turning off\n", + pcie->ctl_id); + tegra264_pcie_power_off(pcie); + goto err_free_ecam; + } + + err =3D pci_host_probe(bridge); + if (err < 0) { + dev_err_probe(dev, err, "failed to register host\n"); + goto err_free_ecam; + } + + return 0; + +err_free_ecam: + pci_ecam_free(pcie->cfg); +err_put_pm: + pm_runtime_put_sync(dev); +err_put_bpmp: + tegra_bpmp_put(pcie->bpmp); + + return err; +} + +static void tegra264_pcie_remove(struct platform_device *pdev) +{ + struct tegra264_pcie *pcie =3D platform_get_drvdata(pdev); + + /* + * If we undo tegra264_pcie_init() then link goes down and need + * controller reset to bring up the link again. Remove intention is + * to clean up the root bridge and re-enumerate during bind. + */ + pci_lock_rescan_remove(); + pci_stop_root_bus(pcie->bridge->bus); + pci_remove_root_bus(pcie->bridge->bus); + pci_unlock_rescan_remove(); + + pm_runtime_put_sync(&pdev->dev); + tegra_bpmp_put(pcie->bpmp); + pci_ecam_free(pcie->cfg); +} + +static const struct of_device_id tegra264_pcie_of_match[] =3D { + { + .compatible =3D "nvidia,tegra264-pcie", + }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, tegra264_pcie_of_match); + +static struct platform_driver tegra264_pcie_driver =3D { + .probe =3D tegra264_pcie_probe, + .remove =3D tegra264_pcie_remove, + .driver =3D { + .name =3D "tegra264-pcie", + .of_match_table =3D tegra264_pcie_of_match, + }, +}; +module_platform_driver(tegra264_pcie_driver); + +MODULE_AUTHOR("Manikanta Maddireddy "); +MODULE_AUTHOR("Thierry Reding "); +MODULE_DESCRIPTION("NVIDIA Tegra264 PCIe host controller driver"); +MODULE_LICENSE("GPL"); --=20 2.55.0 From nobody Mon Sep 28 23:55:40 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 F252C47CA91; Fri, 14 Aug 2026 15:39:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721958; cv=none; b=TWo/cEGbt8HPVPjxk3sG9X6aNfvJqfXSv6QDKJxwhPLipTLNJ3I1rdPnj5I+zg7FsJoK2tnw99rzAZt4vC0KpUkM2GAUeiohZC9PWQveK0TPBCORym97jtG9ZlM4IfD+8I5qftDhVoGSYr9KenynTg68f5VYBGmllcV81hD8g4A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721958; c=relaxed/simple; bh=vHDQYHWcZpXzc2MpcUKqVRSgovG9GqUSE1dYXXsfkd0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=GD8rGtINN44iKJtrKVjSIpjRNBDmpydS6RJdUIZcP0pkwEoWuwjidKpn/kufWu+4q7yN/d3LtQgLLYAzftxX3lRFBqFl5xFyOnqOsw3d/N12oSalc+Ka9Fvj5TNNd18W/JgdJClhxOJvMYJPoy9cn73GQl6PJW6vxLUV+D6AmbE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=D0St+jbf; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="D0St+jbf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FEE21F00A3D; Fri, 14 Aug 2026 15:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786721956; bh=9VGq6rdCNxgCfxXDEz0J90bfJLSsfsFdCtf54uc9TfM=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=D0St+jbfHvysXJBZXp713sWK0S6DSlYeqLS/tbl4AsHFxNNMsgodGaZDMQYV1kggi hgbAUmTQIknKBJjEZNT2JSjejbf+eObhkRtA3rKf0B4xFhXi8bkTumJiiVHyeQoDPo VlQI+JApk0rO59+BEbnsr5hoN6bia2WZdURExe6YZyfYf1fb91biMfB/r6ezW+jhpX bOmlLPtXsPPPimC8Ex8cndKmkD0yqGFYK1/7ADnNj9xPzsmB9UJt5FJDwWBC51BF9Y SHyRv/9MWkExnhJR2qWuTC/PHsR68cunyZgBKUCQQXGjPiEjzNiTgVY4XVkM0hxc7X PEpGdXRP6WGxQ== From: Thierry Reding Date: Fri, 14 Aug 2026 17:38:58 +0200 Subject: [PATCH v10 4/5] arm64: tegra: Reorder reg and reg-names to match bindings 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: <20260814-tegra264-pcie-v10-4-05d08c592b05@nvidia.com> References: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> In-Reply-To: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> To: Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Karthikeyan Mitran , Hou Zhiqiang , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Michal Simek , Kevin Xie , Thierry Reding , Aksh Garg Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thierry Reding X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4866; i=treding@nvidia.com; h=from:subject:message-id; bh=7CI81HCMNfvKezvmtxPTjIu4kaNogcb6dnP3NUgeanQ=; b=owEBbQKS/ZANAwAKAd0jrNd/PrOhAcsmYgBqfzaWzPES9W6Y+7NkdqVB54sIeERlXj5u8eChk 5LE7wN8kbyJAjMEAAEKAB0WIQSI6sMIAUnM98CNyJ/dI6zXfz6zoQUCan82lgAKCRDdI6zXfz6z odU3EAC8qdbSeUoS1pWRDbpK6XUMeqoyajUT+8f9uG5Cc9bL9u5zodozuAVUFdBDmc0ZNmeGIxj gYnzBGRbNKQMylEFi2byjgzno4MO8PDhXAn1Yw+ncdf9U3rXgm0B1dN9loAa3r+uCB3qORc6kH7 pktSIu4kHtkQSbBcw75aLLjNj3+5lSnDYY0zY7+9bD+Z1yujoR+oWP6U2TDe0Elu4yPTA5e1oel Bu1sc8PuueVg1dyxb6/NoT1IJE2EAmYz8oqwXds0c5F+xfzmCXdA79ULFsnSem0jtk2yfMUgiWo 5HdM85wCl3w5GoxYkwyihmIfmDSeqJ6E5/WQVfTSsvyAkpFZuuqIRFXkM9ARM9eS4fcpWt4DEGN 1DR7KZUKsvifsNWn3j9NKMoutHATsBaufu4ZM3gDqRWRoqhReVWrW5O83qv+bVsfkRGkFQyTHOf 9K/VWooqpSs8TwwQHdShOnaHGINdTn3POgYCUad6rF0RlxaPoJ6LYyumLLLoEUfjPR6iIbi8s59 jzU4s3LmSfXcWnr4n2FZ65EuVAQXANL2/wtp/P3MsCqZSaTS44JkNhG62o0ZISHBgpClMQeMBw+ NDsORpX1oQMM1bzvgaltnuvOMPxgyvjd+Md8/aU7WaBACx/YB4ba46Z8UIt6CiVSZRkjm7YcNrT j2E/PEFxc4UP7Lw== X-Developer-Key: i=treding@nvidia.com; a=openpgp; fpr=88EAC3080149CCF7C08DC89FDD23ACD77F3EB3A1 From: Thierry Reding The ECAM region cannot be the first entry in the "reg" property, because in that case the unit-address wouldn't match the first entry. The order of the nodes can also not be changed to match the ECAM entry because the ECAM region is global and outside of any of the control busses. Acked-by: Manivannan Sadhasivam Signed-off-by: Thierry Reding --- Changes in v8: - add Acked-by from Manivannan Changes in v5: - rebase onto v7.1-rc1 Changes in v4: - revert ECAM "reg" entry order Changes in v2: - order ECAM "reg" entry before others --- arch/arm64/boot/dts/nvidia/tegra264.dtsi | 48 ++++++++++++++++------------= ---- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra264.dtsi b/arch/arm64/boot/dts= /nvidia/tegra264.dtsi index a1a86022d638..cf9760c681b1 100644 --- a/arch/arm64/boot/dts/nvidia/tegra264.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra264.dtsi @@ -3538,11 +3538,11 @@ cmdqv4: cmdqv@b200000 { =20 pci@c000000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xd0 0xb0000000 0x0 0x10000000>, - <0x00 0x0c000000 0x0 0x00004000>, + reg =3D <0x00 0x0c000000 0x0 0x00004000>, <0x00 0x0c004000 0x0 0x00001000>, - <0x00 0x0c005000 0x0 0x00001000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri"; + <0x00 0x0c005000 0x0 0x00001000>, + <0xd0 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; @@ -3991,12 +3991,12 @@ gpio_uphy: gpio@8300000 { =20 pci@8400000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xa8 0xb0000000 0x0 0x10000000>, - <0x00 0x08400000 0x0 0x00004000>, + reg =3D <0x00 0x08400000 0x0 0x00004000>, <0x00 0x08404000 0x0 0x00001000>, <0x00 0x08405000 0x0 0x00001000>, - <0x00 0x08410000 0x0 0x00010000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri", "xpl"; + <0x00 0x08410000 0x0 0x00010000>, + <0xa8 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "xpl", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; @@ -4023,12 +4023,12 @@ pci@8400000 { =20 pci@8420000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xb0 0xb0000000 0x0 0x10000000>, - <0x00 0x08420000 0x0 0x00004000>, + reg =3D <0x00 0x08420000 0x0 0x00004000>, <0x00 0x08424000 0x0 0x00001000>, <0x00 0x08425000 0x0 0x00001000>, - <0x00 0x08430000 0x0 0x00010000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri", "xpl"; + <0x00 0x08430000 0x0 0x00010000>, + <0xb0 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "xpl", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; @@ -4055,12 +4055,12 @@ pci@8420000 { =20 pci@8440000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xb8 0xb0000000 0x0 0x10000000>, - <0x00 0x08440000 0x0 0x00004000>, + reg =3D <0x00 0x08440000 0x0 0x00004000>, <0x00 0x08444000 0x0 0x00001000>, <0x00 0x08445000 0x0 0x00001000>, - <0x00 0x08450000 0x0 0x00010000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri", "xpl"; + <0x00 0x08450000 0x0 0x00010000>, + <0xb8 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "xpl", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; @@ -4087,12 +4087,12 @@ pci@8440000 { =20 pci@8460000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xc0 0xb0000000 0x0 0x10000000>, - <0x00 0x08460000 0x0 0x00004000>, + reg =3D <0x00 0x08460000 0x0 0x00004000>, <0x00 0x08464000 0x0 0x00001000>, <0x00 0x08465000 0x0 0x00001000>, - <0x00 0x08470000 0x0 0x00010000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri", "xpl"; + <0x00 0x08470000 0x0 0x00010000>, + <0xc0 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "xpl", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; @@ -4119,12 +4119,12 @@ pci@8460000 { =20 pci@8480000 { compatible =3D "nvidia,tegra264-pcie"; - reg =3D <0xc8 0xb0000000 0x0 0x10000000>, - <0x00 0x08480000 0x0 0x00004000>, + reg =3D <0x00 0x08480000 0x0 0x00004000>, <0x00 0x08484000 0x0 0x00001000>, <0x00 0x08485000 0x0 0x00001000>, - <0x00 0x08490000 0x0 0x00010000>; - reg-names =3D "ecam", "xal", "xtl", "xtl-pri", "xpl"; + <0x00 0x08490000 0x0 0x00010000>, + <0xc8 0xb0000000 0x0 0x10000000>; + reg-names =3D "xal", "xtl", "xtl-pri", "xpl", "ecam"; #address-cells =3D <3>; #size-cells =3D <2>; device_type =3D "pci"; --=20 2.55.0 From nobody Mon Sep 28 23:55:40 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 AF95F3382FC; Fri, 14 Aug 2026 15:39:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721962; cv=none; b=ko60OAA+Ri/FDcjpo6ntgQ9zntKRkyTtw67jpYqIuUfERmjk1TlBhuf767DBMIWnFsSxzVUD9jL/ZCFjvi0KEkPzHwWuzMTB2wqOWIhVf4W5rb1dllnSWDDs0d0SDZlpmadP34LJlYb8EBYNPz8pXboEaRPZNR40Yrmuo/Ect8c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786721962; c=relaxed/simple; bh=CC582akEQKxNpN8EcZcq2Yi/v5FMMcKYYTglNAXB2Hw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=G1ZjAXVsmB1Lx9/GNIIVZSo5tPBOmG65QLRxLbVGp92BiKX05WR9ChC8fx0iBtoAcjbnQAVYmBjYR3mjpR7hKBkUHLkCW5ZPsw+JAqGhABB9c4pnMO8S1VPU8g665OVIUMAcdFEwz/AYsHqkHh4afLqtlcJ9YIocUa9z+4e29sk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=UNk8vWrr; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UNk8vWrr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAE311F000E9; Fri, 14 Aug 2026 15:39:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1786721959; bh=WTU4rKoCuNIWwmP06D5AYy719XUngvGdKxTCifYWBEg=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=UNk8vWrrfGrTrRvFwV6Q97e/So934xNYhgnz+P03wNfbcXB2DRZreJwAQZB0pbdBo zhNIN2sSVCDWJjKxF4njT6Ikzv1imrysfLL8eFayA/REPL3XmnQ0/k3qh9dj+QFncE 3kamK56TucH76Y+1GmMO83MpE3iprsGMO9GW3aHqE/MnwYkfbyus4SCWWcDtDb7Wlh D+K4FmGkhqmg/U+IpWxhRvhH2kuFRPvBidV+J2JCPE3LrRlXuLbI8PWmKahHJZTnBl qNnCoCUAbiqHgbtBB132ApYa97Ctk8WinRYOoRVTBNYyq1+140Y2CwVOBNHMKz4FmM ODMU/w8q4MyDA== From: Thierry Reding Date: Fri, 14 Aug 2026 17:38:59 +0200 Subject: [PATCH v10 5/5] arm64: tegra: Add PCIe root ports on Tegra264 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: <20260814-tegra264-pcie-v10-5-05d08c592b05@nvidia.com> References: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> In-Reply-To: <20260814-tegra264-pcie-v10-0-05d08c592b05@nvidia.com> To: Bjorn Helgaas , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thierry Reding , Jonathan Hunter , Karthikeyan Mitran , Hou Zhiqiang , Thomas Petazzoni , =?utf-8?q?Pali_Roh=C3=A1r?= , Michal Simek , Kevin Xie , Thierry Reding , Aksh Garg Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thierry Reding X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=4514; i=treding@nvidia.com; h=from:subject:message-id; bh=uwzcY4itT9MMOHxh6BOCpBg+SC59ccFzs5RX826Wlz0=; b=owEBbQKS/ZANAwAKAd0jrNd/PrOhAcsmYgBqfzaW4YIYb6uN8x540XtICYs8H7pIA4yy6T0P4 bdVmbjUPI6JAjMEAAEKAB0WIQSI6sMIAUnM98CNyJ/dI6zXfz6zoQUCan82lgAKCRDdI6zXfz6z oVaED/0bLQ8HxXJtuWtiwdg+VWi9iBMVPs+nW+dSxgZL74efhTeXijIIrSmdUUH5wuhthB6CEwC lADNWPjzhSXLAHG54fMUocJB1d7H1ALF8yLyXxiAVbF18ntkN/TfWLRLjYcKml5qQV1HbPv6m9T uZxgz3Vfw/ZM7vrlKR8GVjipN+cdPC2fuMJZijC+/d++VA6Vg0ZpXswvSGIaSM+YG+rkwhP51Zh MvJdYeCXFx/rIhuOqTdnuwbfSh1z1kAeAN5h2v4il9oZlTqYnK2hgsMn3ChXyFIZLCOkQ1vETg1 K3HIFOL3NYT3zRVi0oeNQ1TTljS9va0wIes8I24SJ4Q8eAJ91C3Qy0V21rSqhswPh3GvGDloHWD mweywfT6RcloS+K9/sFGUzGfO4itxHb+1c1h3/SpnJfFUfm0t/N6OBb8ycSW5NwG5DvgkpPYRhv gBuBXz0iZpK642dJ9bCPWmTCRiehVUgE+QxFAjKhT74aXaXKvuivPn7Bg7LJaV7kpGnVO32qiBZ aeqrOOLLa5NE2XOckAfXqpQi3AqXHR/pIo5mNfOiW15Zn5qJZbtlhSbI0JjEH4P3ECpjfuS74QV 9Jts21I1N3LH/NYfSzb3c4BbmYgDfMNjZVBNG4l6hIiwYLLEsBFhnkgIyMg22GxUISw89Bocucs a1l/UPW5+Hil0pw== X-Developer-Key: i=treding@nvidia.com; a=openpgp; fpr=88EAC3080149CCF7C08DC89FDD23ACD77F3EB3A1 From: Thierry Reding The bindings have been updated to use the PCIe root port bindings, so the nodes for the root ports must be added. Signed-off-by: Thierry Reding --- arch/arm64/boot/dts/nvidia/tegra264.dtsi | 66 ++++++++++++++++++++++++++++= +--- 1 file changed, 60 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra264.dtsi b/arch/arm64/boot/dts= /nvidia/tegra264.dtsi index cf9760c681b1..31bd29df8e46 100644 --- a/arch/arm64/boot/dts/nvidia/tegra264.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra264.dtsi @@ -3562,10 +3562,19 @@ pci@c000000 { ranges =3D <0x81000000 0x00 0x84000000 0xd0 0x84000000 0x00 0x00200000>= , /* I/O */ <0x82000000 0x00 0x20000000 0x00 0x20000000 0x00 0x08000000>, /* non-= prefetchable memory (128 MiB) */ <0xc3000000 0xd0 0xc0000000 0xd0 0xc0000000 0x07 0xc0000000>; /* pref= etchable memory */ - bus-range =3D <0x0 0xff>; =20 nvidia,bpmp =3D <&bpmp 0>; status =3D "disabled"; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; =20 pinmux_main: pinmux@c281000 { @@ -4015,10 +4024,19 @@ pci@8400000 { ranges =3D <0x81000000 0x00 0x84000000 0xa8 0x84000000 0x00 0x00200000>= , /* I/O */ <0x82000000 0x00 0x28000000 0x00 0x28000000 0x00 0x08000000>, /* non-= prefetchable memory */ <0xc3000000 0xa8 0xc0000000 0xa8 0xc0000000 0x07 0xc0000000>; /* pref= etchable memory */ - bus-range =3D <0x00 0xff>; =20 nvidia,bpmp =3D <&bpmp 1>; status =3D "disabled"; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; =20 pci@8420000 { @@ -4047,10 +4065,19 @@ pci@8420000 { ranges =3D <0x81000000 0x00 0x84000000 0xb0 0x84000000 0x00 0x00200000>= , /* I/O */ <0x82000000 0x00 0x30000000 0x00 0x30000000 0x00 0x08000000>, /* non-= prefetchable memory */ <0xc3000000 0xb0 0xc0000000 0xb0 0xc0000000 0x07 0xc0000000>; /* pref= etchable memory */ - bus-range =3D <0x00 0xff>; =20 nvidia,bpmp =3D <&bpmp 2>; status =3D "disabled"; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; =20 pci@8440000 { @@ -4079,10 +4106,19 @@ pci@8440000 { ranges =3D <0x81000000 0x00 0x84000000 0xb8 0x84000000 0x00 0x00200000>= , /* I/O */ <0x82000000 0x00 0x38000000 0x00 0x38000000 0x00 0x08000000>, /* non-= prefetchable memory */ <0xc3000000 0xb8 0xc0000000 0xb8 0xc0000000 0x07 0xc0000000>; /* pref= etchable memory */ - bus-range =3D <0x00 0xff>; =20 nvidia,bpmp =3D <&bpmp 3>; status =3D "disabled"; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; =20 pci@8460000 { @@ -4111,10 +4147,19 @@ pci@8460000 { ranges =3D <0x81000000 0x00 0x84000000 0xc0 0x84000000 0x00 0x00200000>= , /* I/O */ <0x82000000 0x00 0x40000000 0x00 0x40000000 0x00 0x08000000>, /* non-= prefetchable memory */ <0xc3000000 0xc0 0xc0000000 0xc0 0xc0000000 0x07 0xc0000000>; /* pref= etchable memory */ - bus-range =3D <0x00 0xff>; =20 nvidia,bpmp =3D <&bpmp 4>; status =3D "disabled"; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; =20 pci@8480000 { @@ -4143,10 +4188,19 @@ pci@8480000 { ranges =3D <0x81000000 0x00 0x84000000 0xc8 0x84000000 0x00 0x00200000>= , /* I/O */ <0x82000000 0x00 0x48000000 0x00 0x48000000 0x00 0x08000000>, /* non-= prefetchable memory */ <0xc3000000 0xc8 0xc0000000 0xc8 0xc0000000 0x07 0xc0000000>; /* pref= etchable memory */ - bus-range =3D <0x00 0xff>; =20 nvidia,bpmp =3D <&bpmp 5>; status =3D "disabled"; + + pcie@0 { + device_type =3D "pci"; + compatible =3D "pciclass,0604"; + reg =3D <0x0 0x0 0x0 0x0 0x0>; + bus-range =3D <0x01 0xff>; + #address-cells =3D <3>; + #size-cells =3D <2>; + ranges; + }; }; }; =20 --=20 2.55.0