]> git.ipfire.org Git - thirdparty/openwrt.git/commit
airoha: fix PERST deassert in PCIe driver
authorKenneth Kasilag <kenneth@kasilag.me>
Mon, 6 Apr 2026 23:04:38 +0000 (23:04 +0000)
committerJonas Jelonek <jelonek.jonas@gmail.com>
Wed, 3 Jun 2026 07:06:33 +0000 (09:06 +0200)
commit298db2f5a7cf396eea5e713b38634cbe52253dd9
treee763c5ee99d6a996418a987c3b6c4ddfb1f2282a
parent41207cd72e0c1eeac7c1b40f1ab555782834471c
airoha: fix PERST deassert in PCIe driver

Due to hardware bugs, the PCIE Gen3 IP in Airoha AN7581 requires a
special reset procedure:
> MAC reset asserted thru the SCU block
> PERST asserted thru the SCU for the desired PCIE lane
> PHY initialization runs, clocks enabled
> MAC reset deasserted
> EQ config (if needed) written
> PERST deasserted

The existing code currently toggles PERST for all three PCIE
ports every time mtk_pcie_en7581_power_up is called, resulting
in PCIE link down issues.

This issue was discovered during porting of the 6.18 kernel to
AN7581. It is not entirely clear how the hardware seemed to
function under kernel 6.12 with similar driver code, it is
presumed that differences in assert/deassert times for PERST in
6.18 changed which exposed the bug.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/21019
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
target/linux/airoha/patches-6.18/913-pcie-mediatek-gen3-fix-x2-mode-PERST-deassert.patch [new file with mode: 0644]