Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: PCI: tegra234: Add schema for tegra234 Root Port mode

Add support for PCIe controllers that operate in the Root Port mode in
tegra234 chipset.

Link: https://lore.kernel.org/r/20220721142052.25971-3-vidyas@nvidia.com
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rob Herring <robh@kernel.org>

authored by

Vidya Sagar and committed by
Bjorn Helgaas
3e4ff9a6 e4dffb67

+101 -2
+101 -2
Documentation/devicetree/bindings/pci/nvidia,tegra194-pcie.yaml
··· 24 24 compatible: 25 25 enum: 26 26 - nvidia,tegra194-pcie 27 + - nvidia,tegra234-pcie 27 28 28 29 reg: 29 30 items: ··· 93 92 A phandle to the node that controls power to the respective PCIe 94 93 controller and a specifier name for the PCIe controller. 95 94 96 - specifiers are defined in "include/dt-bindings/power/tegra194-powergate.h" file. 95 + Tegra194 specifiers defined in "include/dt-bindings/power/tegra194-powergate.h" 96 + Tegra234 specifiers defined in "include/dt-bindings/power/tegra234-powergate.h" 97 97 98 98 interconnects: 99 99 items: ··· 114 112 Must contain a pair of phandles to BPMP controller node followed by 115 113 controller ID. Following are the controller IDs for each controller: 116 114 115 + Tegra194 116 + 117 117 0: C0 118 118 1: C1 119 119 2: C2 120 120 3: C3 121 121 4: C4 122 122 5: C5 123 + 124 + Tegra234 125 + 126 + 0 : C0 127 + 1 : C1 128 + 2 : C2 129 + 3 : C3 130 + 4 : C4 131 + 5 : C5 132 + 6 : C6 133 + 7 : C7 134 + 8 : C8 135 + 9 : C9 136 + 10: C10 137 + 123 138 items: 124 139 - items: 125 140 - description: phandle to BPMP controller node 126 141 - description: PCIe controller ID 127 - maximum: 5 142 + maximum: 10 128 143 129 144 nvidia,update-fc-fixup: 130 145 description: | ··· 149 130 when a platform is designed in such a way that it satisfies at least one 150 131 of the following conditions thereby enabling Root Port to exchange 151 132 optimum number of FC (Flow Control) credits with downstream devices: 133 + 134 + NOTE: This is applicable only for Tegra194. 152 135 153 136 1. If C0/C4/C5 run at x1/x2 link widths (irrespective of speed and MPS) 154 137 2. If C0/C1/C2/C3/C4/C5 operate at their respective max link widths and ··· 182 161 description: A phandle to the regulator node that supplies 12V to the slot 183 162 if the platform has one such slot, e.g., x16 slot owned by C5 controller 184 163 in p2972-0000 platform. 164 + 165 + nvidia,enable-srns: 166 + description: | 167 + This boolean property needs to be present if the controller is 168 + configured to operate in SRNS (Separate Reference Clocks with No 169 + Spread-Spectrum Clocking). NOTE: This is applicable only for 170 + Tegra234. 171 + 172 + $ref: /schemas/types.yaml#/definitions/flag 173 + 174 + nvidia,enable-ext-refclk: 175 + description: | 176 + This boolean property needs to be present if the controller is 177 + configured to use the reference clocking coming in from an external 178 + clock source instead of using the internal clock source. 179 + 180 + $ref: /schemas/types.yaml#/definitions/flag 185 181 186 182 allOf: 187 183 - $ref: /schemas/pci/snps,dw-pcie.yaml# ··· 284 246 285 247 phys = <&p2u_hsio_2>, <&p2u_hsio_3>, <&p2u_hsio_4>, 286 248 <&p2u_hsio_5>; 249 + phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3"; 250 + }; 251 + }; 252 + 253 + - | 254 + #include <dt-bindings/clock/tegra234-clock.h> 255 + #include <dt-bindings/interrupt-controller/arm-gic.h> 256 + #include <dt-bindings/power/tegra234-powergate.h> 257 + #include <dt-bindings/reset/tegra234-reset.h> 258 + 259 + bus@0 { 260 + #address-cells = <2>; 261 + #size-cells = <2>; 262 + ranges = <0x0 0x0 0x0 0x8 0x0>; 263 + 264 + pcie@14160000 { 265 + compatible = "nvidia,tegra234-pcie"; 266 + power-domains = <&bpmp TEGRA234_POWER_DOMAIN_PCIEX4BB>; 267 + reg = <0x00 0x14160000 0x0 0x00020000>, /* appl registers (128K) */ 268 + <0x00 0x36000000 0x0 0x00040000>, /* configuration space (256K) */ 269 + <0x00 0x36040000 0x0 0x00040000>, /* iATU_DMA reg space (256K) */ 270 + <0x00 0x36080000 0x0 0x00040000>; /* DBI reg space (256K) */ 271 + reg-names = "appl", "config", "atu_dma", "dbi"; 272 + 273 + #address-cells = <3>; 274 + #size-cells = <2>; 275 + device_type = "pci"; 276 + num-lanes = <4>; 277 + num-viewport = <8>; 278 + linux,pci-domain = <4>; 279 + 280 + clocks = <&bpmp TEGRA234_CLK_PEX0_C4_CORE>; 281 + clock-names = "core"; 282 + 283 + resets = <&bpmp TEGRA234_RESET_PEX0_CORE_4_APB>, 284 + <&bpmp TEGRA234_RESET_PEX0_CORE_4>; 285 + reset-names = "apb", "core"; 286 + 287 + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>, /* controller interrupt */ 288 + <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; /* MSI interrupt */ 289 + interrupt-names = "intr", "msi"; 290 + 291 + #interrupt-cells = <1>; 292 + interrupt-map-mask = <0 0 0 0>; 293 + interrupt-map = <0 0 0 0 &gic GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>; 294 + 295 + nvidia,bpmp = <&bpmp 4>; 296 + 297 + nvidia,aspm-cmrt-us = <60>; 298 + nvidia,aspm-pwr-on-t-us = <20>; 299 + nvidia,aspm-l0s-entrance-latency-us = <3>; 300 + 301 + bus-range = <0x0 0xff>; 302 + ranges = <0x43000000 0x21 0x40000000 0x21 0x40000000 0x2 0xe8000000>, /* prefetchable */ 303 + <0x02000000 0x0 0x40000000 0x24 0x28000000 0x0 0x08000000>, /* non-prefetchable */ 304 + <0x01000000 0x0 0x36100000 0x00 0x36100000 0x0 0x00100000>; /* downstream I/O */ 305 + 306 + vddio-pex-ctl-supply = <&p3701_vdd_AO_1v8>; 307 + 308 + phys = <&p2u_hsio_4>, <&p2u_hsio_5>, <&p2u_hsio_6>, 309 + <&p2u_hsio_7>; 287 310 phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3"; 288 311 }; 289 312 };