Re: [PATCH v6 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC

From: Caleb James DeLisle

Date: Wed May 13 2026 - 18:18:18 EST



On 14/05/2026 00:06, Bjorn Helgaas wrote:
On Wed, May 13, 2026 at 11:39:25PM +0200, Caleb James DeLisle wrote:
On 13/05/2026 23:07, Bjorn Helgaas wrote:
On Wed, May 13, 2026 at 07:16:52PM +0000, Caleb James DeLisle wrote:
Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.

These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports
require re-training after startup.
+found_port:
+ if (!IS_BUILTIN(CONFIG_PCIE_MEDIATEK)) {
+ /* Let it go because the device will work as Gen1 */
+ dev_warn(dev, "module must be built-in to retrain to Gen2\n");
I suppose this will cause a warning even in cases where Gen2 is
impossible, e.g., the endpoint only supports Gen1?
Correct indeed.

I imagine in most cases, if the port is Gen1 only then board integrator uses
a Gen1 card as well, so I could try being fancy and probe the card to see if
it supports Gen2. In OpenWrt the PCI driver is always built-in so I didn't
really consider this something to worry about.
Probing the downstream device sounds like overkill because it hasn't
been enumerated yet and there's no good place to check after it is
enumerated. I would consider just logging one message as "info"
instead of "warn", maybe in mtk_pcie_startup_port_en7528()?


Works for me, worth noting if anybody adds a startup for another device which has this quirk, they'll also need to copy the log line - but it's highly likely that no other such device exists, and duplicating 3 lines of code is not the end of the world.


Thanks,

Caleb