R6220 ” Could not find PHY for device ‘radio0’” mt76x2 .. issue continues

I am re-opening this topic. R6220 "Could not find PHY for device 'radio'" mt76x2

After 2 months of uptime, I had a need to update the dns entries. Have changed the same post which ksoftirq was occupying high CPU. To mitigate this manually rebooted the router.

After the reboot I lost the 2.4G wifi card and still trying to get it back. The error is same as the original post. Steps I have tried so far.

  1. checked the 11g entry on radio0 in /etc/config/wireless
  2. Power cycled the router physically
  3. Restored previous config backup
  4. Reset the router configuration
  5. Re-installed OpenWrt 20.02.1

None of the above steps helped. Any suggestions to retrieve the 2.4G interface?

UPDATE:- Clean flashed 20.02.0 and the 2.4G card got detected. After configuring the same through LuCI and reboot, it disappeared again. The difference between dmesg while the card was detected and not is as below.

While 2.4G Interface is detected:

root@OpenWrt:~# dmesg | grep pci
[    2.348338] mt7621-pci 1e140000.pcie: Parsing DT failed
[    2.571054] rt2880-pinmux pinctrl: pcie is already enabled
[    2.582174] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    2.597121] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    2.711666] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    2.722785] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    2.833611] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
[    2.847483] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    2.857204] mt7621-pci 1e140000.pcie: PCIE2 enabled
[    2.866933] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    2.885663] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    2.898348] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    2.912053] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.925755] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.936727] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    2.948730] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    2.961225] pci 0000:00:00.0: reg 0x14: [mem 0x60200000-0x6020ffff]
[    2.973787] pci 0000:00:00.0: supports D1
[    2.981777] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    2.993651] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    3.005670] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    3.018166] pci 0000:00:01.0: reg 0x14: [mem 0x60410000-0x6041ffff]
[    3.030712] pci 0000:00:01.0: supports D1
[    3.038702] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    3.051807] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    3.063851] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    3.077427] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    3.090880] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    3.104526] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    3.114946] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    3.127091] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    3.140627] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    3.155022] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.168449] pci 0000:02:00.0: [14c3:7603] type 00 class 0x028000
[    3.180477] pci 0000:02:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    3.193102] pci 0000:02:00.0: PME# supported from D0 D3hot D3cold
[    3.206698] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    3.217131] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    3.229276] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    3.242804] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff pref]
[    3.257203] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    3.270429] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    3.283614] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    3.297493] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    3.310672] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    3.324551] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    3.338082] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    3.352480] pci 0000:00:01.0: BAR 8: assigned [mem 0x60200000-0x602fffff]
[    3.366010] pci 0000:00:01.0: BAR 9: assigned [mem 0x60300000-0x603fffff pref]
[    3.380414] pci 0000:00:00.0: BAR 1: assigned [mem 0x60400000-0x6040ffff]
[    3.393949] pci 0000:00:01.0: BAR 1: assigned [mem 0x60410000-0x6041ffff]
[    3.407480] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    3.421014] pci 0000:00:01.0: BAR 7: assigned [io  0x1e161000-0x1e161fff]
[    3.434551] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    3.449132] pci 0000:01:00.0: BAR 6: assigned [mem 0x60100000-0x6010ffff pref]
[    3.463524] pci 0000:00:00.0: PCI bridge to [bus 01]
[    3.473422] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    3.486956] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    3.500487] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    3.514886] pci 0000:02:00.0: BAR 0: assigned [mem 0x60200000-0x602fffff]
[    3.528419] pci 0000:00:01.0: PCI bridge to [bus 02]
[    3.538313] pci 0000:00:01.0:   bridge window [io  0x1e161000-0x1e161fff]
[    3.551841] pci 0000:00:01.0:   bridge window [mem 0x60200000-0x602fffff]
[    3.565372] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff pref]
[   13.852321] mt7621-pci 1e140000.pcie: bus=2 slot=1 irq=21
[   13.863129] pci 0000:00:01.0: enabling device (0006 -> 0007)
[   14.517388] mt7603e 0000:02:00.0: Firmware Version: ap_pcie
[   14.777849] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=19
[   14.788705] pci 0000:00:00.0: enabling device (0006 -> 0007)

While the 2.4G Interface is not detected.

root@bkj-gateway:~# dmesg | grep pci
[    2.349235] mt7621-pci 1e140000.pcie: Parsing DT failed
[    2.571741] rt2880-pinmux pinctrl: pcie is already enabled
[    2.582827] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    2.597781] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    2.712327] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    2.723446] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    2.834271] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
[    2.848139] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    2.862020] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    2.871744] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    2.890462] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    2.903148] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    2.916853] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.930553] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.941527] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    2.953529] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    2.966029] pci 0000:00:00.0: reg 0x14: [mem 0x60400000-0x6040ffff]
[    2.978586] pci 0000:00:00.0: supports D1
[    2.986578] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    2.999755] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    3.011800] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    3.025369] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    3.038827] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    3.052444] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    3.062876] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    3.075027] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    3.088555] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    3.102955] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.116180] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    3.129364] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    3.143240] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    3.156774] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    3.171168] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    3.184711] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    3.198248] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    3.212829] pci 0000:01:00.0: BAR 6: assigned [mem 0x60100000-0x6010ffff pref]
[    3.227220] pci 0000:00:00.0: PCI bridge to [bus 01]
[    3.237119] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    3.250647] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    3.264174] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[   13.574330] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=19
[   13.585184] pci 0000:00:00.0: enabling device (0006 -> 0007)

[ 2.857204] mt7621-pci 1e140000.pcie: PCIE2 enabled this interface is not getting enabled when the 2.4G card disappears.

You might try @borromini's suggestion in the prior thread...

2 Likes

This is the first time I am trying to patch OpenWrt, so please bear with me if I am making silly errors.

I have setup a Ubuntu machine on Oracle VM and cloned the git. When I tried applying the diff patch am getting below error.

prakash@prakash-vm:~/openwrt$ cat mt76x2.diff
diff --git a/target/linux/ramips/dts/mt7621_netgear_r6220.dts b/target/linux/ramips/dts/mt7621_netgear_r6220.dts
index 54489243b8..a12009d298 100644
--- a/target/linux/ramips/dts/mt7621_netgear_r6220.dts
+++ b/target/linux/ramips/dts/mt7621_netgear_r6220.dts
@@ -55,6 +55,13 @@
        };
 };

+&pcie {
+       status = "okay";
+
+       reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
+                     <&gpio 8 GPIO_ACTIVE_LOW>;
+}
+
 &gmac0 {
        nvmem-cells = <&macaddr_factory_4>;
        nvmem-cell-names = "mac-address";
prakash@prakash-vm:~/openwrt$
prakash@prakash-vm:~/openwrt$ git apply mt76x2.diff
error: patch failed: target/linux/ramips/dts/mt7621_netgear_r6220.dts:55
error: target/linux/ramips/dts/mt7621_netgear_r6220.dts: patch does not apply

UPDATE: I have manually appended the 7 lines to target/linux/ramips/dts/mt7621_netgear_r6220.dts and compiled the firmware from image builder. Tried with both GPIO 7 and 8, but the issue remains the same.

Any help here ?

Thanks @borromini, @anon89577378 I think the issue is resolved now. It was a missing ";" at the end.

Below is the entry/patch which works in the file mt7621_netgear_r6220.dts


&pcie {
        status = "okay";

        reset-gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
                      <&gpio 8 GPIO_ACTIVE_LOW>;
};

1 Like

We might need to send it in for 21.02 then. I'll whip up a proper patch.

1 Like

Hello.

I just upgrate my R6220 to version 21.02.1 and the problem persist:

Fri Feb 11 15:28:24 2022 daemon.info dnsmasq[6868]: read /etc/hosts - 4 addresses
Fri Feb 11 15:28:24 2022 daemon.info dnsmasq[6868]: read /tmp/hosts/odhcpd - 2 addresses
Fri Feb 11 15:28:24 2022 daemon.info dnsmasq[6868]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Fri Feb 11 15:28:24 2022 daemon.info dnsmasq-dhcp[6868]: read /etc/ethers - 0 addresses
Fri Feb 11 15:28:30 2022 user.info : luci: accepted login on /admin/network/network for root from 192.168.1.208
Fri Feb 11 15:29:26 2022 daemon.notice netifd: radio0 (8547): Could not find PHY for device 'radio0'
Fri Feb 11 15:29:26 2022 daemon.notice netifd: Wireless device 'radio0' set retry=0
Fri Feb 11 15:29:26 2022 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Fri Feb 11 15:29:26 2022 daemon.notice netifd: radio0 (8562): WARNING: Variable 'data' does not exist or is not an array/object
Fri Feb 11 15:29:26 2022 daemon.notice netifd: radio0 (8562): Bug: PHY is undefined for device 'radio0'
Fri Feb 11 15:29:26 2022 daemon.notice netifd: Wireless device 'radio0' is now down
Fri Feb 11 15:30:55 2022 daemon.notice netifd: radio0 (8855): Could not find PHY for device 'radio0'
Fri Feb 11 15:30:55 2022 daemon.notice netifd: Wireless device 'radio0' set retry=0
Fri Feb 11 15:30:55 2022 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Fri Feb 11 15:30:55 2022 daemon.notice netifd: radio0 (8873): WARNING: Variable 'data' does not exist or is not an array/object
Fri Feb 11 15:30:55 2022 daemon.notice netifd: radio0 (8873): Bug: PHY is undefined for device 'radio0'
Fri Feb 11 15:30:55 2022 daemon.notice netifd: Wireless device 'radio0' is now down
Fri Feb 11 15:31:15 2022 daemon.notice netifd: radio0 (8963): Could not find PHY for device 'radio0'
Fri Feb 11 15:31:15 2022 daemon.notice netifd: Wireless device 'radio0' set retry=0
Fri Feb 11 15:31:15 2022 daemon.crit netifd: Wireless device 'radio0' setup failed, retry=0
Fri Feb 11 15:31:15 2022 daemon.notice netifd: radio0 (8981): WARNING: Variable 'data' does not exist or is not an array/object
Fri Feb 11 15:31:15 2022 daemon.notice netifd: radio0 (8981): Bug: PHY is undefined for device 'radio0'
Fri Feb 11 15:31:15 2022 daemon.notice netifd: Wireless device 'radio0' is now down


Where is this fix to be applied, pls?

You need to build your own image, I went through image builder path and added the entries to target/linux/ramips/dts/mt7621_netgear_r6220.dts file before creating the image.

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.