Skip to content

Commit c7020e1

Browse files
committed
Merge tag 'pci-v6.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull PCI updates from Bjorn Helgaas: "Enumeration: - Squash portdrv_{core,pci}.c into portdrv.c to ease maintenance and make more things static. - Make portdrv bind to Switch Ports that have AER. Previously, if these Ports lacked MSI/MSI-X, portdrv failed to bind, which meant the Ports couldn't be suspended to low-power states. AER on these Ports doesn't use interrupts, and the AER driver doesn't need to claim them. - Assign PCI domain IDs using ida_alloc(), which makes host bridge add/remove work better. Resource management: - To work better with recent BIOSes that use EfiMemoryMappedIO for PCI host bridge apertures, remove those regions from the E820 map (E820 entries normally prevent us from allocating BARs). In v5.19, we added some quirks to disable E820 checking, but that's not very maintainable. EfiMemoryMappedIO means the OS needs to map the region for use by EFI runtime services; it shouldn't prevent OS from using it. PCIe native device hotplug: - Build pciehp by default if USB4 is enabled, since Thunderbolt/USB4 PCIe tunneling depends on native PCIe hotplug. - Enable Command Completed Interrupt only if supported to avoid user confusion from lspci output that says this is enabled but not supported. - Prevent pciehp from binding to Switch Upstream Ports; this happened because of interaction with acpiphp and caused devices below the Upstream Port to disappear. Power management: - Convert AGP drivers to generic power management. We hope to remove legacy power management from the PCI core eventually. Virtualization: - Fix pci_device_is_present(), which previously always returned "false" for VFs, causing virtio hangs when unbinding the driver. Miscellaneous: - Convert drivers to gpiod API to prepare for dropping some legacy code. - Fix DOE fencepost error for the maximum data object length. Baikal-T1 PCIe controller driver: - Add driver and DT bindings. Broadcom STB PCIe controller driver: - Enable Multi-MSI. - Delay 100ms after PERST# deassert to allow power and clocks to stabilize. - Configure Read Completion Boundary to 64 bytes. Freescale i.MX6 PCIe controller driver: - Initialize PHY before deasserting core reset to fix a regression in v6.0 on boards where the PHY provides the reference. - Fix imx6sx and imx8mq clock names in DT schema. Intel VMD host bridge driver: - Fix Secondary Bus Reset on VMD bridges, which allows reset of NVMe SSDs in VT-d pass-through scenarios. - Disable MSI remapping, which gets re-enabled by firmware during suspend/resume. MediaTek PCIe Gen3 controller driver: - Add MT7986 and MT8195 support. Qualcomm PCIe controller driver: - Add SC8280XP/SA8540P basic interconnect support. Rockchip DesignWare PCIe controller driver: - Base DT schema on common Synopsys schema. Synopsys DesignWare PCIe core: - Collect DT items shared between Root Port and Endpoint (PERST GPIO, PHY info, clocks, resets, link speed, number of lanes, number of iATU windows, interrupt info, etc) to snps,dw-pcie-common.yaml. - Add dma-ranges support for Root Ports and Endpoints. - Consolidate DT resource retrieval for "dbi", "dbi2", "atu", etc. to reduce code duplication. - Add generic names for clocks and resets to encourage more consistent naming across drivers using DesignWare IP. - Stop advertising PTM Responder role for Endpoints, which aren't allowed to be responders. TI J721E PCIe driver: - Add j721s2 host mode ID to DT schema. - Add interrupt properties to DT schema. Toshiba Visconti PCIe controller driver: - Fix interrupts array max constraints in DT schema" * tag 'pci-v6.2-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (95 commits) x86/PCI: Use pr_info() when possible x86/PCI: Fix log message typo x86/PCI: Tidy E820 removal messages PCI: Skip allocate_resource() if too little space available efi/x86: Remove EfiMemoryMappedIO from E820 map PCI/portdrv: Allow AER service only for Root Ports & RCECs PCI: xilinx-nwl: Fix coding style violations PCI: mvebu: Switch to using gpiod API PCI: pciehp: Enable Command Completed Interrupt only if supported PCI: aardvark: Switch to using devm_gpiod_get_optional() dt-bindings: PCI: mediatek-gen3: add support for mt7986 dt-bindings: PCI: mediatek-gen3: add SoC based clock config dt-bindings: PCI: qcom: Allow 'dma-coherent' property PCI: mt7621: Add sentinel to quirks table PCI: vmd: Fix secondary bus reset for Intel bridges PCI: endpoint: pci-epf-vntb: Fix sparse ntb->reg build warning PCI: endpoint: pci-epf-vntb: Fix sparse build warning for epf_db PCI: endpoint: pci-epf-vntb: Replace hardcoded 4 with sizeof(u32) PCI: endpoint: pci-epf-vntb: Remove unused epf_db_phy struct member PCI: endpoint: pci-epf-vntb: Fix call pci_epc_mem_free_addr() in error path ...
2 parents a0a6c76 + f826afe commit c7020e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2753
-931
lines changed
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/baikal,bt1-pcie.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Baikal-T1 PCIe Root Port Controller
8+
9+
maintainers:
10+
- Serge Semin <[email protected]>
11+
12+
description:
13+
Embedded into Baikal-T1 SoC Root Complex controller with a single port
14+
activated. It's based on the DWC RC PCIe v4.60a IP-core, which is configured
15+
to have just a single Root Port function and is capable of establishing the
16+
link up to Gen.3 speed on x4 lanes. It doesn't have embedded clock and reset
17+
control module, so the proper interface initialization is supposed to be
18+
performed by software. There four in- and four outbound iATU regions
19+
which can be used to emit all required TLP types on the PCIe bus.
20+
21+
allOf:
22+
- $ref: /schemas/pci/snps,dw-pcie.yaml#
23+
24+
properties:
25+
compatible:
26+
const: baikal,bt1-pcie
27+
28+
reg:
29+
description:
30+
DBI, DBI2 and at least 4KB outbound iATU-capable region for the
31+
peripheral devices CFG-space access.
32+
maxItems: 3
33+
34+
reg-names:
35+
items:
36+
- const: dbi
37+
- const: dbi2
38+
- const: config
39+
40+
interrupts:
41+
description:
42+
MSI, AER, PME, Hot-plug, Link Bandwidth Management, Link Equalization
43+
request and eight Read/Write eDMA IRQ lines are available.
44+
maxItems: 14
45+
46+
interrupt-names:
47+
items:
48+
- const: dma0
49+
- const: dma1
50+
- const: dma2
51+
- const: dma3
52+
- const: dma4
53+
- const: dma5
54+
- const: dma6
55+
- const: dma7
56+
- const: msi
57+
- const: aer
58+
- const: pme
59+
- const: hp
60+
- const: bw_mg
61+
- const: l_eq
62+
63+
clocks:
64+
description:
65+
DBI (attached to the APB bus), AXI-bus master and slave interfaces
66+
are fed up by the dedicated application clocks. A common reference
67+
clock signal is supposed to be attached to the corresponding Ref-pad
68+
of the SoC. It will be redistributed amongst the controller core
69+
sub-modules (pipe, core, aux, etc).
70+
maxItems: 4
71+
72+
clock-names:
73+
items:
74+
- const: dbi
75+
- const: mstr
76+
- const: slv
77+
- const: ref
78+
79+
resets:
80+
description:
81+
A comprehensive controller reset logic is supposed to be implemented
82+
by software, so almost all the possible application and core reset
83+
signals are exposed via the system CCU module.
84+
maxItems: 9
85+
86+
reset-names:
87+
items:
88+
- const: mstr
89+
- const: slv
90+
- const: pwr
91+
- const: hot
92+
- const: phy
93+
- const: core
94+
- const: pipe
95+
- const: sticky
96+
- const: non-sticky
97+
98+
baikal,bt1-syscon:
99+
$ref: /schemas/types.yaml#/definitions/phandle
100+
description:
101+
Phandle to the Baikal-T1 System Controller DT node. It's required to
102+
access some additional PM, Reset-related and LTSSM signals.
103+
104+
num-lanes:
105+
maximum: 4
106+
107+
max-link-speed:
108+
maximum: 3
109+
110+
required:
111+
- compatible
112+
- reg
113+
- reg-names
114+
- interrupts
115+
- interrupt-names
116+
117+
unevaluatedProperties: false
118+
119+
examples:
120+
- |
121+
#include <dt-bindings/interrupt-controller/mips-gic.h>
122+
#include <dt-bindings/gpio/gpio.h>
123+
124+
pcie@1f052000 {
125+
compatible = "baikal,bt1-pcie";
126+
device_type = "pci";
127+
reg = <0x1f052000 0x1000>, <0x1f053000 0x1000>, <0x1bdbf000 0x1000>;
128+
reg-names = "dbi", "dbi2", "config";
129+
#address-cells = <3>;
130+
#size-cells = <2>;
131+
ranges = <0x81000000 0 0x00000000 0x1bdb0000 0 0x00008000>,
132+
<0x82000000 0 0x20000000 0x08000000 0 0x13db0000>;
133+
bus-range = <0x0 0xff>;
134+
135+
interrupts = <GIC_SHARED 80 IRQ_TYPE_LEVEL_HIGH>,
136+
<GIC_SHARED 81 IRQ_TYPE_LEVEL_HIGH>,
137+
<GIC_SHARED 82 IRQ_TYPE_LEVEL_HIGH>,
138+
<GIC_SHARED 83 IRQ_TYPE_LEVEL_HIGH>,
139+
<GIC_SHARED 84 IRQ_TYPE_LEVEL_HIGH>,
140+
<GIC_SHARED 85 IRQ_TYPE_LEVEL_HIGH>,
141+
<GIC_SHARED 86 IRQ_TYPE_LEVEL_HIGH>,
142+
<GIC_SHARED 87 IRQ_TYPE_LEVEL_HIGH>,
143+
<GIC_SHARED 88 IRQ_TYPE_LEVEL_HIGH>,
144+
<GIC_SHARED 89 IRQ_TYPE_LEVEL_HIGH>,
145+
<GIC_SHARED 90 IRQ_TYPE_LEVEL_HIGH>,
146+
<GIC_SHARED 91 IRQ_TYPE_LEVEL_HIGH>,
147+
<GIC_SHARED 92 IRQ_TYPE_LEVEL_HIGH>,
148+
<GIC_SHARED 93 IRQ_TYPE_LEVEL_HIGH>;
149+
interrupt-names = "dma0", "dma1", "dma2", "dma3",
150+
"dma4", "dma5", "dma6", "dma7",
151+
"msi", "aer", "pme", "hp", "bw_mg",
152+
"l_eq";
153+
154+
clocks = <&ccu_sys 1>, <&ccu_axi 6>, <&ccu_axi 7>, <&clk_pcie>;
155+
clock-names = "dbi", "mstr", "slv", "ref";
156+
157+
resets = <&ccu_axi 6>, <&ccu_axi 7>, <&ccu_sys 7>, <&ccu_sys 10>,
158+
<&ccu_sys 4>, <&ccu_sys 6>, <&ccu_sys 5>, <&ccu_sys 8>,
159+
<&ccu_sys 9>;
160+
reset-names = "mstr", "slv", "pwr", "hot", "phy", "core", "pipe",
161+
"sticky", "non-sticky";
162+
163+
reset-gpios = <&port0 0 GPIO_ACTIVE_LOW>;
164+
165+
num-lanes = <4>;
166+
max-link-speed = <3>;
167+
};
168+
...

Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.yaml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ description: |+
1414
This PCIe host controller is based on the Synopsys DesignWare PCIe IP
1515
and thus inherits all the common properties defined in snps,dw-pcie.yaml.
1616
17-
allOf:
18-
- $ref: /schemas/pci/snps,dw-pcie.yaml#
19-
2017
properties:
2118
compatible:
2219
enum:
@@ -61,7 +58,7 @@ properties:
6158
- const: pcie
6259
- const: pcie_bus
6360
- const: pcie_phy
64-
- const: pcie_inbound_axi for imx6sx-pcie, pcie_aux for imx8mq-pcie
61+
- enum: [ pcie_inbound_axi, pcie_aux ]
6562

6663
num-lanes:
6764
const: 1
@@ -175,6 +172,47 @@ required:
175172
- clocks
176173
- clock-names
177174

175+
allOf:
176+
- $ref: /schemas/pci/snps,dw-pcie.yaml#
177+
- if:
178+
properties:
179+
compatible:
180+
contains:
181+
const: fsl,imx6sx-pcie
182+
then:
183+
properties:
184+
clock-names:
185+
items:
186+
- {}
187+
- {}
188+
- {}
189+
- const: pcie_inbound_axi
190+
- if:
191+
properties:
192+
compatible:
193+
contains:
194+
const: fsl,imx8mq-pcie
195+
then:
196+
properties:
197+
clock-names:
198+
items:
199+
- {}
200+
- {}
201+
- {}
202+
- const: pcie_aux
203+
- if:
204+
properties:
205+
compatible:
206+
not:
207+
contains:
208+
enum:
209+
- fsl,imx6sx-pcie
210+
- fsl,imx8mq-pcie
211+
then:
212+
properties:
213+
clock-names:
214+
maxItems: 3
215+
178216
unevaluatedProperties: false
179217

180218
examples:

Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,12 @@ description: |+
4343
each set has its own address for MSI message, and supports 32 MSI vectors
4444
to generate interrupt.
4545
46-
allOf:
47-
- $ref: /schemas/pci/pci-bus.yaml#
48-
4946
properties:
5047
compatible:
5148
oneOf:
5249
- items:
5350
- enum:
51+
- mediatek,mt7986-pcie
5452
- mediatek,mt8188-pcie
5553
- mediatek,mt8195-pcie
5654
- const: mediatek,mt8192-pcie
@@ -70,29 +68,29 @@ properties:
7068
minItems: 1
7169
maxItems: 8
7270

71+
iommu-map:
72+
maxItems: 1
73+
74+
iommu-map-mask:
75+
const: 0
76+
7377
resets:
7478
minItems: 1
7579
maxItems: 2
7680

7781
reset-names:
7882
minItems: 1
83+
maxItems: 2
7984
items:
80-
- const: phy
81-
- const: mac
85+
enum: [ phy, mac ]
8286

8387
clocks:
88+
minItems: 4
8489
maxItems: 6
8590

8691
clock-names:
87-
items:
88-
- const: pl_250m
89-
- const: tl_26m
90-
- const: tl_96m
91-
- const: tl_32k
92-
- const: peri_26m
93-
- enum:
94-
- top_133m # for MT8192
95-
- peri_mem # for MT8188/MT8195
92+
minItems: 4
93+
maxItems: 6
9694

9795
assigned-clocks:
9896
maxItems: 1
@@ -107,6 +105,9 @@ properties:
107105
items:
108106
- const: pcie-phy
109107

108+
power-domains:
109+
maxItems: 1
110+
110111
'#interrupt-cells':
111112
const: 1
112113

@@ -138,6 +139,54 @@ required:
138139
- '#interrupt-cells'
139140
- interrupt-controller
140141

142+
allOf:
143+
- $ref: /schemas/pci/pci-bus.yaml#
144+
- if:
145+
properties:
146+
compatible:
147+
const: mediatek,mt8192-pcie
148+
then:
149+
properties:
150+
clock-names:
151+
items:
152+
- const: pl_250m
153+
- const: tl_26m
154+
- const: tl_96m
155+
- const: tl_32k
156+
- const: peri_26m
157+
- const: top_133m
158+
- if:
159+
properties:
160+
compatible:
161+
contains:
162+
enum:
163+
- mediatek,mt8188-pcie
164+
- mediatek,mt8195-pcie
165+
then:
166+
properties:
167+
clock-names:
168+
items:
169+
- const: pl_250m
170+
- const: tl_26m
171+
- const: tl_96m
172+
- const: tl_32k
173+
- const: peri_26m
174+
- const: peri_mem
175+
- if:
176+
properties:
177+
compatible:
178+
contains:
179+
enum:
180+
- mediatek,mt7986-pcie
181+
then:
182+
properties:
183+
clock-names:
184+
items:
185+
- const: pl_250m
186+
- const: tl_26m
187+
- const: peri_26m
188+
- const: top_133m
189+
141190
unevaluatedProperties: false
142191

143192
examples:

Documentation/devicetree/bindings/pci/qcom,pcie.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,16 @@ properties:
6262
minItems: 3
6363
maxItems: 13
6464

65+
dma-coherent: true
66+
67+
interconnects:
68+
maxItems: 2
69+
70+
interconnect-names:
71+
items:
72+
- const: pcie-mem
73+
- const: cpu-pcie
74+
6575
resets:
6676
minItems: 1
6777
maxItems: 12
@@ -631,6 +641,18 @@ allOf:
631641
items:
632642
- const: pci # PCIe core reset
633643

644+
- if:
645+
properties:
646+
compatible:
647+
contains:
648+
enum:
649+
- qcom,pcie-sa8540p
650+
- qcom,pcie-sc8280xp
651+
then:
652+
required:
653+
- interconnects
654+
- interconnect-names
655+
634656
- if:
635657
not:
636658
properties:

0 commit comments

Comments
 (0)