Skip to content

Commit 0c5c62d

Browse files
committed
Merge tag 'pci-v5.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull pci updates from Bjorn Helgaas: "Enumeration: - Conserve IRQs by setting up portdrv IRQs only when there are users (Jan Kiszka) - Rework and simplify _OSC negotiation for control of PCIe features (Joerg Roedel) - Remove struct pci_dev.driver pointer since it's redundant with the struct device.driver pointer (Uwe Kleine-König) Resource management: - Coalesce contiguous host bridge apertures from _CRS to accommodate BARs that cover more than one aperture (Kai-Heng Feng) Sysfs: - Check CAP_SYS_ADMIN before parsing user input (Krzysztof Wilczyński) - Return -EINVAL consistently from "store" functions (Krzysztof Wilczyński) - Use sysfs_emit() in endpoint "show" functions to avoid buffer overruns (Kunihiko Hayashi) PCIe native device hotplug: - Ignore Link Down/Up caused by resets during error recovery so endpoint drivers can remain bound to the device (Lukas Wunner) Virtualization: - Avoid bus resets on Atheros QCA6174, where they hang the device (Ingmar Klein) - Work around Pericom PI7C9X2G switch packet drop erratum by using store and forward mode instead of cut-through (Nathan Rossi) - Avoid trying to enable AtomicOps on VFs; the PF setting applies to all VFs (Selvin Xavier) MSI: - Document that /sys/bus/pci/devices/.../irq contains the legacy INTx interrupt or the IRQ of the first MSI (not MSI-X) vector (Barry Song) VPD: - Add pci_read_vpd_any() and pci_write_vpd_any() to access anywhere in the possible VPD space; use these to simplify the cxgb3 driver (Heiner Kallweit) Peer-to-peer DMA: - Add (not subtract) the bus offset when calculating DMA address (Wang Lu) ASPM: - Re-enable LTR at Downstream Ports so they don't report Unsupported Requests when reset or hot-added devices send LTR messages (Mingchuang Qiao) Apple PCIe controller driver: - Add driver for Apple M1 PCIe controller (Alyssa Rosenzweig, Marc Zyngier) Cadence PCIe controller driver: - Return success when probe succeeds instead of falling into error path (Li Chen) HiSilicon Kirin PCIe controller driver: - Reorganize PHY logic and add support for external PHY drivers (Mauro Carvalho Chehab) - Support PERST# GPIOs for HiKey970 external PEX 8606 bridge (Mauro Carvalho Chehab) - Add Kirin 970 support (Mauro Carvalho Chehab) - Make driver removable (Mauro Carvalho Chehab) Intel VMD host bridge driver: - If IOMMU supports interrupt remapping, leave VMD MSI-X remapping enabled (Adrian Huang) - Number each controller so we can tell them apart in /proc/interrupts (Chunguang Xu) - Avoid building on UML because VMD depends on x86 bare metal APIs (Johannes Berg) Marvell Aardvark PCIe controller driver: - Define macros for PCI_EXP_DEVCTL_PAYLOAD_* (Pali Rohár) - Set Max Payload Size to 512 bytes per Marvell spec (Pali Rohár) - Downgrade PIO Response Status messages to debug level (Marek Behún) - Preserve CRS SV (Config Request Retry Software Visibility) bit in emulated Root Control register (Pali Rohár) - Fix issue in configuring reference clock (Pali Rohár) - Don't clear status bits for masked interrupts (Pali Rohár) - Don't mask unused interrupts (Pali Rohár) - Avoid code repetition in advk_pcie_rd_conf() (Marek Behún) - Retry config accesses on CRS response (Pali Rohár) - Simplify emulated Root Capabilities initialization (Pali Rohár) - Fix several link training issues (Pali Rohár) - Fix link-up checking via LTSSM (Pali Rohár) - Fix reporting of Data Link Layer Link Active (Pali Rohár) - Fix emulation of W1C bits (Marek Behún) - Fix MSI domain .alloc() method to return zero on success (Marek Behún) - Read entire 16-bit MSI vector in MSI handler, not just low 8 bits (Marek Behún) - Clear Root Port I/O Space, Memory Space, and Bus Master Enable bits at startup; PCI core will set those as necessary (Pali Rohár) - When operating as a Root Port, set class code to "PCI Bridge" instead of the default "Mass Storage Controller" (Pali Rohár) - Add emulation for PCI_BRIDGE_CTL_BUS_RESET since aardvark doesn't implement this per spec (Pali Rohár) - Add emulation of option ROM BAR since aardvark doesn't implement this per spec (Pali Rohár) MediaTek MT7621 PCIe controller driver: - Add MediaTek MT7621 PCIe host controller driver and DT binding (Sergio Paracuellos) Qualcomm PCIe controller driver: - Add SC8180x compatible string (Bjorn Andersson) - Add endpoint controller driver and DT binding (Manivannan Sadhasivam) - Restructure to use of_device_get_match_data() (Prasad Malisetty) - Add SC7280-specific pcie_1_pipe_clk_src handling (Prasad Malisetty) Renesas R-Car PCIe controller driver: - Remove unnecessary includes (Geert Uytterhoeven) Rockchip DesignWare PCIe controller driver: - Add DT binding (Simon Xue) Socionext UniPhier Pro5 controller driver: - Serialize INTx masking/unmasking (Kunihiko Hayashi) Synopsys DesignWare PCIe controller driver: - Run dwc .host_init() method before registering MSI interrupt handler so we can deal with pending interrupts left by bootloader (Bjorn Andersson) - Clean up Kconfig dependencies (Andy Shevchenko) - Export symbols to allow more modular drivers (Luca Ceresoli) TI DRA7xx PCIe controller driver: - Allow host and endpoint drivers to be modules (Luca Ceresoli) - Enable external clock if present (Luca Ceresoli) TI J721E PCIe driver: - Disable PHY when probe fails after initializing it (Christophe JAILLET) MicroSemi Switchtec management driver: - Return error to application when command execution fails because an out-of-band reset has cleared the device BARs, Memory Space Enable, etc (Kelvin Cao) - Fix MRPC error status handling issue (Kelvin Cao) - Mask out other bits when reading of management VEP instance ID (Kelvin Cao) - Return EOPNOTSUPP instead of ENOTSUPP from sysfs show functions (Kelvin Cao) - Add check of event support (Logan Gunthorpe) Miscellaneous: - Remove unused pci_pool wrappers, which have been replaced by dma_pool (Cai Huoqing) - Use 'unsigned int' instead of bare 'unsigned' (Krzysztof Wilczyński) - Use kstrtobool() directly, sans strtobool() wrapper (Krzysztof Wilczyński) - Fix some sscanf(), sprintf() format mismatches (Krzysztof Wilczyński) - Update PCI subsystem information in MAINTAINERS (Krzysztof Wilczyński) - Correct some misspellings (Krzysztof Wilczyński)" * tag 'pci-v5.16-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (137 commits) PCI: Add ACS quirk for Pericom PI7C9X2G switches PCI: apple: Configure RID to SID mapper on device addition iommu/dart: Exclude MSI doorbell from PCIe device IOVA range PCI: apple: Implement MSI support PCI: apple: Add INTx and per-port interrupt support PCI: kirin: Allow removing the driver PCI: kirin: De-init the dwc driver PCI: kirin: Disable clkreq during poweroff sequence PCI: kirin: Move the power-off code to a common routine PCI: kirin: Add power_off support for Kirin 960 PHY PCI: kirin: Allow building it as a module PCI: kirin: Add MODULE_* macros PCI: kirin: Add Kirin 970 compatible PCI: kirin: Support PERST# GPIOs for HiKey970 external PEX 8606 bridge PCI: apple: Set up reference clocks when probing PCI: apple: Add initial hardware bring-up PCI: of: Allow matching of an interrupt-map local to a PCI device of/irq: Allow matching of an interrupt-map local to an interrupt controller irqdomain: Make of_phandle_args_to_fwspec() generally available PCI: Do not enable AtomicOps on VFs ...
2 parents 512b793 + dda4b38 commit 0c5c62d

File tree

121 files changed

+3945
-1192
lines changed

Some content is hidden

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

121 files changed

+3945
-1192
lines changed

Documentation/ABI/testing/sysfs-bus-pci

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,17 @@ Description:
100100
This attribute indicates the mode that the irq vector named by
101101
the file is in (msi vs. msix)
102102

103+
What: /sys/bus/pci/devices/.../irq
104+
Date: August 2021
105+
Contact: Linux PCI developers <[email protected]>
106+
Description:
107+
If a driver has enabled MSI (not MSI-X), "irq" contains the
108+
IRQ of the first MSI vector. Otherwise "irq" contains the
109+
IRQ of the legacy INTx interrupt.
110+
111+
"irq" being set to 0 indicates that the device isn't
112+
capable of generating legacy INTx interrupts.
113+
103114
What: /sys/bus/pci/devices/.../remove
104115
Date: January 2009
105116
Contact: Linux PCI developers <[email protected]>
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/mediatek,mt7621-pcie.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek MT7621 PCIe controller
8+
9+
maintainers:
10+
- Sergio Paracuellos <[email protected]>
11+
12+
description: |+
13+
MediaTek MT7621 PCIe subsys supports a single Root Complex (RC)
14+
with 3 Root Ports. Each Root Port supports a Gen1 1-lane Link
15+
16+
allOf:
17+
- $ref: /schemas/pci/pci-bus.yaml#
18+
19+
properties:
20+
compatible:
21+
const: mediatek,mt7621-pci
22+
23+
reg:
24+
items:
25+
- description: host-pci bridge registers
26+
- description: pcie port 0 RC control registers
27+
- description: pcie port 1 RC control registers
28+
- description: pcie port 2 RC control registers
29+
30+
ranges:
31+
maxItems: 2
32+
33+
patternProperties:
34+
'pcie@[0-2],0':
35+
type: object
36+
$ref: /schemas/pci/pci-bus.yaml#
37+
38+
properties:
39+
resets:
40+
maxItems: 1
41+
42+
clocks:
43+
maxItems: 1
44+
45+
phys:
46+
maxItems: 1
47+
48+
required:
49+
- "#interrupt-cells"
50+
- interrupt-map-mask
51+
- interrupt-map
52+
- resets
53+
- clocks
54+
- phys
55+
- phy-names
56+
- ranges
57+
58+
unevaluatedProperties: false
59+
60+
required:
61+
- compatible
62+
- reg
63+
- ranges
64+
- "#interrupt-cells"
65+
- interrupt-map-mask
66+
- interrupt-map
67+
- reset-gpios
68+
69+
unevaluatedProperties: false
70+
71+
examples:
72+
- |
73+
#include <dt-bindings/gpio/gpio.h>
74+
#include <dt-bindings/interrupt-controller/mips-gic.h>
75+
76+
pcie: pcie@1e140000 {
77+
compatible = "mediatek,mt7621-pci";
78+
reg = <0x1e140000 0x100>,
79+
<0x1e142000 0x100>,
80+
<0x1e143000 0x100>,
81+
<0x1e144000 0x100>;
82+
83+
#address-cells = <3>;
84+
#size-cells = <2>;
85+
pinctrl-names = "default";
86+
pinctrl-0 = <&pcie_pins>;
87+
device_type = "pci";
88+
ranges = <0x02000000 0 0x60000000 0x60000000 0 0x10000000>, /* pci memory */
89+
<0x01000000 0 0x1e160000 0x1e160000 0 0x00010000>; /* io space */
90+
#interrupt-cells = <1>;
91+
interrupt-map-mask = <0xF800 0 0 0>;
92+
interrupt-map = <0x0000 0 0 0 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>,
93+
<0x0800 0 0 0 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>,
94+
<0x1000 0 0 0 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
95+
reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
96+
97+
pcie@0,0 {
98+
reg = <0x0000 0 0 0 0>;
99+
#address-cells = <3>;
100+
#size-cells = <2>;
101+
device_type = "pci";
102+
#interrupt-cells = <1>;
103+
interrupt-map-mask = <0 0 0 0>;
104+
interrupt-map = <0 0 0 0 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>;
105+
resets = <&rstctrl 24>;
106+
clocks = <&clkctrl 24>;
107+
phys = <&pcie0_phy 1>;
108+
phy-names = "pcie-phy0";
109+
ranges;
110+
};
111+
112+
pcie@1,0 {
113+
reg = <0x0800 0 0 0 0>;
114+
#address-cells = <3>;
115+
#size-cells = <2>;
116+
device_type = "pci";
117+
#interrupt-cells = <1>;
118+
interrupt-map-mask = <0 0 0 0>;
119+
interrupt-map = <0 0 0 0 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>;
120+
resets = <&rstctrl 25>;
121+
clocks = <&clkctrl 25>;
122+
phys = <&pcie0_phy 1>;
123+
phy-names = "pcie-phy1";
124+
ranges;
125+
};
126+
127+
pcie@2,0 {
128+
reg = <0x1000 0 0 0 0>;
129+
#address-cells = <3>;
130+
#size-cells = <2>;
131+
device_type = "pci";
132+
#interrupt-cells = <1>;
133+
interrupt-map-mask = <0 0 0 0>;
134+
interrupt-map = <0 0 0 0 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
135+
resets = <&rstctrl 26>;
136+
clocks = <&clkctrl 26>;
137+
phys = <&pcie2_phy 0>;
138+
phy-names = "pcie-phy2";
139+
ranges;
140+
};
141+
};
142+
...
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/pci/qcom,pcie-ep.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm PCIe Endpoint Controller binding
8+
9+
maintainers:
10+
- Manivannan Sadhasivam <[email protected]>
11+
12+
allOf:
13+
- $ref: "pci-ep.yaml#"
14+
15+
properties:
16+
compatible:
17+
const: qcom,sdx55-pcie-ep
18+
19+
reg:
20+
items:
21+
- description: Qualcomm-specific PARF configuration registers
22+
- description: DesignWare PCIe registers
23+
- description: External local bus interface registers
24+
- description: Address Translation Unit (ATU) registers
25+
- description: Memory region used to map remote RC address space
26+
- description: BAR memory region
27+
28+
reg-names:
29+
items:
30+
- const: parf
31+
- const: dbi
32+
- const: elbi
33+
- const: atu
34+
- const: addr_space
35+
- const: mmio
36+
37+
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
46+
47+
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
56+
57+
qcom,perst-regs:
58+
description: Reference to a syscon representing TCSR followed by the two
59+
offsets within syscon for Perst enable and Perst separation
60+
enable registers
61+
$ref: "/schemas/types.yaml#/definitions/phandle-array"
62+
items:
63+
minItems: 3
64+
maxItems: 3
65+
66+
interrupts:
67+
items:
68+
- description: PCIe Global interrupt
69+
- description: PCIe Doorbell interrupt
70+
71+
interrupt-names:
72+
items:
73+
- const: global
74+
- const: doorbell
75+
76+
reset-gpios:
77+
description: GPIO used as PERST# input signal
78+
maxItems: 1
79+
80+
wake-gpios:
81+
description: GPIO used as WAKE# output signal
82+
maxItems: 1
83+
84+
resets:
85+
maxItems: 1
86+
87+
reset-names:
88+
const: core
89+
90+
power-domains:
91+
maxItems: 1
92+
93+
phys:
94+
maxItems: 1
95+
96+
phy-names:
97+
const: pciephy
98+
99+
num-lanes:
100+
default: 2
101+
102+
required:
103+
- compatible
104+
- reg
105+
- reg-names
106+
- clocks
107+
- clock-names
108+
- qcom,perst-regs
109+
- interrupts
110+
- interrupt-names
111+
- reset-gpios
112+
- resets
113+
- reset-names
114+
- power-domains
115+
116+
unevaluatedProperties: false
117+
118+
examples:
119+
- |
120+
#include <dt-bindings/clock/qcom,gcc-sdx55.h>
121+
#include <dt-bindings/gpio/gpio.h>
122+
#include <dt-bindings/interrupt-controller/arm-gic.h>
123+
pcie_ep: pcie-ep@40000000 {
124+
compatible = "qcom,sdx55-pcie-ep";
125+
reg = <0x01c00000 0x3000>,
126+
<0x40000000 0xf1d>,
127+
<0x40000f20 0xc8>,
128+
<0x40001000 0x1000>,
129+
<0x40002000 0x1000>,
130+
<0x01c03000 0x3000>;
131+
reg-names = "parf", "dbi", "elbi", "atu", "addr_space",
132+
"mmio";
133+
134+
clocks = <&gcc GCC_PCIE_AUX_CLK>,
135+
<&gcc GCC_PCIE_CFG_AHB_CLK>,
136+
<&gcc GCC_PCIE_MSTR_AXI_CLK>,
137+
<&gcc GCC_PCIE_SLV_AXI_CLK>,
138+
<&gcc GCC_PCIE_SLV_Q2A_AXI_CLK>,
139+
<&gcc GCC_PCIE_SLEEP_CLK>,
140+
<&gcc GCC_PCIE_0_CLKREF_CLK>;
141+
clock-names = "aux", "cfg", "bus_master", "bus_slave",
142+
"slave_q2a", "sleep", "ref";
143+
144+
qcom,perst-regs = <&tcsr 0xb258 0xb270>;
145+
146+
interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
147+
<GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>;
148+
interrupt-names = "global", "doorbell";
149+
reset-gpios = <&tlmm 57 GPIO_ACTIVE_LOW>;
150+
wake-gpios = <&tlmm 53 GPIO_ACTIVE_LOW>;
151+
resets = <&gcc GCC_PCIE_BCR>;
152+
reset-names = "core";
153+
power-domains = <&gcc PCIE_GDSC>;
154+
phys = <&pcie0_lane>;
155+
phy-names = "pciephy";
156+
max-link-speed = <3>;
157+
num-lanes = <2>;
158+
};

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
- "qcom,pcie-ipq4019" for ipq4019
1313
- "qcom,pcie-ipq8074" for ipq8074
1414
- "qcom,pcie-qcs404" for qcs404
15+
- "qcom,pcie-sc8180x" for sc8180x
1516
- "qcom,pcie-sdm845" for sdm845
1617
- "qcom,pcie-sm8250" for sm8250
1718
- "qcom,pcie-ipq6018" for ipq6018
@@ -156,7 +157,7 @@
156157
- "pipe" PIPE clock
157158

158159
- clock-names:
159-
Usage: required for sm8250
160+
Usage: required for sc8180x and sm8250
160161
Value type: <stringlist>
161162
Definition: Should contain the following entries
162163
- "aux" Auxiliary clock
@@ -245,7 +246,7 @@
245246
- "ahb" AHB reset
246247

247248
- reset-names:
248-
Usage: required for sdm845 and sm8250
249+
Usage: required for sc8180x, sdm845 and sm8250
249250
Value type: <stringlist>
250251
Definition: Should contain the following entries
251252
- "pci" PCIe core reset

0 commit comments

Comments
 (0)