[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6c132018714402d0a46fb8b59c862fb7f96a77f8.camel@collabora.com>
Date: Thu, 10 Jul 2025 11:06:54 -0400
From: Nícolas "F. R. A. Prado" <nfraprado@...labora.com>
To: Louis-Alexis Eyraud <louisalexis.eyraud@...labora.com>, Ryder Lee
<ryder.lee@...iatek.com>, Jianjun Wang <jianjun.wang@...iatek.com>, Lorenzo
Pieralisi <lpieralisi@...nel.org>, Krzysztof Wilczyński
<kwilczynski@...nel.org>, Manivannan Sadhasivam <mani@...nel.org>, Rob
Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>, Philipp
Zabel <p.zabel@...gutronix.de>, Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
Cc: kernel@...labora.com, linux-pci@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] PCI: mediatek-gen3: Assert MAC Reset only for a delay
during PM suspend sequence
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@...labora.com>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@...labora.com>
--
Thanks,
Nícolas
Powered by blists - more mailing lists