Skip to content

Commit 687aedb

Browse files
nxpfranklibjorn-helgaas
authored andcommitted
PCI: imx6: Add i.MX8Q PCIe Endpoint (EP) support
Add support for the i.MX8Q series (i.MX8QM, i.MX8QXP, and i.MX8DXL) PCIe Endpoint (EP). On the i.MX8Q platforms, the PCI bus addresses differ from the CPU addresses. However, the DesignWare (DWC) driver already handles this in the common code. Link: https://lore.kernel.org/r/20241119-pci_fixup_addr-v8-7-c4bfa5193288@nxp.com Signed-off-by: Frank Li <Frank.Li@nxp.com> [kwilczynski: commit log] Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1 parent 3d22072 commit 687aedb

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ enum imx_pcie_variants {
7070
IMX8MQ_EP,
7171
IMX8MM_EP,
7272
IMX8MP_EP,
73+
IMX8Q_EP,
7374
IMX95_EP,
7475
};
7576

@@ -1082,6 +1083,16 @@ static const struct pci_epc_features imx8m_pcie_epc_features = {
10821083
.align = SZ_64K,
10831084
};
10841085

1086+
static const struct pci_epc_features imx8q_pcie_epc_features = {
1087+
.linkup_notifier = false,
1088+
.msi_capable = true,
1089+
.msix_capable = false,
1090+
.bar[BAR_1] = { .type = BAR_RESERVED, },
1091+
.bar[BAR_3] = { .type = BAR_RESERVED, },
1092+
.bar[BAR_5] = { .type = BAR_RESERVED, },
1093+
.align = SZ_64K,
1094+
};
1095+
10851096
/*
10861097
* BAR# | Default BAR enable | Default BAR Type | Default BAR Size | BAR Sizing Scheme
10871098
* ================================================================================================
@@ -1678,6 +1689,14 @@ static const struct imx_pcie_drvdata drvdata[] = {
16781689
.epc_features = &imx8m_pcie_epc_features,
16791690
.enable_ref_clk = imx8mm_pcie_enable_ref_clk,
16801691
},
1692+
[IMX8Q_EP] = {
1693+
.variant = IMX8Q_EP,
1694+
.flags = IMX_PCIE_FLAG_HAS_PHYDRV,
1695+
.mode = DW_PCIE_EP_TYPE,
1696+
.epc_features = &imx8q_pcie_epc_features,
1697+
.clk_names = imx8q_clks,
1698+
.clks_cnt = ARRAY_SIZE(imx8q_clks),
1699+
},
16811700
[IMX95_EP] = {
16821701
.variant = IMX95_EP,
16831702
.flags = IMX_PCIE_FLAG_HAS_SERDES |
@@ -1707,6 +1726,7 @@ static const struct of_device_id imx_pcie_of_match[] = {
17071726
{ .compatible = "fsl,imx8mq-pcie-ep", .data = &drvdata[IMX8MQ_EP], },
17081727
{ .compatible = "fsl,imx8mm-pcie-ep", .data = &drvdata[IMX8MM_EP], },
17091728
{ .compatible = "fsl,imx8mp-pcie-ep", .data = &drvdata[IMX8MP_EP], },
1729+
{ .compatible = "fsl,imx8q-pcie-ep", .data = &drvdata[IMX8Q_EP], },
17101730
{ .compatible = "fsl,imx95-pcie-ep", .data = &drvdata[IMX95_EP], },
17111731
{},
17121732
};

0 commit comments

Comments
 (0)