Skip to content

Commit 43dfc13

Browse files
committed
Merge tag 'pci-v6.19-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull PCI updates from Bjorn Helgaas: "Enumeration: - Enable host bridge emulation for PCI_DOMAINS_GENERIC platforms (Dan Williams) - Switch vmd from custom domain number allocator to the common allocator to prevent a potential race with new non-VMD buses (Dan Williams) - Enable Precision Time Measurement (PTM) only if device advertises support for a relevant role, to prevent invalid PTM Requests that cause ACS violations that are reported as AER Uncorrectable Non-Fatal errors (Mika Westerberg) Resource management: - Prevent resource tree corruption when BAR resize fails (Ilpo Järvinen) - Restore BARs to the original size if a BAR resize fails (Ilpo Järvinen) - Remove BAR release from BAR resize attempts by the xe, i915, and amdgpu drivers so the PCI core can restore BARs if the resize fails (Ilpo Järvinen) - Move Resizable BAR code to rebar.c (Ilpo Järvinen) - Add pci_rebar_size_supported() and use it in i915 and xe (Ilpo Järvinen) - Add pci_rebar_get_max_size() and use it in xe and amdgpu (Ilpo Järvinen) Power management and error handling: - For drivers using PCI legacy suspend, save config state at suspend so that state (not any earlier state from enumeration, probe, or error recovery) will be restored when resuming (Lukas Wunner) - For devices with no driver or a driver that lacks power management, save config state at hibernate so that state (not any earlier state from enumeration, probe, or error recovery) will be restored when resuming (Lukas Wunner) - Save device config space on device addition, before driver binding, so error recovery works more reliably (Lukas Wunner) - Drop pci_save_state() from several drivers that no longer need it since the PCI core always does it and pci_restore_state() no longer invalidates the saved state (Lukas Wunner) - Document use of pci_save_state() by drivers to capture the state they want restored during error recovery (Lukas Wunner) Power control: - Add a struct pci_ops.assert_perst() function pointer to assert/deassert PCIe PERST# and implement it for the qcom driver (Krishna Chaitanya Chundru) - Add DT binding and pwrctrl driver for the Toshiba TC9563 PCIe switch, which must be held in reset after poweron so the pwrctrl driver can configure the switch via I2C before bringing up the links (Krishna Chaitanya Chundru) Endpoint framework: - Convert the endpoint doorbell test to use a threaded IRQ to fix a 'sleeping while atomic' issue (Bhanu Seshu Kumar Valluri) - Add endpoint VNTB MSI doorbell support to reduce latency between host and endpoint (Frank Li) New native PCIe controller drivers: - Add CIX Sky1 host controller DT binding and driver (Hans Zhang) - Add NXP S32G host controller DT binding and driver (Vincent Guittot) - Add Renesas RZ/G3S host controller DT binding and driver (Claudiu Beznea) - Add SpacemiT K1 host controller DT binding and driver (Alex Elder) Amlogic Meson PCIe controller driver: - Update DT binding to name DBI region 'dbi', not 'elbi', and update driver to support both (Manivannan Sadhasivam) Apple PCIe controller driver: - Move struct pci_host_bridge allocation from pci_host_common_init() to callers, which significantly simplifies pcie-apple (Marc Zyngier) Broadcom STB PCIe controller driver: - Disable advertising ASPM L0s support correctly (Jim Quinlan) - Add a panic/die handler to print diagnostic info in case PCIe caused an unrecoverable abort (Jim Quinlan) Cadence PCIe controller driver: - Add module support for Cadence platform host and endpoint controller driver (Manikandan K Pillai) - Split headers into 'legacy' (LGA) and 'high perf' (HPA) to prepare for new CIX Sky1 driver (Manikandan K Pillai) MediaTek PCIe controller driver: - Convert DT binding to YAML schema (Christian Marangi) - Add Airoha AN7583 DT compatible and driver support (Christian Marangi) Qualcomm PCIe controller driver: - Add Qualcomm Kaanapali to SM8550 DT binding (Qiang Yu) - Add required 'power-domains' and 'resets' to qcom sa8775p, sc7280, sc8280xp, sm8150, sm8250, sm8350, sm8450, sm8550, x1e80100 DT schemas (Krzysztof Kozlowski) - Look up OPP using both frequency and data rate (not just frequency) so RPMh votes can account for both (Krishna Chaitanya Chundru) Rockchip DesignWare PCIe controller driver: - Add Rockchip RK3528 compatible strings in DT binding (Yao Zi) STMicroelectronics STM32MP25 PCIe controller driver: - Fix a race between link training and endpoint register initialization (Christian Bruel) - Align endpoint allocations to match the ATU requirements (Christian Bruel) Synopsys DesignWare PCIe controller driver: - Clear L1 PM Substate Capability 'Supported' bits unless glue driver says it's supported, which prevents users from enabling non-working L1SS. Currently only qcom and tegra194 support L1SS (Bjorn Helgaas) - Remove now-superfluous L1SS disable code from tegra194 (Bjorn Helgaas) - Configure L1SS support in dw-rockchip when DT says 'supports-clkreq' (Shawn Lin) TI Keystone PCIe controller driver: - Fail the probe instead of silently succeeding if ks_pcie_of_data didn't specify Root Complex or Endpoint mode (Siddharth Vadapalli) - Make keystone buildable as a loadable module, except on ARM32 where hook_fault_code() is __init (Siddharth Vadapalli)" * tag 'pci-v6.19-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (100 commits) MAINTAINERS: Add Manivannan Sadhasivam as PCI/pwrctrl maintainer MAINTAINERS: Add CIX Sky1 PCIe controller driver maintainer PCI: sky1: Add PCIe host support for CIX Sky1 dt-bindings: PCI: Add CIX Sky1 PCIe Root Complex bindings PCI: cadence: Add support for High Perf Architecture (HPA) controller MAINTAINERS: Add NXP S32G PCIe controller driver maintainer PCI: s32g: Add NXP S32G PCIe controller driver (RC) PCI: dwc: Add register and bitfield definitions dt-bindings: PCI: s32g: Add NXP S32G PCIe controller PCI: Add Renesas RZ/G3S host controller driver PCI: host-generic: Move bridge allocation outside of pci_host_common_init() dt-bindings: PCI: Add Renesas RZ/G3S PCIe controller binding PCI: Validate pci_rebar_size_supported() input Documentation: PCI: Amend error recovery doc with pci_save_state() rules treewide: Drop pci_save_state() after pci_restore_state() PCI/ERR: Ensure error recoverability at all times PCI/PM: Stop needlessly clearing state_saved on enumeration and thaw PCI/PM: Reinstate clearing state_saved in legacy and !PM codepaths PCI: dw-rockchip: Configure L1SS support PCI: tegra194: Remove unnecessary L1SS disable code ...
2 parents b1dd1e2 + cd6b7c8 commit 43dfc13

126 files changed

Lines changed: 7905 additions & 1672 deletions

File tree

Some content is hidden

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

Documentation/PCI/pci-error-recovery.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,21 @@ be recovered, there is nothing more that can be done; the platform
326326
will typically report a "permanent failure" in such a case. The
327327
device will be considered "dead" in this case.
328328

329+
Drivers typically need to call pci_restore_state() after reset to
330+
re-initialize the device's config space registers and thereby
331+
bring it from D0\ :sub:`uninitialized` into D0\ :sub:`active` state
332+
(PCIe r7.0 sec 5.3.1.1). The PCI core invokes pci_save_state()
333+
on enumeration after initializing config space to ensure that a
334+
saved state is available for subsequent error recovery.
335+
Drivers which modify config space on probe may need to invoke
336+
pci_save_state() afterwards to record those changes for later
337+
error recovery. When going into system suspend, pci_save_state()
338+
is called for every PCI device and that state will be restored
339+
not only on resume, but also on any subsequent error recovery.
340+
In the unlikely event that the saved state recorded on suspend
341+
is unsuitable for error recovery, drivers should call
342+
pci_save_state() on resume.
343+
329344
Drivers for multi-function cards will need to coordinate among
330345
themselves as to which driver instance will perform any "one-shot"
331346
or global device initialization. For example, the Symbios sym53cxx2

Documentation/devicetree/bindings/pci/amlogic,axg-pcie.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ allOf:
2020
select:
2121
properties:
2222
compatible:
23-
enum:
24-
- amlogic,axg-pcie
25-
- amlogic,g12a-pcie
23+
contains:
24+
enum:
25+
- amlogic,axg-pcie
26+
- amlogic,g12a-pcie
2627
required:
2728
- compatible
2829

@@ -36,13 +37,13 @@ properties:
3637

3738
reg:
3839
items:
39-
- description: External local bus interface registers
40+
- description: Data Bus Interface registers
4041
- description: Meson designed configuration registers
4142
- description: PCIe configuration space
4243

4344
reg-names:
4445
items:
45-
- const: elbi
46+
- const: dbi
4647
- const: cfg
4748
- const: config
4849

@@ -51,15 +52,15 @@ properties:
5152

5253
clocks:
5354
items:
55+
- description: PCIe PHY clock
5456
- description: PCIe GEN 100M PLL clock
5557
- description: PCIe RC clock gate
56-
- description: PCIe PHY clock
5758

5859
clock-names:
5960
items:
61+
- const: general
6062
- const: pclk
6163
- const: port
62-
- const: general
6364

6465
phys:
6566
maxItems: 1
@@ -88,7 +89,7 @@ required:
8889
- reg
8990
- reg-names
9091
- interrupts
91-
- clock
92+
- clocks
9293
- clock-names
9394
- "#address-cells"
9495
- "#size-cells"
@@ -113,10 +114,10 @@ examples:
113114
pcie: pcie@f9800000 {
114115
compatible = "amlogic,axg-pcie", "snps,dw-pcie";
115116
reg = <0xf9800000 0x400000>, <0xff646000 0x2000>, <0xf9f00000 0x100000>;
116-
reg-names = "elbi", "cfg", "config";
117+
reg-names = "dbi", "cfg", "config";
117118
interrupts = <GIC_SPI 177 IRQ_TYPE_EDGE_RISING>;
118-
clocks = <&pclk>, <&clk_port>, <&clk_phy>;
119-
clock-names = "pclk", "port", "general";
119+
clocks = <&clk_phy>, <&pclk>, <&clk_port>;
120+
clock-names = "general", "pclk", "port";
120121
resets = <&reset_pcie_port>, <&reset_pcie_apb>;
121122
reset-names = "port", "apb";
122123
phys = <&pcie_phy>;
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/cix,sky1-pcie-host.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: CIX Sky1 PCIe Root Complex
8+
9+
maintainers:
10+
- Hans Zhang <hans.zhang@cixtech.com>
11+
12+
description:
13+
PCIe root complex controller based on the Cadence PCIe core.
14+
15+
allOf:
16+
- $ref: /schemas/pci/pci-host-bridge.yaml#
17+
18+
properties:
19+
compatible:
20+
const: cix,sky1-pcie-host
21+
22+
reg:
23+
items:
24+
- description: PCIe controller registers.
25+
- description: ECAM registers.
26+
- description: Remote CIX System Unit strap registers.
27+
- description: Remote CIX System Unit status registers.
28+
- description: Region for sending messages registers.
29+
30+
reg-names:
31+
items:
32+
- const: reg
33+
- const: cfg
34+
- const: rcsu_strap
35+
- const: rcsu_status
36+
- const: msg
37+
38+
ranges:
39+
maxItems: 3
40+
41+
required:
42+
- compatible
43+
- ranges
44+
- bus-range
45+
- device_type
46+
- interrupt-map
47+
- interrupt-map-mask
48+
- msi-map
49+
50+
unevaluatedProperties: false
51+
52+
examples:
53+
- |
54+
#include <dt-bindings/interrupt-controller/arm-gic.h>
55+
56+
soc {
57+
#address-cells = <2>;
58+
#size-cells = <2>;
59+
60+
pcie@a010000 {
61+
compatible = "cix,sky1-pcie-host";
62+
reg = <0x00 0x0a010000 0x00 0x10000>,
63+
<0x00 0x2c000000 0x00 0x4000000>,
64+
<0x00 0x0a000300 0x00 0x100>,
65+
<0x00 0x0a000400 0x00 0x100>,
66+
<0x00 0x60000000 0x00 0x00100000>;
67+
reg-names = "reg", "cfg", "rcsu_strap", "rcsu_status", "msg";
68+
ranges = <0x01000000 0x00 0x60100000 0x00 0x60100000 0x00 0x00100000>,
69+
<0x02000000 0x00 0x60200000 0x00 0x60200000 0x00 0x1fe00000>,
70+
<0x43000000 0x18 0x00000000 0x18 0x00000000 0x04 0x00000000>;
71+
#address-cells = <3>;
72+
#size-cells = <2>;
73+
bus-range = <0xc0 0xff>;
74+
device_type = "pci";
75+
#interrupt-cells = <1>;
76+
interrupt-map-mask = <0 0 0 0x7>;
77+
interrupt-map = <0 0 0 1 &gic 0 0 GIC_SPI 407 IRQ_TYPE_LEVEL_HIGH 0>,
78+
<0 0 0 2 &gic 0 0 GIC_SPI 408 IRQ_TYPE_LEVEL_HIGH 0>,
79+
<0 0 0 3 &gic 0 0 GIC_SPI 409 IRQ_TYPE_LEVEL_HIGH 0>,
80+
<0 0 0 4 &gic 0 0 GIC_SPI 410 IRQ_TYPE_LEVEL_HIGH 0>;
81+
msi-map = <0xc000 &gic_its 0xc000 0x4000>;
82+
};
83+
};
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/mediatek-pcie-mt7623.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: PCIe controller on MediaTek SoCs
8+
9+
maintainers:
10+
- Christian Marangi <ansuelsmth@gmail.com>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- mediatek,mt2701-pcie
16+
- mediatek,mt7623-pcie
17+
18+
reg:
19+
minItems: 4
20+
maxItems: 4
21+
22+
reg-names:
23+
items:
24+
- const: subsys
25+
- const: port0
26+
- const: port1
27+
- const: port2
28+
29+
clocks:
30+
minItems: 4
31+
maxItems: 4
32+
33+
clock-names:
34+
items:
35+
- const: free_ck
36+
- const: sys_ck0
37+
- const: sys_ck1
38+
- const: sys_ck2
39+
40+
resets:
41+
minItems: 3
42+
maxItems: 3
43+
44+
reset-names:
45+
items:
46+
- const: pcie-rst0
47+
- const: pcie-rst1
48+
- const: pcie-rst2
49+
50+
phys:
51+
minItems: 3
52+
maxItems: 3
53+
54+
phy-names:
55+
items:
56+
- const: pcie-phy0
57+
- const: pcie-phy1
58+
- const: pcie-phy2
59+
60+
power-domains:
61+
maxItems: 1
62+
63+
required:
64+
- compatible
65+
- reg
66+
- reg-names
67+
- ranges
68+
- clocks
69+
- clock-names
70+
- '#interrupt-cells'
71+
- resets
72+
- reset-names
73+
- phys
74+
- phy-names
75+
- power-domains
76+
- pcie@0,0
77+
- pcie@1,0
78+
- pcie@2,0
79+
80+
allOf:
81+
- $ref: /schemas/pci/pci-host-bridge.yaml#
82+
83+
unevaluatedProperties: false
84+
85+
examples:
86+
# MT7623
87+
- |
88+
#include <dt-bindings/interrupt-controller/arm-gic.h>
89+
#include <dt-bindings/interrupt-controller/irq.h>
90+
#include <dt-bindings/clock/mt2701-clk.h>
91+
#include <dt-bindings/reset/mt2701-resets.h>
92+
#include <dt-bindings/phy/phy.h>
93+
#include <dt-bindings/power/mt2701-power.h>
94+
95+
soc {
96+
#address-cells = <2>;
97+
#size-cells = <2>;
98+
99+
pcie@1a140000 {
100+
compatible = "mediatek,mt7623-pcie";
101+
device_type = "pci";
102+
reg = <0 0x1a140000 0 0x1000>, /* PCIe shared registers */
103+
<0 0x1a142000 0 0x1000>, /* Port0 registers */
104+
<0 0x1a143000 0 0x1000>, /* Port1 registers */
105+
<0 0x1a144000 0 0x1000>; /* Port2 registers */
106+
reg-names = "subsys", "port0", "port1", "port2";
107+
#address-cells = <3>;
108+
#size-cells = <2>;
109+
#interrupt-cells = <1>;
110+
interrupt-map-mask = <0xf800 0 0 0>;
111+
interrupt-map = <0x0000 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>,
112+
<0x0800 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>,
113+
<0x1000 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
114+
clocks = <&topckgen CLK_TOP_ETHIF_SEL>,
115+
<&hifsys CLK_HIFSYS_PCIE0>,
116+
<&hifsys CLK_HIFSYS_PCIE1>,
117+
<&hifsys CLK_HIFSYS_PCIE2>;
118+
clock-names = "free_ck", "sys_ck0", "sys_ck1", "sys_ck2";
119+
resets = <&hifsys MT2701_HIFSYS_PCIE0_RST>,
120+
<&hifsys MT2701_HIFSYS_PCIE1_RST>,
121+
<&hifsys MT2701_HIFSYS_PCIE2_RST>;
122+
reset-names = "pcie-rst0", "pcie-rst1", "pcie-rst2";
123+
phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>,
124+
<&pcie2_phy PHY_TYPE_PCIE>;
125+
phy-names = "pcie-phy0", "pcie-phy1", "pcie-phy2";
126+
power-domains = <&scpsys MT2701_POWER_DOMAIN_HIF>;
127+
bus-range = <0x00 0xff>;
128+
ranges = <0x81000000 0 0x1a160000 0 0x1a160000 0 0x00010000>, /* I/O space */
129+
<0x83000000 0 0x60000000 0 0x60000000 0 0x10000000>; /* memory space */
130+
131+
pcie@0,0 {
132+
device_type = "pci";
133+
reg = <0x0000 0 0 0 0>;
134+
#address-cells = <3>;
135+
#size-cells = <2>;
136+
#interrupt-cells = <1>;
137+
interrupt-map-mask = <0 0 0 0>;
138+
interrupt-map = <0 0 0 0 &sysirq GIC_SPI 193 IRQ_TYPE_LEVEL_LOW>;
139+
ranges;
140+
};
141+
142+
pcie@1,0 {
143+
device_type = "pci";
144+
reg = <0x0800 0 0 0 0>;
145+
#address-cells = <3>;
146+
#size-cells = <2>;
147+
#interrupt-cells = <1>;
148+
interrupt-map-mask = <0 0 0 0>;
149+
interrupt-map = <0 0 0 0 &sysirq GIC_SPI 194 IRQ_TYPE_LEVEL_LOW>;
150+
ranges;
151+
};
152+
153+
pcie@2,0 {
154+
device_type = "pci";
155+
reg = <0x1000 0 0 0 0>;
156+
#address-cells = <3>;
157+
#size-cells = <2>;
158+
#interrupt-cells = <1>;
159+
interrupt-map-mask = <0 0 0 0>;
160+
interrupt-map = <0 0 0 0 &sysirq GIC_SPI 195 IRQ_TYPE_LEVEL_LOW>;
161+
ranges;
162+
};
163+
};
164+
};

0 commit comments

Comments
 (0)