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

Caleb James DeLisle cjd at cjdns.fr
Wed May 13 14:39:25 PDT 2026


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.
> s/re-training/retraining/
OK
>
>> + * @MTK_PCIE_RETRAIN: Re-train link to bridge after startup because some
>> + *                    Gen2-capable devices start as Gen1.
> s/Re-train/Retrain/ to make this consistent and more greppable.
> Also more instances below.
OK
>
>> + * as Gen1, and must be re-trained once after initial configuration in order to
>> + * only Gen1 capable. Therefore it is most convenient to re-train every port
>> +	return dev_err_probe(dev, ret, "root bridge not found\n");
> "Root bridge" is not a term used by the specs, but in common usage it
> refers to the host bridge, i.e., the RC.  In this case, you didn't
> find a "Root Port".
OK Thanks
>
>> +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.

What's your preference?

Thanks,

Caleb




More information about the Linux-mediatek mailing list