Skip to contentSkip to conversation

arm64: defconfig: enable PCIe controller on TI platforms

PATCH In review Achal Verma 4 participants 7 messages May 9, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: defconfig: enable PCIe controller on TI platforms

Enable PCIe controller and serdes drivers to enable PCIe functionality.
* Enable Cadence serdes phy and wrapper driver.
* Enable Cadence PCIe controller driver.

---
 arch/arm64/configs/defconfig | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
arch/arm64/configs/defconfig +11 -4
index a24609e14d50..ff187dd585c2 100644
@@ -230,9 +230,16 @@ CONFIG_PCIE_HISI_STB=y
 CONFIG_PCIE_TEGRA194_HOST=m
 CONFIG_PCIE_VISCONTI_HOST=y
 CONFIG_PCIE_LAYERSCAPE_GEN4=y
+CONFIG_PCIE_CADENCE=y
+CONFIG_PCIE_CADENCE_HOST=y
+CONFIG_PCIE_CADENCE_EP=y
+CONFIG_PCI_J721E=y
+CONFIG_PCI_J721E_HOST=y
+CONFIG_PCI_J721E_EP=y
 CONFIG_PCI_ENDPOINT=y
 CONFIG_PCI_ENDPOINT_CONFIGFS=y
 CONFIG_PCI_EPF_TEST=m
+CONFIG_PCI_EPF_NTB=m
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_FW_LOADER_USER_HELPER=y
@@ -1330,8 +1337,8 @@ CONFIG_RESET_TI_SCI=y
 CONFIG_PHY_XGENE=y
 CONFIG_PHY_CAN_TRANSCEIVER=m
 CONFIG_PHY_SUN4I_USB=y
-CONFIG_PHY_CADENCE_TORRENT=m
-CONFIG_PHY_CADENCE_SIERRA=m
+CONFIG_PHY_CADENCE_TORRENT=y
+CONFIG_PHY_CADENCE_SIERRA=y
 CONFIG_PHY_MIXEL_MIPI_DPHY=m
 CONFIG_PHY_FSL_IMX8M_PCIE=y
 CONFIG_PHY_HI6220_USB=y
@@ -1363,8 +1370,8 @@ CONFIG_PHY_SAMSUNG_UFS=y
 CONFIG_PHY_UNIPHIER_USB2=y
 CONFIG_PHY_UNIPHIER_USB3=y
 CONFIG_PHY_TEGRA_XUSB=y
-CONFIG_PHY_AM654_SERDES=m
-CONFIG_PHY_J721E_WIZ=m
+CONFIG_PHY_AM654_SERDES=y
+CONFIG_PHY_J721E_WIZ=y
 CONFIG_ARM_CCI_PMU=m
 CONFIG_ARM_CCN=m
 CONFIG_ARM_CMN=m
Signature · 1 line
2.25.1
#1 lore raw
Quoted 3 lines · Achal Verma

Enable PCIe controller and serdes drivers to enable PCIe functionality.
* Enable Cadence serdes phy and wrapper driver.
* Enable Cadence PCIe controller driver.

Why? IOW, which boards needs it?

Quoted 11 lines
---
 arch/arm64/configs/defconfig | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
arch/arm64/configs/defconfig +0 -0
index a24609e14d50..ff187dd585c2 100644

arch/arm64/configs/defconfig CONFIG_PCIE_HISI_STB=y · line 233

Quoted 4 lines
arch/arm64/configs/defconfig +1 -0
@@ -230,9 +230,16 @@ CONFIG_PCIE_HISI_STB=y
 CONFIG_PCIE_TEGRA194_HOST=m
 CONFIG_PCIE_VISCONTI_HOST=y
 CONFIG_PCIE_LAYERSCAPE_GEN4=y
+CONFIG_PCIE_CADENCE=y

=m

arch/arm64/configs/defconfig CONFIG_PCIE_HISI_STB=y · line 236

Quoted 3 lines
arch/arm64/configs/defconfig +3 -0
+CONFIG_PCIE_CADENCE_HOST=y
+CONFIG_PCIE_CADENCE_EP=y
+CONFIG_PCI_J721E=y

=m

Quoted 10 lines
arch/arm64/configs/defconfig +3 -0
+CONFIG_PCI_J721E_HOST=y
+CONFIG_PCI_J721E_EP=y
 CONFIG_PCI_ENDPOINT=y
 CONFIG_PCI_ENDPOINT_CONFIGFS=y
 CONFIG_PCI_EPF_TEST=m
+CONFIG_PCI_EPF_NTB=m
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_FW_LOADER_USER_HELPER=y

arch/arm64/configs/defconfig CONFIG_RESET_TI_SCI=y · line 1341

Quoted 7 lines
arch/arm64/configs/defconfig +2 -2
@@ -1330,8 +1337,8 @@ CONFIG_RESET_TI_SCI=y
 CONFIG_PHY_XGENE=y
 CONFIG_PHY_CAN_TRANSCEIVER=m
 CONFIG_PHY_SUN4I_USB=y
-CONFIG_PHY_CADENCE_TORRENT=m
-CONFIG_PHY_CADENCE_SIERRA=m
+CONFIG_PHY_CADENCE_TORRENT=y
+CONFIG_PHY_CADENCE_SIERRA=y

Why? Commit msg does not explain it.

arch/arm64/configs/defconfig CONFIG_PHY_SAMSUNG_UFS=y · line 1374

Quoted 11 lines
arch/arm64/configs/defconfig +2 -2
 CONFIG_PHY_MIXEL_MIPI_DPHY=m
 CONFIG_PHY_FSL_IMX8M_PCIE=y
 CONFIG_PHY_HI6220_USB=y
@@ -1363,8 +1370,8 @@ CONFIG_PHY_SAMSUNG_UFS=y
 CONFIG_PHY_UNIPHIER_USB2=y
 CONFIG_PHY_UNIPHIER_USB3=y
 CONFIG_PHY_TEGRA_XUSB=y
-CONFIG_PHY_AM654_SERDES=m
-CONFIG_PHY_J721E_WIZ=m
+CONFIG_PHY_AM654_SERDES=y
+CONFIG_PHY_J721E_WIZ=y

Why?

arch/arm64/configs/defconfig CONFIG_PHY_SAMSUNG_UFS=y · line 1377

Quoted 3 lines
arch/arm64/configs/defconfig +0 -0
 CONFIG_ARM_CCI_PMU=m
 CONFIG_ARM_CCN=m
 CONFIG_ARM_CMN=m

Best regards,
Krzysztof

#2 lore raw

Hi Achal,

Quoted 24 lines · Krzysztof Kozlowski
Quoted 3 lines · Achal Verma

Enable PCIe controller and serdes drivers to enable PCIe functionality.
* Enable Cadence serdes phy and wrapper driver.
* Enable Cadence PCIe controller driver.

Why? IOW, which boards needs it?

Quoted 11 lines
---
 arch/arm64/configs/defconfig | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
arch/arm64/configs/defconfig +0 -0
index a24609e14d50..ff187dd585c2 100644

arch/arm64/configs/defconfig CONFIG_PCIE_HISI_STB=y · line 233

Quoted 4 lines
arch/arm64/configs/defconfig +1 -0
@@ -230,9 +230,16 @@ CONFIG_PCIE_HISI_STB=y
 CONFIG_PCIE_TEGRA194_HOST=m
 CONFIG_PCIE_VISCONTI_HOST=y
 CONFIG_PCIE_LAYERSCAPE_GEN4=y
+CONFIG_PCIE_CADENCE=y

=m

Quoted 5 lines

arch/arm64/configs/defconfig CONFIG_PCIE_HISI_STB=y · line 236

Quoted 3 lines
arch/arm64/configs/defconfig +3 -0
+CONFIG_PCIE_CADENCE_HOST=y
+CONFIG_PCIE_CADENCE_EP=y
+CONFIG_PCI_J721E=y

=m

Also, see [0] for history. We really want these to be modules unless its necessary for bootup.

You may want to revive [1] and get it to mainline

[0] https://lore.kernel.org/linux-arm-kernel/CAK8P3a2VSBvOn1o+q1PYZaQ6LS9U4cz+DZGuDbisHkwNs2dAAw@mail.gmail.com/
[1] https://lore.kernel.org/linux-arm-kernel/20230110153805.GA1505901@bhelgaas/

[...]

Signature · 2 lines
Regards
Vignesh
#3 lore raw
Quoted 9 lines · Vignesh Raghavendra

Also, see [0] for history. We really want these to be modules unless its necessary for bootup.

You may want to revive [1] and get it to mainline

[0]
https://lore.kernel.org/linux-arm-kernel/CAK8P3a2VSBvOn1o+q1PYZaQ6LS9U4cz+DZGuDbisHkwNs2dAAw@mail.gmail.com/
[1]
https://lore.kernel.org/linux-arm-kernel/20230110153805.GA1505901@bhelgaas/

Agreed, that seems simple enough. Ideally these should even be removable modules, not just single-load but unremovable.

Doing that may require changes to the cadence PCIe host code if that does not support unloading yet (I have not checked), but should not require any changes to the core PCIe host code that supports loadable/removable modules.

Arnd

#4 lore raw

Hello,

Quoted 15 lines · Arnd Bergmann
Quoted 9 lines · Vignesh Raghavendra

Also, see [0] for history. We really want these to be modules unless its necessary for bootup.

You may want to revive [1] and get it to mainline

[0]
https://lore.kernel.org/linux-arm-kernel/CAK8P3a2VSBvOn1o+q1PYZaQ6LS9U4cz+DZGuDbisHkwNs2dAAw@mail.gmail.com/
[1]
https://lore.kernel.org/linux-arm-kernel/20230110153805.GA1505901@bhelgaas/

Agreed, that seems simple enough. Ideally these should even be removable modules, not just single-load but unremovable.

Quoted 6 lines

Doing that may require changes to the cadence PCIe host code if that does not support unloading yet (I have not checked), but should not require any changes to the core PCIe host code that supports loadable/removable modules.

Arnd

So, my understanding is that following change is expected +CONFIG_PCIE_CADENCE=m +CONFIG_PCIE_CADENCE_HOST=m +CONFIG_PCIE_CADENCE_EP=m
+CONFIG_PCI_J721E=m
+CONFIG_PCI_J721E_HOST=m
+CONFIG_PCI_J721E_EP=m
+CONFIG_PCI_EPF_NTB=m

I also want to inform that pci_j721e.c is a single file with both host and EP functionality, last attempt to build it as modules depending on host or EP selected failed because of symbols dependency. Refactoring of pci_j721e.c into common, host and EP specific files could work similar to the Cadence driver, So I will follow this way and push the changes.

Please let me know if there are concerns.

Thanks,
Achal Verma

#5 lore raw
Quoted 33 lines · Achal

Hello,

Quoted 15 lines · Arnd Bergmann
Quoted 9 lines · Vignesh Raghavendra

Also, see [0] for history. We really want these to be modules unless its necessary for bootup.

You may want to revive [1] and get it to mainline

[0]
https://lore.kernel.org/linux-arm-kernel/CAK8P3a2VSBvOn1o+q1PYZaQ6LS9U4cz+DZGuDbisHkwNs2dAAw@mail.gmail.com/
[1]
https://lore.kernel.org/linux-arm-kernel/20230110153805.GA1505901@bhelgaas/

Agreed, that seems simple enough. Ideally these should even be removable modules, not just single-load but unremovable.

Quoted 6 lines

Doing that may require changes to the cadence PCIe host code if that does not support unloading yet (I have not checked), but should not require any changes to the core PCIe host code that supports loadable/removable modules.

Arnd

So, my understanding is that following change is expected

(quoted diff) +7 -0
+CONFIG_PCIE_CADENCE=m
+CONFIG_PCIE_CADENCE_HOST=m
+CONFIG_PCIE_CADENCE_EP=m
+CONFIG_PCI_J721E=m
+CONFIG_PCI_J721E_HOST=m
+CONFIG_PCI_J721E_EP=m
+CONFIG_PCI_EPF_NTB=m
Quoted 8 lines

I also want to inform that pci_j721e.c is a single file with both host and EP functionality, last attempt to build it as modules depending on host or EP selected failed because of symbols dependency. Refactoring of pci_j721e.c into common, host and EP specific files could work similar to the Cadence driver, So I will follow this way and push the changes.

Please let me know if there are concerns.

Aren't HOST and EP just customizing main module?

Best regards,
Krzysztof

#6 lore raw
Quoted 41 lines · Krzysztof Kozlowski
Quoted 40 lines · Achal

Hello,

Quoted 15 lines · Arnd Bergmann
Quoted 9 lines · Vignesh Raghavendra

Also, see [0] for history. We really want these to be modules unless its necessary for bootup.

You may want to revive [1] and get it to mainline

[0]
https://lore.kernel.org/linux-arm-kernel/CAK8P3a2VSBvOn1o+q1PYZaQ6LS9U4cz+DZGuDbisHkwNs2dAAw@mail.gmail.com/
[1]
https://lore.kernel.org/linux-arm-kernel/20230110153805.GA1505901@bhelgaas/

Agreed, that seems simple enough. Ideally these should even be removable modules, not just single-load but unremovable.

Quoted 6 lines

Doing that may require changes to the cadence PCIe host code if that does not support unloading yet (I have not checked), but should not require any changes to the core PCIe host code that supports loadable/removable modules.

Arnd

So, my understanding is that following change is expected

(quoted diff) +7 -0
+CONFIG_PCIE_CADENCE=m
+CONFIG_PCIE_CADENCE_HOST=m
+CONFIG_PCIE_CADENCE_EP=m
+CONFIG_PCI_J721E=m
+CONFIG_PCI_J721E_HOST=m
+CONFIG_PCI_J721E_EP=m
+CONFIG_PCI_EPF_NTB=m

I also want to inform that pci_j721e.c is a single file with both host and EP functionality, last attempt to build it as modules depending on host or EP selected failed because of symbols dependency. Refactoring of pci_j721e.c into common, host and EP specific files could work similar to the Cadence driver, So I will follow this way and push the changes.

Quoted 3 lines
Quoted 1 line

Please let me know if there are concerns.

Aren't HOST and EP just customizing main module?

Current pci-j721e driver is composed of host specific and endpoint specific code encapsulated in switch case and shared required common code, last attempt of putting endpoint and host specific code inside EP and HOST CONFIGS respectively failed (also reported by kernel test bot) when tried with different combinations of Y/M/N along with CADENCE driver on which pci-j721e depends, So only way is to break main module into common, host and endpoint files.

Quoted 4 lines

Best regards,
Krzysztof