Re: [PATCH v6 2/2] PCI: mediatek: Add support for EcoNet EN7528 SoC
From: Caleb James DeLisle
Date: Wed May 13 2026 - 17:39:54 EST
On 13/05/2026 23:07, Bjorn Helgaas wrote:
On Wed, May 13, 2026 at 07:16:52PM +0000, Caleb James DeLisle wrote:OK
Add support for the PCIe present on the EcoNet EN7528 (and EN751221) SoCs.s/re-training/retraining/
These SoCs have a mix of Gen1 and Gen2 capable ports, but the Gen2 ports
require re-training after startup.
OK
+ * @MTK_PCIE_RETRAIN: Re-train link to bridge after startup because somes/Re-train/Retrain/ to make this consistent and more greppable.
+ * Gen2-capable devices start as Gen1.
Also more instances below.
OK Thanks
+ * as Gen1, and must be re-trained once after initial configuration in order to"Root bridge" is not a term used by the specs, but in common usage it
+ * only Gen1 capable. Therefore it is most convenient to re-train every port
+ return dev_err_probe(dev, ret, "root bridge not found\n");
refers to the host bridge, i.e., the RC. In this case, you didn't
find a "Root Port".
+found_port:I suppose this will cause a warning even in cases where Gen2 is
+ 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");
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