10956dcb8SJim Quinlan# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 20956dcb8SJim Quinlan%YAML 1.2 30956dcb8SJim Quinlan--- 40956dcb8SJim Quinlan$id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml# 50956dcb8SJim Quinlan$schema: http://devicetree.org/meta-schemas/core.yaml# 60956dcb8SJim Quinlan 7dd3cb467SAndrew Lunntitle: Brcmstb PCIe Host Controller 80956dcb8SJim Quinlan 90956dcb8SJim Quinlanmaintainers: 10*8a4db021SJim Quinlan - Jim Quinlan <james.quinlan@broadcom.com> 110956dcb8SJim Quinlan 120956dcb8SJim Quinlanproperties: 130956dcb8SJim Quinlan compatible: 14e6f98b29SJim Quinlan items: 15e6f98b29SJim Quinlan - enum: 16e6f98b29SJim Quinlan - brcm,bcm2711-pcie # The Raspberry Pi 4 17f435ce7eSRafał Miłecki - brcm,bcm4908-pcie 18e6f98b29SJim Quinlan - brcm,bcm7211-pcie # Broadcom STB version of RPi4 19e6f98b29SJim Quinlan - brcm,bcm7216-pcie # Broadcom 7216 Arm 20*8a4db021SJim Quinlan - brcm,bcm7278-pcie # Broadcom 7278 Arm 21145790e5SJim Quinlan - brcm,bcm7425-pcie # Broadcom 7425 MIPs 22145790e5SJim Quinlan - brcm,bcm7435-pcie # Broadcom 7435 MIPs 23*8a4db021SJim Quinlan - brcm,bcm7445-pcie # Broadcom 7445 Arm 240956dcb8SJim Quinlan 250956dcb8SJim Quinlan reg: 260956dcb8SJim Quinlan maxItems: 1 270956dcb8SJim Quinlan 280956dcb8SJim Quinlan interrupts: 290956dcb8SJim Quinlan minItems: 1 300956dcb8SJim Quinlan items: 310956dcb8SJim Quinlan - description: PCIe host controller 320956dcb8SJim Quinlan - description: builtin MSI controller 330956dcb8SJim Quinlan 340956dcb8SJim Quinlan interrupt-names: 350956dcb8SJim Quinlan minItems: 1 360956dcb8SJim Quinlan items: 370956dcb8SJim Quinlan - const: pcie 380956dcb8SJim Quinlan - const: msi 390956dcb8SJim Quinlan 400956dcb8SJim Quinlan ranges: 41e6f98b29SJim Quinlan minItems: 1 42e6f98b29SJim Quinlan maxItems: 4 430956dcb8SJim Quinlan 440956dcb8SJim Quinlan dma-ranges: 45e6f98b29SJim Quinlan minItems: 1 46e6f98b29SJim Quinlan maxItems: 6 470956dcb8SJim Quinlan 480956dcb8SJim Quinlan clocks: 490956dcb8SJim Quinlan maxItems: 1 500956dcb8SJim Quinlan 510956dcb8SJim Quinlan clock-names: 520956dcb8SJim Quinlan items: 530956dcb8SJim Quinlan - const: sw_pcie 540956dcb8SJim Quinlan 550956dcb8SJim Quinlan msi-controller: 560956dcb8SJim Quinlan description: Identifies the node as an MSI controller. 570956dcb8SJim Quinlan 580956dcb8SJim Quinlan msi-parent: 590956dcb8SJim Quinlan description: MSI controller the device is capable of using. 600956dcb8SJim Quinlan 610956dcb8SJim Quinlan brcm,enable-ssc: 620956dcb8SJim Quinlan description: Indicates usage of spread-spectrum clocking. 630956dcb8SJim Quinlan type: boolean 640956dcb8SJim Quinlan 65420c517bSJim Quinlan aspm-no-l0s: true 66420c517bSJim Quinlan 6714b15aebSJim Quinlan brcm,clkreq-mode: 6814b15aebSJim Quinlan description: A string that determines the operating 6914b15aebSJim Quinlan clkreq mode of the PCIe RC HW with respect to controlling the refclk 7014b15aebSJim Quinlan signal. There are three different modes -- "safe", which drives the 7114b15aebSJim Quinlan refclk signal unconditionally and will work for all devices but does 7214b15aebSJim Quinlan not provide any power savings; "no-l1ss" -- which provides Clock 7314b15aebSJim Quinlan Power Management, L0s, and L1, but cannot provide L1 substate (L1SS) 7414b15aebSJim Quinlan power savings. If the downstream device connected to the RC is L1SS 7514b15aebSJim Quinlan capable AND the OS enables L1SS, all PCIe traffic may abruptly halt, 7614b15aebSJim Quinlan potentially hanging the system; "default" -- which provides L0s, L1, 7714b15aebSJim Quinlan and L1SS, but not compliant to provide Clock Power Management; 7814b15aebSJim Quinlan specifically, may not be able to meet the T_CLRon max timing of 400ns 7914b15aebSJim Quinlan as specified in "Dynamic Clock Control", section 3.2.5.2.2 PCI 8014b15aebSJim Quinlan Express Mini CEM 2.1 specification. This situation is atypical and 8114b15aebSJim Quinlan should happen only with older devices. 8214b15aebSJim Quinlan $ref: /schemas/types.yaml#/definitions/string 8314b15aebSJim Quinlan enum: [ safe, no-l1ss, default ] 8414b15aebSJim Quinlan 85e6f98b29SJim Quinlan brcm,scb-sizes: 86e6f98b29SJim Quinlan description: u64 giving the 64bit PCIe memory 87e6f98b29SJim Quinlan viewport size of a memory controller. There may be up to 88e6f98b29SJim Quinlan three controllers, and each size must be a power of two 89e6f98b29SJim Quinlan with a size greater or equal to the amount of memory the 90e6f98b29SJim Quinlan controller supports. Note that each memory controller 91e6f98b29SJim Quinlan may have two component regions -- base and extended -- so 92e6f98b29SJim Quinlan this information cannot be deduced from the dma-ranges. 93e6f98b29SJim Quinlan $ref: /schemas/types.yaml#/definitions/uint64-array 94e6f98b29SJim Quinlan items: 95e6f98b29SJim Quinlan minItems: 1 96e6f98b29SJim Quinlan maxItems: 3 97e6f98b29SJim Quinlan 980956dcb8SJim Quinlanrequired: 995e8a7d26SFlorian Fainelli - compatible 1000956dcb8SJim Quinlan - reg 101e6f98b29SJim Quinlan - ranges 1020956dcb8SJim Quinlan - dma-ranges 1030956dcb8SJim Quinlan - "#interrupt-cells" 1040956dcb8SJim Quinlan - interrupts 1050956dcb8SJim Quinlan - interrupt-names 1060956dcb8SJim Quinlan - interrupt-map-mask 1070956dcb8SJim Quinlan - interrupt-map 1080956dcb8SJim Quinlan - msi-controller 1090956dcb8SJim Quinlan 110e6f98b29SJim QuinlanallOf: 1115db62b7dSKrzysztof Kozlowski - $ref: /schemas/pci/pci-host-bridge.yaml# 1122e8b4b6eSMark Kettenis - $ref: /schemas/interrupt-controller/msi-controller.yaml# 113e6f98b29SJim Quinlan - if: 114e6f98b29SJim Quinlan properties: 115e6f98b29SJim Quinlan compatible: 116e6f98b29SJim Quinlan contains: 117f435ce7eSRafał Miłecki const: brcm,bcm4908-pcie 118f435ce7eSRafał Miłecki then: 119f435ce7eSRafał Miłecki properties: 120f435ce7eSRafał Miłecki resets: 121f435ce7eSRafał Miłecki items: 122f435ce7eSRafał Miłecki - description: reset controller handling the PERST# signal 123f435ce7eSRafał Miłecki 124f435ce7eSRafał Miłecki reset-names: 125f435ce7eSRafał Miłecki items: 126f435ce7eSRafał Miłecki - const: perst 127f435ce7eSRafał Miłecki 128f435ce7eSRafał Miłecki required: 129f435ce7eSRafał Miłecki - resets 130f435ce7eSRafał Miłecki - reset-names 131f435ce7eSRafał Miłecki - if: 132f435ce7eSRafał Miłecki properties: 133f435ce7eSRafał Miłecki compatible: 134f435ce7eSRafał Miłecki contains: 135e6f98b29SJim Quinlan const: brcm,bcm7216-pcie 136e6f98b29SJim Quinlan then: 137f435ce7eSRafał Miłecki properties: 138f435ce7eSRafał Miłecki resets: 139f435ce7eSRafał Miłecki items: 140f435ce7eSRafał Miłecki - description: phandle pointing to the RESCAL reset controller 141f435ce7eSRafał Miłecki 142f435ce7eSRafał Miłecki reset-names: 143f435ce7eSRafał Miłecki items: 144f435ce7eSRafał Miłecki - const: rescal 145f435ce7eSRafał Miłecki 146e6f98b29SJim Quinlan required: 147e6f98b29SJim Quinlan - resets 148e6f98b29SJim Quinlan - reset-names 149e6f98b29SJim Quinlan 1500956dcb8SJim QuinlanunevaluatedProperties: false 1510956dcb8SJim Quinlan 1520956dcb8SJim Quinlanexamples: 1530956dcb8SJim Quinlan - | 1540956dcb8SJim Quinlan #include <dt-bindings/interrupt-controller/irq.h> 1550956dcb8SJim Quinlan #include <dt-bindings/interrupt-controller/arm-gic.h> 1560956dcb8SJim Quinlan 1570956dcb8SJim Quinlan scb { 1580956dcb8SJim Quinlan #address-cells = <2>; 1590956dcb8SJim Quinlan #size-cells = <1>; 1600956dcb8SJim Quinlan pcie0: pcie@7d500000 { 1610956dcb8SJim Quinlan compatible = "brcm,bcm2711-pcie"; 1620956dcb8SJim Quinlan reg = <0x0 0x7d500000 0x9310>; 1630956dcb8SJim Quinlan device_type = "pci"; 1640956dcb8SJim Quinlan #address-cells = <3>; 1650956dcb8SJim Quinlan #size-cells = <2>; 1660956dcb8SJim Quinlan #interrupt-cells = <1>; 167504253e4SJim Quinlan interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>, 1680956dcb8SJim Quinlan <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>; 1690956dcb8SJim Quinlan interrupt-names = "pcie", "msi"; 1700956dcb8SJim Quinlan interrupt-map-mask = <0x0 0x0 0x0 0x7>; 171504253e4SJim Quinlan interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH 172504253e4SJim Quinlan 0 0 0 2 &gicv2 GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH 173504253e4SJim Quinlan 0 0 0 3 &gicv2 GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH 174504253e4SJim Quinlan 0 0 0 4 &gicv2 GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>; 175504253e4SJim Quinlan 1760956dcb8SJim Quinlan msi-parent = <&pcie0>; 1770956dcb8SJim Quinlan msi-controller; 1780956dcb8SJim Quinlan ranges = <0x02000000 0x0 0xf8000000 0x6 0x00000000 0x0 0x04000000>; 179e6f98b29SJim Quinlan dma-ranges = <0x42000000 0x1 0x00000000 0x0 0x40000000 0x0 0x80000000>, 180e6f98b29SJim Quinlan <0x42000000 0x1 0x80000000 0x3 0x00000000 0x0 0x80000000>; 1810956dcb8SJim Quinlan brcm,enable-ssc; 182e6f98b29SJim Quinlan brcm,scb-sizes = <0x0000000080000000 0x0000000080000000>; 183ea372f45SJim Quinlan 184ea372f45SJim Quinlan /* PCIe bridge, Root Port */ 185ea372f45SJim Quinlan pci@0,0 { 186ea372f45SJim Quinlan #address-cells = <3>; 187ea372f45SJim Quinlan #size-cells = <2>; 188ea372f45SJim Quinlan reg = <0x0 0x0 0x0 0x0 0x0>; 189ea372f45SJim Quinlan compatible = "pciclass,0604"; 190ea372f45SJim Quinlan device_type = "pci"; 191ea372f45SJim Quinlan vpcie3v3-supply = <&vreg7>; 192ea372f45SJim Quinlan ranges; 193ea372f45SJim Quinlan 194ea372f45SJim Quinlan /* PCIe endpoint */ 195ea372f45SJim Quinlan pci-ep@0,0 { 196ea372f45SJim Quinlan assigned-addresses = 197ea372f45SJim Quinlan <0x82010000 0x0 0xf8000000 0x6 0x00000000 0x0 0x2000>; 198ea372f45SJim Quinlan reg = <0x0 0x0 0x0 0x0 0x0>; 199ea372f45SJim Quinlan compatible = "pci14e4,1688"; 200ea372f45SJim Quinlan }; 201ea372f45SJim Quinlan }; 2020956dcb8SJim Quinlan }; 2030956dcb8SJim Quinlan }; 204