Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2969 - ramips/mt7621: hang up while booting if pcie0 is not connected #7805

Closed
openwrt-bot opened this issue Apr 5, 2020 · 2 comments
Closed
Labels

Comments

@openwrt-bot
Copy link

musashino205:

  • Problem: MT7621 device hang up while booting if pcie0 is not connected
  • Software versions: master, 95bd6a0
  • Steps: write firmware of above version and boot

I tried the self compiled firmware with latest source on I-O DATA WN-AX1167GR2. But the kernel hangs up while booting after the pcie related messages.
This problem didn't occur on other models using pcie0 (WSR-2533DHPL, etc). I haven't checked it yet, it may happen in WN-DX1167R as well.

[ 0.000000] Linux version 5.4.28 (musashino205@Taiha.Net) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r0+12840-8cc9839c92)) #0 SMP Sun Apr 5 06:16:37 2020
[ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[ 0.000000] MIPS: machine is I-O DATA WN-AX1167GR2
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] VPE topology {2,2} total 4
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[ 0.000000] percpu: Embedded 14 pages/cpu s26672 r8192 d22480 u57344
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32480
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Writing ErrCtl register=0000c001
[ 0.000000] Readback ErrCtl register=0000c001
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 116048K/131072K available (5549K kernel code, 203K rwdata, 1208K rodata, 6276K init, 229K bss, 15024K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] NR_IRQS: 256
[ 0.000000] random: get_random_bytes called from start_kernel+0x340/0x554 with crng_init=0
[ 0.000000] CPU Clock: 880MHz
[ 0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[ 0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[ 0.015481] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[ 0.055821] pid_max: default: 32768 minimum: 301
[ 0.065157] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.079561] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.097479] rcu: Hierarchical SRCU implementation.
[ 0.107535] smp: Bringing up secondary CPUs ...
[ 0.129503] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.129513] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.129525] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.129622] CPU1 revision is: 0001992f (MIPS 1004Kc)
[ 0.144677] Synchronize counters for CPU 1: done.
[ 0.220318] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.220327] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.220334] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.220391] CPU2 revision is: 0001992f (MIPS 1004Kc)
[ 0.243144] Synchronize counters for CPU 2: done.
[ 0.315731] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.315739] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.315747] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.315804] CPU3 revision is: 0001992f (MIPS 1004Kc)
[ 0.330748] Synchronize counters for CPU 3: done.
[ 0.390348] smp: Brought up 1 node, 4 CPUs
[ 0.402614] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.421919] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.435859] pinctrl core: initialized pinctrl subsystem
[ 0.447624] NET: Registered protocol family 16
[ 0.486592] clocksource: Switched to clocksource GIC
[ 0.496979] random: fast init done
[ 0.497538] NET: Registered protocol family 2
[ 0.513019] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.529544] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.544733] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.558748] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.571462] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.584347] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.598393] NET: Registered protocol family 1
[ 0.606966] PCI: CLS 0 bytes, default 32
[ 6.742558] 4 CPUs re-calibrate udelay(lpj = 1163264)
[ 6.754161] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[ 6.778244] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 6.789727] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 6.811882] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 6.823219] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 6.834457] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 6.846298] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[ 6.860280] printk: console [ttyS0] disabled
[ 6.868715] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[ 6.886659] printk: console [ttyS0] enabled
[ 6.886659] printk: console [ttyS0] enabled
[ 6.903203] printk: bootconsole [early0] disabled
[ 6.903203] printk: bootconsole [early0] disabled
[ 6.924134] mt7621-nand 1e003000.nand: Using programmed access timing: 31c07388
[ 6.938978] nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
[ 6.951627] nand: AMD/Spansion S34ML01G2
[ 6.959432] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 6.974505] mt7621-nand 1e003000.nand: ECC strength adjusted to 4 bits
[ 6.987534] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[ 7.002087] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[ 7.016642] Scanning device for bad blocks
[ 9.001152] 11 fixed-partitions partitions found on MTD device mt7621-nand
[ 9.014845] Creating 11 MTD partitions on "mt7621-nand":
[ 9.025428] 0x000000000000-0x000000100000 : "u-boot"
[ 9.036590] 0x000000100000-0x000000200000 : "u-boot-env"
[ 9.048276] 0x000000200000-0x000000300000 : "factory"
[ 9.059423] 0x000000300000-0x000000400000 : "SecondBoot"
[ 9.071150] 0x000000400000-0x000000800000 : "kernel"
[ 9.082131] 0x000000800000-0x000003600000 : "ubi"
[ 9.092822] 0x000003600000-0x000003700000 : "Config"
[ 9.103819] 0x000003700000-0x000006900000 : "firmware_2"
[ 9.115780] 0x000006900000-0x000006a00000 : "Config_2"
[ 9.127170] 0x000006a00000-0x000006b00000 : "persist"
[ 9.138320] 0x000006b00000-0x000007f80000 : "Backup"
[ 9.150162] libphy: Fixed MDIO Bus: probed
[ 9.184958] libphy: mdio: probed
[ 9.191648] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 9.205602] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 20
[ 9.224369] mt7621-pci 1e140000.pcie: Parsing DT failed
[ 9.237170] NET: Registered protocol family 10
[ 9.247693] Segment Routing with IPv6
[ 9.255116] NET: Registered protocol family 17
[ 9.264287] 8021q: 802.1Q VLAN Support v1.8
[ 9.274325] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 10.075087] libphy: dsa slave smi: probed
[ 10.094612] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[ 10.122622] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[ 10.150618] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[ 10.178625] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[ 10.206624] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[ 10.270566] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[ 10.894561] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[ 10.978593] DSA: tree 0 setup
[ 10.984829] rt2880-pinmux pinctrl: pcie is already enabled
[ 10.995766] mt7621-pci 1e140000.pcie: Error applying setting, reverse things back
[ 11.010801] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[ 11.025679] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[ 11.140078] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[ 11.151191] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[ 11.261887] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)

I tried to disable pcie0 in the device dts, then, the kernel boot up but the MT7615D chip connected to pcie1 isn't detected.

$ git diff HEAD diff --git a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr2.dts b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr2.dts index 251caf4250..46973a5257 100644 --- a/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr2.dts +++ b/target/linux/ramips/dts/mt7621_iodata_wn-ax1167gr2.dts @@ -16,6 +16,10 @@ }; };

+&pcie0 {

  •   status = "disabled";
    

+};
+
&pcie1 {
wifi@0,0 {
compatible = "mediatek,mt76";


[ 11.000733] mt7621-pci 1e140000.pcie: Error applying setting, reverse things back
[ 11.015843] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[ 11.130454] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[ 11.241369] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
[ 11.255240] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[ 11.269118] mt7621-pci 1e140000.pcie: Nothing is connected in virtual bridges. Exiting...

In old revision (3ec7005) with kernel 4.14, there is no problem.

[ 0.579260] pull PCIe RST: RALINK_RSTCTRL = 0 [ 0.888232] release PCIe RST: RALINK_RSTCTRL = 7000000 [ 0.898296] ***** Xtal 40MHz ***** [ 0.905030] release PCIe RST: RALINK_RSTCTRL = 7000000 [ 0.915236] Port 0 N_FTS = 1b102800 [ 0.922135] Port 1 N_FTS = 1b102800 [ 0.929060] Port 2 N_FTS = 1b102800 [ 2.087472] PCIE0 no card, disable it(RST&CLK) [ 2.096162] PCIE2 no card, disable it(RST&CLK) [ 2.104963] -> 20107f2 [ 2.109813] PCIE1 enabled [ 2.114992] PCI host bridge /pcie@1e140000 ranges: [ 2.124519] MEM 0x0000000060000000..0x000000006fffffff [ 2.134873] IO 0x000000001e160000..0x000000001e16ffff [ 2.145243] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000 [ 2.168504] mt7621_gpio 1e000600.gpio: registering 32 gpios [ 2.179800] mt7621_gpio 1e000600.gpio: registering 32 gpios [ 2.191063] mt7621_gpio 1e000600.gpio: registering 32 gpios [ 2.203751] PCI host bridge to bus 0000:00 [ 2.211762] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] [ 2.225441] pci_bus 0000:00: root bus resource [io 0xffffffff] [ 2.237170] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0] [ 2.250658] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff] [ 2.266803] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 2.283185] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000] [ 2.296226] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000] [ 2.310040] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff] [ 2.323508] pci 0000:00:00.0: BAR 1: assigned [mem 0x60100000-0x6010ffff] [ 2.337000] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit] [ 2.351512] pci 0000:00:00.0: PCI bridge to [bus 01] [ 2.361328] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
@openwrt-bot
Copy link
Author

cliobrando:

I can replicate the same behavior using the latest master and a ZBT we1326.

@openwrt-bot
Copy link
Author

musashino205:

This issue was fixed by he commit 51c6b14.
WN-AX1167GR2 boots up normally after this commit.

[ 10.997594] rt2880-pinmux pinctrl: pcie is already enabled
[ 11.008545] mt7621-pci 1e140000.pcie: Error applying setting, reverse things back
[ 11.023591] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[ 11.038523] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[ 11.153072] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[ 11.164195] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[ 11.274998] mt7621-pci 1e140000.pcie: pcie0 no card, disable it (RST & CLK)
[ 11.288871] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[ 11.302743] mt7621-pci 1e140000.pcie: PCIE1 enabled
[ 11.312476] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[ 11.331194] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[ 11.343882] pci_bus 0000:00: root bus resource [io 0x1e160000-0x1e16ffff]
[ 11.357584] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[ 11.371293] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 11.382267] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[ 11.394269] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[ 11.406765] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[ 11.419349] pci 0000:00:00.0: supports D1
[ 11.427358] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 11.440184] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 11.456341] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[ 11.468368] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[ 11.482061] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[ 11.510800] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 11.521238] pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
[ 11.533386] pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff]
[ 11.546915] pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref]
[ 11.561317] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 11.574546] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 11.587733] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 11.601611] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[ 11.615145] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[ 11.629550] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[ 11.643085] pci 0000:00:00.0: BAR 7: assigned [io 0x1e160000-0x1e160fff]
[ 11.656626] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[ 11.671203] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 11.681104] pci 0000:00:00.0: bridge window [io 0x1e160000-0x1e160fff]
[ 11.694634] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
[ 11.708174] pci 0000:00:00.0: bridge window [mem 0x60100000-0x601fffff pref]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant