Skip to contentSkip to conversation

dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583

PATCH Superseded Christian Marangi 2 participants 5 messages Sep 23, 2025 – Sep 24, 2025

Subsystems (5)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583

Introduce Airoha AN7583 SoC compatible in mediatek-gen3 PCIe controller binding.

This differ from the Airoha EN7581 SoC by the fact that only one Gen3 PCIe controller is present on the SoC.

---
Changes v2:
- Fix alphabetical order

 .../bindings/pci/mediatek-pcie-gen3.yaml      | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +21 -0
index 0278845701ce..1ca9594a9739 100644
@@ -58,6 +58,7 @@ properties:
           - const: mediatek,mt8196-pcie
       - const: mediatek,mt8192-pcie
       - const: mediatek,mt8196-pcie
+      - const: airoha,an7583-pcie-gen3
       - const: airoha,en7581-pcie
 
   reg:
@@ -276,6 +277,26 @@ allOf:
 
         mediatek,pbus-csr: false
 
+  - if:
+      properties:
+        compatible:
+          const: airoha,an7583-pcie-gen3
+    then:
+      properties:
+        clocks:
+          maxItems: 1
+
+        clock-names:
+          items:
+            - const: sys-ck
+
+        resets:
+          minItems: 1
+
+        reset-names:
+          items:
+            - const: phy-lane0
+
   - if:
       properties:
         compatible:
Signature · 1 line
2.51.0
#1 lore raw

PATCH v2 2/2 PCI: mediatek-gen3: add support for Airoha AN7583 SoC

Add support for Airoha AN7583 SoC that implement the same logic of Airoha EN7581 with the only difference that only 1 PCIe line is supported (for GEN3).

A dedicated compatible is defined with the pdata struct with the 1 reset line.

---
Changes v2:
- Fix alphabetical order

 drivers/pci/controller/pcie-mediatek-gen3.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/pci/controller/pcie-mediatek-gen3.c +10 -0
index 75ddb8bee168..6e68ed75b564 100644
@@ -1360,7 +1360,17 @@ static const struct mtk_gen3_pcie_pdata mtk_pcie_soc_en7581 = {
 	.flags = SKIP_PCIE_RSTB,
 };
 
+static const struct mtk_gen3_pcie_pdata mtk_pcie_soc_an7583 = {
+	.power_up = mtk_pcie_en7581_power_up,
+	.phy_resets = {
+		.id[0] = "phy-lane0",
+		.num_resets = 1,
+	},
+	.flags = SKIP_PCIE_RSTB,
+};
+
 static const struct of_device_id mtk_pcie_of_match[] = {
+	{ .compatible = "airoha,an7583-pcie-gen3", .data = &mtk_pcie_soc_an7583 },
 	{ .compatible = "airoha,en7581-pcie", .data = &mtk_pcie_soc_en7581 },
 	{ .compatible = "mediatek,mt8192-pcie", .data = &mtk_pcie_soc_mt8192 },
 	{ .compatible = "mediatek,mt8196-pcie", .data = &mtk_pcie_soc_mt8196 },
Signature · 1 line
2.51.0
maintainer Reviewed-by on v2 2/2
#2 lore raw

Re: [PATCH v2 2/2] PCI: mediatek-gen3: add support for Airoha AN7583 SoC

Il 23/09/25 21:07, Christian Marangi ha scritto:

Quoted 8 lines

Add support for Airoha AN7583 SoC that implement the same logic of Airoha EN7581 with the only difference that only 1 PCIe line is supported (for GEN3).

A dedicated compatible is defined with the pdata struct with the 1 reset line.

#3 lore raw
In reply to Christian Marangi

Il 23/09/25 21:06, Christian Marangi ha scritto:

Quoted 19 lines

Introduce Airoha AN7583 SoC compatible in mediatek-gen3 PCIe controller binding.

This differ from the Airoha EN7581 SoC by the fact that only one Gen3 PCIe controller is present on the SoC.

---
Changes v2:
- Fix alphabetical order

  .../bindings/pci/mediatek-pcie-gen3.yaml      | 21 +++++++++++++++++++
  1 file changed, 21 insertions(+)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +0 -0
index 0278845701ce..1ca9594a9739 100644

Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml properties: · line 61

Quoted 4 lines
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +1 -0
@@ -58,6 +58,7 @@ properties:
            - const: mediatek,mt8196-pcie
        - const: mediatek,mt8192-pcie
        - const: mediatek,mt8196-pcie
+      - const: airoha,an7583-pcie-gen3

In the previous review, I also asked you to change the compatible string to be consistent with the others.

airoha,an7583-pcie

Regards,
Angelo

Quoted 2 lines
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +0 -0
        - const: airoha,en7581-pcie
 
maintainer Reviewed-by
#4 lore raw

Il 24/09/25 10:36, AngeloGioacchino Del Regno ha scritto:

Quoted 28 lines

Il 23/09/25 21:06, Christian Marangi ha scritto:

Quoted 19 lines

Introduce Airoha AN7583 SoC compatible in mediatek-gen3 PCIe controller binding.

This differ from the Airoha EN7581 SoC by the fact that only one Gen3 PCIe controller is present on the SoC.

---
Changes v2:
- Fix alphabetical order

  .../bindings/pci/mediatek-pcie-gen3.yaml      | 21 +++++++++++++++++++

  1 file changed, 21 insertions(+)
Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +0 -0
index 0278845701ce..1ca9594a9739 100644
@@ -58,6 +58,7 @@ properties:
Quoted 4 lines

            - const: mediatek,mt8196-pcie
        - const: mediatek,mt8192-pcie
        - const: mediatek,mt8196-pcie
+      - const: airoha,an7583-pcie-gen3

In the previous review, I also asked you to change the compatible string to be consistent with the others.

Quoted 1 line

airoha,an7583-pcie

I have just seen the other series where you add AN7583 to the GEN2 PCIe controller driver; this means that this SoC has two controllers, one GEN2 and one GEN3.

The compatible string inconsistency is therefore acceptable.

Please, though - add this information in the commit message, saying that the new string is inconsistent with the others and explain the reason.

After which,