[PATCH v4 00/12] PCI: aardvark: Fix support for Turris MOX and Compex wifi cards

Pali Rohár
2020-04-30T08:06:43Z

Hello,

this is the fourth version of the patch series for Armada 3720 PCIe
controller (aardvark). It's main purpose is to fix some bugs regarding
buggy ath10k cards, but we also found out some suspicious stuff about
the driver and the SOC itself, which we try to address.

Patches are available also in my git branch pci-aardvark:
https://git.kernel.org/pub/scm/linux/kernel/git/pali/linux.git/log/?h=pci-aardvark

Changes since v3:
- do not change return value of of_pci_get_max_link_speed() function
- mark zero 'max-link-speed' as invalid
- silently use gen3 speed when 'max-link-speed' as invalid

Changes since v2:
- move PCIe max-link-speed property to armada-37xx.dtsi
- replace custom macros by standard linux/pci_regs.h macros
- increase PERST delay to 10ms (needed for initialized Compex WLE900VX)
- disable link training before PERST (needed for Compex WLE900VX)
- change of_pci_get_max_link_speed() function to signal -ENOENT
- handle errors from of_pci_get_max_link_speed() function
- updated comments, commit titles and messages

Changes since v1:
- commit titles and messages were reviewed and some of them were rewritten
- patches 1 and 5 from v1 which touch PCIe speed configuration were
reworked into one patch
- patch 2 from v1 was removed, it is not needed anymore
- patch 7 from v1 now touches the device tree of armada-3720-db
- a patch was added that tries to enable PCIe PHY via generic-phy API
(if a phandle to the PHY is found in the device tree)
- a patch describing the new PCIe node DT properties was added
- a patch was added that moves the PHY phandle from board device trees
to armada-37xx.dtsi

Marek and Pali

Marek Behún (5):
PCI: aardvark: Improve link training
PCI: aardvark: Add PHY support
dt-bindings: PCI: aardvark: Describe new properties
arm64: dts: marvell: armada-37xx: Set pcie_reset_pin to gpio function
arm64: dts: marvell: armada-37xx: Move PCIe comphy handle property

Pali Rohár (7):
PCI: aardvark: Train link immediately after enabling training
PCI: aardvark: Don't blindly enable ASPM L0s and don't write to
read-only register
PCI: of: Zero max-link-speed value is invalid
PCI: aardvark: Issue PERST via GPIO
PCI: aardvark: Add FIXME comment for PCIE_CORE_CMD_STATUS_REG access
PCI: aardvark: Replace custom macros by standard linux/pci_regs.h
macros
arm64: dts: marvell: armada-37xx: Move PCIe max-link-speed property

.../devicetree/bindings/pci/aardvark-pci.txt | 4 +
.../arm64/boot/dts/marvell/armada-3720-db.dts | 3 +
.../dts/marvell/armada-3720-espressobin.dtsi | 2 +-
.../dts/marvell/armada-3720-turris-mox.dts | 6 -
arch/arm64/boot/dts/marvell/armada-37xx.dtsi | 4 +-
drivers/pci/controller/pci-aardvark.c | 263 +++++++++++++++---
drivers/pci/of.c | 2 +-
7 files changed, 231 insertions(+), 53 deletions(-)

--
2.20.1