Skip to contentSkip to conversation

PCI: mediatek: Add support for EcoNet SoCs

PATCH Superseded Caleb James DeLisle 2 participants 5 messages Apr 4 – Apr 8

Subsystems (6)

v4 of 11 Superseded Latest is v11 →

lore
Share & tools
lore
#0 lore raw

v4 cover PCI: mediatek: Add support for EcoNet SoCs

Add EcoNet EN7528 (and EN751221) PCIe support.

Changes from v3:
* s/initiallized/initialized/
* Use PCIE_T_PVPERL_MS for sleep time
* Use PCI_PM_D3COLD_WAIT for startup wait time
* Clarify comment "Activate INTx interrupts"
* Add MTK_PCIE_RETRAIN quirk for devices which require link re-train
* Do not retrain *all* bridges, only root bridge
* Better comments and logging in retraining logic
* v3: https://lore.kernel.org/linux-mips/[email protected]/

Changes from v2:
* mediatek-pcie.yaml -> s/power-domain/power-domains/ and drop example
* Patch 3 dropped as it has been applied (Thanks!)
* v2: https://lore.kernel.org/linux-mips/[email protected]/

Changes from v1:
* mediatek-pcie.yaml slot0 needs device-type = "pci", fix dt_binding_check

* v1: https://lore.kernel.org/linux-mips/[email protected]/

This was split from a larger PCIe patchset which crossed multiple subsystems. I'm not labeling this a v3 because it's a new patchset, but I'm keeping the historical record anyway.

Changes from econet-pcie v2:
* mediatek-pcie.yaml add missing constraints to PCI node properties
* econet-pcie v2: https://lore.kernel.org/linux-mips/[email protected]

Changes from econet-pcie v1:
* pcie-mediatek.c Exclude pcie_retrain_link() when building as a module
* econet-pcie v1: https://lore.kernel.org/linux-mips/[email protected]/

Caleb James DeLisle (2):
dt-bindings: PCI: mediatek: Add support for EcoNet EN7528
PCI: mediatek: Add support for EcoNet EN7528 SoC

 .../bindings/pci/mediatek-pcie.yaml           |  26 ++++
 drivers/pci/controller/Kconfig                |   2 +-
 drivers/pci/controller/pcie-mediatek.c        | 133 ++++++++++++++++++
 3 files changed, 160 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.5
#1 lore raw

PATCH v4 1/2 dt-bindings: PCI: mediatek: Add support for EcoNet EN7528

Introduce EcoNet EN7528 SoC compatible in MediaTek PCIe controller binding.

EcoNet PCIe controller has the same configuration model as Mediatek v2 but is initialized more similarly to an MT7621 PCIe.

---
 .../bindings/pci/mediatek-pcie.yaml           | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
Documentation/devicetree/bindings/pci/mediatek-pcie.yaml +26 -0
index 0b8c78ec4f91..7e1b0876c291 100644
@@ -14,6 +14,7 @@ properties:
     oneOf:
       - enum:
           - airoha,an7583-pcie
+          - econet,en7528-pcie
           - mediatek,mt2712-pcie
           - mediatek,mt7622-pcie
           - mediatek,mt7629-pcie
@@ -226,6 +227,31 @@ allOf:
 
         mediatek,pbus-csr: false
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: econet,en7528-pcie
+    then:
+      properties:
+        clocks:
+          maxItems: 1
+
+        clock-names:
+          maxItems: 1
+
+        reset: false
+
+        reset-names: false
+
+        power-domains: false
+
+        mediatek,pbus-csr: false
+
+      required:
+        - phys
+        - phy-names
+
 unevaluatedProperties: false
 
 examples:
Signature · 1 line
2.39.5
#2 lore raw

Re: [PATCH v4 1/2] dt-bindings: PCI: mediatek: Add support for EcoNet EN7528

Quoted 7 lines · Caleb James DeLisle

Introduce EcoNet EN7528 SoC compatible in MediaTek PCIe controller binding.

EcoNet PCIe controller has the same configuration model as Mediatek v2 but is initialized more similarly to an MT7621 PCIe.

<form letter>
This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

If you do not know the process, here is a short explanation:
Please add Acked-by/Reviewed-by/Tested-by tags when posting new versions of patchset, under or above your Signed-off-by tag, unless patch changed significantly (e.g. new properties added to the DT bindings). Tag is "received", when provided in a message replied to you on the mailing list. Tools like b4 can help here. However, there's no need to repost patches *only* to add the tags. The upstream maintainer will do that for tags received on the version they apply.

Please read:
https://elixir.bootlin.com/linux/v6.12-rc3/source/Documentation/process/submitting-patches.rst#L577

If a tag was not added on purpose, please state in the patch changelog or cover letter why and what changed.
</form letter>

Best regards,
Krzysztof

author Acked-by Conor Dooley
#3 lore raw

Re: [PATCH v4 1/2] dt-bindings: PCI: mediatek: Add support for EcoNet EN7528

Quoted 4 lines · Krzysztof Kozlowski
Quoted 3 lines · Caleb James DeLisle

Introduce EcoNet EN7528 SoC compatible in MediaTek PCIe controller binding.

Quoted 9 lines
Quoted 4 lines

EcoNet PCIe controller has the same configuration model as Mediatek v2 but is initialized more similarly to an MT7621 PCIe.

<form letter>
This is a friendly reminder during the review process.

It looks like you received a tag and forgot to add it.

Whoops, that was a failed-to-press-save error, thanks for catching it, I will update in a few days after waiting for any additional commentary.

Caleb

The missing line:

#4 lore raw

PATCH v4 2/2 PCI: mediatek: Add support for EcoNet EN7528 SoC

In reply to Caleb James DeLisle

Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.

These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports require re-training after startup.

---
 drivers/pci/controller/Kconfig         |   2 +-
 drivers/pci/controller/pcie-mediatek.c | 133 +++++++++++++++++++++++++
 2 files changed, 134 insertions(+), 1 deletion(-)
drivers/pci/controller/Kconfig +1 -1
index 686349e09cd3..5808d5e407fd 100644
@@ -209,7 +209,7 @@ config PCI_MVEBU
 
 config PCIE_MEDIATEK
 	tristate "MediaTek PCIe controller"
-	depends on ARCH_AIROHA || ARCH_MEDIATEK || COMPILE_TEST
+	depends on ARCH_AIROHA || ARCH_MEDIATEK || ECONET || COMPILE_TEST
 	depends on OF
 	depends on PCI_MSI
 	select IRQ_MSI_LIB
drivers/pci/controller/pcie-mediatek.c +133 -0

189 lines not on this page · raw message

Signature · 1 line
2.39.5