dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583
Subsystems (5)
PATCH v3 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.
The compatible have -gen3 tag as the Airoha AN7583 SoC have both GEN2 and GEN3 PCIe controller and it's required to differentiate them as different schema are required for the 2 PCIe Controller variant.
---
Changes v3:
- Add review tag
- Add comments for compatible inconsistency
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
@@ -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
PATCH v3 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 v3:
- Add review tag
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
@@ -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
Quoted 19 lines · Christian Marangi
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.
The compatible have -gen3 tag as the Airoha AN7583 SoC have both GEN2 and GEN3 PCIe controller and it's required to differentiate them as different schema are required for the 2 PCIe Controller variant.
Signed-off-by Christian Marangi <[email protected]>Reviewed-by AngeloGioacchino Del Regno <[email protected]>---
Changes v3:
- Add review tag
- Add comments for compatible inconsistency
Changes v2:
- Fix alphabetical order
Quoted 3 lines
.../bindings/pci/mediatek-pcie-gen3.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+)
Quoted 6 lines · Christian Marangi
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.
Quoted 6 lines
The compatible have -gen3 tag as the Airoha AN7583 SoC have both GEN2 and GEN3 PCIe controller and it's required to differentiate them as different schema are required for the 2 PCIe Controller variant.
Signed-off-by Christian Marangi <[email protected]>Reviewed-by AngeloGioacchino Del Regno <[email protected]>
Any chance this can be picked? All the 2 patch got review tag.
Quoted 52 lines
---
Changes v3:
- Add review tag
- Add comments for compatible inconsistency
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@@ -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
Signature · 1 line
Ansuel