PCIe controller on MediaTek SoCs
Schema identifier ($id): "http://devicetree.org/schemas/pci/mediatek-pcie-mt7623.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Christian Marangi <ansuelsmth@gmail.com>"
Properties and child nodes (properties) #
compatible — required here #
Allowed values (enum): "mediatek,mt2701-pcie", "mediatek,mt7623-pcie"
reg — required here #
Minimum number of items (minItems): 4
Maximum number of items (maxItems): 4
reg-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"subsys"
Item 2
Exact value (
const):"port0"
Item 3
Exact value (
const):"port1"
Item 4
Exact value (
const):"port2"
clocks — required here #
Minimum number of items (minItems): 4
Maximum number of items (maxItems): 4
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"free_ck"
Item 2
Exact value (
const):"sys_ck0"
Item 3
Exact value (
const):"sys_ck1"
Item 4
Exact value (
const):"sys_ck2"
resets — required here #
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 3
reset-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"pcie-rst0"
Item 2
Exact value (
const):"pcie-rst1"
Item 3
Exact value (
const):"pcie-rst2"
phys — required here #
Minimum number of items (minItems): 3
Maximum number of items (maxItems): 3
phy-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"pcie-phy0"
Item 2
Exact value (
const):"pcie-phy1"
Item 3
Exact value (
const):"pcie-phy2"
power-domains — required here #
Maximum number of items (maxItems): 1
Required in this object (required): "compatible", "reg", "reg-names", "ranges", "clocks", "clock-names", "#interrupt-cells", "resets", "reset-names", "phys", "phy-names", "power-domains", "pcie@0,0", "pcie@1,0", "pcie@2,0"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):/schemas/pci/pci-host-bridge.yaml#
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/mt2701-clk.h>
#include <dt-bindings/reset/mt2701-resets.h>
#include <dt-bindings/phy/phy.h>
#include <dt-bindings/power/mt2701-power.h>
soc {
#address-cells = <2>;
#size-cells = <2>;
pcie@1a140000 {
compatible = "mediatek,mt7623-pcie";
device_type = "pci";
reg = <0 0x1a140000 0 0x1000>, /* PCIe shared registers */
<0 0x1a142000 0 0x1000>, /* Port0 registers */
<0 0x1a143000 0 0x1000>, /* Port1 registers */
<0 0x1a144000 0 0x1000>; /* Port2 registers */
reg-names = "subsys", "port0", "port1", "port2";
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
interrupt-map-mask = <0xf800 0 0 0>;
interrupt-map = <0x0000 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>,
<0x0800 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>,
<0x1000 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
<&hifsys CLK_HIFSYS_PCIE0>,
<&hifsys CLK_HIFSYS_PCIE1>,
<&hifsys CLK_HIFSYS_PCIE2>;
clock-names = "free_ck", "sys_ck0", "sys_ck1", "sys_ck2";
resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>,
<&hifsys MT2701_HIFSYS_PCIE1_RST>,
<&hifsys MT2701_HIFSYS_PCIE2_RST>;
reset-names = "pcie-rst0", "pcie-rst1", "pcie-rst2";
phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>,
<&pcie2_phy PHY_TYPE_PCIE>;
phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
bus-range = <0x00 0xff>;
ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000>, /* I/O space */
<0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* memory space */
pcie@0,0 {
device_type = "pci";
reg = <0x0000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0>;
interrupt-map = <0 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>;
ranges;
};
pcie@1,0 {
device_type = "pci";
reg = <0x0800 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0>;
interrupt-map = <0 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>;
ranges;
};
pcie@2,0 {
device_type = "pci";
reg = <0x1000 0 0 0 0>;
#address-cells = <3>;
#size-cells = <2>;
#interrupt-cells = <1>;
interrupt-map-mask = <0 0 0 0>;
interrupt-map = <0 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
ranges;
};
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
Line 86: MT7623