1*ae5de77eSEmmanuel Vadot# SPDX-License-Identifier: GPL-2.0 2*ae5de77eSEmmanuel Vadot%YAML 1.2 3*ae5de77eSEmmanuel Vadot--- 4*ae5de77eSEmmanuel Vadot$id: http://devicetree.org/schemas/pci/marvell,kirkwood-pcie.yaml# 5*ae5de77eSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*ae5de77eSEmmanuel Vadot 7*ae5de77eSEmmanuel Vadottitle: Marvell EBU PCIe interfaces 8*ae5de77eSEmmanuel Vadot 9*ae5de77eSEmmanuel Vadotmaintainers: 10*ae5de77eSEmmanuel Vadot - Thomas Petazzoni <thomas.petazzoni@bootlin.com> 11*ae5de77eSEmmanuel Vadot - Pali Rohár <pali@kernel.org> 12*ae5de77eSEmmanuel Vadot 13*ae5de77eSEmmanuel VadotallOf: 14*ae5de77eSEmmanuel Vadot - $ref: /schemas/pci/pci-host-bridge.yaml# 15*ae5de77eSEmmanuel Vadot 16*ae5de77eSEmmanuel Vadotproperties: 17*ae5de77eSEmmanuel Vadot compatible: 18*ae5de77eSEmmanuel Vadot enum: 19*ae5de77eSEmmanuel Vadot - marvell,armada-370-pcie 20*ae5de77eSEmmanuel Vadot - marvell,armada-xp-pcie 21*ae5de77eSEmmanuel Vadot - marvell,dove-pcie 22*ae5de77eSEmmanuel Vadot - marvell,kirkwood-pcie 23*ae5de77eSEmmanuel Vadot 24*ae5de77eSEmmanuel Vadot ranges: 25*ae5de77eSEmmanuel Vadot description: > 26*ae5de77eSEmmanuel Vadot The ranges describing the MMIO registers have the following layout: 27*ae5de77eSEmmanuel Vadot 28*ae5de77eSEmmanuel Vadot 0x82000000 0 r MBUS_ID(0xf0, 0x01) r 0 s 29*ae5de77eSEmmanuel Vadot 30*ae5de77eSEmmanuel Vadot where: 31*ae5de77eSEmmanuel Vadot 32*ae5de77eSEmmanuel Vadot * r is a 32-bits value that gives the offset of the MMIO registers of 33*ae5de77eSEmmanuel Vadot this PCIe interface, from the base of the internal registers. 34*ae5de77eSEmmanuel Vadot 35*ae5de77eSEmmanuel Vadot * s is a 32-bits value that give the size of this MMIO registers area. 36*ae5de77eSEmmanuel Vadot This range entry translates the '0x82000000 0 r' PCI address into the 37*ae5de77eSEmmanuel Vadot 'MBUS_ID(0xf0, 0x01) r' CPU address, which is part of the internal 38*ae5de77eSEmmanuel Vadot register window (as identified by MBUS_ID(0xf0, 0x01)). 39*ae5de77eSEmmanuel Vadot 40*ae5de77eSEmmanuel Vadot The ranges describing the MBus windows have the following layout: 41*ae5de77eSEmmanuel Vadot 42*ae5de77eSEmmanuel Vadot 0x8t000000 s 0 MBUS_ID(w, a) 0 1 0 43*ae5de77eSEmmanuel Vadot 44*ae5de77eSEmmanuel Vadot where: 45*ae5de77eSEmmanuel Vadot 46*ae5de77eSEmmanuel Vadot * t is the type of the MBus window (as defined by the standard PCI DT 47*ae5de77eSEmmanuel Vadot bindings), 1 for I/O and 2 for memory. 48*ae5de77eSEmmanuel Vadot 49*ae5de77eSEmmanuel Vadot * s is the PCI slot that corresponds to this PCIe interface 50*ae5de77eSEmmanuel Vadot 51*ae5de77eSEmmanuel Vadot * w is the 'target ID' value for the MBus window 52*ae5de77eSEmmanuel Vadot 53*ae5de77eSEmmanuel Vadot * a the 'attribute' value for the MBus window. 54*ae5de77eSEmmanuel Vadot 55*ae5de77eSEmmanuel Vadot Since the location and size of the different MBus windows is not fixed in 56*ae5de77eSEmmanuel Vadot hardware, and only determined in runtime, those ranges cover the full first 57*ae5de77eSEmmanuel Vadot 4 GB of the physical address space, and do not translate into a valid CPU 58*ae5de77eSEmmanuel Vadot address. 59*ae5de77eSEmmanuel Vadot 60*ae5de77eSEmmanuel Vadot msi-parent: 61*ae5de77eSEmmanuel Vadot maxItems: 1 62*ae5de77eSEmmanuel Vadot 63*ae5de77eSEmmanuel VadotpatternProperties: 64*ae5de77eSEmmanuel Vadot '^pcie@': 65*ae5de77eSEmmanuel Vadot type: object 66*ae5de77eSEmmanuel Vadot allOf: 67*ae5de77eSEmmanuel Vadot - $ref: /schemas/pci/pci-bus-common.yaml# 68*ae5de77eSEmmanuel Vadot - $ref: /schemas/pci/pci-device.yaml# 69*ae5de77eSEmmanuel Vadot unevaluatedProperties: false 70*ae5de77eSEmmanuel Vadot 71*ae5de77eSEmmanuel Vadot properties: 72*ae5de77eSEmmanuel Vadot clocks: 73*ae5de77eSEmmanuel Vadot maxItems: 1 74*ae5de77eSEmmanuel Vadot 75*ae5de77eSEmmanuel Vadot interrupts: 76*ae5de77eSEmmanuel Vadot minItems: 1 77*ae5de77eSEmmanuel Vadot maxItems: 2 78*ae5de77eSEmmanuel Vadot 79*ae5de77eSEmmanuel Vadot interrupt-names: 80*ae5de77eSEmmanuel Vadot minItems: 1 81*ae5de77eSEmmanuel Vadot items: 82*ae5de77eSEmmanuel Vadot - const: intx 83*ae5de77eSEmmanuel Vadot - const: error 84*ae5de77eSEmmanuel Vadot 85*ae5de77eSEmmanuel Vadot reset-delay-us: 86*ae5de77eSEmmanuel Vadot default: 100000 87*ae5de77eSEmmanuel Vadot description: todo 88*ae5de77eSEmmanuel Vadot 89*ae5de77eSEmmanuel Vadot marvell,pcie-port: 90*ae5de77eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 91*ae5de77eSEmmanuel Vadot maximum: 3 92*ae5de77eSEmmanuel Vadot description: todo 93*ae5de77eSEmmanuel Vadot 94*ae5de77eSEmmanuel Vadot marvell,pcie-lane: 95*ae5de77eSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 96*ae5de77eSEmmanuel Vadot maximum: 3 97*ae5de77eSEmmanuel Vadot description: todo 98*ae5de77eSEmmanuel Vadot 99*ae5de77eSEmmanuel Vadot interrupt-controller: 100*ae5de77eSEmmanuel Vadot type: object 101*ae5de77eSEmmanuel Vadot additionalProperties: false 102*ae5de77eSEmmanuel Vadot 103*ae5de77eSEmmanuel Vadot properties: 104*ae5de77eSEmmanuel Vadot interrupt-controller: true 105*ae5de77eSEmmanuel Vadot 106*ae5de77eSEmmanuel Vadot '#interrupt-cells': 107*ae5de77eSEmmanuel Vadot const: 1 108*ae5de77eSEmmanuel Vadot 109*ae5de77eSEmmanuel Vadot required: 110*ae5de77eSEmmanuel Vadot - assigned-addresses 111*ae5de77eSEmmanuel Vadot - clocks 112*ae5de77eSEmmanuel Vadot - interrupt-map 113*ae5de77eSEmmanuel Vadot - marvell,pcie-port 114*ae5de77eSEmmanuel Vadot 115*ae5de77eSEmmanuel VadotunevaluatedProperties: false 116*ae5de77eSEmmanuel Vadot 117*ae5de77eSEmmanuel Vadotexamples: 118*ae5de77eSEmmanuel Vadot - | 119*ae5de77eSEmmanuel Vadot #define MBUS_ID(target,attributes) (((target) << 24) | ((attributes) << 16)) 120*ae5de77eSEmmanuel Vadot 121*ae5de77eSEmmanuel Vadot soc { 122*ae5de77eSEmmanuel Vadot #address-cells = <2>; 123*ae5de77eSEmmanuel Vadot #size-cells = <2>; 124*ae5de77eSEmmanuel Vadot 125*ae5de77eSEmmanuel Vadot pcie@f001000000000000 { 126*ae5de77eSEmmanuel Vadot compatible = "marvell,armada-xp-pcie"; 127*ae5de77eSEmmanuel Vadot device_type = "pci"; 128*ae5de77eSEmmanuel Vadot 129*ae5de77eSEmmanuel Vadot #address-cells = <3>; 130*ae5de77eSEmmanuel Vadot #size-cells = <2>; 131*ae5de77eSEmmanuel Vadot 132*ae5de77eSEmmanuel Vadot bus-range = <0x00 0xff>; 133*ae5de77eSEmmanuel Vadot msi-parent = <&mpic>; 134*ae5de77eSEmmanuel Vadot 135*ae5de77eSEmmanuel Vadot ranges = 136*ae5de77eSEmmanuel Vadot <0x82000000 0 0x40000 MBUS_ID(0xf0, 0x01) 0x40000 0 0x00002000 /* Port 0.0 registers */ 137*ae5de77eSEmmanuel Vadot 0x82000000 0 0x42000 MBUS_ID(0xf0, 0x01) 0x42000 0 0x00002000 /* Port 2.0 registers */ 138*ae5de77eSEmmanuel Vadot 0x82000000 0 0x44000 MBUS_ID(0xf0, 0x01) 0x44000 0 0x00002000 /* Port 0.1 registers */ 139*ae5de77eSEmmanuel Vadot 0x82000000 0 0x48000 MBUS_ID(0xf0, 0x01) 0x48000 0 0x00002000 /* Port 0.2 registers */ 140*ae5de77eSEmmanuel Vadot 0x82000000 0 0x4c000 MBUS_ID(0xf0, 0x01) 0x4c000 0 0x00002000 /* Port 0.3 registers */ 141*ae5de77eSEmmanuel Vadot 0x82000000 0 0x80000 MBUS_ID(0xf0, 0x01) 0x80000 0 0x00002000 /* Port 1.0 registers */ 142*ae5de77eSEmmanuel Vadot 0x82000000 0 0x82000 MBUS_ID(0xf0, 0x01) 0x82000 0 0x00002000 /* Port 3.0 registers */ 143*ae5de77eSEmmanuel Vadot 0x82000000 0 0x84000 MBUS_ID(0xf0, 0x01) 0x84000 0 0x00002000 /* Port 1.1 registers */ 144*ae5de77eSEmmanuel Vadot 0x82000000 0 0x88000 MBUS_ID(0xf0, 0x01) 0x88000 0 0x00002000 /* Port 1.2 registers */ 145*ae5de77eSEmmanuel Vadot 0x82000000 0 0x8c000 MBUS_ID(0xf0, 0x01) 0x8c000 0 0x00002000 /* Port 1.3 registers */ 146*ae5de77eSEmmanuel Vadot 0x82000000 0x1 0 MBUS_ID(0x04, 0xe8) 0 1 0 /* Port 0.0 MEM */ 147*ae5de77eSEmmanuel Vadot 0x81000000 0x1 0 MBUS_ID(0x04, 0xe0) 0 1 0 /* Port 0.0 IO */ 148*ae5de77eSEmmanuel Vadot 0x82000000 0x2 0 MBUS_ID(0x04, 0xd8) 0 1 0 /* Port 0.1 MEM */ 149*ae5de77eSEmmanuel Vadot 0x81000000 0x2 0 MBUS_ID(0x04, 0xd0) 0 1 0 /* Port 0.1 IO */ 150*ae5de77eSEmmanuel Vadot 0x82000000 0x3 0 MBUS_ID(0x04, 0xb8) 0 1 0 /* Port 0.2 MEM */ 151*ae5de77eSEmmanuel Vadot 0x81000000 0x3 0 MBUS_ID(0x04, 0xb0) 0 1 0 /* Port 0.2 IO */ 152*ae5de77eSEmmanuel Vadot 0x82000000 0x4 0 MBUS_ID(0x04, 0x78) 0 1 0 /* Port 0.3 MEM */ 153*ae5de77eSEmmanuel Vadot 0x81000000 0x4 0 MBUS_ID(0x04, 0x70) 0 1 0 /* Port 0.3 IO */ 154*ae5de77eSEmmanuel Vadot 155*ae5de77eSEmmanuel Vadot 0x82000000 0x5 0 MBUS_ID(0x08, 0xe8) 0 1 0 /* Port 1.0 MEM */ 156*ae5de77eSEmmanuel Vadot 0x81000000 0x5 0 MBUS_ID(0x08, 0xe0) 0 1 0 /* Port 1.0 IO */ 157*ae5de77eSEmmanuel Vadot 0x82000000 0x6 0 MBUS_ID(0x08, 0xd8) 0 1 0 /* Port 1.1 MEM */ 158*ae5de77eSEmmanuel Vadot 0x81000000 0x6 0 MBUS_ID(0x08, 0xd0) 0 1 0 /* Port 1.1 IO */ 159*ae5de77eSEmmanuel Vadot 0x82000000 0x7 0 MBUS_ID(0x08, 0xb8) 0 1 0 /* Port 1.2 MEM */ 160*ae5de77eSEmmanuel Vadot 0x81000000 0x7 0 MBUS_ID(0x08, 0xb0) 0 1 0 /* Port 1.2 IO */ 161*ae5de77eSEmmanuel Vadot 0x82000000 0x8 0 MBUS_ID(0x08, 0x78) 0 1 0 /* Port 1.3 MEM */ 162*ae5de77eSEmmanuel Vadot 0x81000000 0x8 0 MBUS_ID(0x08, 0x70) 0 1 0 /* Port 1.3 IO */ 163*ae5de77eSEmmanuel Vadot 164*ae5de77eSEmmanuel Vadot 0x82000000 0x9 0 MBUS_ID(0x04, 0xf8) 0 1 0 /* Port 2.0 MEM */ 165*ae5de77eSEmmanuel Vadot 0x81000000 0x9 0 MBUS_ID(0x04, 0xf0) 0 1 0 /* Port 2.0 IO */ 166*ae5de77eSEmmanuel Vadot 167*ae5de77eSEmmanuel Vadot 0x82000000 0xa 0 MBUS_ID(0x08, 0xf8) 0 1 0 /* Port 3.0 MEM */ 168*ae5de77eSEmmanuel Vadot 0x81000000 0xa 0 MBUS_ID(0x08, 0xf0) 0 1 0 /* Port 3.0 IO */>; 169*ae5de77eSEmmanuel Vadot 170*ae5de77eSEmmanuel Vadot pcie@1,0 { 171*ae5de77eSEmmanuel Vadot device_type = "pci"; 172*ae5de77eSEmmanuel Vadot assigned-addresses = <0x82000800 0 0x40000 0 0x2000>; 173*ae5de77eSEmmanuel Vadot reg = <0x0800 0 0 0 0>; 174*ae5de77eSEmmanuel Vadot #address-cells = <3>; 175*ae5de77eSEmmanuel Vadot #size-cells = <2>; 176*ae5de77eSEmmanuel Vadot #interrupt-cells = <1>; 177*ae5de77eSEmmanuel Vadot ranges = <0x82000000 0 0 0x82000000 0x1 0 1 0 178*ae5de77eSEmmanuel Vadot 0x81000000 0 0 0x81000000 0x1 0 1 0>; 179*ae5de77eSEmmanuel Vadot interrupt-map-mask = <0 0 0 0>; 180*ae5de77eSEmmanuel Vadot interrupt-map = <0 0 0 0 &mpic 58>; 181*ae5de77eSEmmanuel Vadot marvell,pcie-port = <0>; 182*ae5de77eSEmmanuel Vadot marvell,pcie-lane = <0>; 183*ae5de77eSEmmanuel Vadot num-lanes = <1>; 184*ae5de77eSEmmanuel Vadot /* low-active PERST# reset on GPIO 25 */ 185*ae5de77eSEmmanuel Vadot reset-gpios = <&gpio0 25 1>; 186*ae5de77eSEmmanuel Vadot /* wait 20ms for device settle after reset deassertion */ 187*ae5de77eSEmmanuel Vadot reset-delay-us = <20000>; 188*ae5de77eSEmmanuel Vadot clocks = <&gateclk 5>; 189*ae5de77eSEmmanuel Vadot }; 190*ae5de77eSEmmanuel Vadot 191*ae5de77eSEmmanuel Vadot pcie@2,0 { 192*ae5de77eSEmmanuel Vadot device_type = "pci"; 193*ae5de77eSEmmanuel Vadot assigned-addresses = <0x82001000 0 0x44000 0 0x2000>; 194*ae5de77eSEmmanuel Vadot reg = <0x1000 0 0 0 0>; 195*ae5de77eSEmmanuel Vadot #address-cells = <3>; 196*ae5de77eSEmmanuel Vadot #size-cells = <2>; 197*ae5de77eSEmmanuel Vadot #interrupt-cells = <1>; 198*ae5de77eSEmmanuel Vadot ranges = <0x82000000 0 0 0x82000000 0x2 0 1 0 199*ae5de77eSEmmanuel Vadot 0x81000000 0 0 0x81000000 0x2 0 1 0>; 200*ae5de77eSEmmanuel Vadot interrupt-map-mask = <0 0 0 0>; 201*ae5de77eSEmmanuel Vadot interrupt-map = <0 0 0 0 &mpic 59>; 202*ae5de77eSEmmanuel Vadot marvell,pcie-port = <0>; 203*ae5de77eSEmmanuel Vadot marvell,pcie-lane = <1>; 204*ae5de77eSEmmanuel Vadot num-lanes = <1>; 205*ae5de77eSEmmanuel Vadot clocks = <&gateclk 6>; 206*ae5de77eSEmmanuel Vadot }; 207*ae5de77eSEmmanuel Vadot 208*ae5de77eSEmmanuel Vadot pcie@3,0 { 209*ae5de77eSEmmanuel Vadot device_type = "pci"; 210*ae5de77eSEmmanuel Vadot assigned-addresses = <0x82001800 0 0x48000 0 0x2000>; 211*ae5de77eSEmmanuel Vadot reg = <0x1800 0 0 0 0>; 212*ae5de77eSEmmanuel Vadot #address-cells = <3>; 213*ae5de77eSEmmanuel Vadot #size-cells = <2>; 214*ae5de77eSEmmanuel Vadot #interrupt-cells = <1>; 215*ae5de77eSEmmanuel Vadot ranges = <0x82000000 0 0 0x82000000 0x3 0 1 0 216*ae5de77eSEmmanuel Vadot 0x81000000 0 0 0x81000000 0x3 0 1 0>; 217*ae5de77eSEmmanuel Vadot interrupt-map-mask = <0 0 0 0>; 218*ae5de77eSEmmanuel Vadot interrupt-map = <0 0 0 0 &mpic 60>; 219*ae5de77eSEmmanuel Vadot marvell,pcie-port = <0>; 220*ae5de77eSEmmanuel Vadot marvell,pcie-lane = <2>; 221*ae5de77eSEmmanuel Vadot num-lanes = <1>; 222*ae5de77eSEmmanuel Vadot clocks = <&gateclk 7>; 223*ae5de77eSEmmanuel Vadot }; 224*ae5de77eSEmmanuel Vadot 225*ae5de77eSEmmanuel Vadot pcie@4,0 { 226*ae5de77eSEmmanuel Vadot device_type = "pci"; 227*ae5de77eSEmmanuel Vadot assigned-addresses = <0x82002000 0 0x4c000 0 0x2000>; 228*ae5de77eSEmmanuel Vadot reg = <0x2000 0 0 0 0>; 229*ae5de77eSEmmanuel Vadot #address-cells = <3>; 230*ae5de77eSEmmanuel Vadot #size-cells = <2>; 231*ae5de77eSEmmanuel Vadot #interrupt-cells = <1>; 232*ae5de77eSEmmanuel Vadot ranges = <0x82000000 0 0 0x82000000 0x4 0 1 0 233*ae5de77eSEmmanuel Vadot 0x81000000 0 0 0x81000000 0x4 0 1 0>; 234*ae5de77eSEmmanuel Vadot interrupt-map-mask = <0 0 0 0>; 235*ae5de77eSEmmanuel Vadot interrupt-map = <0 0 0 0 &mpic 61>; 236*ae5de77eSEmmanuel Vadot marvell,pcie-port = <0>; 237*ae5de77eSEmmanuel Vadot marvell,pcie-lane = <3>; 238*ae5de77eSEmmanuel Vadot num-lanes = <1>; 239*ae5de77eSEmmanuel Vadot clocks = <&gateclk 8>; 240*ae5de77eSEmmanuel Vadot }; 241*ae5de77eSEmmanuel Vadot 242*ae5de77eSEmmanuel Vadot pcie@5,0 { 243*ae5de77eSEmmanuel Vadot device_type = "pci"; 244*ae5de77eSEmmanuel Vadot assigned-addresses = <0x82002800 0 0x80000 0 0x2000>; 245*ae5de77eSEmmanuel Vadot reg = <0x2800 0 0 0 0>; 246*ae5de77eSEmmanuel Vadot #address-cells = <3>; 247*ae5de77eSEmmanuel Vadot #size-cells = <2>; 248*ae5de77eSEmmanuel Vadot #interrupt-cells = <1>; 249*ae5de77eSEmmanuel Vadot ranges = <0x82000000 0 0 0x82000000 0x5 0 1 0 250*ae5de77eSEmmanuel Vadot 0x81000000 0 0 0x81000000 0x5 0 1 0>; 251*ae5de77eSEmmanuel Vadot interrupt-map-mask = <0 0 0 0>; 252*ae5de77eSEmmanuel Vadot interrupt-map = <0 0 0 0 &mpic 62>; 253*ae5de77eSEmmanuel Vadot marvell,pcie-port = <1>; 254*ae5de77eSEmmanuel Vadot marvell,pcie-lane = <0>; 255*ae5de77eSEmmanuel Vadot num-lanes = <1>; 256*ae5de77eSEmmanuel Vadot clocks = <&gateclk 9>; 257*ae5de77eSEmmanuel Vadot }; 258*ae5de77eSEmmanuel Vadot 259*ae5de77eSEmmanuel Vadot pcie@6,0 { 260*ae5de77eSEmmanuel Vadot device_type = "pci"; 261*ae5de77eSEmmanuel Vadot assigned-addresses = <0x82003000 0 0x84000 0 0x2000>; 262*ae5de77eSEmmanuel Vadot reg = <0x3000 0 0 0 0>; 263*ae5de77eSEmmanuel Vadot #address-cells = <3>; 264*ae5de77eSEmmanuel Vadot #size-cells = <2>; 265*ae5de77eSEmmanuel Vadot #interrupt-cells = <1>; 266*ae5de77eSEmmanuel Vadot ranges = <0x82000000 0 0 0x82000000 0x6 0 1 0 267*ae5de77eSEmmanuel Vadot 0x81000000 0 0 0x81000000 0x6 0 1 0>; 268*ae5de77eSEmmanuel Vadot interrupt-map-mask = <0 0 0 0>; 269*ae5de77eSEmmanuel Vadot interrupt-map = <0 0 0 0 &mpic 63>; 270*ae5de77eSEmmanuel Vadot marvell,pcie-port = <1>; 271*ae5de77eSEmmanuel Vadot marvell,pcie-lane = <1>; 272*ae5de77eSEmmanuel Vadot num-lanes = <1>; 273*ae5de77eSEmmanuel Vadot clocks = <&gateclk 10>; 274*ae5de77eSEmmanuel Vadot }; 275*ae5de77eSEmmanuel Vadot }; 276*ae5de77eSEmmanuel Vadot }; 277*ae5de77eSEmmanuel Vadot... 278