127cee7d7SSergio Paracuellos# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 227cee7d7SSergio Paracuellos%YAML 1.2 327cee7d7SSergio Paracuellos--- 427cee7d7SSergio Paracuellos$id: http://devicetree.org/schemas/pci/mediatek,mt7621-pcie.yaml# 527cee7d7SSergio Paracuellos$schema: http://devicetree.org/meta-schemas/core.yaml# 627cee7d7SSergio Paracuellos 727cee7d7SSergio Paracuellostitle: MediaTek MT7621 PCIe controller 827cee7d7SSergio Paracuellos 927cee7d7SSergio Paracuellosmaintainers: 1027cee7d7SSergio Paracuellos - Sergio Paracuellos <sergio.paracuellos@gmail.com> 1127cee7d7SSergio Paracuellos 1227cee7d7SSergio Paracuellosdescription: |+ 1327cee7d7SSergio Paracuellos MediaTek MT7621 PCIe subsys supports a single Root Complex (RC) 1427cee7d7SSergio Paracuellos with 3 Root Ports. Each Root Port supports a Gen1 1-lane Link 1527cee7d7SSergio Paracuellos 1627cee7d7SSergio ParacuellosallOf: 1727cee7d7SSergio Paracuellos - $ref: /schemas/pci/pci-bus.yaml# 1827cee7d7SSergio Paracuellos 1927cee7d7SSergio Paracuellosproperties: 2027cee7d7SSergio Paracuellos compatible: 2127cee7d7SSergio Paracuellos const: mediatek,mt7621-pci 2227cee7d7SSergio Paracuellos 2327cee7d7SSergio Paracuellos reg: 2427cee7d7SSergio Paracuellos items: 2527cee7d7SSergio Paracuellos - description: host-pci bridge registers 2627cee7d7SSergio Paracuellos - description: pcie port 0 RC control registers 2727cee7d7SSergio Paracuellos - description: pcie port 1 RC control registers 2827cee7d7SSergio Paracuellos - description: pcie port 2 RC control registers 2927cee7d7SSergio Paracuellos 3027cee7d7SSergio Paracuellos ranges: 3127cee7d7SSergio Paracuellos maxItems: 2 3227cee7d7SSergio Paracuellos 3327cee7d7SSergio ParacuellospatternProperties: 34*7621aabdSRob Herring '^pcie@[0-2],0$': 3527cee7d7SSergio Paracuellos type: object 3627cee7d7SSergio Paracuellos $ref: /schemas/pci/pci-bus.yaml# 3727cee7d7SSergio Paracuellos 3827cee7d7SSergio Paracuellos properties: 3927cee7d7SSergio Paracuellos resets: 4027cee7d7SSergio Paracuellos maxItems: 1 4127cee7d7SSergio Paracuellos 4227cee7d7SSergio Paracuellos clocks: 4327cee7d7SSergio Paracuellos maxItems: 1 4427cee7d7SSergio Paracuellos 4527cee7d7SSergio Paracuellos phys: 4627cee7d7SSergio Paracuellos maxItems: 1 4727cee7d7SSergio Paracuellos 48dcd49679SRob Herring phy-names: 49dcd49679SRob Herring pattern: '^pcie-phy[0-2]$' 50dcd49679SRob Herring 5127cee7d7SSergio Paracuellos required: 5227cee7d7SSergio Paracuellos - "#interrupt-cells" 5327cee7d7SSergio Paracuellos - interrupt-map-mask 5427cee7d7SSergio Paracuellos - interrupt-map 5527cee7d7SSergio Paracuellos - resets 5627cee7d7SSergio Paracuellos - clocks 5727cee7d7SSergio Paracuellos - phys 5827cee7d7SSergio Paracuellos - phy-names 5927cee7d7SSergio Paracuellos - ranges 6027cee7d7SSergio Paracuellos 6127cee7d7SSergio Paracuellos unevaluatedProperties: false 6227cee7d7SSergio Paracuellos 6327cee7d7SSergio Paracuellosrequired: 6427cee7d7SSergio Paracuellos - compatible 6527cee7d7SSergio Paracuellos - reg 6627cee7d7SSergio Paracuellos - ranges 6727cee7d7SSergio Paracuellos - "#interrupt-cells" 6827cee7d7SSergio Paracuellos - interrupt-map-mask 6927cee7d7SSergio Paracuellos - interrupt-map 7027cee7d7SSergio Paracuellos - reset-gpios 7127cee7d7SSergio Paracuellos 7227cee7d7SSergio ParacuellosunevaluatedProperties: false 7327cee7d7SSergio Paracuellos 7427cee7d7SSergio Paracuellosexamples: 7527cee7d7SSergio Paracuellos - | 7627cee7d7SSergio Paracuellos #include <dt-bindings/gpio/gpio.h> 7727cee7d7SSergio Paracuellos #include <dt-bindings/interrupt-controller/mips-gic.h> 7827cee7d7SSergio Paracuellos 7927cee7d7SSergio Paracuellos pcie: pcie@1e140000 { 8027cee7d7SSergio Paracuellos compatible = "mediatek,mt7621-pci"; 8127cee7d7SSergio Paracuellos reg = <0x1e140000 0x100>, 8227cee7d7SSergio Paracuellos <0x1e142000 0x100>, 8327cee7d7SSergio Paracuellos <0x1e143000 0x100>, 8427cee7d7SSergio Paracuellos <0x1e144000 0x100>; 8527cee7d7SSergio Paracuellos 8627cee7d7SSergio Paracuellos #address-cells = <3>; 8727cee7d7SSergio Paracuellos #size-cells = <2>; 8827cee7d7SSergio Paracuellos pinctrl-names = "default"; 8927cee7d7SSergio Paracuellos pinctrl-0 = <&pcie_pins>; 9027cee7d7SSergio Paracuellos device_type = "pci"; 9127cee7d7SSergio Paracuellos ranges = <0x02000000 0 0x60000000 0x60000000 0 0x10000000>, /* pci memory */ 9227cee7d7SSergio Paracuellos <0x01000000 0 0x1e160000 0x1e160000 0 0x00010000>; /* io space */ 9327cee7d7SSergio Paracuellos #interrupt-cells = <1>; 9427cee7d7SSergio Paracuellos interrupt-map-mask = <0xF800 0 0 0>; 9527cee7d7SSergio Paracuellos interrupt-map = <0x0000 0 0 0 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>, 9627cee7d7SSergio Paracuellos <0x0800 0 0 0 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>, 9727cee7d7SSergio Paracuellos <0x1000 0 0 0 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>; 9827cee7d7SSergio Paracuellos reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>; 9927cee7d7SSergio Paracuellos 10027cee7d7SSergio Paracuellos pcie@0,0 { 10127cee7d7SSergio Paracuellos reg = <0x0000 0 0 0 0>; 10227cee7d7SSergio Paracuellos #address-cells = <3>; 10327cee7d7SSergio Paracuellos #size-cells = <2>; 10427cee7d7SSergio Paracuellos device_type = "pci"; 10527cee7d7SSergio Paracuellos #interrupt-cells = <1>; 10627cee7d7SSergio Paracuellos interrupt-map-mask = <0 0 0 0>; 10727cee7d7SSergio Paracuellos interrupt-map = <0 0 0 0 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>; 10827cee7d7SSergio Paracuellos resets = <&rstctrl 24>; 10927cee7d7SSergio Paracuellos clocks = <&clkctrl 24>; 11027cee7d7SSergio Paracuellos phys = <&pcie0_phy 1>; 11127cee7d7SSergio Paracuellos phy-names = "pcie-phy0"; 11227cee7d7SSergio Paracuellos ranges; 11327cee7d7SSergio Paracuellos }; 11427cee7d7SSergio Paracuellos 11527cee7d7SSergio Paracuellos pcie@1,0 { 11627cee7d7SSergio Paracuellos reg = <0x0800 0 0 0 0>; 11727cee7d7SSergio Paracuellos #address-cells = <3>; 11827cee7d7SSergio Paracuellos #size-cells = <2>; 11927cee7d7SSergio Paracuellos device_type = "pci"; 12027cee7d7SSergio Paracuellos #interrupt-cells = <1>; 12127cee7d7SSergio Paracuellos interrupt-map-mask = <0 0 0 0>; 12227cee7d7SSergio Paracuellos interrupt-map = <0 0 0 0 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>; 12327cee7d7SSergio Paracuellos resets = <&rstctrl 25>; 12427cee7d7SSergio Paracuellos clocks = <&clkctrl 25>; 12527cee7d7SSergio Paracuellos phys = <&pcie0_phy 1>; 12627cee7d7SSergio Paracuellos phy-names = "pcie-phy1"; 12727cee7d7SSergio Paracuellos ranges; 12827cee7d7SSergio Paracuellos }; 12927cee7d7SSergio Paracuellos 13027cee7d7SSergio Paracuellos pcie@2,0 { 13127cee7d7SSergio Paracuellos reg = <0x1000 0 0 0 0>; 13227cee7d7SSergio Paracuellos #address-cells = <3>; 13327cee7d7SSergio Paracuellos #size-cells = <2>; 13427cee7d7SSergio Paracuellos device_type = "pci"; 13527cee7d7SSergio Paracuellos #interrupt-cells = <1>; 13627cee7d7SSergio Paracuellos interrupt-map-mask = <0 0 0 0>; 13727cee7d7SSergio Paracuellos interrupt-map = <0 0 0 0 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>; 13827cee7d7SSergio Paracuellos resets = <&rstctrl 26>; 13927cee7d7SSergio Paracuellos clocks = <&clkctrl 26>; 14027cee7d7SSergio Paracuellos phys = <&pcie2_phy 0>; 14127cee7d7SSergio Paracuellos phy-names = "pcie-phy2"; 14227cee7d7SSergio Paracuellos ranges; 14327cee7d7SSergio Paracuellos }; 14427cee7d7SSergio Paracuellos }; 14527cee7d7SSergio Paracuellos... 146