Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport PCIe patches to 6.14. #6657

Merged
merged 22 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
32c3698
Revert "PCI: brcmstb: Add BCM2712 support"
6by9 Feb 6, 2025
01c9067
Revert "dt-bindings: PCI: brcmstb: add optional property - "brcm,tper…
6by9 Feb 6, 2025
2c7cb5e
Revert "irqchip: irq-bcm2712-mip: Support for 2712's MIP"
6by9 Feb 6, 2025
b613d50
Revert "Revert "PCI: brcmstb: Configure HW CLKREQ# mode appropriate f…
6by9 Feb 6, 2025
83051c1
arm64: dts: Drop downstream PCIe nodes that are about to be superceded
6by9 Feb 6, 2025
a5f8df9
dt-bindings: interrupt-controller: Add bcm2712 MSI-X DT bindings
Oct 14, 2024
5ef951d
dt-bindings: PCI: brcmstb: Update bindings for PCIe on bcm2712
Jan 20, 2025
fd5d960
irqchip: Add Broadcom bcm2712 MSI-X interrupt controller
Jan 20, 2025
565baea
PCI: brcmstb: Reuse config structure
Jan 20, 2025
f1de16b
PCI: brcmstb: Expand inbound window size up to 64GB
Oct 25, 2024
34e4335
PCI: brcmstb: Add bcm2712 support
Oct 25, 2024
31c719b
PCI: brcmstb: Adjust PHY PLL setup to use a 54MHz input refclk
Jan 20, 2025
8e755c3
PCI: brcmstb: Adding a softdep to MIP MSI-X driver
Jan 20, 2025
cd081ad
PCI: brcmstb: Fix for missing of_node_put
Jan 20, 2025
7ceb6dc
arm64: dts: broadcom: bcm2712: Add PCIe DT nodes
Jan 20, 2025
13996f2
arm64: dts: broadcom: bcm2712-rpi-5-b: Enable PCIe DT nodes
Jan 20, 2025
619cf6f
PCI: brcmstb: Refactor max speed limit functionality
jamesequinlan Feb 5, 2025
307210c
PCI: brcmstb: Fix error path upon call of regulator_bulk_get()
jamesequinlan Feb 5, 2025
e57364c
PCI: brcmstb: Fix potential premature regluator disabling
jamesequinlan Feb 5, 2025
b582882
PCI: brcmstb: Use same constant table for config space access
jamesequinlan Feb 5, 2025
113140f
PCI: brcmstb: Make two changes in MDIO register fields
jamesequinlan Feb 5, 2025
bf17a33
PCI: brcmstb: Cast an int variable to an irq_hw_number_t
jamesequinlan Feb 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/interrupt-controller/brcm,bcm2712-msix.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom bcm2712 MSI-X Interrupt Peripheral support

maintainers:
- Stanimir Varbanov <[email protected]>

description:
This interrupt controller is used to provide interrupt vectors to the
generic interrupt controller (GIC) on bcm2712. It will be used as
external MSI-X controller for PCIe root complex.

allOf:
- $ref: /schemas/interrupt-controller/msi-controller.yaml#

properties:
compatible:
const: brcm,bcm2712-mip

reg:
items:
- description: Base register address
- description: PCIe message address

"#msi-cells":
const: 0

brcm,msi-offset:
$ref: /schemas/types.yaml#/definitions/uint32
description: Shift the allocated MSI's.

unevaluatedProperties: false

required:
- compatible
- reg
- msi-controller
- msi-ranges

examples:
- |
#include <dt-bindings/interrupt-controller/arm-gic.h>

axi {
#address-cells = <2>;
#size-cells = <2>;

msi-controller@1000130000 {
compatible = "brcm,bcm2712-mip";
reg = <0x10 0x00130000 0x00 0xc0>,
<0xff 0xfffff000 0x00 0x1000>;
msi-controller;
#msi-cells = <0>;
msi-ranges = <&gicv2 GIC_SPI 128 IRQ_TYPE_EDGE_RISING 64>;
};
};
14 changes: 5 additions & 9 deletions Documentation/devicetree/bindings/pci/brcm,stb-pcie.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ properties:
items:
- enum:
- brcm,bcm2711-pcie # The Raspberry Pi 4
- brcm,bcm2712-pcie # Raspberry Pi 5
- brcm,bcm4908-pcie
- brcm,bcm7211-pcie # Broadcom STB version of RPi4
- brcm,bcm7216-pcie # Broadcom 7216 Arm
Expand Down Expand Up @@ -101,15 +102,10 @@ properties:

reset-names:
minItems: 1
maxItems: 3

brcm,tperst-clk-ms:
category: optional
type: int
description: u32 giving the number of milliseconds to extend
the time between internal release of fundamental reset and
the deassertion of the external PERST# pin. This has the
effect of increasing the Tperst_clk phase of link init.
items:
- enum: [perst, rescal]
- const: bridge
- const: swinit

required:
- compatible
Expand Down
190 changes: 0 additions & 190 deletions arch/arm64/boot/dts/broadcom/bcm2712-ds.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -350,190 +350,6 @@
brcm,dma-channel-mask = <0x0fc0>;
};

// Single-lane Gen3 PCIe
// Outbound window at 0x14_000000-0x17_ffffff
pcie0: pcie@100000 {
compatible = "brcm,bcm2712-pcie";
reg = <0x10 0x00100000 0x0 0x9310>;
device_type = "pci";
max-link-speed = <2>;
#address-cells = <3>;
#interrupt-cells = <1>;
#size-cells = <2>;
/*
* Unused interrupts:
* 208: AER
* 215: NMI
* 216: PME
*/
interrupt-parent = <&gicv2>;
interrupts = <GIC_SPI 213 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 214 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "pcie", "msi";
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 209
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 2 &gicv2 GIC_SPI 210
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 3 &gicv2 GIC_SPI 211
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 4 &gicv2 GIC_SPI 212
IRQ_TYPE_LEVEL_HIGH>;
resets = <&bcm_reset 5>, <&bcm_reset 42>, <&pcie_rescal>;
reset-names = "swinit", "bridge", "rescal";
msi-controller;
msi-parent = <&pcie0>;

ranges = <0x02000000 0x00 0x00000000
0x17 0x00000000
0x0 0xfffffffc>,
<0x43000000 0x04 0x00000000
0x14 0x00000000
0x3 0x00000000>;

dma-ranges = <0x43000000 0x10 0x00000000
0x00 0x00000000
0x10 0x00000000>;

status = "disabled";
};

// Single-lane Gen3 PCIe
// Outbound window at 0x18_000000-0x1b_ffffff
pcie1: pcie@110000 {
compatible = "brcm,bcm2712-pcie";
reg = <0x10 0x00110000 0x0 0x9310>;
device_type = "pci";
max-link-speed = <2>;
#address-cells = <3>;
#interrupt-cells = <1>;
#size-cells = <2>;
/*
* Unused interrupts:
* 218: AER
* 225: NMI
* 226: PME
*/
interrupt-parent = <&gicv2>;
interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 224 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "pcie", "msi";
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 219
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 2 &gicv2 GIC_SPI 220
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 3 &gicv2 GIC_SPI 221
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 4 &gicv2 GIC_SPI 222
IRQ_TYPE_LEVEL_HIGH>;
resets = <&bcm_reset 7>, <&bcm_reset 43>, <&pcie_rescal>;
reset-names = "swinit", "bridge", "rescal";
msi-controller;
msi-parent = <&mip1>;

// 2GB, 32-bit, non-prefetchable at PCIe 00_80000000
ranges = <0x02000000 0x00 0x80000000
0x1b 0x80000000
0x00 0x80000000>,
// 14GB, 64-bit, prefetchable at PCIe 04_00000000
<0x43000000 0x04 0x00000000
0x18 0x00000000
0x03 0x80000000>;

dma-ranges = <0x03000000 0x10 0x00000000
0x00 0x00000000
0x10 0x00000000>;

status = "disabled";
};

pcie_rescal: reset-controller@119500 {
compatible = "brcm,bcm7216-pcie-sata-rescal";
reg = <0x10 0x00119500 0x0 0x10>;
#reset-cells = <0>;
};

// Quad-lane Gen3 PCIe
// Outbound window at 0x1c_000000-0x1f_ffffff
pcie2: pcie@120000 {
compatible = "brcm,bcm2712-pcie";
reg = <0x10 0x00120000 0x0 0x9310>;
device_type = "pci";
max-link-speed = <2>;
#address-cells = <3>;
#interrupt-cells = <1>;
#size-cells = <2>;
/*
* Unused interrupts:
* 228: AER
* 235: NMI
* 236: PME
*/
interrupt-parent = <&gicv2>;
interrupts = <GIC_SPI 233 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 234 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "pcie", "msi";
interrupt-map-mask = <0x0 0x0 0x0 0x7>;
interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 229
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 2 &gicv2 GIC_SPI 230
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 3 &gicv2 GIC_SPI 231
IRQ_TYPE_LEVEL_HIGH>,
<0 0 0 4 &gicv2 GIC_SPI 232
IRQ_TYPE_LEVEL_HIGH>;
resets = <&bcm_reset 32>, <&bcm_reset 44>, <&pcie_rescal>;
reset-names = "swinit", "bridge", "rescal";
msi-controller;
msi-parent = <&mip0>;

// ~4GB, 32-bit, not-prefetchable at PCIe 00_00000000
ranges = <0x02000000 0x00 0x00000000
0x1f 0x00000000
0x0 0xfffffffc>,
// 12GB, 64-bit, prefetchable at PCIe 04_00000000
<0x43000000 0x04 0x00000000
0x1c 0x00000000
0x03 0x00000000>;

// 64GB system RAM space at PCIe 10_00000000
dma-ranges = <0x02000000 0x00 0x00000000
0x1f 0x00000000
0x00 0x00400000>,
<0x43000000 0x10 0x00000000
0x00 0x00000000
0x10 0x00000000>;

status = "disabled";
};

mip0: msi-controller@130000 {
compatible = "brcm,bcm2712-mip-intc";
reg = <0x10 0x00130000 0x0 0xc0>;
msi-controller;
interrupt-controller;
#interrupt-cells = <2>;
brcm,msi-base-spi = <128>;
brcm,msi-num-spis = <64>;
brcm,msi-offset = <0>;
brcm,msi-pci-addr = <0xff 0xfffff000>;
};

mip1: msi-controller@131000 {
compatible = "brcm,bcm2712-mip-intc";
reg = <0x10 0x00131000 0x0 0xc0>;
msi-controller;
interrupt-controller;
#interrupt-cells = <2>;
brcm,msi-base-spi = <247>;
/* Actually 20 total, but the others are
* both sparse and non-consecutive */
brcm,msi-num-spis = <8>;
brcm,msi-offset = <8>;
brcm,msi-pci-addr = <0xff 0xffffe000>;
};

syscon_piarbctl: syscon@400018 {
compatible = "brcm,syscon-piarbctl", "syscon", "simple-mfd";
reg = <0x10 0x00400018 0x0 0x18>;
Expand Down Expand Up @@ -591,12 +407,6 @@
status = "disabled";
};

bcm_reset: reset-controller@1504318 {
compatible = "brcm,brcmstb-reset";
reg = <0x10 0x01504318 0x0 0x30>;
#reset-cells = <1>;
};

v3d: v3d@2000000 {
compatible = "brcm,2712-v3d";
reg = <0x10 0x02000000 0x0 0x4000>,
Expand Down
8 changes: 8 additions & 0 deletions arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
Original file line number Diff line number Diff line change
Expand Up @@ -764,3 +764,11 @@ spi10_cs_pins: &spi10_cs_gpio1 {};
clocks = <&firmware_clocks 13>, <&firmware_clocks 14>, <&dvp 1>, <&clk_27MHz>;
clock-names = "hdmi", "bvb", "audio", "cec";
};

&pcie1 {
status = "okay";
};

&pcie2 {
status = "okay";
};
Loading
Loading