[openwrt/openwrt] mediatek: fix broken PCIe caused by update to 5.15.158

LEDE Commits lede-commits at lists.infradead.org
Thu Jun 6 14:14:42 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/3f1b60ad40bb23a21c800e8e3094cf79c4e5b5dd

commit 3f1b60ad40bb23a21c800e8e3094cf79c4e5b5dd
Author: Rany Hany <rany_hany at riseup.net>
AuthorDate: Mon May 6 01:39:58 2024 +0300

    mediatek: fix broken PCIe caused by update to 5.15.158
    
    The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
    makes use of "syscon_regmap_lookup_by_phandle" which requires that
    "syscon" be in the compatible list.
    
    Without this patch, PCIe probe will fail with the following error:
    
    [    1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie at 1a143000 ranges:
    [    1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
    [    1.299901] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
    [    1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
    [    1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22
    
    Fixes: 01c58a0d2a ("kernel: bump 5.15 to 5.15.158")
    Signed-off-by: Rany Hany <rany_hany at riseup.net>
    (cherry picked from commit 8607372b410fbb24b08de97ff5941341d0870d6f)
---
 .../710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch     | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch b/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
index 18691c5595..c73883494e 100644
--- a/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
+++ b/target/linux/mediatek/patches-5.10/710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch
@@ -44,6 +44,15 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  		slot1: pcie at 1,0 {
  			reg = <0x0800 0 0 0 0>;
+@@ -930,7 +936,7 @@
+ 	};
+ 
+ 	hifsys: clock-controller at 1af00000 {
+-		compatible = "mediatek,mt7622-hifsys";
++		compatible = "mediatek,mt7622-hifsys", "syscon";
+ 		reg = <0 0x1af00000 0 0x70>;
+ 		#clock-cells = <1>;
+ 	};
 --- a/drivers/pci/controller/pcie-mediatek.c
 +++ b/drivers/pci/controller/pcie-mediatek.c
 @@ -20,6 +20,7 @@




More information about the lede-commits mailing list