mbox series

[v9,0/5] Enable rk356x PCIe controller

Message ID 20220429123832.2376381-1-pgwipeout@gmail.com (mailing list archive)
Headers show
Series Enable rk356x PCIe controller | expand

Message

Peter Geis April 29, 2022, 12:38 p.m. UTC
This series enables the DesignWare based PCIe controller on the rk356x
series of chips. We drop the fallback to the core driver due to 
compatibility issues. We reset the PCIe controller at driver probe to
prevent issues in the future when firmware / kexec leaves the controller
in an unknown state. We add support for legacy interrupts for cards that
lack MSI support (which is partially broken currently). We then add the
device tree nodes to enable PCIe on the Quartz64 Model A.

Patch 1 drops the snps,dw,pcie fallback from the dt-binding
Patch 2 resets the PCIe controller to prevent configuration bugs
Patch 3 adds legacy interrupt support to the driver
Patch 4 adds the device tree binding to the rk356x.dtsi
Patch 5 enables the PCIe controller on the Quartz64-A

Changelog:
v9:
- move reset_control_assert out of rockchip_pcie_resource_get
- fix various formatting mistakes
- fix a checkpatch warning

v8:
- add core reset patch
- simplify IRQ enable/disable functions
- drop spinlock
- only enable/disable IRQ requested
- only pass the IRQ register bits used to irq functions

v7:
- drop assigned-clocks

v6:
- fix a ranges issue
- point to GIC instead of ITS

v5:
- fix incorrect series (apologies for the v4 spam)

v4:
- drop the ITS modification, poor compatibility is better than
  completely broken

v3:
- drop select node from dt-binding
- convert to for_each_set_bit
- convert to generic_handle_domain_irq
- drop unncessary dev_err
- reorder irq_chip items
- change to level_irq
- install the handler after initializing the domain

v2:
- Define PCIE_CLIENT_INTR_STATUS_LEGACY
- Fix PCIE_LEGACY_INT_ENABLE to only enable the RC interrupts
- Add legacy interrupt enable/disable support


Peter Geis (5):
  dt-bindings: PCI: Remove fallback from Rockchip DesignWare binding
  PCI: rockchip-dwc: Reset core at driver probe
  PCI: rockchip-dwc: Add legacy interrupt support
  arm64: dts: rockchip: Add rk3568 PCIe2x1 controller
  arm64: dts: rockchip: Enable PCIe controller on quartz64-a

 .../bindings/pci/rockchip-dw-pcie.yaml        |  12 +-
 .../boot/dts/rockchip/rk3566-quartz64-a.dts   |  34 +++++
 arch/arm64/boot/dts/rockchip/rk356x.dtsi      |  52 ++++++++
 drivers/pci/controller/dwc/pcie-dw-rockchip.c | 119 +++++++++++++++---
 4 files changed, 191 insertions(+), 26 deletions(-)

Comments

Peter Geis May 10, 2022, 9:11 p.m. UTC | #1
On Fri, Apr 29, 2022 at 8:38 AM Peter Geis <pgwipeout@gmail.com> wrote:
>
> This series enables the DesignWare based PCIe controller on the rk356x
> series of chips. We drop the fallback to the core driver due to
> compatibility issues. We reset the PCIe controller at driver probe to
> prevent issues in the future when firmware / kexec leaves the controller
> in an unknown state. We add support for legacy interrupts for cards that
> lack MSI support (which is partially broken currently). We then add the
> device tree nodes to enable PCIe on the Quartz64 Model A.

Good Evening,

Just a gentle ping to see if there's anything outstanding here.

Very Respectfully,
Peter Geis

>
> Patch 1 drops the snps,dw,pcie fallback from the dt-binding
> Patch 2 resets the PCIe controller to prevent configuration bugs
> Patch 3 adds legacy interrupt support to the driver
> Patch 4 adds the device tree binding to the rk356x.dtsi
> Patch 5 enables the PCIe controller on the Quartz64-A
>
> Changelog:
> v9:
> - move reset_control_assert out of rockchip_pcie_resource_get
> - fix various formatting mistakes
> - fix a checkpatch warning
>
> v8:
> - add core reset patch
> - simplify IRQ enable/disable functions
> - drop spinlock
> - only enable/disable IRQ requested
> - only pass the IRQ register bits used to irq functions
>
> v7:
> - drop assigned-clocks
>
> v6:
> - fix a ranges issue
> - point to GIC instead of ITS
>
> v5:
> - fix incorrect series (apologies for the v4 spam)
>
> v4:
> - drop the ITS modification, poor compatibility is better than
>   completely broken
>
> v3:
> - drop select node from dt-binding
> - convert to for_each_set_bit
> - convert to generic_handle_domain_irq
> - drop unncessary dev_err
> - reorder irq_chip items
> - change to level_irq
> - install the handler after initializing the domain
>
> v2:
> - Define PCIE_CLIENT_INTR_STATUS_LEGACY
> - Fix PCIE_LEGACY_INT_ENABLE to only enable the RC interrupts
> - Add legacy interrupt enable/disable support
>
>
> Peter Geis (5):
>   dt-bindings: PCI: Remove fallback from Rockchip DesignWare binding
>   PCI: rockchip-dwc: Reset core at driver probe
>   PCI: rockchip-dwc: Add legacy interrupt support
>   arm64: dts: rockchip: Add rk3568 PCIe2x1 controller
>   arm64: dts: rockchip: Enable PCIe controller on quartz64-a
>
>  .../bindings/pci/rockchip-dw-pcie.yaml        |  12 +-
>  .../boot/dts/rockchip/rk3566-quartz64-a.dts   |  34 +++++
>  arch/arm64/boot/dts/rockchip/rk356x.dtsi      |  52 ++++++++
>  drivers/pci/controller/dwc/pcie-dw-rockchip.c | 119 +++++++++++++++---
>  4 files changed, 191 insertions(+), 26 deletions(-)
>
> --
> 2.25.1
>
Heiko Stuebner May 10, 2022, 9:15 p.m. UTC | #2
Am Dienstag, 10. Mai 2022, 23:11:18 CEST schrieb Peter Geis:
> On Fri, Apr 29, 2022 at 8:38 AM Peter Geis <pgwipeout@gmail.com> wrote:
> >
> > This series enables the DesignWare based PCIe controller on the rk356x
> > series of chips. We drop the fallback to the core driver due to
> > compatibility issues. We reset the PCIe controller at driver probe to
> > prevent issues in the future when firmware / kexec leaves the controller
> > in an unknown state. We add support for legacy interrupts for cards that
> > lack MSI support (which is partially broken currently). We then add the
> > device tree nodes to enable PCIe on the Quartz64 Model A.
> 
> Good Evening,
> 
> Just a gentle ping to see if there's anything outstanding here.

From my side it looks good. I'll take patches 4+5 once the binding-change
from patch1 has been applied to some tree.


Heiko


> >
> > Patch 1 drops the snps,dw,pcie fallback from the dt-binding
> > Patch 2 resets the PCIe controller to prevent configuration bugs
> > Patch 3 adds legacy interrupt support to the driver
> > Patch 4 adds the device tree binding to the rk356x.dtsi
> > Patch 5 enables the PCIe controller on the Quartz64-A
> >
> > Changelog:
> > v9:
> > - move reset_control_assert out of rockchip_pcie_resource_get
> > - fix various formatting mistakes
> > - fix a checkpatch warning
> >
> > v8:
> > - add core reset patch
> > - simplify IRQ enable/disable functions
> > - drop spinlock
> > - only enable/disable IRQ requested
> > - only pass the IRQ register bits used to irq functions
> >
> > v7:
> > - drop assigned-clocks
> >
> > v6:
> > - fix a ranges issue
> > - point to GIC instead of ITS
> >
> > v5:
> > - fix incorrect series (apologies for the v4 spam)
> >
> > v4:
> > - drop the ITS modification, poor compatibility is better than
> >   completely broken
> >
> > v3:
> > - drop select node from dt-binding
> > - convert to for_each_set_bit
> > - convert to generic_handle_domain_irq
> > - drop unncessary dev_err
> > - reorder irq_chip items
> > - change to level_irq
> > - install the handler after initializing the domain
> >
> > v2:
> > - Define PCIE_CLIENT_INTR_STATUS_LEGACY
> > - Fix PCIE_LEGACY_INT_ENABLE to only enable the RC interrupts
> > - Add legacy interrupt enable/disable support
> >
> >
> > Peter Geis (5):
> >   dt-bindings: PCI: Remove fallback from Rockchip DesignWare binding
> >   PCI: rockchip-dwc: Reset core at driver probe
> >   PCI: rockchip-dwc: Add legacy interrupt support
> >   arm64: dts: rockchip: Add rk3568 PCIe2x1 controller
> >   arm64: dts: rockchip: Enable PCIe controller on quartz64-a
> >
> >  .../bindings/pci/rockchip-dw-pcie.yaml        |  12 +-
> >  .../boot/dts/rockchip/rk3566-quartz64-a.dts   |  34 +++++
> >  arch/arm64/boot/dts/rockchip/rk356x.dtsi      |  52 ++++++++
> >  drivers/pci/controller/dwc/pcie-dw-rockchip.c | 119 +++++++++++++++---
> >  4 files changed, 191 insertions(+), 26 deletions(-)
> >
> > --
> > 2.25.1
> >
>
Lorenzo Pieralisi May 11, 2022, 3:15 p.m. UTC | #3
On Fri, 29 Apr 2022 08:38:26 -0400, Peter Geis wrote:
> This series enables the DesignWare based PCIe controller on the rk356x
> series of chips. We drop the fallback to the core driver due to
> compatibility issues. We reset the PCIe controller at driver probe to
> prevent issues in the future when firmware / kexec leaves the controller
> in an unknown state. We add support for legacy interrupts for cards that
> lack MSI support (which is partially broken currently). We then add the
> device tree nodes to enable PCIe on the Quartz64 Model A.
> 
> [...]

Applied to pci/dwc, thanks!

[1/5] dt-bindings: PCI: Remove fallback from Rockchip DesignWare binding
      https://git.kernel.org/lpieralisi/pci/c/931262e646
[2/5] PCI: rockchip-dwc: Reset core at driver probe
      https://git.kernel.org/lpieralisi/pci/c/431e7d2eec
[3/5] PCI: rockchip-dwc: Add legacy interrupt support
      https://git.kernel.org/lpieralisi/pci/c/e8aae154df

Thanks,
Lorenzo
Heiko Stuebner May 15, 2022, 7:47 p.m. UTC | #4
On Fri, 29 Apr 2022 08:38:26 -0400, Peter Geis wrote:
> This series enables the DesignWare based PCIe controller on the rk356x
> series of chips. We drop the fallback to the core driver due to
> compatibility issues. We reset the PCIe controller at driver probe to
> prevent issues in the future when firmware / kexec leaves the controller
> in an unknown state. We add support for legacy interrupts for cards that
> lack MSI support (which is partially broken currently). We then add the
> device tree nodes to enable PCIe on the Quartz64 Model A.
> 
> [...]

Applied, thanks!

[4/5] arm64: dts: rockchip: Add rk3568 PCIe2x1 controller
      commit: c9168492af55bdbc811e05bfc55ae70880bf8ff3
[5/5] arm64: dts: rockchip: Enable PCIe controller on quartz64-a
      commit: 4f4cbbb147b988daaa036dcf34628d93b2e22cd9

Best regards,