[PATCH v3 00/11] Add PCIe support for bcm2712

Stanimir Varbanov posted 11 patches 1 month, 1 week ago
There is a newer version of this series
.../brcm,bcm2712-msix.yaml                    |  60 ++++
.../bindings/pci/brcm,stb-pcie.yaml           |   5 +-
.../boot/dts/broadcom/bcm2712-rpi-5-b.dts     |   8 +
arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 160 +++++++++
drivers/irqchip/Kconfig                       |  16 +
drivers/irqchip/Makefile                      |   1 +
drivers/irqchip/irq-bcm2712-mip.c             | 308 ++++++++++++++++++
drivers/pci/controller/pcie-brcmstb.c         | 197 ++++++++---
8 files changed, 707 insertions(+), 48 deletions(-)
create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
create mode 100644 drivers/irqchip/irq-bcm2712-mip.c
[PATCH v3 00/11] Add PCIe support for bcm2712
Posted by Stanimir Varbanov 1 month, 1 week ago
Hello,

Here is v3 the series to add support for PCIe on bcm2712 SoC
used by RPi5. Previous v2 can be found at [1].

v2 -> v3 changes include:
 - Added Reviewed-by/Acked-by tags.
 - MIP MSI-X driver has been converted to MSI parent.
 - Added a new patch for PHY PLL adjustment need to succesfully
   enumerate PCIe endpoints on extension connector (tested with
   Pineboards AI Bundle + NVME SSD adapter card).
 - Re-introduced brcm,msi-offset DT private property for MIP
   interrupt-controller (without it I'm anable to use the interrupts
   of adapter cards on PCIe enxtension connector).

For more info check patches.

[1] https://patchwork.kernel.org/project/linux-pci/cover/20240910151845.17308-1-svarbanov@suse.de/

Stanimir Varbanov (11):
  dt-bindings: interrupt-controller: Add bcm2712 MSI-X DT bindings
  dt-bindings: PCI: brcmstb: Update bindings for PCIe on bcm2712
  irqchip: mip: Add Broadcom bcm2712 MSI-X interrupt controller
  PCI: brcmstb: Expand inbound size calculation helper
  PCI: brcmstb: Enable external MSI-X if available
  PCI: brcmstb: Avoid turn off of bridge reset
  PCI: brcmstb: Add bcm2712 support
  PCI: brcmstb: Reuse config structure
  PCI: brcmstb: Adjust PHY PLL setup to use a 54MHz input refclk
  arm64: dts: broadcom: bcm2712: Add PCIe DT nodes
  arm64: dts: broadcom: bcm2712-rpi-5-b: Enable PCIe DT nodes

 .../brcm,bcm2712-msix.yaml                    |  60 ++++
 .../bindings/pci/brcm,stb-pcie.yaml           |   5 +-
 .../boot/dts/broadcom/bcm2712-rpi-5-b.dts     |   8 +
 arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 160 +++++++++
 drivers/irqchip/Kconfig                       |  16 +
 drivers/irqchip/Makefile                      |   1 +
 drivers/irqchip/irq-bcm2712-mip.c             | 308 ++++++++++++++++++
 drivers/pci/controller/pcie-brcmstb.c         | 197 ++++++++---
 8 files changed, 707 insertions(+), 48 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
 create mode 100644 drivers/irqchip/irq-bcm2712-mip.c

-- 
2.43.0
Re: [PATCH v3 00/11] Add PCIe support for bcm2712
Posted by Rob Herring (Arm) 1 month, 1 week ago
On Mon, 14 Oct 2024 16:06:59 +0300, Stanimir Varbanov wrote:
> Hello,
> 
> Here is v3 the series to add support for PCIe on bcm2712 SoC
> used by RPi5. Previous v2 can be found at [1].
> 
> v2 -> v3 changes include:
>  - Added Reviewed-by/Acked-by tags.
>  - MIP MSI-X driver has been converted to MSI parent.
>  - Added a new patch for PHY PLL adjustment need to succesfully
>    enumerate PCIe endpoints on extension connector (tested with
>    Pineboards AI Bundle + NVME SSD adapter card).
>  - Re-introduced brcm,msi-offset DT private property for MIP
>    interrupt-controller (without it I'm anable to use the interrupts
>    of adapter cards on PCIe enxtension connector).
> 
> For more info check patches.
> 
> [1] https://patchwork.kernel.org/project/linux-pci/cover/20240910151845.17308-1-svarbanov@suse.de/
> 
> Stanimir Varbanov (11):
>   dt-bindings: interrupt-controller: Add bcm2712 MSI-X DT bindings
>   dt-bindings: PCI: brcmstb: Update bindings for PCIe on bcm2712
>   irqchip: mip: Add Broadcom bcm2712 MSI-X interrupt controller
>   PCI: brcmstb: Expand inbound size calculation helper
>   PCI: brcmstb: Enable external MSI-X if available
>   PCI: brcmstb: Avoid turn off of bridge reset
>   PCI: brcmstb: Add bcm2712 support
>   PCI: brcmstb: Reuse config structure
>   PCI: brcmstb: Adjust PHY PLL setup to use a 54MHz input refclk
>   arm64: dts: broadcom: bcm2712: Add PCIe DT nodes
>   arm64: dts: broadcom: bcm2712-rpi-5-b: Enable PCIe DT nodes
> 
>  .../brcm,bcm2712-msix.yaml                    |  60 ++++
>  .../bindings/pci/brcm,stb-pcie.yaml           |   5 +-
>  .../boot/dts/broadcom/bcm2712-rpi-5-b.dts     |   8 +
>  arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 160 +++++++++
>  drivers/irqchip/Kconfig                       |  16 +
>  drivers/irqchip/Makefile                      |   1 +
>  drivers/irqchip/irq-bcm2712-mip.c             | 308 ++++++++++++++++++
>  drivers/pci/controller/pcie-brcmstb.c         | 197 ++++++++---
>  8 files changed, 707 insertions(+), 48 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
>  create mode 100644 drivers/irqchip/irq-bcm2712-mip.c
> 
> --
> 2.43.0
> 
> 
> 


My bot found new DTB warnings on the .dts files added or changed in this
series.

Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.

If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:

  pip3 install dtschema --upgrade


New warnings running 'make CHECK_DTBS=y broadcom/bcm2712-rpi-5-b.dtb' for 20241014130710.413-1-svarbanov@suse.de:

arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: resets: [[12, 42], [13]] is too short
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: reset-names:0: 'rescal' was expected
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: reset-names:1: 'bridge' was expected
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: reset-names: ['bridge', 'rescal'] is too short
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: 'msi-controller' is a required property
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: resets: [[12, 43], [13]] is too short
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: reset-names:0: 'rescal' was expected
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: reset-names:1: 'bridge' was expected
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: reset-names: ['bridge', 'rescal'] is too short
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: 'msi-controller' is a required property
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: resets: [[12, 44], [13]] is too short
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: reset-names:0: 'rescal' was expected
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: reset-names:1: 'bridge' was expected
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: reset-names: ['bridge', 'rescal'] is too short
	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
Re: [PATCH v3 00/11] Add PCIe support for bcm2712
Posted by Stanimir Varbanov 1 month, 1 week ago

On 10/14/24 17:05, Rob Herring (Arm) wrote:
> 
> On Mon, 14 Oct 2024 16:06:59 +0300, Stanimir Varbanov wrote:
>> Hello,
>>
>> Here is v3 the series to add support for PCIe on bcm2712 SoC
>> used by RPi5. Previous v2 can be found at [1].
>>
>> v2 -> v3 changes include:
>>  - Added Reviewed-by/Acked-by tags.
>>  - MIP MSI-X driver has been converted to MSI parent.
>>  - Added a new patch for PHY PLL adjustment need to succesfully
>>    enumerate PCIe endpoints on extension connector (tested with
>>    Pineboards AI Bundle + NVME SSD adapter card).
>>  - Re-introduced brcm,msi-offset DT private property for MIP
>>    interrupt-controller (without it I'm anable to use the interrupts
>>    of adapter cards on PCIe enxtension connector).
>>
>> For more info check patches.
>>
>> [1] https://patchwork.kernel.org/project/linux-pci/cover/20240910151845.17308-1-svarbanov@suse.de/
>>
>> Stanimir Varbanov (11):
>>   dt-bindings: interrupt-controller: Add bcm2712 MSI-X DT bindings
>>   dt-bindings: PCI: brcmstb: Update bindings for PCIe on bcm2712
>>   irqchip: mip: Add Broadcom bcm2712 MSI-X interrupt controller
>>   PCI: brcmstb: Expand inbound size calculation helper
>>   PCI: brcmstb: Enable external MSI-X if available
>>   PCI: brcmstb: Avoid turn off of bridge reset
>>   PCI: brcmstb: Add bcm2712 support
>>   PCI: brcmstb: Reuse config structure
>>   PCI: brcmstb: Adjust PHY PLL setup to use a 54MHz input refclk
>>   arm64: dts: broadcom: bcm2712: Add PCIe DT nodes
>>   arm64: dts: broadcom: bcm2712-rpi-5-b: Enable PCIe DT nodes
>>
>>  .../brcm,bcm2712-msix.yaml                    |  60 ++++
>>  .../bindings/pci/brcm,stb-pcie.yaml           |   5 +-
>>  .../boot/dts/broadcom/bcm2712-rpi-5-b.dts     |   8 +
>>  arch/arm64/boot/dts/broadcom/bcm2712.dtsi     | 160 +++++++++
>>  drivers/irqchip/Kconfig                       |  16 +
>>  drivers/irqchip/Makefile                      |   1 +
>>  drivers/irqchip/irq-bcm2712-mip.c             | 308 ++++++++++++++++++
>>  drivers/pci/controller/pcie-brcmstb.c         | 197 ++++++++---
>>  8 files changed, 707 insertions(+), 48 deletions(-)
>>  create mode 100644 Documentation/devicetree/bindings/interrupt-controller/brcm,bcm2712-msix.yaml
>>  create mode 100644 drivers/irqchip/irq-bcm2712-mip.c
>>
>> --
>> 2.43.0
>>
>>
>>
> 
> 
> My bot found new DTB warnings on the .dts files added or changed in this
> series.
> 
> Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
> are fixed by another series. Ultimately, it is up to the platform
> maintainer whether these warnings are acceptable or not. No need to reply
> unless the platform maintainer has comments.
> 
> If you already ran DT checks and didn't see these error(s), then
> make sure dt-schema is up to date:
> 
>   pip3 install dtschema --upgrade
> 
> 
> New warnings running 'make CHECK_DTBS=y broadcom/bcm2712-rpi-5-b.dtb' for 20241014130710.413-1-svarbanov@suse.de:

Sorry about that. I forgot to update brcm,stb-pcie.yaml schema for
number of resets.

~Stan

> 
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: resets: [[12, 42], [13]] is too short
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: reset-names:0: 'rescal' was expected
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: reset-names:1: 'bridge' was expected
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@100000: reset-names: ['bridge', 'rescal'] is too short
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: 'msi-controller' is a required property
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: resets: [[12, 43], [13]] is too short
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: reset-names:0: 'rescal' was expected
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: reset-names:1: 'bridge' was expected
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@110000: reset-names: ['bridge', 'rescal'] is too short
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: 'msi-controller' is a required property
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: resets: [[12, 44], [13]] is too short
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: reset-names:0: 'rescal' was expected
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: reset-names:1: 'bridge' was expected
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb: pcie@120000: reset-names: ['bridge', 'rescal'] is too short
> 	from schema $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
> 
> 
> 
> 
>