Skip to content

Commit 3a37872

Browse files
committed
Merge tag 'pci-v6.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci
Pull pci updates from Bjorn Helgaas: "Enumeration: - Wait for device readiness after reset by polling Vendor ID and looking for Configuration RRS instead of polling the Command register and looking for non-error completions, to avoid hardware retries done for RRS on non-Vendor ID reads (Bjorn Helgaas) - Rename CRS Completion Status to RRS ('Request Retry Status') to match PCIe r6.0 spec usage (Bjorn Helgaas) - Clear LBMS bit after a manual link retrain so we don't try to retrain a link when there's no downstream device anymore (Maciej W. Rozycki) - Revert to the original link speed after retraining fails instead of leaving it restricted to 2.5GT/s, so a future device has a chance to use higher speeds (Maciej W. Rozycki) - Wait for each level of downstream bus, not just the first, to become accessible before restoring devices on that bus (Ilpo Järvinen) - Add ARCH_PCI_DEV_GROUPS so s390 can add its own attribute_groups without having to stomp on the core's pdev->dev.groups (Lukas Wunner) Driver binding: - Export pcim_request_region(), a managed counterpart of pci_request_region(), for use by drivers (Philipp Stanner) - Export pcim_iomap_region() and deprecate pcim_iomap_regions() (Philipp Stanner) - Request the PCI BAR used by xboxvideo (Philipp Stanner) - Request and map drm/ast BARs with pcim_iomap_region() (Philipp Stanner) MSI: - Add MSI_FLAG_NO_AFFINITY flag for devices that mux MSIs onto a single IRQ line and cannot set the affinity of each MSI to a specific CPU core (Marek Vasut) - Use MSI_FLAG_NO_AFFINITY and remove unnecessary .irq_set_affinity() implementations in aardvark, altera, brcmstb, dwc, mediatek-gen3, mediatek, mobiveil, plda, rcar, tegra, vmd, xilinx-nwl, xilinx-xdma, and xilinx drivers to avoid 'IRQ: set affinity failed' warnings (Marek Vasut) Power management: - Add pwrctl support for ATH11K inside the WCN6855 package (Konrad Dybcio) PCI device hotplug: - Remove unnecessary hpc_ops struct from shpchp (ngn) - Check for PCI_POSSIBLE_ERROR(), not 0xffffffff, in cpqphp (weiyufeng) Virtualization: - Mark Creative Labs EMU20k2 INTx masking as broken (Alex Williamson) - Add an ACS quirk for Qualcomm SA8775P, which doesn't advertise ACS but does provide ACS-like features (Subramanian Ananthanarayanan) IOMMU: - Add function 0 DMA alias quirk for Glenfly Arise audio function, which uses the function 0 Requester ID (WangYuli) NPEM: - Add Native PCIe Enclosure Management (NPEM) support for sysfs control of NVMe RAID storage indicators (ok/fail/locate/ rebuild/etc) (Mariusz Tkaczyk) - Add support for the ACPI _DSM PCIe SSD status LED management, which is functionally similar to NPEM but mediated by platform firmware (Mariusz Tkaczyk) Device trees: - Drop minItems and maxItems from ranges in PCI generic host binding since host bridges may have several MMIO and I/O port apertures (Frank Li) - Add kirin, rcar-gen2, uniphier DT binding top-level constraints for clocks (Krzysztof Kozlowski) Altera PCIe controller driver: - Convert altera DT bindings from text to YAML (Matthew Gerlach) - Replace TLP_REQ_ID() with macro PCI_DEVID(), which does the same thing and is what other drivers use (Jinjie Ruan) Broadcom STB PCIe controller driver: - Add DT binding maxItems for reset controllers (Jim Quinlan) - Use the 'bridge' reset method if described in the DT (Jim Quinlan) - Use the 'swinit' reset method if described in the DT (Jim Quinlan) - Add 'has_phy' so the existence of a 'rescal' reset controller doesn't imply software control of it (Jim Quinlan) - Add support for many inbound DMA windows (Jim Quinlan) - Rename SoC 'type' to 'soc_base' express the fact that SoCs come in families of multiple similar devices (Jim Quinlan) - Add Broadcom 7712 DT description and driver support (Jim Quinlan) - Sort enums, pcie_offsets[], pcie_cfg_data, .compatible strings for maintainability (Bjorn Helgaas) Freescale i.MX6 PCIe controller driver: - Add imx6q-pcie 'dbi2' and 'atu' reg-names for i.MX8M Endpoints (Richard Zhu) - Fix a code restructuring error that caused i.MX8MM and i.MX8MP Endpoints to fail to establish link (Richard Zhu) - Fix i.MX8MP Endpoint occasional failure to trigger MSI by enforcing outbound alignment requirement (Richard Zhu) - Call phy_power_off() in the .probe() error path (Frank Li) - Rename internal names from imx6_* to imx_* since i.MX7/8/9 are also supported (Frank Li) - Manage Refclk by using SoC-specific callbacks instead of switch statements (Frank Li) - Manage core reset by using SoC-specific callbacks instead of switch statements (Frank Li) - Expand comments for erratum ERR010728 workaround (Frank Li) - Use generic PHY APIs to configure mode, speed, and submode, which is harmless for devices that implement their own internal PHY management and don't set the generic imx_pcie->phy (Frank Li) - Add i.MX8Q (i.MX8QM, i.MX8QXP, and i.MX8DXL) DT binding and driver Root Complex support (Richard Zhu) Freescale Layerscape PCIe controller driver: - Replace layerscape-pcie DT binding compatible fsl,lx2160a-pcie with fsl,lx2160ar2-pcie (Frank Li) - Add layerscape-pcie DT binding deprecated 'num-viewport' property to address a DT checker warning (Frank Li) - Change layerscape-pcie DT binding 'fsl,pcie-scfg' to phandle-array (Frank Li) Loongson PCIe controller driver: - Increase max PCI hosts to 8 for Loongson-3C6000 and newer chipsets (Huacai Chen) Marvell Aardvark PCIe controller driver: - Fix issue with emulating Configuration RRS for two-byte reads of Vendor ID; previously it only worked for four-byte reads (Bjorn Helgaas) MediaTek PCIe Gen3 controller driver: - Add per-SoC struct mtk_gen3_pcie_pdata to support multiple SoC types (Lorenzo Bianconi) - Use reset_bulk APIs to manage PHY reset lines (Lorenzo Bianconi) - Add DT and driver support for Airoha EN7581 PCIe controller (Lorenzo Bianconi) Qualcomm PCIe controller driver: - Update qcom,pcie-sc7280 DT binding with eight interrupts (Rayyan Ansari) - Add back DT 'vddpe-3v3-supply', which was incorrectly removed earlier (Johan Hovold) - Drop endpoint redundant masking of global IRQ events (Manivannan Sadhasivam) - Clarify unknown global IRQ message and only log it once to avoid a flood (Manivannan Sadhasivam) - Add 'linux,pci-domain' property to endpoint DT binding (Manivannan Sadhasivam) - Assign PCI domain number for endpoint controllers (Manivannan Sadhasivam) - Add 'qcom_pcie_ep' and the PCI domain number to IRQ names for endpoint controller (Manivannan Sadhasivam) - Add global SPI interrupt for PCIe link events to DT binding (Manivannan Sadhasivam) - Add global RC interrupt handler to handle 'Link up' events and automatically enumerate hot-added devices (Manivannan Sadhasivam) - Avoid mirroring of DBI and iATU register space so it doesn't overlap BAR MMIO space (Prudhvi Yarlagadda) - Enable controller resources like PHY only after PERST# is deasserted to partially avoid the problem that the endpoint SoC crashes when accessing things when Refclk is absent (Manivannan Sadhasivam) - Add 16.0 GT/s equalization and RX lane margining settings (Shashank Babu Chinta Venkata) - Pass domain number to pci_bus_release_domain_nr() explicitly to avoid a NULL pointer dereference (Manivannan Sadhasivam) Renesas R-Car PCIe controller driver: - Make the read-only const array 'check_addr' static (Colin Ian King) - Add R-Car V4M (R8A779H0) PCIe host and endpoint to DT binding (Yoshihiro Shimoda) TI DRA7xx PCIe controller driver: - Request IRQF_ONESHOT for 'dra7xx-pcie-main' IRQ since the primary handler is NULL (Siddharth Vadapalli) - Handle IRQ request errors during root port and endpoint probe (Siddharth Vadapalli) TI J721E PCIe driver: - Add DT 'ti,syscon-acspcie-proxy-ctrl' and driver support to enable the ACSPCIE module to drive Refclk for the Endpoint (Siddharth Vadapalli) - Extract the cadence link setup from cdns_pcie_host_setup() so link setup can be done separately during resume (Thomas Richard) - Add T_PERST_CLK_US definition for the mandatory delay between Refclk becoming stable and PERST# being deasserted (Thomas Richard) - Add j721e suspend and resume support (Théo Lebrun) TI Keystone PCIe controller driver: - Fix NULL pointer checking when applying MRRS limitation quirk for AM65x SR 1.0 Errata #i2037 (Dan Carpenter) Xilinx NWL PCIe controller driver: - Fix off-by-one error in INTx IRQ handler that caused INTx interrupts to be lost or delivered as the wrong interrupt (Sean Anderson) - Rate-limit misc interrupt messages (Sean Anderson) - Turn off the clock on probe failure and device removal (Sean Anderson) - Add DT binding and driver support for enabling/disabling PHYs (Sean Anderson) - Add PCIe phy bindings for the ZCU102 (Sean Anderson) Xilinx XDMA PCIe controller driver: - Add support for Xilinx QDMA Soft IP PCIe Root Port Bridge to DT binding and xilinx-dma-pl driver (Thippeswamy Havalige) Miscellaneous: - Fix buffer overflow in kirin_pcie_parse_port() (Alexandra Diupina) - Fix minor kerneldoc issues and typos (Bjorn Helgaas) - Use PCI_DEVID() macro in aer_inject() instead of open-coding it (Jinjie Ruan) - Check pcie_find_root_port() return in x86 fixups to avoid NULL pointer dereferences (Samasth Norway Ananda) - Make pci_bus_type constant (Kunwu Chan) - Remove unused declarations of __pci_pme_wakeup() and pci_vpd_release() (Yue Haibing) - Remove any leftover .*.cmd files with make clean (zhang jiao) - Remove unused BILLION macro (zhang jiao)" * tag 'pci-v6.12-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: (132 commits) PCI: Fix typos dt-bindings: PCI: qcom: Allow 'vddpe-3v3-supply' again tools: PCI: Remove unused BILLION macro tools: PCI: Remove .*.cmd files with make clean PCI: Pass domain number to pci_bus_release_domain_nr() explicitly PCI: dra7xx: Fix error handling when IRQ request fails in probe PCI: dra7xx: Fix threaded IRQ request for "dra7xx-pcie-main" IRQ PCI: qcom: Add RX lane margining settings for 16.0 GT/s PCI: qcom: Add equalization settings for 16.0 GT/s PCI: dwc: Always cache the maximum link speed value in dw_pcie::max_link_speed PCI: dwc: Rename 'dw_pcie::link_gen' to 'dw_pcie::max_link_speed' PCI: qcom-ep: Enable controller resources like PHY only after refclk is available PCI: Mark Creative Labs EMU20k2 INTx masking as broken dt-bindings: PCI: imx6q-pcie: Add reg-name "dbi2" and "atu" for i.MX8M PCIe Endpoint dt-bindings: PCI: altera: msi: Convert to YAML PCI: imx6: Add i.MX8Q PCIe Root Complex (RC) support PCI: Rename CRS Completion Status to RRS PCI: aardvark: Correct Configuration RRS checking PCI: Wait for device readiness with Configuration RRS PCI: brcmstb: Sort enums, pcie_offsets[], pcie_cfg_data, .compatible strings ...
2 parents 18ba603 + 81e53c0 commit 3a37872

File tree

111 files changed

+3353
-1323
lines changed

Some content is hidden

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

111 files changed

+3353
-1323
lines changed

Documentation/ABI/testing/sysfs-bus-pci

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,3 +500,75 @@ Description:
500500
console drivers from the device. Raw users of pci-sysfs
501501
resourceN attributes must be terminated prior to resizing.
502502
Success of the resizing operation is not guaranteed.
503+
504+
What: /sys/bus/pci/devices/.../leds/*:enclosure:*/brightness
505+
What: /sys/class/leds/*:enclosure:*/brightness
506+
Date: August 2024
507+
KernelVersion: 6.12
508+
Description:
509+
LED indications on PCIe storage enclosures which are controlled
510+
through the NPEM interface (Native PCIe Enclosure Management,
511+
PCIe r6.1 sec 6.28) are accessible as led class devices, both
512+
below /sys/class/leds and below NPEM-capable PCI devices.
513+
514+
Although these led class devices could be manipulated manually,
515+
in practice they are typically manipulated automatically by an
516+
application such as ledmon(8).
517+
518+
The name of a led class device is as follows:
519+
<bdf>:enclosure:<indication>
520+
where:
521+
522+
- <bdf> is the domain, bus, device and function number
523+
(e.g. 10000:02:05.0)
524+
- <indication> is a short description of the LED indication
525+
526+
Valid indications per PCIe r6.1 table 6-27 are:
527+
528+
- ok (drive is functioning normally)
529+
- locate (drive is being identified by an admin)
530+
- fail (drive is not functioning properly)
531+
- rebuild (drive is part of an array that is rebuilding)
532+
- pfa (drive is predicted to fail soon)
533+
- hotspare (drive is marked to be used as a replacement)
534+
- ica (drive is part of an array that is degraded)
535+
- ifa (drive is part of an array that is failed)
536+
- idt (drive is not the right type for the connector)
537+
- disabled (drive is disabled, removal is safe)
538+
- specific0 to specific7 (enclosure-specific indications)
539+
540+
Broadly, the indications fall into one of these categories:
541+
542+
- to signify drive state (ok, locate, fail, idt, disabled)
543+
- to signify drive role or state in a software RAID array
544+
(rebuild, pfa, hotspare, ica, ifa)
545+
- to signify any other role or state (specific0 to specific7)
546+
547+
Mandatory indications per PCIe r6.1 sec 7.9.19.2 comprise:
548+
ok, locate, fail, rebuild. All others are optional.
549+
A led class device is only visible if the corresponding
550+
indication is supported by the device.
551+
552+
To manipulate the indications, write 0 (LED_OFF) or 1 (LED_ON)
553+
to the "brightness" file. Note that manipulating an indication
554+
may implicitly manipulate other indications at the vendor's
555+
discretion. E.g. when the user lights up the "ok" indication,
556+
the vendor may choose to automatically turn off the "fail"
557+
indication. The current state of an indication can be
558+
retrieved by reading its "brightness" file.
559+
560+
The PCIe Base Specification allows vendors leeway to choose
561+
different colors or blinking patterns for the indications,
562+
but they typically follow the IBPI standard. E.g. the "locate"
563+
indication is usually presented as one or two LEDs blinking at
564+
4 Hz frequency:
565+
https://en.wikipedia.org/wiki/International_Blinking_Pattern_Interpretation
566+
567+
PCI Firmware Specification r3.3 sec 4.7 defines a DSM interface
568+
to facilitate shared access by operating system and platform
569+
firmware to a device's NPEM registers. The kernel will use
570+
this DSM interface where available, instead of accessing NPEM
571+
registers directly. The DSM interface does not support the
572+
enclosure-specific indications "specific0" to "specific7",
573+
hence the corresponding led class devices are unavailable if
574+
the DSM interface is used.

Documentation/devicetree/bindings/pci/altera-pcie-msi.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

Documentation/devicetree/bindings/pci/altera-pcie.txt

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
# Copyright (C) 2015, 2024, Intel Corporation
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/altr,msi-controller.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Altera PCIe MSI controller
9+
10+
maintainers:
11+
- Matthew Gerlach <[email protected]>
12+
13+
properties:
14+
compatible:
15+
enum:
16+
- altr,msi-1.0
17+
18+
reg:
19+
items:
20+
- description: CSR registers
21+
- description: Vectors slave port region
22+
23+
reg-names:
24+
items:
25+
- const: csr
26+
- const: vector_slave
27+
28+
interrupts:
29+
maxItems: 1
30+
31+
msi-controller: true
32+
33+
num-vectors:
34+
description: number of vectors
35+
$ref: /schemas/types.yaml#/definitions/uint32
36+
minimum: 1
37+
maximum: 32
38+
39+
required:
40+
- compatible
41+
- reg
42+
- reg-names
43+
- interrupts
44+
- msi-controller
45+
- num-vectors
46+
47+
allOf:
48+
- $ref: /schemas/interrupt-controller/msi-controller.yaml#
49+
50+
unevaluatedProperties: false
51+
52+
examples:
53+
- |
54+
#include <dt-bindings/interrupt-controller/arm-gic.h>
55+
#include <dt-bindings/interrupt-controller/irq.h>
56+
msi@ff200000 {
57+
compatible = "altr,msi-1.0";
58+
reg = <0xff200000 0x00000010>,
59+
<0xff200010 0x00000080>;
60+
reg-names = "csr", "vector_slave";
61+
interrupt-parent = <&hps_0_arm_gic_0>;
62+
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
63+
msi-controller;
64+
num-vectors = <32>;
65+
};
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
# Copyright (C) 2015, 2019, 2024, Intel Corporation
3+
%YAML 1.2
4+
---
5+
$id: http://devicetree.org/schemas/altr,pcie-root-port.yaml#
6+
$schema: http://devicetree.org/meta-schemas/core.yaml#
7+
8+
title: Altera PCIe Root Port
9+
10+
maintainers:
11+
- Matthew Gerlach <[email protected]>
12+
13+
properties:
14+
compatible:
15+
enum:
16+
- altr,pcie-root-port-1.0
17+
- altr,pcie-root-port-2.0
18+
19+
reg:
20+
items:
21+
- description: TX slave port region
22+
- description: Control register access region
23+
- description: Hard IP region
24+
minItems: 2
25+
26+
reg-names:
27+
items:
28+
- const: Txs
29+
- const: Cra
30+
- const: Hip
31+
minItems: 2
32+
33+
interrupts:
34+
maxItems: 1
35+
36+
interrupt-controller: true
37+
38+
interrupt-map-mask:
39+
items:
40+
- const: 0
41+
- const: 0
42+
- const: 0
43+
- const: 7
44+
45+
interrupt-map:
46+
maxItems: 4
47+
48+
"#interrupt-cells":
49+
const: 1
50+
51+
msi-parent: true
52+
53+
required:
54+
- compatible
55+
- reg
56+
- reg-names
57+
- interrupts
58+
- "#interrupt-cells"
59+
- interrupt-controller
60+
- interrupt-map
61+
- interrupt-map-mask
62+
63+
allOf:
64+
- $ref: /schemas/pci/pci-host-bridge.yaml#
65+
- if:
66+
properties:
67+
compatible:
68+
enum:
69+
- altr,pcie-root-port-1.0
70+
then:
71+
properties:
72+
reg:
73+
maxItems: 2
74+
75+
reg-names:
76+
maxItems: 2
77+
78+
else:
79+
properties:
80+
reg:
81+
minItems: 3
82+
83+
reg-names:
84+
minItems: 3
85+
86+
87+
unevaluatedProperties: false
88+
89+
examples:
90+
- |
91+
#include <dt-bindings/interrupt-controller/arm-gic.h>
92+
#include <dt-bindings/interrupt-controller/irq.h>
93+
pcie_0: pcie@c00000000 {
94+
compatible = "altr,pcie-root-port-1.0";
95+
reg = <0xc0000000 0x20000000>,
96+
<0xff220000 0x00004000>;
97+
reg-names = "Txs", "Cra";
98+
interrupt-parent = <&hps_0_arm_gic_0>;
99+
interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
100+
interrupt-controller;
101+
#interrupt-cells = <1>;
102+
bus-range = <0x0 0xff>;
103+
device_type = "pci";
104+
msi-parent = <&msi_to_gic_gen_0>;
105+
#address-cells = <3>;
106+
#size-cells = <2>;
107+
interrupt-map-mask = <0 0 0 7>;
108+
interrupt-map = <0 0 0 1 &pcie_0 0 0 0 1>,
109+
<0 0 0 2 &pcie_0 0 0 0 2>,
110+
<0 0 0 3 &pcie_0 0 0 0 3>,
111+
<0 0 0 4 &pcie_0 0 0 0 4>;
112+
ranges = <0x82000000 0x00000000 0x00000000 0xc0000000 0x00000000 0x10000000>,
113+
<0x82000000 0x00000000 0x10000000 0xd0000000 0x00000000 0x10000000>;
114+
};

0 commit comments

Comments
 (0)