Skip to content

Commit 041bc24

Browse files
committed
Merge tag 'pci-v6.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull pci updates from Bjorn Helgaas: "Resource management: - Distribute spare resources to unconfigured hotplug bridges at boot-time (not just when hot-adding such a bridge), which makes hot-adding devices to docks work better. - Revert to a BAR assignment inherited from firmware only when the address is actually reachable via any upstream bridges, which fixes some cases where firmware doesn't configure all devices. - Add a sysfs interface to resize BARs so this can be done before assigning devices to a VM through VFIO. Power management: - Disable Precision Time Management for all devices on suspend to enable lower-power PM state. We previously did this just for Root Ports, which isn't enough because downstream devices can still generate PTM messages, which cause errors if it's disabled in the Root Port. - Save and restore the ASPM L1 PM Substates configuration for suspend/ resume. Previously this configuration was lost, so L1.x states likely stopped working after resume. - Check whether the L1 PM Substates Capability exists. If it didn't exist, we previously read junk and tried to configure L1 Substates based on that. - Fix the LTR_L1.2_THRESHOLD computation, which previously set a threshold for entering L1.2 that was too low in some cases. - Reduce the delay after transitions to or from D3cold by using usleep_range() rather than msleep(), which often slept for ~19ms instead of the 10ms normally required. The spec says 10ms is enough, but it's possible we could trip over devices that need a little more. Error handling: - Work around a BIOS bug that caused Intel Root Ports to advertise a Root Port Programmed I/O (RP PIO) log size of zero, which caused annoying warnings and prevented the kernel from dumping log registers for DPC errors. Qualcomm PCIe controller driver: - Add support for SC8280XP and SA8540P host controllers and SM8450 endpoint controller. - Disable Master AXI clock on endpoint controllers to save power when link is idle or in L1.x. - Expose link state transition counts via debugfs to help debug issues with low-power states. - Add auto-loading module support. Synopsys DesignWare PCIe controller driver: - Remove a dependency on ZONE_DMA32 by allocating the MSI target page differently. There's more work to do related to eDMA controllers, so it's not completely settled" * tag 'pci-v6.1-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (71 commits) PCI: qcom-ep: Check platform_get_resource_byname() return value PCI: qcom-ep: Add support for SM8450 SoC dt-bindings: PCI: qcom-ep: Add support for SM8450 SoC dt-bindings: PCI: qcom-ep: Define clocks per platform PCI: qcom-ep: Make PERST separation optional dt-bindings: PCI: qcom-ep: Make PERST separation optional PCI: qcom-ep: Disable Master AXI Clock when there is no PCIe traffic PCI: Expose PCIe Resizable BAR support via sysfs PCI/ASPM: Correct LTR_L1.2_THRESHOLD computation PCI/ASPM: Ignore L1 PM Substates if device lacks capability PCI/ASPM: Factor out L1 PM Substates configuration PCI: qcom-ep: Gate Master AXI clock to MHI bus during L1SS PCI: qcom-ep: Expose link transition counts via debugfs PCI: qcom-ep: Disable IRQs during driver remove PCI/ASPM: Save L1 PM Substates Capability for suspend/resume PCI/ASPM: Refactor L1 PM Substates Control Register programming PCI: qcom-ep: Make use of the cached dev pointer PCI: qcom-ep: Rely on the clocks supplied by devicetree PCI: qcom-ep: Add kernel-doc for qcom_pcie_ep structure phy: freescale: imx8m-pcie: Fix the wrong order of phy_init() and phy_power_on() ...
2 parents c440f99 + 0e00a3a commit 041bc24

37 files changed

+1274
-642
lines changed

Documentation/ABI/testing/sysfs-bus-pci

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,3 +457,36 @@ Description:
457457

458458
The file is writable if the PF is bound to a driver that
459459
implements ->sriov_set_msix_vec_count().
460+
461+
What: /sys/bus/pci/devices/.../resourceN_resize
462+
Date: September 2022
463+
Contact: Alex Williamson <[email protected]>
464+
Description:
465+
These files provide an interface to PCIe Resizable BAR support.
466+
A file is created for each BAR resource (N) supported by the
467+
PCIe Resizable BAR extended capability of the device. Reading
468+
each file exposes the bitmap of available resource sizes:
469+
470+
# cat resource1_resize
471+
00000000000001c0
472+
473+
The bitmap represents supported resource sizes for the BAR,
474+
where bit0 = 1MB, bit1 = 2MB, bit2 = 4MB, etc. In the above
475+
example the device supports 64MB, 128MB, and 256MB BAR sizes.
476+
477+
When writing the file, the user provides the bit position of
478+
the desired resource size, for example:
479+
480+
# echo 7 > resource1_resize
481+
482+
This indicates to set the size value corresponding to bit 7,
483+
128MB. The resulting size is 2 ^ (bit# + 20). This definition
484+
matches the PCIe specification of this capability.
485+
486+
In order to make use of resource resizing, all PCI drivers must
487+
be unbound from the device and peer devices under the same
488+
parent bridge may need to be soft removed. In the case of
489+
VGA devices, writing a resize value will remove low level
490+
console drivers from the device. Raw users of pci-sysfs
491+
resourceN attributes must be terminated prior to resizing.
492+
Success of the resizing operation is not guaranteed.

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,13 @@ allOf:
4848

4949
properties:
5050
compatible:
51-
const: mediatek,mt8192-pcie
51+
oneOf:
52+
- items:
53+
- enum:
54+
- mediatek,mt8188-pcie
55+
- mediatek,mt8195-pcie
56+
- const: mediatek,mt8192-pcie
57+
- const: mediatek,mt8192-pcie
5258

5359
reg:
5460
maxItems: 1
@@ -84,7 +90,9 @@ properties:
8490
- const: tl_96m
8591
- const: tl_32k
8692
- const: peri_26m
87-
- const: top_133m
93+
- enum:
94+
- top_133m # for MT8192
95+
- peri_mem # for MT8188/MT8195
8896

8997
assigned-clocks:
9098
maxItems: 1
@@ -126,6 +134,7 @@ required:
126134
- interrupts
127135
- ranges
128136
- clocks
137+
- clock-names
129138
- '#interrupt-cells'
130139
- interrupt-controller
131140

Documentation/devicetree/bindings/pci/microchip,pcie-host.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,33 @@ properties:
2525
- const: cfg
2626
- const: apb
2727

28+
clocks:
29+
description:
30+
Fabric Interface Controllers, FICs, are the interface between the FPGA
31+
fabric and the core complex on PolarFire SoC. The FICs require two clocks,
32+
one from each side of the interface. The "FIC clocks" described by this
33+
property are on the core complex side & communication through a FIC is not
34+
possible unless it's corresponding clock is enabled. A clock must be
35+
enabled for each of the interfaces the root port is connected through.
36+
This could in theory be all 4 interfaces, one interface or any combination
37+
in between.
38+
minItems: 1
39+
items:
40+
- description: FIC0's clock
41+
- description: FIC1's clock
42+
- description: FIC2's clock
43+
- description: FIC3's clock
44+
45+
clock-names:
46+
description:
47+
As any FIC connection combination is possible, the names should match the
48+
order in the clocks property and take the form "ficN" where N is a number
49+
0-3
50+
minItems: 1
51+
maxItems: 4
52+
items:
53+
pattern: '^fic[0-3]$'
54+
2855
interrupts:
2956
minItems: 1
3057
items:
@@ -40,6 +67,10 @@ properties:
4067
ranges:
4168
maxItems: 1
4269

70+
dma-ranges:
71+
minItems: 1
72+
maxItems: 6
73+
4374
msi-controller:
4475
description: Identifies the node as an MSI controller.
4576

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

Lines changed: 65 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@ title: Qualcomm PCIe Endpoint Controller binding
99
maintainers:
1010
- Manivannan Sadhasivam <[email protected]>
1111

12-
allOf:
13-
- $ref: "pci-ep.yaml#"
14-
1512
properties:
1613
compatible:
17-
const: qcom,sdx55-pcie-ep
14+
enum:
15+
- qcom,sdx55-pcie-ep
16+
- qcom,sm8450-pcie-ep
1817

1918
reg:
2019
items:
@@ -35,24 +34,12 @@ properties:
3534
- const: mmio
3635

3736
clocks:
38-
items:
39-
- description: PCIe Auxiliary clock
40-
- description: PCIe CFG AHB clock
41-
- description: PCIe Master AXI clock
42-
- description: PCIe Slave AXI clock
43-
- description: PCIe Slave Q2A AXI clock
44-
- description: PCIe Sleep clock
45-
- description: PCIe Reference clock
37+
minItems: 7
38+
maxItems: 8
4639

4740
clock-names:
48-
items:
49-
- const: aux
50-
- const: cfg
51-
- const: bus_master
52-
- const: bus_slave
53-
- const: slave_q2a
54-
- const: sleep
55-
- const: ref
41+
minItems: 7
42+
maxItems: 8
5643

5744
qcom,perst-regs:
5845
description: Reference to a syscon representing TCSR followed by the two
@@ -105,14 +92,71 @@ required:
10592
- reg-names
10693
- clocks
10794
- clock-names
108-
- qcom,perst-regs
10995
- interrupts
11096
- interrupt-names
11197
- reset-gpios
11298
- resets
11399
- reset-names
114100
- power-domains
115101

102+
allOf:
103+
- $ref: pci-ep.yaml#
104+
- if:
105+
properties:
106+
compatible:
107+
contains:
108+
enum:
109+
- qcom,sdx55-pcie-ep
110+
then:
111+
properties:
112+
clocks:
113+
items:
114+
- description: PCIe Auxiliary clock
115+
- description: PCIe CFG AHB clock
116+
- description: PCIe Master AXI clock
117+
- description: PCIe Slave AXI clock
118+
- description: PCIe Slave Q2A AXI clock
119+
- description: PCIe Sleep clock
120+
- description: PCIe Reference clock
121+
clock-names:
122+
items:
123+
- const: aux
124+
- const: cfg
125+
- const: bus_master
126+
- const: bus_slave
127+
- const: slave_q2a
128+
- const: sleep
129+
- const: ref
130+
131+
- if:
132+
properties:
133+
compatible:
134+
contains:
135+
enum:
136+
- qcom,sm8450-pcie-ep
137+
then:
138+
properties:
139+
clocks:
140+
items:
141+
- description: PCIe Auxiliary clock
142+
- description: PCIe CFG AHB clock
143+
- description: PCIe Master AXI clock
144+
- description: PCIe Slave AXI clock
145+
- description: PCIe Slave Q2A AXI clock
146+
- description: PCIe Reference clock
147+
- description: PCIe DDRSS SF TBU clock
148+
- description: PCIe AGGRE NOC AXI clock
149+
clock-names:
150+
items:
151+
- const: aux
152+
- const: cfg
153+
- const: bus_master
154+
- const: bus_slave
155+
- const: slave_q2a
156+
- const: ref
157+
- const: ddrss_sf_tbu
158+
- const: aggre_noc_axi
159+
116160
unevaluatedProperties: false
117161

118162
examples:

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

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ properties:
2525
- qcom,pcie-ipq4019
2626
- qcom,pcie-ipq8074
2727
- qcom,pcie-qcs404
28+
- qcom,pcie-sa8540p
2829
- qcom,pcie-sc7280
2930
- qcom,pcie-sc8180x
31+
- qcom,pcie-sc8280xp
3032
- qcom,pcie-sdm845
3133
- qcom,pcie-sm8150
3234
- qcom,pcie-sm8250
@@ -181,6 +183,7 @@ allOf:
181183
enum:
182184
- qcom,pcie-sc7280
183185
- qcom,pcie-sc8180x
186+
- qcom,pcie-sc8280xp
184187
- qcom,pcie-sm8250
185188
- qcom,pcie-sm8450-pcie0
186189
- qcom,pcie-sm8450-pcie1
@@ -598,6 +601,36 @@ allOf:
598601
items:
599602
- const: pci # PCIe core reset
600603

604+
- if:
605+
properties:
606+
compatible:
607+
contains:
608+
enum:
609+
- qcom,pcie-sa8540p
610+
- qcom,pcie-sc8280xp
611+
then:
612+
properties:
613+
clocks:
614+
minItems: 8
615+
maxItems: 9
616+
clock-names:
617+
minItems: 8
618+
items:
619+
- const: aux # Auxiliary clock
620+
- const: cfg # Configuration clock
621+
- const: bus_master # Master AXI clock
622+
- const: bus_slave # Slave AXI clock
623+
- const: slave_q2a # Slave Q2A clock
624+
- const: ddrss_sf_tbu # PCIe SF TBU clock
625+
- const: noc_aggr_4 # NoC aggregate 4 clock
626+
- const: noc_aggr_south_sf # NoC aggregate South SF clock
627+
- const: cnoc_qx # Configuration NoC QX clock
628+
resets:
629+
maxItems: 1
630+
reset-names:
631+
items:
632+
- const: pci # PCIe core reset
633+
601634
- if:
602635
not:
603636
properties:
@@ -626,8 +659,6 @@ allOf:
626659
- resets
627660
- reset-names
628661

629-
# Newer chipsets support either 1 or 8 MSI vectors
630-
# On older chipsets it's always 1 MSI vector
631662
- if:
632663
properties:
633664
compatible:
@@ -662,7 +693,40 @@ allOf:
662693
- const: msi5
663694
- const: msi6
664695
- const: msi7
665-
else:
696+
697+
- if:
698+
properties:
699+
compatible:
700+
contains:
701+
enum:
702+
- qcom,pcie-sc8280xp
703+
then:
704+
properties:
705+
interrupts:
706+
minItems: 4
707+
maxItems: 4
708+
interrupt-names:
709+
items:
710+
- const: msi0
711+
- const: msi1
712+
- const: msi2
713+
- const: msi3
714+
715+
- if:
716+
properties:
717+
compatible:
718+
contains:
719+
enum:
720+
- qcom,pcie-apq8064
721+
- qcom,pcie-apq8084
722+
- qcom,pcie-ipq4019
723+
- qcom,pcie-ipq6018
724+
- qcom,pcie-ipq8064
725+
- qcom,pcie-ipq8064-v2
726+
- qcom,pcie-ipq8074
727+
- qcom,pcie-qcs404
728+
- qcom,pcie-sa8540p
729+
then:
666730
properties:
667731
interrupts:
668732
maxItems: 1

Documentation/devicetree/bindings/pci/sifive,fu740-pcie.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ properties:
5151
description: A phandle to the PCIe power up reset line.
5252
maxItems: 1
5353

54+
clocks:
55+
maxItems: 1
56+
57+
clock-names:
58+
const: pcie_aux
59+
5460
pwren-gpios:
5561
description: Should specify the GPIO for controlling the PCI bus device power on.
5662
maxItems: 1
@@ -66,6 +72,7 @@ required:
6672
- interrupt-map-mask
6773
- interrupt-map
6874
- clocks
75+
- clock-names
6976
- resets
7077
- pwren-gpios
7178
- reset-gpios
@@ -104,6 +111,7 @@ examples:
104111
<0x0 0x0 0x0 0x2 &plic0 58>,
105112
<0x0 0x0 0x0 0x3 &plic0 59>,
106113
<0x0 0x0 0x0 0x4 &plic0 60>;
114+
clock-names = "pcie_aux";
107115
clocks = <&prci FU740_PRCI_CLK_PCIE_AUX>;
108116
resets = <&prci 4>;
109117
pwren-gpios = <&gpio 5 0>;

MAINTAINERS

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15865,6 +15865,7 @@ PCI ENDPOINT SUBSYSTEM
1586515865
M: Kishon Vijay Abraham I <[email protected]>
1586615866
M: Lorenzo Pieralisi <[email protected]>
1586715867
R: Krzysztof Wilczyński <[email protected]>
15868+
R: Manivannan Sadhasivam <[email protected]>
1586815869
1586915870
S: Supported
1587015871
Q: https://patchwork.kernel.org/project/linux-pci/list/
@@ -15878,8 +15879,8 @@ F: drivers/pci/endpoint/
1587815879
F: tools/pci/
1587915880

1588015881
PCI ENHANCED ERROR HANDLING (EEH) FOR POWERPC
15881-
M: Russell Currey <[email protected]>
15882-
M: Oliver O'Halloran <[email protected]>
15882+
M: Mahesh J Salgaonkar <[email protected]>
15883+
R: Oliver O'Halloran <[email protected]>
1588315884
1588415885
S: Supported
1588515886
F: Documentation/PCI/pci-error-recovery.rst

0 commit comments

Comments
 (0)