1c66ec88fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2c66ec88fSEmmanuel Vadot%YAML 1.2 3c66ec88fSEmmanuel Vadot--- 4c66ec88fSEmmanuel Vadot$id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml# 5c66ec88fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6c66ec88fSEmmanuel Vadot 77ef62cebSEmmanuel Vadottitle: Brcmstb PCIe Host Controller 8c66ec88fSEmmanuel Vadot 9c66ec88fSEmmanuel Vadotmaintainers: 10*b2d2a78aSEmmanuel Vadot - Jim Quinlan <james.quinlan@broadcom.com> 11c66ec88fSEmmanuel Vadot 12c66ec88fSEmmanuel Vadotproperties: 13c66ec88fSEmmanuel Vadot compatible: 146be33864SEmmanuel Vadot items: 156be33864SEmmanuel Vadot - enum: 166be33864SEmmanuel Vadot - brcm,bcm2711-pcie # The Raspberry Pi 4 175def4c47SEmmanuel Vadot - brcm,bcm4908-pcie 186be33864SEmmanuel Vadot - brcm,bcm7211-pcie # Broadcom STB version of RPi4 196be33864SEmmanuel Vadot - brcm,bcm7216-pcie # Broadcom 7216 Arm 20*b2d2a78aSEmmanuel Vadot - brcm,bcm7278-pcie # Broadcom 7278 Arm 21e67e8565SEmmanuel Vadot - brcm,bcm7425-pcie # Broadcom 7425 MIPs 22e67e8565SEmmanuel Vadot - brcm,bcm7435-pcie # Broadcom 7435 MIPs 23*b2d2a78aSEmmanuel Vadot - brcm,bcm7445-pcie # Broadcom 7445 Arm 24*b2d2a78aSEmmanuel Vadot - brcm,bcm7712-pcie # Broadcom STB sibling of Rpi 5 25c66ec88fSEmmanuel Vadot 26c66ec88fSEmmanuel Vadot reg: 27c66ec88fSEmmanuel Vadot maxItems: 1 28c66ec88fSEmmanuel Vadot 29c66ec88fSEmmanuel Vadot interrupts: 30c66ec88fSEmmanuel Vadot minItems: 1 31c66ec88fSEmmanuel Vadot items: 32c66ec88fSEmmanuel Vadot - description: PCIe host controller 33c66ec88fSEmmanuel Vadot - description: builtin MSI controller 34c66ec88fSEmmanuel Vadot 35c66ec88fSEmmanuel Vadot interrupt-names: 36c66ec88fSEmmanuel Vadot minItems: 1 37c66ec88fSEmmanuel Vadot items: 38c66ec88fSEmmanuel Vadot - const: pcie 39c66ec88fSEmmanuel Vadot - const: msi 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot ranges: 426be33864SEmmanuel Vadot minItems: 1 436be33864SEmmanuel Vadot maxItems: 4 44c66ec88fSEmmanuel Vadot 45c66ec88fSEmmanuel Vadot dma-ranges: 466be33864SEmmanuel Vadot minItems: 1 476be33864SEmmanuel Vadot maxItems: 6 48c66ec88fSEmmanuel Vadot 49c66ec88fSEmmanuel Vadot clocks: 50c66ec88fSEmmanuel Vadot maxItems: 1 51c66ec88fSEmmanuel Vadot 52c66ec88fSEmmanuel Vadot clock-names: 53c66ec88fSEmmanuel Vadot items: 54c66ec88fSEmmanuel Vadot - const: sw_pcie 55c66ec88fSEmmanuel Vadot 56c66ec88fSEmmanuel Vadot msi-controller: 57c66ec88fSEmmanuel Vadot description: Identifies the node as an MSI controller. 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel Vadot msi-parent: 60c66ec88fSEmmanuel Vadot description: MSI controller the device is capable of using. 61c66ec88fSEmmanuel Vadot 62c66ec88fSEmmanuel Vadot brcm,enable-ssc: 63c66ec88fSEmmanuel Vadot description: Indicates usage of spread-spectrum clocking. 64c66ec88fSEmmanuel Vadot type: boolean 65c66ec88fSEmmanuel Vadot 66c66ec88fSEmmanuel Vadot aspm-no-l0s: true 67c66ec88fSEmmanuel Vadot 688d13bc63SEmmanuel Vadot brcm,clkreq-mode: 698d13bc63SEmmanuel Vadot description: A string that determines the operating 708d13bc63SEmmanuel Vadot clkreq mode of the PCIe RC HW with respect to controlling the refclk 718d13bc63SEmmanuel Vadot signal. There are three different modes -- "safe", which drives the 728d13bc63SEmmanuel Vadot refclk signal unconditionally and will work for all devices but does 738d13bc63SEmmanuel Vadot not provide any power savings; "no-l1ss" -- which provides Clock 748d13bc63SEmmanuel Vadot Power Management, L0s, and L1, but cannot provide L1 substate (L1SS) 758d13bc63SEmmanuel Vadot power savings. If the downstream device connected to the RC is L1SS 768d13bc63SEmmanuel Vadot capable AND the OS enables L1SS, all PCIe traffic may abruptly halt, 778d13bc63SEmmanuel Vadot potentially hanging the system; "default" -- which provides L0s, L1, 788d13bc63SEmmanuel Vadot and L1SS, but not compliant to provide Clock Power Management; 798d13bc63SEmmanuel Vadot specifically, may not be able to meet the T_CLRon max timing of 400ns 808d13bc63SEmmanuel Vadot as specified in "Dynamic Clock Control", section 3.2.5.2.2 PCI 818d13bc63SEmmanuel Vadot Express Mini CEM 2.1 specification. This situation is atypical and 828d13bc63SEmmanuel Vadot should happen only with older devices. 838d13bc63SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 848d13bc63SEmmanuel Vadot enum: [ safe, no-l1ss, default ] 858d13bc63SEmmanuel Vadot 866be33864SEmmanuel Vadot brcm,scb-sizes: 876be33864SEmmanuel Vadot description: u64 giving the 64bit PCIe memory 886be33864SEmmanuel Vadot viewport size of a memory controller. There may be up to 896be33864SEmmanuel Vadot three controllers, and each size must be a power of two 906be33864SEmmanuel Vadot with a size greater or equal to the amount of memory the 916be33864SEmmanuel Vadot controller supports. Note that each memory controller 926be33864SEmmanuel Vadot may have two component regions -- base and extended -- so 936be33864SEmmanuel Vadot this information cannot be deduced from the dma-ranges. 946be33864SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint64-array 956be33864SEmmanuel Vadot items: 966be33864SEmmanuel Vadot minItems: 1 976be33864SEmmanuel Vadot maxItems: 3 986be33864SEmmanuel Vadot 99*b2d2a78aSEmmanuel Vadot resets: 100*b2d2a78aSEmmanuel Vadot minItems: 1 101*b2d2a78aSEmmanuel Vadot maxItems: 3 102*b2d2a78aSEmmanuel Vadot 103*b2d2a78aSEmmanuel Vadot reset-names: 104*b2d2a78aSEmmanuel Vadot minItems: 1 105*b2d2a78aSEmmanuel Vadot maxItems: 3 106*b2d2a78aSEmmanuel Vadot 107c66ec88fSEmmanuel Vadotrequired: 108e67e8565SEmmanuel Vadot - compatible 109c66ec88fSEmmanuel Vadot - reg 1106be33864SEmmanuel Vadot - ranges 111c66ec88fSEmmanuel Vadot - dma-ranges 112c66ec88fSEmmanuel Vadot - "#interrupt-cells" 113c66ec88fSEmmanuel Vadot - interrupts 114c66ec88fSEmmanuel Vadot - interrupt-names 115c66ec88fSEmmanuel Vadot - interrupt-map-mask 116c66ec88fSEmmanuel Vadot - interrupt-map 117c66ec88fSEmmanuel Vadot - msi-controller 118c66ec88fSEmmanuel Vadot 1196be33864SEmmanuel VadotallOf: 1207d0873ebSEmmanuel Vadot - $ref: /schemas/pci/pci-host-bridge.yaml# 1218cc087a1SEmmanuel Vadot - $ref: /schemas/interrupt-controller/msi-controller.yaml# 1226be33864SEmmanuel Vadot - if: 1236be33864SEmmanuel Vadot properties: 1246be33864SEmmanuel Vadot compatible: 1256be33864SEmmanuel Vadot contains: 1265def4c47SEmmanuel Vadot const: brcm,bcm4908-pcie 1275def4c47SEmmanuel Vadot then: 1285def4c47SEmmanuel Vadot properties: 1295def4c47SEmmanuel Vadot resets: 130*b2d2a78aSEmmanuel Vadot maxItems: 1 1315def4c47SEmmanuel Vadot 1325def4c47SEmmanuel Vadot reset-names: 1335def4c47SEmmanuel Vadot items: 1345def4c47SEmmanuel Vadot - const: perst 1355def4c47SEmmanuel Vadot 1365def4c47SEmmanuel Vadot required: 1375def4c47SEmmanuel Vadot - resets 1385def4c47SEmmanuel Vadot - reset-names 1395def4c47SEmmanuel Vadot - if: 1405def4c47SEmmanuel Vadot properties: 1415def4c47SEmmanuel Vadot compatible: 1425def4c47SEmmanuel Vadot contains: 1436be33864SEmmanuel Vadot const: brcm,bcm7216-pcie 1446be33864SEmmanuel Vadot then: 1455def4c47SEmmanuel Vadot properties: 1465def4c47SEmmanuel Vadot resets: 147*b2d2a78aSEmmanuel Vadot maxItems: 1 1485def4c47SEmmanuel Vadot 1495def4c47SEmmanuel Vadot reset-names: 1505def4c47SEmmanuel Vadot items: 1515def4c47SEmmanuel Vadot - const: rescal 1525def4c47SEmmanuel Vadot 1536be33864SEmmanuel Vadot required: 1546be33864SEmmanuel Vadot - resets 1556be33864SEmmanuel Vadot - reset-names 1566be33864SEmmanuel Vadot 157*b2d2a78aSEmmanuel Vadot - if: 158*b2d2a78aSEmmanuel Vadot properties: 159*b2d2a78aSEmmanuel Vadot compatible: 160*b2d2a78aSEmmanuel Vadot contains: 161*b2d2a78aSEmmanuel Vadot const: brcm,bcm7712-pcie 162*b2d2a78aSEmmanuel Vadot then: 163*b2d2a78aSEmmanuel Vadot properties: 164*b2d2a78aSEmmanuel Vadot resets: 165*b2d2a78aSEmmanuel Vadot minItems: 3 166*b2d2a78aSEmmanuel Vadot maxItems: 3 167*b2d2a78aSEmmanuel Vadot 168*b2d2a78aSEmmanuel Vadot reset-names: 169*b2d2a78aSEmmanuel Vadot items: 170*b2d2a78aSEmmanuel Vadot - const: rescal 171*b2d2a78aSEmmanuel Vadot - const: bridge 172*b2d2a78aSEmmanuel Vadot - const: swinit 173*b2d2a78aSEmmanuel Vadot 174*b2d2a78aSEmmanuel Vadot required: 175*b2d2a78aSEmmanuel Vadot - resets 176*b2d2a78aSEmmanuel Vadot - reset-names 177*b2d2a78aSEmmanuel Vadot 178c66ec88fSEmmanuel VadotunevaluatedProperties: false 179c66ec88fSEmmanuel Vadot 180c66ec88fSEmmanuel Vadotexamples: 181c66ec88fSEmmanuel Vadot - | 182c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 183c66ec88fSEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 184c66ec88fSEmmanuel Vadot 185c66ec88fSEmmanuel Vadot scb { 186c66ec88fSEmmanuel Vadot #address-cells = <2>; 187c66ec88fSEmmanuel Vadot #size-cells = <1>; 188c66ec88fSEmmanuel Vadot pcie0: pcie@7d500000 { 189c66ec88fSEmmanuel Vadot compatible = "brcm,bcm2711-pcie"; 190c66ec88fSEmmanuel Vadot reg = <0x0 0x7d500000 0x9310>; 191c66ec88fSEmmanuel Vadot device_type = "pci"; 192c66ec88fSEmmanuel Vadot #address-cells = <3>; 193c66ec88fSEmmanuel Vadot #size-cells = <2>; 194c66ec88fSEmmanuel Vadot #interrupt-cells = <1>; 195e67e8565SEmmanuel Vadot interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, 196c66ec88fSEmmanuel Vadot <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; 197c66ec88fSEmmanuel Vadot interrupt-names = "pcie", "msi"; 198c66ec88fSEmmanuel Vadot interrupt-map-mask = <0x0 0x0 0x0 0x7>; 199e67e8565SEmmanuel Vadot interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH 200e67e8565SEmmanuel Vadot 0 0 0 2 &gicv2 GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH 201e67e8565SEmmanuel Vadot 0 0 0 3 &gicv2 GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH 202e67e8565SEmmanuel Vadot 0 0 0 4 &gicv2 GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>; 203e67e8565SEmmanuel Vadot 204c66ec88fSEmmanuel Vadot msi-parent = <&pcie0>; 205c66ec88fSEmmanuel Vadot msi-controller; 206c66ec88fSEmmanuel Vadot ranges = <0x02000000 0x0 0xf8000000 0x6 0x00000000 0x0 0x04000000>; 2076be33864SEmmanuel Vadot dma-ranges = <0x42000000 0x1 0x00000000 0x0 0x40000000 0x0 0x80000000>, 2086be33864SEmmanuel Vadot <0x42000000 0x1 0x80000000 0x3 0x00000000 0x0 0x80000000>; 209c66ec88fSEmmanuel Vadot brcm,enable-ssc; 2106be33864SEmmanuel Vadot brcm,scb-sizes = <0x0000000080000000 0x0000000080000000>; 211e67e8565SEmmanuel Vadot 212e67e8565SEmmanuel Vadot /* PCIe bridge, Root Port */ 213e67e8565SEmmanuel Vadot pci@0,0 { 214e67e8565SEmmanuel Vadot #address-cells = <3>; 215e67e8565SEmmanuel Vadot #size-cells = <2>; 216e67e8565SEmmanuel Vadot reg = <0x0 0x0 0x0 0x0 0x0>; 217e67e8565SEmmanuel Vadot compatible = "pciclass,0604"; 218e67e8565SEmmanuel Vadot device_type = "pci"; 219e67e8565SEmmanuel Vadot vpcie3v3-supply = <&vreg7>; 220e67e8565SEmmanuel Vadot ranges; 221e67e8565SEmmanuel Vadot 222e67e8565SEmmanuel Vadot /* PCIe endpoint */ 223e67e8565SEmmanuel Vadot pci-ep@0,0 { 224e67e8565SEmmanuel Vadot assigned-addresses = 225e67e8565SEmmanuel Vadot <0x82010000 0x0 0xf8000000 0x6 0x00000000 0x0 0x2000>; 226e67e8565SEmmanuel Vadot reg = <0x0 0x0 0x0 0x0 0x0>; 227e67e8565SEmmanuel Vadot compatible = "pci14e4,1688"; 228e67e8565SEmmanuel Vadot }; 229e67e8565SEmmanuel Vadot }; 230c66ec88fSEmmanuel Vadot }; 231c66ec88fSEmmanuel Vadot }; 232