[PATCH] PCI: mediatek-gen3: Assert MAC Reset only for a delay during PM suspend sequence
Nícolas F. R. A. Prado
nfraprado at collabora.com
Thu Jul 10 08:06:54 PDT 2025
On Wed, 2025-07-09 at 17:42 +0200, Louis-Alexis Eyraud wrote:
> In the pcie-mediatek-gen3 driver, the PM suspend callback function
> powers down the PCIE link to stop the clocks and PHY and also assert
> the MAC and PHY resets.
>
> On MT8195 SoC, asserting the MAC reset for PCIe port 0 during suspend
> sequence and letting it asserted leads the system to hang during
> resume
> sequence because the PCIE link remains down after powering it up:
> ```
> mtk-pcie-gen3 112f0000.pcie: PCIe link down, current LTSSM state:
> detect.quiet (0x0)
> mtk-pcie-gen3 112f0000.pcie: PM: dpm_run_callback():
> genpd_resume_noirq
> returns -110
> mtk-pcie-gen3 112f0000.pcie: PM: failed to resume noirq: error -110
> ```
> Deasserting it before suspend sequence is completed, allows the
> system
> to resume properly.
>
> So, add in the mtk_pcie_power_down function a flag parameter to say
> if the
> device is being suspended and in this case, make the MAC reset be
> deasserted after PCIE_MTK_RESET_TIME_US (=10us) delay.
>
> Fixes: d537dc125f07 ("PCI: mediatek-gen3: Add system PM support")
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud at collabora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
--
Thanks,
Nícolas
More information about the linux-arm-kernel
mailing list