* [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583
@ 2025-09-20 9:25 Christian Marangi
2025-09-20 9:25 ` [PATCH 2/2] PCI: mediatek-gen3: add support for Airoha AN7583 SoC Christian Marangi
2025-09-22 11:34 ` [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583 AngeloGioacchino Del Regno
0 siblings, 2 replies; 5+ messages in thread
From: Christian Marangi @ 2025-09-20 9:25 UTC (permalink / raw)
To: Ryder Lee, Jianjun Wang, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, linux-pci, linux-mediatek, devicetree,
linux-kernel, linux-arm-kernel, upstream
Cc: 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.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
.../bindings/pci/mediatek-pcie-gen3.yaml | 21 +++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
index 0278845701ce..3f556d1327a6 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
@@ -59,6 +59,7 @@ properties:
- const: mediatek,mt8192-pcie
- const: mediatek,mt8196-pcie
- const: airoha,en7581-pcie
+ - const: airoha,an7583-pcie-gen3
reg:
maxItems: 1
@@ -298,6 +299,26 @@ allOf:
- const: phy-lane1
- const: phy-lane2
+ - 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
+
unevaluatedProperties: false
examples:
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] PCI: mediatek-gen3: add support for Airoha AN7583 SoC
2025-09-20 9:25 [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583 Christian Marangi
@ 2025-09-20 9:25 ` Christian Marangi
2025-09-22 11:34 ` AngeloGioacchino Del Regno
2025-09-22 11:34 ` [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583 AngeloGioacchino Del Regno
1 sibling, 1 reply; 5+ messages in thread
From: Christian Marangi @ 2025-09-20 9:25 UTC (permalink / raw)
To: Ryder Lee, Jianjun Wang, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, linux-pci, linux-mediatek, devicetree,
linux-kernel, linux-arm-kernel, upstream
Cc: Christian Marangi
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.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/pci/controller/pcie-mediatek-gen3.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
index 75ddb8bee168..db9985375be9 100644
--- a/drivers/pci/controller/pcie-mediatek-gen3.c
+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
@@ -1360,8 +1360,18 @@ 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,en7581-pcie", .data = &mtk_pcie_soc_en7581 },
+ { .compatible = "airoha,an7583-pcie-gen3", .data = &mtk_pcie_soc_an7583 },
{ .compatible = "mediatek,mt8192-pcie", .data = &mtk_pcie_soc_mt8192 },
{ .compatible = "mediatek,mt8196-pcie", .data = &mtk_pcie_soc_mt8196 },
{},
--
2.51.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583
2025-09-20 9:25 [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583 Christian Marangi
2025-09-20 9:25 ` [PATCH 2/2] PCI: mediatek-gen3: add support for Airoha AN7583 SoC Christian Marangi
@ 2025-09-22 11:34 ` AngeloGioacchino Del Regno
2025-09-22 11:36 ` Christian Marangi
1 sibling, 1 reply; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-09-22 11:34 UTC (permalink / raw)
To: Christian Marangi, Ryder Lee, Jianjun Wang, Bjorn Helgaas,
Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, linux-pci, linux-mediatek,
devicetree, linux-kernel, linux-arm-kernel, upstream
Il 20/09/25 11:25, Christian Marangi ha scritto:
> 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.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> .../bindings/pci/mediatek-pcie-gen3.yaml | 21 +++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> index 0278845701ce..3f556d1327a6 100644
> --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> @@ -59,6 +59,7 @@ properties:
> - const: mediatek,mt8192-pcie
> - const: mediatek,mt8196-pcie
"an" comes before "en", please move it here.
Also, for consistency with all of the other compatibles, this should be just
"airoha,an7583-pcie": please rename it.
> - const: airoha,en7581-pcie
> + - const: airoha,an7583-pcie-gen3
>
> reg:
> maxItems: 1
> @@ -298,6 +299,26 @@ allOf:
> - const: phy-lane1
> - const: phy-lane2
>
> + - if:
> + properties:
> + compatible:
> + const: airoha,an7583-pcie-gen3
same for this if block, please put it before en7583.
Everything else looks good.
Cheers,
Angelo
> + then:
> + properties:
> + clocks:
> + maxItems: 1
> +
> + clock-names:
> + items:
> + - const: sys-ck
> +
> + resets:
> + minItems: 1
> +
> + reset-names:
> + items:
> + - const: phy-lane0
> +
> unevaluatedProperties: false
>
> examples:
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] PCI: mediatek-gen3: add support for Airoha AN7583 SoC
2025-09-20 9:25 ` [PATCH 2/2] PCI: mediatek-gen3: add support for Airoha AN7583 SoC Christian Marangi
@ 2025-09-22 11:34 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-09-22 11:34 UTC (permalink / raw)
To: Christian Marangi, Ryder Lee, Jianjun Wang, Bjorn Helgaas,
Lorenzo Pieralisi, Krzysztof Wilczyński,
Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, linux-pci, linux-mediatek,
devicetree, linux-kernel, linux-arm-kernel, upstream
Il 20/09/25 11:25, Christian Marangi ha scritto:
> 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.
>
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> ---
> drivers/pci/controller/pcie-mediatek-gen3.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/pci/controller/pcie-mediatek-gen3.c b/drivers/pci/controller/pcie-mediatek-gen3.c
> index 75ddb8bee168..db9985375be9 100644
> --- a/drivers/pci/controller/pcie-mediatek-gen3.c
> +++ b/drivers/pci/controller/pcie-mediatek-gen3.c
> @@ -1360,8 +1360,18 @@ 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,en7581-pcie", .data = &mtk_pcie_soc_en7581 },
> + { .compatible = "airoha,an7583-pcie-gen3", .data = &mtk_pcie_soc_an7583 },
Same comments as the dt-bindings review, "an" comes before "en", also rename to
airoha,an7583-pcie.
Cheers,
Angelo
> { .compatible = "mediatek,mt8192-pcie", .data = &mtk_pcie_soc_mt8192 },
> { .compatible = "mediatek,mt8196-pcie", .data = &mtk_pcie_soc_mt8196 },
> {},
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583
2025-09-22 11:34 ` [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583 AngeloGioacchino Del Regno
@ 2025-09-22 11:36 ` Christian Marangi
0 siblings, 0 replies; 5+ messages in thread
From: Christian Marangi @ 2025-09-22 11:36 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: Ryder Lee, Jianjun Wang, Bjorn Helgaas, Lorenzo Pieralisi,
Krzysztof Wilczyński, Manivannan Sadhasivam, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, linux-pci,
linux-mediatek, devicetree, linux-kernel, linux-arm-kernel,
upstream
On Mon, Sep 22, 2025 at 01:34:06PM +0200, AngeloGioacchino Del Regno wrote:
> Il 20/09/25 11:25, Christian Marangi ha scritto:
> > 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.
> >
> > Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
> > ---
> > .../bindings/pci/mediatek-pcie-gen3.yaml | 21 +++++++++++++++++++
> > 1 file changed, 21 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > index 0278845701ce..3f556d1327a6 100644
> > --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml
> > @@ -59,6 +59,7 @@ properties:
> > - const: mediatek,mt8192-pcie
> > - const: mediatek,mt8196-pcie
>
> "an" comes before "en", please move it here.
>
> Also, for consistency with all of the other compatibles, this should be just
> "airoha,an7583-pcie": please rename it.
>
Thanks for the review. The "gen3" wasn't added randomly. On AN7583 they
put both gen2 and gen3 PCIe. One line is gen3, the other gen2. So either
we differenciate for gen2 or we add the gen3 tag.
I decided to add it here to follow the naming pattern with
mediatek-pcie-gen3.
If you have better idea on this, I'm all open.
> > - const: airoha,en7581-pcie
> > + - const: airoha,an7583-pcie-gen3
>
>
>
> > reg:
> > maxItems: 1
> > @@ -298,6 +299,26 @@ allOf:
> > - const: phy-lane1
> > - const: phy-lane2
> > + - if:
> > + properties:
> > + compatible:
> > + const: airoha,an7583-pcie-gen3
>
> same for this if block, please put it before en7583.
>
> Everything else looks good.
>
> Cheers,
> Angelo
>
> > + then:
> > + properties:
> > + clocks:
> > + maxItems: 1
> > +
> > + clock-names:
> > + items:
> > + - const: sys-ck
> > +
> > + resets:
> > + minItems: 1
> > +
> > + reset-names:
> > + items:
> > + - const: phy-lane0
> > +
> > unevaluatedProperties: false
> > examples:
>
>
>
--
Ansuel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-22 11:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-20 9:25 [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583 Christian Marangi
2025-09-20 9:25 ` [PATCH 2/2] PCI: mediatek-gen3: add support for Airoha AN7583 SoC Christian Marangi
2025-09-22 11:34 ` AngeloGioacchino Del Regno
2025-09-22 11:34 ` [PATCH 1/2] dt-bindings: PCI: mediatek-gen3: Add support for Airoha AN7583 AngeloGioacchino Del Regno
2025-09-22 11:36 ` Christian Marangi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).