Skip to content

PCI: MediaTek: Add host controller support for mt2712 and mt7622

[email protected] linux-arm-kernel linux-devicetree linux-mediatek linux-pci lkml 5 versions – Applied

Status from this message: I applied these on pci/host-mediatek for v4.14, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest7 patches 1 replyApplied
  2. v36 patches 4 repliesSuperseded
  3. v2 posting 2/21 of 5 patches 1 replySuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/25 patches18 repliesSuperseded
v15 patches2 repliesSuperseded

Changes in v4 from the cover letter

- Unify the macro define's names with PCIE_ prefix.
- Use lower/upper_32_bits macro and remove AHB2PCIE_BASEL/AHB2PCIE_BASEH.
- Factor out mtk_pcie_find_port to eliminate duplicate code.
- Use list_for_each_entry instead of list_for_each_entry_safe when search list.
- Simplify the mtk_pcie_hw_rd_cfg flow.
- Split a new patch to rename the parameter and function names.
- Update the subject and changelog to include specific SoC IDs.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/7PCI: mediatek: Using readl_poll_timeout to wait Gen2 trainingdrivers/pci/host/pcie-mediatek.c+22 -300 replies
2/7PCI: mediatek: make the parameter and function names more accuratedrivers/pci/host/pcie-mediatek.c+25 -250 replies
3/7PCI: mediatek: Add a structure to abstract the controller generationsdrivers/pci/host/pcie-mediatek.c+26 -50 replies
4/7PCI: mediatek: switch to use platform_get_resource_byname()drivers/pci/host/pcie-mediatek.c+10 -70 replies
5/7dt-bindings: PCI: rename and cleanup MediaTek binding textDocumentation/devicetree/bindings/pci/mediatek-pcie.txt+16 -160 replies
6/7PCI: mediatek: Add controller support for mt2712 and mt7622drivers/pci/host/Kconfig drivers/pci/host/pcie-mediatek.c+460 -70 replies
7/7dt-bindings: PCI: add support for mt2712 and mt7622Documentation/devicetree/bindings/pci/mediatek-pcie.txt+161 -70 replies

Reviews trailers per patch

2 of 7 patches have a Reviewed-by or Acked-by.

PatchRob Herring
1/7
2/7
3/7
4/7
5/7A-b
6/7
7/7A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/7] PCI: MediaTek: Add host controller support for mt2712 and mt7622

From: Honghui Zhang <[email protected]>

MediaTek's PCIe host controller has two generation HWs, MT2712 and MT7622 using the new generation HW, which has two root ports. They share most probing flow with MT2701/MT7623. But the read/write config space logical is different. The per-port registers must be touched for read/write configuration space.

This patchset abstract the common probing flow, and add support for the new generation controller.

Changes since v3:
- Unify the macro define's names with PCIE_ prefix.
- Use lower/upper_32_bits macro and remove AHB2PCIE_BASEL/AHB2PCIE_BASEH.
- Factor out mtk_pcie_find_port to eliminate duplicate code.
- Use list_for_each_entry instead of list_for_each_entry_safe when search list.
- Simplify the mtk_pcie_hw_rd_cfg flow.
- Split a new patch to rename the parameter and function names.
- Update the subject and changelog to include specific SoC IDs.

Changes since v2:
- Split the Gen2 training change to a separate patch.
- Simplify the config_read/write logical and get rid of mtk_pcie_find_port.
- Using bus->sysdata to simplify the code.
- Rebase to commit 65b83b13204a ("PCI: mediatek: Explicitly request exclusive reset control")[1].
- Fix some misspells.
- Add review tags in commit message.

Changes since v1:
- Fix build warnings in arm arch.
- Using SoC specific compatible instead of generic compatible.
- Add devicetree binding example for mt7622.
- Unified the register define names with PCIE_ prefix.
- Cleanup some un-necessary condition determine when starup port.
- minor code cleanups.

[1] https://patchwork.kernel.org/patch/9852591/

Honghui Zhang (2):
PCI: mediatek: make the parameter and function names more accurate
PCI: mediatek: Add a structure to abstract the controller generations

Ryder Lee (5):
PCI: mediatek: Using readl_poll_timeout to wait Gen2 training
PCI: mediatek: switch to use platform_get_resource_byname()
dt-bindings: PCI: rename and cleanup MediaTek binding text
PCI: mediatek: Add controller support for mt2712 and mt7622
dt-bindings: PCI: add support for mt2712 and mt7622

 .../bindings/pci/mediatek,mt7623-pcie.txt          | 130 -----
 .../devicetree/bindings/pci/mediatek-pcie.txt      | 284 ++++++++++
 drivers/pci/host/Kconfig                           |   5 +-
 drivers/pci/host/pcie-mediatek.c                   | 598 ++++++++++++++++++---
 4 files changed, 820 insertions(+), 197 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/pci/mediatek,mt7623-pcie.txt
 create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie.txt
Signature · 1 line
2.6.4