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

Bjorn Helgaas helgaas at kernel.org
Wed May 13 15:06:10 PDT 2026


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()?



More information about the Linux-mediatek mailing list