OpenWrt Forum Archive

Topic: MT7620A + QCA8337 - how do I combine the two?

The content of this topic has been archived on 29 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello everyone,

I seem to be stuck at trying to create a working OpenWRT firmware for a board that is based on the MT7620A but uses a QCA8337 (Atheros) switch. I have no clue how to modify one of the MT7620A DTS files to make it attach to and use the QCA8337 switch.

The only config that boots is the MT7620A + MT7530 - that sees the USB ports and GPIOs but doesn't appear to be able to ping or do anything useful with the Ethernet ports.

Can anyone give me a hand with this? This board appears to be rather unique, I couldn't find any supported boards that used the MT7620A but an Atheros (QCA8337) switch.

Boot log is attached if it helps. Thank you!
Razvan

Starting kernel ...                                                             
                                                                                
[    0.000000] Linux version 3.18.14 (root@razubuntu) (gcc version 4.8.3 (OpenW5
[    0.000000] Board has DDR2                                                   
[    0.000000] Analog PMU set to hw control                                     
[    0.000000] Digital PMU set to hw control                                    
[    0.000000] SoC Type: Ralink MT7620A ver:2 eco:6                             
[    0.000000] bootconsole [early0] enabled                                     
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)                          
[    0.000000] MIPS: machine is Ralink MT7620a + MT7530 evaluation board        
[    0.000000] Determined physical RAM map:                                     
[    0.000000]  memory: 04000000 @ 00000000 (usable)                            
[    0.000000] Initrd not found or empty - disabling initrd                     
[    0.000000] Zone ranges:                                                     
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]                           
[    0.000000] Movable zone start for each node                                 
[    0.000000] Early memory node ranges                                         
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]                          
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]                 
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.  
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bys
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa6
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jff2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)              
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)    
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)     
[    0.000000] Writing ErrCtl register=0007e000                                 
[    0.000000] Readback ErrCtl register=0007e000                                
[    0.000000] Memory: 61360K/65536K available (2527K kernel code, 124K rwdata,)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1       
[    0.000000] NR_IRQS:256                                                      
[    0.000000] CPU Clock: 580MHz                                                
[    0.000000] systick: running - mult: 214748, shift: 32                       
[    0.010000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)          
[    0.070000] pid_max: default: 32768 minimum: 301                             
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)      
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) 
[    0.090000] pinctrl core: initialized pinctrl subsystem                      
[    0.100000] NET: Registered protocol family 16                               
[    0.430000] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)     
[    0.440000] mt7620-pci: probe of 10140000.pcie failed with error -1          
[    0.460000] rt2880_gpio 10000600.gpio: registering 24 gpios                  
[    0.470000] rt2880_gpio 10000600.gpio: registering 24 irq handlers           
[    0.480000] rt2880_gpio 10000638.gpio: registering 16 gpios                  
[    0.490000] rt2880_gpio 10000638.gpio: registering 16 irq handlers           
[    0.500000] rt2880_gpio 10000660.gpio: registering 32 gpios                  
[    0.510000] rt2880_gpio 10000660.gpio: registering 32 irq handlers           
[    0.520000] rt2880_gpio 10000688.gpio: registering 1 gpios                   
[    0.530000] rt2880_gpio 10000688.gpio: registering 1 irq handlers            
[    0.540000] Switched to clocksource systick                                  
[    0.550000] NET: Registered protocol family 2                                
[    0.550000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)  
[    0.570000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)         
[    0.580000] TCP: Hash tables configured (established 1024 bind 1024)         
[    0.590000] TCP: reno registered                                             
[    0.600000] UDP hash table entries: 256 (order: 0, 4096 bytes)               
[    0.610000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)          
[    0.620000] NET: Registered protocol family 1                                
[    0.630000] rt-timer 10000100.timer: maximum frequency is 2441Hz             
[    0.650000] futex hash table entries: 256 (order: -1, 3072 bytes)            
[    0.680000] squashfs: version 4.0 (2009/01/31) Phillip Lougher               
[    0.690000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORI.
[    0.710000] msgmni has been set to 119                                       
[    0.720000] io scheduler noop registered                                     
[    0.720000] io scheduler deadline registered (default)                       
[    0.740000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[147]           
[    0.750000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[161]           
[    0.760000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled         
[    0.770000] console [ttyS0] disabled                                         
[    0.780000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baudA
[    0.800000] console [ttyS0] enabled                                          
[    0.800000] console [ttyS0] enabled                                          
[    0.800000] bootconsole [early0] disabled                                    
[    0.800000] bootconsole [early0] disabled                                    
[    0.800000] m25p80 spi32766.0: found w25q128, expected s25fl064k             
[    0.800000] m25p80 spi32766.0: w25q128 (16384 Kbytes)                        
[    0.800000] 4 ofpart partitions found on MTD device spi32766.0               
[    0.800000] Creating 4 MTD partitions on "spi32766.0":                       
[    0.800000] 0x000000000000-0x000000030000 : "u-boot"                         
[    0.800000] 0x000000030000-0x000000040000 : "u-boot-env"                     
[    0.800000] 0x000000040000-0x000000050000 : "factory"                        
[    0.800000] 0x000000050000-0x000000800000 : "firmware"                       
[    0.800000] 2 uimage-fw partitions found on MTD device firmware              
[    0.800000] 0x000000050000-0x000000167816 : "kernel"                         
[    0.800000] 0x000000167816-0x000000800000 : "rootfs"                         
[    0.800000] mtd: device 5 (rootfs) set to be root filesystem                 
[    0.800000] 1 squashfs-split partitions found on MTD device rootfs           
[    0.800000] 0x000000340000-0x000000800000 : "rootfs_data"                    
[    0.800000] rt2880-pinmux pinctrl: pin io60 already requested by pinctrl; cat
[    0.800000] rt2880-pinmux pinctrl: pin-60 (10100000.ethernet) status -22     
[    0.800000] rt2880-pinmux pinctrl: could not request pin 60 (io60) from groux
[    0.800000] ralink_soc_eth 10100000.ethernet: Error applying setting, reversk
[    1.120000] ralink_soc_eth 10100000.ethernet: generated random MAC address ca
[    1.140000] libphy: mdio: probed                                             
[    1.150000] ralink_soc_eth 10100000.ethernet: using fixed link parameters    
[    1.170000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver           
[    1.190000] ralink_soc_eth 10100000.ethernet: fixing up MHWTRAP register - bt
[    1.210000] ralink_soc_eth 10100000.ethernet: loaded mt7530 driver           
[    1.220000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq5
[    1.240000] rt2880_wdt 10000120.watchdog: Initialized                        
[    1.250000] TCP: cubic registered                                            
[    1.260000] NET: Registered protocol family 17                               
[    1.270000] bridge: automatic filtering via arp/ip/ip6tables has been deprec.
[    1.290000] 8021q: 802.1Q VLAN Support v1.8                                  
[    1.320000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5. 
[    1.330000] Freeing unused kernel memory: 148K (8031b000 - 80340000)         
[    3.780000] init: Console is alive                                           
[    3.790000] init: - watchdog -                                               
[    6.030000] usbcore: registered new interface driver usbfs                   
[    6.030000] usbcore: registered new interface driver hub                     
[    6.030000] usbcore: registered new device driver usb                        
[    6.030000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver       
[    6.030000] ehci-platform: EHCI generic platform driver                      
[    6.030000] phy phy-usbphy.0: remote usb device wakeup disabled              
[    6.350000] phy phy-usbphy.0: UTMI 16bit 30MHz                               
[    6.360000] ehci-platform 101c0000.ehci: EHCI Host Controller                
[    6.370000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bu1
[    6.380000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000           
[    6.420000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00          
[    6.430000] hub 1-0:1.0: USB hub found                                       
[    6.440000] hub 1-0:1.0: 1 port detected                                     
[    6.450000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver           
[    6.460000] ohci-platform: OHCI generic platform driver                      
[    6.470000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller    
[    6.490000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bu2
[    6.500000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000           
[    6.570000] hub 2-0:1.0: USB hub found                                       
[    6.580000] hub 2-0:1.0: 1 port detected                                     
[    6.760000] usb 1-1: new high-speed USB device number 2 using ehci-platform  
[    6.920000] hub 1-1:1.0: USB hub found                                       
[    6.930000] hub 1-1:1.0: 4 ports detected                                    
[    7.220000] usb 1-1.3: new high-speed USB device number 3 using ehci-platform
[    7.340000] hub 1-1.3:1.0: USB hub found                                     
[    7.340000] hub 1-1.3:1.0: 4 ports detected                                  
[    7.650000] init: - preinit -                                                
[    8.270000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/)
[    8.290000] 8021q: adding VLAN 0 to HW filter on device eth0                 
[    8.350000] random: mktemp urandom read with 11 bits of entropy available    
Press the [f] key and hit [enter] to enter failsafe mode                        
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level    
[   11.690000] mount_root: jffs2 not ready yet, using temporary tmpfs overlay   
[   11.720000] ralink_soc_eth 10100000.ethernet eth0: port 5 link down          
[   11.740000] procd: - early -                                                 
[   11.750000] procd: - watchdog -                                              
[   12.380000] procd: - ubus -                                                  
[   13.390000] procd: - init -                                                  
Please press Enter to activate this console.                                    
[   13.890000] NET: Registered protocol family 10                               
[   13.890000] ip6_tables: (C) 2000-2006 Netfilter Core Team                    
[   13.890000] Loading modules backported from Linux version master-2015-03-09-5
[   13.890000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   13.890000] ip_tables: (C) 2000-2006 Netfilter Core Team                     
[   13.890000] nf_conntrack version 0.5.0 (961 buckets, 3844 max)               
[   14.280000] xt_time: kernel timezone is -0000                                
[   14.320000] cfg80211: Calling CRDA to update world regulatory domain         
[   14.340000] cfg80211: World regulatory domain updated:                       
[   14.350000] cfg80211:  DFS Master region: unset                              
[   14.350000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_ga)
[   14.370000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 )
[   14.390000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 )
[   14.410000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 )
[   14.420000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 )
[   14.440000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz A)
[   14.460000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000)
[   14.470000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 )
[   14.490000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0)
[   14.540000] PPP generic driver version 2.4.2                                 
[   14.550000] NET: Registered protocol family 24                               
[   14.590000] rt2800_wmac 10180000.wmac: failed to load eeprom property        
[   14.600000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EE.
[   14.620000] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eep2
[   14.640000] rt2800_wmac 10180000.wmac: Falling back to user helper           
[   14.710000] firmware soc_wmac.eeprom: firmware_loading_store: map pages faild
[   14.730000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to.
[   14.740000] rt2800_wmac: probe of 10180000.wmac failed with error -11        
[   20.990000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0   
[   21.010000] jffs2_build_filesystem(): unlocking the mtd device... done.      
[   21.020000] jffs2_build_filesystem(): erasing all blocks after the end marke 
[   23.410000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/)
[   23.430000] 8021q: adding VLAN 0 to HW filter on device eth0                 
[   23.490000] device eth0.1 entered promiscuous mode                           
[   23.500000] device eth0 entered promiscuous mode                             
[   23.550000] br-lan: port 1(eth0.1) entered forwarding state                  
[   23.560000] br-lan: port 1(eth0.1) entered forwarding state                  
[   25.560000] br-lan: port 1(eth0.1) entered forwarding state                  
[   62.370000] done.                                                            
[   62.370000] jffs2: notice: (851) jffs2_build_xattr_subsystem: complete build.
[   95.020000] random: nonblocking pool is initialized

                                                                                
                                                                                
BusyBox v1.23.2 (2015-05-30 20:21:49 EEST) built-in shell (ash)                 
                                                                                
  _______                     ________        __                                
 |       |.-----.-----.-----.|  |  |  |.----.|  |_                              
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|                             
 |_______||   __|_____|__|__||________||__|  |____|                             
          |__| W I R E L E S S   F R E E D O M                                  
 -----------------------------------------------------                          
 CHAOS CALMER (Bleeding Edge, r45845)                                           
 -----------------------------------------------------                          
  * 1 1/2 oz Gin            Shake with a glassful                               
  * 1/4 oz Triple Sec       of broken ice and pour                              
  * 3/4 oz Lime Juice       unstrained into a goblet.                           
  * 1 1/2 oz Orange Juice                                                       
  * 1 tsp. Grenadine Syrup                                                      
 -----------------------------------------------------                          
root@OpenWrt:/# ifconfig -a                                                     
br-lan    Link encap:Ethernet  HWaddr CE:01:AB:8E:78:3A                         
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0        
          inet6 addr: fe80::cc01:abff:fe8e:783a/64 Scope:Link                   
          inet6 addr: fd31:ff86:243d::1/60 Scope:Global                         
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                    
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                    
          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0                 
          collisions:0 txqueuelen:0                                             
          RX bytes:0 (0.0 B)  TX bytes:2714 (2.6 KiB)                           
                                                                                
eth0      Link encap:Ethernet  HWaddr CE:01:AB:8E:78:3A                         
          inet6 addr: fe80::cc01:abff:fe8e:783a/64 Scope:Link                   
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                    
          RX packets:459 errors:0 dropped:4 overruns:0 frame:0                  
          TX packets:112 errors:0 dropped:0 overruns:0 carrier:0                
          collisions:0 txqueuelen:1000                                          
          RX bytes:63770 (62.2 KiB)  TX bytes:30878 (30.1 KiB)                  
          Interrupt:5                                                           
                                                                                
eth0.1    Link encap:Ethernet  HWaddr CE:01:AB:8E:78:3A                         
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                    
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                    
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0                 
          collisions:0 txqueuelen:0                                             
          RX bytes:0 (0.0 B)  TX bytes:1992 (1.9 KiB)                           
                                                                                
eth0.2    Link encap:Ethernet  HWaddr CE:01:AB:8E:78:3B                         
          inet6 addr: fe80::cc01:abff:fe8e:783b/64 Scope:Link                   
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1                    
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0                    
          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0                 
          collisions:0 txqueuelen:0                                             
          RX bytes:0 (0.0 B)  TX bytes:26579 (25.9 KiB)                         
                                                                                
lo        Link encap:Local Loopback                                             
          inet addr:127.0.0.1  Mask:255.0.0.0                                   
          inet6 addr: ::1/128 Scope:Host                                        
          UP LOOPBACK RUNNING  MTU:65536  Metric:1                              
          RX packets:288 errors:0 dropped:0 overruns:0 frame:0                  
          TX packets:288 errors:0 dropped:0 overruns:0 carrier:0                
          collisions:0 txqueuelen:0                                             
          RX bytes:19584 (19.1 KiB)  TX bytes:19584 (19.1 KiB) 

All external atheros switches are driven by ar8216.ko through mdio-bus. For MT7620A mdio-bus may be:
- internal (see mt7620a.dtsi);
- virtual mdio-gpio (use two free gpios).
You can find examples in dts-files for other targets.

Thank you Serge! Is there anything I need to do to enable the use of that ar8216 driver? I've enabled it in kernel_menuconfig but the boot log still says

ralink_soc_eth 10100000.ethernet: loaded mt7620 driver

I've also brought it to the point where 3 out of the 5 ports on my board worked. I could ping out and receive packets on ports 1, 4 and 5. Ports 2 and 3 were completely off (no LED lights, nothing). They appeared to be turned off as soon as the board booted up (they worked in uBoot to flash it), so I'm guessing that the MT7620A driver "sort of" works with the QCA8337 - that was a bit weird, I expected it to either fail altogether or work - I didn't expect a partial failure like this.

I'm not sure what made it work like this, I'm trying to do a new build from scratch to see if I can reproduce this. But I still think the board is simply ignoring the ar8216 driver and just going with the Ralink drivers (something must need to be changed in the DTS...).

Any suggestions? What am I missing?

Thank you,
Razvan

As a quick update, here's the dmesg from the time it boots up (with the wrong driver) and sees 3 out of 5 ports. The Atheros AR8216 driver is disabled at this point.

[    0.000000] Linux version 3.18.14 (root@razubuntu) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r45872) ) #12 Tue Jun 2 03:36:32 EEST 5
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: Ralink MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Ralink MT7620a + MT7530 evaluation board
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 802fe0d0, node_mem_map 810090e0
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=0004045c
[    0.000000] Readback ErrCtl register=0004045c
[    0.000000] Memory: 61360K/65536K available (2514K kernel code, 126K rwdata, 516K rodata, 160K init, 186K bss, 4176K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.010000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.100000] NET: Registered protocol family 16
[    0.110000] rt2880-pinmux pinctrl: try to register 73 pins ...
[    0.110000] pinctrl core: registered pin 0 (io0) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 1 (io1) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 2 (io2) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 3 (io3) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 4 (io4) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 5 (io5) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 6 (io6) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 7 (io7) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 8 (io8) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 9 (io9) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 10 (io10) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 11 (io11) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 12 (io12) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 13 (io13) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 14 (io14) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 15 (io15) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 16 (io16) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 17 (io17) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 18 (io18) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 19 (io19) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 20 (io20) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 21 (io21) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 22 (io22) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 23 (io23) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 24 (io24) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 25 (io25) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 26 (io26) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 27 (io27) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 28 (io28) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 29 (io29) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 30 (io30) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 31 (io31) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 32 (io32) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 33 (io33) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 34 (io34) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 35 (io35) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 36 (io36) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 37 (io37) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 38 (io38) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 39 (io39) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 40 (io40) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 41 (io41) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 42 (io42) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 43 (io43) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 44 (io44) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 45 (io45) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 46 (io46) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 47 (io47) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 48 (io48) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 49 (io49) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 50 (io50) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 51 (io51) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 52 (io52) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 53 (io53) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 54 (io54) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 55 (io55) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 56 (io56) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 57 (io57) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 58 (io58) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 59 (io59) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 60 (io60) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 61 (io61) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 62 (io62) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 63 (io63) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 64 (io64) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 65 (io65) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 66 (io66) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 67 (io67) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 68 (io68) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 69 (io69) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 70 (io70) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 71 (io71) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 72 (io72) on rt2880-pinmux
[    0.110000] pinctrl core: add 2 pinmux maps
[    0.110000] rt2880-pinmux pinctrl: found group selector 0 for i2c
[    0.110000] rt2880-pinmux pinctrl: found group selector 1 for uartf
[    0.110000] rt2880-pinmux pinctrl: request pin 1 (io1) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 2 (io2) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 7 (io7) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 8 (io8) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 9 (io9) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 10 (io10) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 11 (io11) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 12 (io12) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 13 (io13) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 14 (io14) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: failed to lookup the sleep state
[    0.110000] pinctrl core: add 1 pinmux maps
[    0.110000] rt2880-pinmux pinctrl: found group selector 8 for pcie
[    0.110000] rt2880-pinmux pinctrl: request pin 36 (io36) for 10140000.pcie
[    0.430000] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[    0.440000] mt7620-pci: probe of 10140000.pcie failed with error -1
[    0.460000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.470000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.480000] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.490000] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.500000] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.510000] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.520000] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.530000] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.540000] Switched to clocksource systick
[    0.550000] NET: Registered protocol family 2
[    0.550000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.570000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.580000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.590000] TCP: reno registered
[    0.600000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.610000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.620000] NET: Registered protocol family 1
[    0.630000] PCI: CLS 0 bytes, default 32
[    0.630000] rt-timer 10000100.timer: maximum frequency is 2441Hz
[    0.650000] alarmtimer alarmtimer: no of_node; not parsing pinctrl DT
[    0.650000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.680000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.690000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.710000] msgmni has been set to 119
[    0.720000] io scheduler noop registered
[    0.720000] io scheduler deadline registered (default)
[    0.740000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[147]
[    0.750000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[161]
[    0.760000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.770000] serial8250 serial8250: no of_node; not parsing pinctrl DT
[    0.770000] pinctrl core: add 1 pinmux maps
[    0.770000] rt2880-pinmux pinctrl: found group selector 3 for uartlite
[    0.770000] rt2880-pinmux pinctrl: request pin 15 (io15) for 10000c00.uartlite
[    0.770000] rt2880-pinmux pinctrl: request pin 16 (io16) for 10000c00.uartlite
[    0.770000] console [ttyS0] disabled
[    0.780000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    0.780000] console [ttyS0] enabled
[    0.780000] bootconsole [early0] disabled
[    0.780000] pinctrl core: add 1 pinmux maps
[    0.780000] rt2880-pinmux pinctrl: found group selector 2 for spi
[    0.780000] rt2880-pinmux pinctrl: request pin 3 (io3) for 10000b00.spi
[    0.780000] rt2880-pinmux pinctrl: request pin 4 (io4) for 10000b00.spi
[    0.780000] rt2880-pinmux pinctrl: request pin 5 (io5) for 10000b00.spi
[    0.780000] rt2880-pinmux pinctrl: request pin 6 (io6) for 10000b00.spi
[    0.780000] m25p80 spi32766.0: found w25q128, expected s25fl064k
[    0.780000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.780000] 4 ofpart partitions found on MTD device spi32766.0
[    0.780000] Creating 4 MTD partitions on "spi32766.0":
[    0.780000] 0x000000000000-0x000000030000 : "u-boot"
[    0.780000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.780000] 0x000000040000-0x000000050000 : "factory"
[    0.780000] 0x000000050000-0x000000800000 : "firmware"
[    0.780000] 2 uimage-fw partitions found on MTD device firmware
[    0.780000] 0x000000050000-0x0000001663a9 : "kernel"
[    0.780000] 0x0000001663a9-0x000000800000 : "rootfs"
[    0.780000] mtd: device 5 (rootfs) set to be root filesystem
[    0.780000] 1 squashfs-split partitions found on MTD device rootfs
[    0.780000] 0x000000340000-0x000000800000 : "rootfs_data"
[    0.780000] libphy: Fixed MDIO Bus: probed
[    0.780000] pinctrl core: add 1 pinmux maps
[    0.780000] pinctrl core: add 1 pinmux maps
[    0.780000] pinctrl core: add 1 pinmux maps
[    0.780000] rt2880-pinmux pinctrl: found group selector 6 for rgmii1
[    0.780000] rt2880-pinmux pinctrl: found group selector 10 for rgmii2
[    0.780000] rt2880-pinmux pinctrl: found group selector 5 for mdio
[    0.780000] rt2880-pinmux pinctrl: request pin 24 (io24) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 25 (io25) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 26 (io26) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 27 (io27) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 28 (io28) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 29 (io29) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 30 (io30) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 31 (io31) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 32 (io32) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 33 (io33) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 34 (io34) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 35 (io35) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 60 (io60) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 61 (io61) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 62 (io62) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 63 (io63) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 64 (io64) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 65 (io65) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 66 (io66) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 67 (io67) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 68 (io68) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 69 (io69) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 70 (io70) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 71 (io71) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 22 (io22) for 10100000.ethernet
[    0.780000] rt2880-pinmux pinctrl: request pin 23 (io23) for 10100000.ethernet
[    0.780000] ralink_soc_eth 10100000.ethernet: generated random MAC address 26:c7:7a:74:52:b6
[    0.780000] libphy: mdio: probed
[    0.780000] ralink_soc_eth 10100000.ethernet: using fixed link parameters
[    1.110000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.120000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    1.140000] rt2880_wdt 10000120.watchdog: Initialized
[    1.150000] TCP: cubic registered
[    1.160000] NET: Registered protocol family 17
[    1.160000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.190000] 8021q: 802.1Q VLAN Support v1.8
[    1.220000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.230000] Freeing unused kernel memory: 160K (80318000 - 80340000)
[    3.410000] init: Console is alive
[    3.410000] init: - watchdog -
[    5.950000] usbcore: registered new interface driver usbfs
[    5.960000] usbcore: registered new interface driver hub
[    5.970000] usbcore: registered new device driver usb
[    5.990000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.000000] ehci-platform: EHCI generic platform driver
[    6.030000] phy phy-usbphy.0: remote usb device wakeup disabled
[    6.030000] phy phy-usbphy.0: UTMI 16bit 30MHz
[    6.030000] ehci-platform 101c0000.ehci: EHCI Host Controller
[    6.030000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    6.030000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    6.350000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    6.360000] usb usb1: no of_node; not parsing pinctrl DT
[    6.360000] hub 1-0:1.0: no of_node; not parsing pinctrl DT
[    6.360000] hub 1-0:1.0: USB hub found
[    6.370000] hub 1-0:1.0: 1 port detected
[    6.380000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.390000] ohci-platform: OHCI generic platform driver
[    6.400000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    6.420000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    6.430000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    6.500000] usb usb2: no of_node; not parsing pinctrl DT
[    6.500000] hub 2-0:1.0: no of_node; not parsing pinctrl DT
[    6.500000] hub 2-0:1.0: USB hub found
[    6.510000] hub 2-0:1.0: 1 port detected
[    6.670000] init: - preinit -
[    6.690000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    7.080000] usb 1-1: no of_node; not parsing pinctrl DT
[    7.090000] hub 1-1:1.0: no of_node; not parsing pinctrl DT
[    7.090000] hub 1-1:1.0: USB hub found
[    7.100000] hub 1-1:1.0: 4 ports detected
[    7.320000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/Full duplex)
[    7.340000] 8021q: adding VLAN 0 to HW filter on device eth0
[    7.340000] random: mktemp urandom read with 9 bits of entropy available
[    7.720000] usb 1-1.3: new high-speed USB device number 3 using ehci-platform
[    7.840000] usb 1-1.3: no of_node; not parsing pinctrl DT
[    7.840000] hub 1-1.3:1.0: no of_node; not parsing pinctrl DT
[    7.840000] hub 1-1.3:1.0: USB hub found
[    7.850000] hub 1-1.3:1.0: 4 ports detected
[   10.570000] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   10.590000] ralink_soc_eth 10100000.ethernet eth0: port 5 link down
[   10.610000] procd: - early -
[   10.620000] procd: - watchdog -
[   11.250000] procd: - ubus -
[   12.270000] procd: - init -
[   12.580000] NET: Registered protocol family 10
[   12.580000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.580000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   12.580000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   12.580000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.580000] nf_conntrack version 0.5.0 (961 buckets, 3844 max)
[   13.160000] xt_time: kernel timezone is -0000
[   13.200000] cfg80211: Calling CRDA to update world regulatory domain
[   13.220000] cfg80211: World regulatory domain updated:
[   13.230000] cfg80211:  DFS Master region: unset
[   13.230000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   13.250000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   13.270000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   13.290000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   13.300000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   13.320000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   13.340000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   13.350000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   13.370000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   13.420000] PPP generic driver version 2.4.2
[   13.430000] NET: Registered protocol family 24
[   13.470000] rt2800_wmac 10180000.wmac: failed to load eeprom property
[   13.480000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[   13.500000] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[   13.520000] rt2800_wmac 10180000.wmac: Falling back to user helper
[   13.590000] firmware soc_wmac.eeprom: firmware_loading_store: map pages failed
[   13.610000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.
[   13.620000] rt2800_wmac: probe of 10180000.wmac failed with error -11
[   19.500000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   19.520000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   19.530000] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   21.740000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/Full duplex)
[   21.760000] 8021q: adding VLAN 0 to HW filter on device eth0
[   22.100000] device eth0.1 entered promiscuous mode
[   22.110000] device eth0 entered promiscuous mode
[   22.160000] br-lan: port 1(eth0.1) entered forwarding state
[   22.170000] br-lan: port 1(eth0.1) entered forwarding state
[   24.170000] br-lan: port 1(eth0.1) entered forwarding state

And here's a dmesg with the Atheros AR8216 driver enabled - it is detected now, but not picked for use and switch0 appears as "mdio-bus" in swconfig. Packets do not flow in this case (and I'm showing two switches, one Mediatek and one mdio-bus (I'm assuming the Atheros one) ).

[    0.000000] Linux version 3.18.14 (root@razubuntu) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r45872) ) #11 Tue Jun 2 03:26:24 EEST 5
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: Ralink MT7620A ver:2 eco:6
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is Ralink MT7620a + MT7530 evaluation board
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 803040d0, node_mem_map 810090e0
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=0004045c
[    0.000000] Readback ErrCtl register=0004045c
[    0.000000] Memory: 61360K/65536K available (2529K kernel code, 128K rwdata, 524K rodata, 136K init, 186K bss, 4176K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 580MHz
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.010000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090000] pinctrl core: initialized pinctrl subsystem
[    0.100000] NET: Registered protocol family 16
[    0.110000] rt2880-pinmux pinctrl: try to register 73 pins ...
[    0.110000] pinctrl core: registered pin 0 (io0) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 1 (io1) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 2 (io2) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 3 (io3) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 4 (io4) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 5 (io5) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 6 (io6) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 7 (io7) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 8 (io8) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 9 (io9) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 10 (io10) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 11 (io11) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 12 (io12) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 13 (io13) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 14 (io14) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 15 (io15) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 16 (io16) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 17 (io17) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 18 (io18) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 19 (io19) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 20 (io20) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 21 (io21) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 22 (io22) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 23 (io23) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 24 (io24) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 25 (io25) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 26 (io26) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 27 (io27) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 28 (io28) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 29 (io29) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 30 (io30) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 31 (io31) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 32 (io32) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 33 (io33) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 34 (io34) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 35 (io35) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 36 (io36) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 37 (io37) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 38 (io38) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 39 (io39) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 40 (io40) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 41 (io41) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 42 (io42) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 43 (io43) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 44 (io44) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 45 (io45) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 46 (io46) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 47 (io47) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 48 (io48) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 49 (io49) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 50 (io50) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 51 (io51) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 52 (io52) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 53 (io53) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 54 (io54) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 55 (io55) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 56 (io56) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 57 (io57) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 58 (io58) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 59 (io59) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 60 (io60) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 61 (io61) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 62 (io62) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 63 (io63) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 64 (io64) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 65 (io65) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 66 (io66) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 67 (io67) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 68 (io68) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 69 (io69) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 70 (io70) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 71 (io71) on rt2880-pinmux
[    0.110000] pinctrl core: registered pin 72 (io72) on rt2880-pinmux
[    0.110000] pinctrl core: add 2 pinmux maps
[    0.110000] rt2880-pinmux pinctrl: found group selector 0 for i2c
[    0.110000] rt2880-pinmux pinctrl: found group selector 1 for uartf
[    0.110000] rt2880-pinmux pinctrl: request pin 1 (io1) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 2 (io2) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 7 (io7) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 8 (io8) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 9 (io9) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 10 (io10) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 11 (io11) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 12 (io12) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 13 (io13) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: request pin 14 (io14) for pinctrl
[    0.110000] rt2880-pinmux pinctrl: failed to lookup the sleep state
[    0.110000] pinctrl core: add 1 pinmux maps
[    0.110000] rt2880-pinmux pinctrl: found group selector 8 for pcie
[    0.110000] rt2880-pinmux pinctrl: request pin 36 (io36) for 10140000.pcie
[    0.430000] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)
[    0.440000] mt7620-pci: probe of 10140000.pcie failed with error -1
[    0.460000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.470000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.480000] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.490000] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.500000] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.510000] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.520000] rt2880_gpio 10000688.gpio: registering 1 gpios
[    0.530000] rt2880_gpio 10000688.gpio: registering 1 irq handlers
[    0.540000] Switched to clocksource systick
[    0.550000] NET: Registered protocol family 2
[    0.550000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.570000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.580000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.590000] TCP: reno registered
[    0.600000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.610000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.620000] NET: Registered protocol family 1
[    0.630000] PCI: CLS 0 bytes, default 32
[    0.630000] rt-timer 10000100.timer: maximum frequency is 2441Hz
[    0.650000] alarmtimer alarmtimer: no of_node; not parsing pinctrl DT
[    0.650000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.680000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.690000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.710000] msgmni has been set to 119
[    0.720000] io scheduler noop registered
[    0.720000] io scheduler deadline registered (default)
[    0.740000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[147]
[    0.750000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[161]
[    0.760000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.770000] serial8250 serial8250: no of_node; not parsing pinctrl DT
[    0.770000] pinctrl core: add 1 pinmux maps
[    0.770000] rt2880-pinmux pinctrl: found group selector 3 for uartlite
[    0.770000] rt2880-pinmux pinctrl: request pin 15 (io15) for 10000c00.uartlite
[    0.770000] rt2880-pinmux pinctrl: request pin 16 (io16) for 10000c00.uartlite
[    0.770000] console [ttyS0] disabled
[    0.780000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a 16550A
[    0.800000] console [ttyS0] enabled
[    0.800000] bootconsole [early0] disabled
[    0.800000] pinctrl core: add 1 pinmux maps
[    0.800000] rt2880-pinmux pinctrl: found group selector 2 for spi
[    0.800000] rt2880-pinmux pinctrl: request pin 3 (io3) for 10000b00.spi
[    0.800000] rt2880-pinmux pinctrl: request pin 4 (io4) for 10000b00.spi
[    0.800000] rt2880-pinmux pinctrl: request pin 5 (io5) for 10000b00.spi
[    0.800000] rt2880-pinmux pinctrl: request pin 6 (io6) for 10000b00.spi
[    0.800000] m25p80 spi32766.0: found w25q128, expected s25fl064k
[    0.800000] m25p80 spi32766.0: w25q128 (16384 Kbytes)
[    0.800000] 4 ofpart partitions found on MTD device spi32766.0
[    0.800000] Creating 4 MTD partitions on "spi32766.0":
[    0.800000] 0x000000000000-0x000000030000 : "u-boot"
[    0.800000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.800000] 0x000000040000-0x000000050000 : "factory"
[    0.800000] 0x000000050000-0x000000800000 : "firmware"
[    0.800000] 2 uimage-fw partitions found on MTD device firmware
[    0.800000] 0x000000050000-0x000000167eae : "kernel"
[    0.800000] 0x000000167eae-0x000000800000 : "rootfs"
[    0.800000] mtd: device 5 (rootfs) set to be root filesystem
[    0.800000] 1 squashfs-split partitions found on MTD device rootfs
[    0.800000] 0x000000340000-0x000000800000 : "rootfs_data"
[    0.800000] libphy: Fixed MDIO Bus: probed
[    0.800000] pinctrl core: add 1 pinmux maps
[    0.800000] pinctrl core: add 1 pinmux maps
[    0.800000] pinctrl core: add 1 pinmux maps
[    0.800000] rt2880-pinmux pinctrl: found group selector 6 for rgmii1
[    0.800000] rt2880-pinmux pinctrl: found group selector 10 for rgmii2
[    0.800000] rt2880-pinmux pinctrl: found group selector 5 for mdio
[    0.800000] rt2880-pinmux pinctrl: request pin 24 (io24) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 25 (io25) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 26 (io26) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 27 (io27) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 28 (io28) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 29 (io29) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 30 (io30) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 31 (io31) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 32 (io32) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 33 (io33) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 34 (io34) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 35 (io35) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 60 (io60) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 61 (io61) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 62 (io62) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 63 (io63) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 64 (io64) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 65 (io65) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 66 (io66) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 67 (io67) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 68 (io68) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 69 (io69) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 70 (io70) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 71 (io71) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 22 (io22) for 10100000.ethernet
[    0.800000] rt2880-pinmux pinctrl: request pin 23 (io23) for 10100000.ethernet
[    0.800000] ralink_soc_eth 10100000.ethernet: generated random MAC address d2:88:d0:ab:44:39
[    0.800000] libphy: mdio: probed
[    0.800000] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus
[    0.800000] Atheros AR8216/AR8236/AR8316: probe of mdio-bus:00 failed with error -22
[    1.130000] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus
[    1.140000] ralink_soc_eth 10100000.ethernet: using fixed link parameters
[    1.150000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.170000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    1.180000] rt2880_wdt 10000120.watchdog: Initialized
[    1.190000] TCP: cubic registered
[    1.200000] NET: Registered protocol family 17
[    1.210000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.230000] 8021q: 802.1Q VLAN Support v1.8
[    1.260000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.280000] Freeing unused kernel memory: 136K (8031e000 - 80340000)
[    3.410000] init: Console is alive
[    3.410000] init: - watchdog -
[    6.000000] usbcore: registered new interface driver usbfs
[    6.010000] usbcore: registered new interface driver hub
[    6.020000] usbcore: registered new device driver usb
[    6.030000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.030000] ehci-platform: EHCI generic platform driver
[    6.030000] phy phy-usbphy.0: remote usb device wakeup disabled
[    6.030000] phy phy-usbphy.0: UTMI 16bit 30MHz
[    6.030000] ehci-platform 101c0000.ehci: EHCI Host Controller
[    6.030000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    6.030000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    6.340000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    6.360000] usb usb1: no of_node; not parsing pinctrl DT
[    6.360000] hub 1-0:1.0: no of_node; not parsing pinctrl DT
[    6.360000] hub 1-0:1.0: USB hub found
[    6.370000] hub 1-0:1.0: 1 port detected
[    6.380000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    6.390000] ohci-platform: OHCI generic platform driver
[    6.400000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    6.410000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    6.430000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    6.500000] usb usb2: no of_node; not parsing pinctrl DT
[    6.500000] hub 2-0:1.0: no of_node; not parsing pinctrl DT
[    6.500000] hub 2-0:1.0: USB hub found
[    6.510000] hub 2-0:1.0: 1 port detected
[    6.690000] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    6.850000] usb 1-1: no of_node; not parsing pinctrl DT
[    6.850000] hub 1-1:1.0: no of_node; not parsing pinctrl DT
[    6.850000] hub 1-1:1.0: USB hub found
[    6.860000] hub 1-1:1.0: 4 ports detected
[    7.150000] usb 1-1.3: new high-speed USB device number 3 using ehci-platform
[    7.270000] usb 1-1.3: no of_node; not parsing pinctrl DT
[    7.270000] hub 1-1.3:1.0: no of_node; not parsing pinctrl DT
[    7.270000] hub 1-1.3:1.0: USB hub found
[    7.280000] hub 1-1.3:1.0: 4 ports detected
[    7.660000] init: - preinit -
[    8.150000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/Full duplex)
[    8.170000] 8021q: adding VLAN 0 to HW filter on device eth0
[    8.340000] random: mktemp urandom read with 12 bits of entropy available
[   11.690000] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[   11.720000] ralink_soc_eth 10100000.ethernet eth0: port 5 link down
[   11.740000] procd: - early -
[   11.750000] procd: - watchdog -
[   12.380000] procd: - ubus -
[   13.470000] procd: - init -
[   14.530000] NET: Registered protocol family 10
[   14.550000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   14.570000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   14.590000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   14.600000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   14.620000] nf_conntrack version 0.5.0 (960 buckets, 3840 max)
[   14.670000] xt_time: kernel timezone is -0000
[   14.710000] cfg80211: Calling CRDA to update world regulatory domain
[   14.740000] cfg80211: World regulatory domain updated:
[   14.750000] cfg80211:  DFS Master region: unset
[   14.750000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   14.770000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   14.790000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   14.810000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   14.820000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   14.840000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   14.860000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   14.870000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   14.890000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   14.960000] PPP generic driver version 2.4.2
[   14.970000] NET: Registered protocol family 24
[   15.010000] rt2800_wmac 10180000.wmac: failed to load eeprom property
[   15.030000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EEPROM data from 'soc_wmac.eeprom'.
[   15.050000] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eeprom failed with error -2
[   15.060000] rt2800_wmac 10180000.wmac: Falling back to user helper
[   15.110000] firmware soc_wmac.eeprom: firmware_loading_store: map pages failed
[   15.120000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to request EEPROM.
[   15.140000] rt2800_wmac: probe of 10180000.wmac failed with error -11
[   21.520000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   21.620000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   21.630000] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   22.790000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/Full duplex)
[   22.810000] 8021q: adding VLAN 0 to HW filter on device eth0
[   22.880000] device eth0.1 entered promiscuous mode
[   22.890000] device eth0 entered promiscuous mode
[   22.960000] br-lan: port 1(eth0.1) entered forwarding state
[   22.970000] br-lan: port 1(eth0.1) entered forwarding state
[   24.970000] br-lan: port 1(eth0.1) entered forwarding state
[   56.150000] done.
[   56.150000] jffs2: notice: (855) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 o.
[   66.260000] device eth0.2 entered promiscuous mode
[   66.270000] br-lan: port 2(eth0.2) entered forwarding state
[   66.280000] br-lan: port 2(eth0.2) entered forwarding state
[   68.280000] br-lan: port 2(eth0.2) entered forwarding state
[   89.280000] random: nonblocking pool is initialized
[   96.470000] CPU 0 Unable to handle kernel paging request at virtual address 00000010, epc == 801b6238, ra == 801b6228
[   96.470000] Oops[#1]:
[   96.470000] CPU: 0 PID: 1083 Comm: swconfig Not tainted 3.18.14 #11
[   96.470000] task: 832b04d8 ti: 830e2000 task.ti: 830e2000
[   96.470000] $ 0   : 00000000 00a83134 00000000 00000001
[   96.470000] $ 4   : 838f01b4 00000054 00000013 00000000
[   96.470000] $ 8   : 830e3b48 80008f3c 556cf879 0000043b
[   96.470000] $12   : 00000005 831d8124 00000000 00020008
[   96.470000] $16   : 00000004 00000000 838f0000 00000001
[   96.470000] $20   : 0000000e 00000000 00000004 00000000
[   96.470000] $24   : 00000000 801bc130                  
[   96.470000] $28   : 830e2000 830e3b68 00000008 801b6228
[   96.470000] Hi    : 00000004
[   96.470000] Lo    : 9d874000
[   96.470000] epc   : 801b6238 ar8327_sw_hw_apply+0x38/0x90
[   96.470000]     Not tainted
[   96.470000] ra    : 801b6228 ar8327_sw_hw_apply+0x28/0x90
[   96.470000] Status: 1100a403 KERNEL EXL IE 
[   96.470000] Cause : 40800008
[   96.470000] BadVA : 00000010
[   96.470000] PrId  : 00019650 (MIPS 24KEc)
[   96.470000] Modules linked in: rt2800soc rt2800pci rt2800mmio rt2800lib pppoe ppp_async iptable_nat rt2x00soc rt2x00pci rt2x00mmio rt2x00libn
[   96.470000] Process swconfig (pid: 1083, threadinfo=830e2000, task=832b04d8, tls=77787440)
[   96.470000] Stack : 00000001 00000000 00000024 830e3c08 838f0000 803186b4 830e3c08 83b05780
[   96.470000]    8398af00 801b2a20 83b05b40 00000000 830e3c08 83b05780 000102d0 831d811c
[   96.470000]    00000008 00000014 802d819c 801508f0 803186b4 00000000 00000000 00000000
[   96.470000]    803185f8 803185f8 803185a8 831d8114 83b05780 8398af00 00000000 00000004
[   96.470000]    00000000 80205b58 00000000 80204688 00000040 802031f8 802d819c 83b05780
[   96.470000]    ...
[   96.470000] Call Trace:
[   96.470000] [<801b6238>] ar8327_sw_hw_apply+0x38/0x90
[   96.470000] [<801b2a20>] swconfig_set_attr+0x174/0x248
[   96.470000] [<80205b58>] genl_rcv_msg+0x278/0x31c
[   96.470000] [<80204f38>] netlink_rcv_skb+0x78/0xf0
[   96.470000] [<802058c8>] genl_rcv+0x30/0x48
[   96.470000] [<80204820>] netlink_unicast+0x150/0x234
[   96.470000] [<80204cfc>] netlink_sendmsg+0x328/0x39c
[   96.470000] [<801c98a8>] sock_sendmsg+0x70/0x98
[   96.470000] [<801cb23c>] ___sys_sendmsg.part.31+0x184/0x220
[   96.470000] [<801cc438>] __sys_sendmsg+0x54/0x88
[   96.470000] [<80006b5c>] handle_sys+0x11c/0x140
[   96.470000] 
[   96.470000] 
[   96.470000] Code: 24100004  24130001  2414000e <92220010> 02402021  10400004  24050100  02133004  0806d897 
[   97.100000] ---[ end trace 3251dfffbdbb505c ]---
[  115.490000] br-lan: port 2(eth0.2) entered disabled state
[  115.500000] br-lan: port 1(eth0.1) entered disabled state
[  120.480000] device eth0.2 left promiscuous mode
[  120.490000] br-lan: port 2(eth0.2) entered disabled state
[  120.500000] device eth0.1 left promiscuous mode
[  120.510000] br-lan: port 1(eth0.1) entered disabled state

I'm guessing that the Atheros AR8216 needs some additional settings to work - not sure where I would put those. I'm using the following DTS (it's the standard MT7620A+MT7350 one - it was the only one that booted up without a kernel panic).

/dts-v1/;

/include/ "mt7620a.dtsi"

/ {
    compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc";
    model = "Ralink MT7620a + MT7530 evaluation board";

    palmbus@10000000 {
        spi@b00 {
            status = "okay";

            m25p80@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "s25fl064k";
                reg = <0 0>;
                linux,modalias = "m25p80", "s25fl064k";
                spi-max-frequency = <10000000>;

                partition@0 {
                    label = "u-boot";
                    reg = <0x0 0x30000>;
                    read-only;
                };

                partition@30000 {
                    label = "u-boot-env";
                    reg = <0x30000 0x10000>;
                    read-only;
                };

                factory: partition@40000 {
                    label = "factory";
                    reg = <0x40000 0x10000>;
                    read-only;
                };

                partition@50000 {
                    label = "firmware";
                    reg = <0x50000 0x7b0000>;
                };
            };
        };
    };

    pinctrl {
        state_default: pinctrl0 {
            gpio {
                ralink,group = "i2c", "uartf";
                ralink,function = "gpio";
            };
        };
    };

    ethernet@10100000 {
        status = "okay";

        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

        ralink,port-map = "llllw";

        port@5 {
            status = "okay";
            ralink,fixed-link = <1000 1 1 1>;
            phy-mode = "rgmii";
        };

        mdio-bus {
            status = "okay";

            phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "rgmii";
            };
            phy1: ethernet-phy@1 {
                reg = <1>;
                phy-mode = "rgmii";
            };
            phy2: ethernet-phy@2 {
                reg = <2>;
                phy-mode = "rgmii";
            };
            phy3: ethernet-phy@3 {
                reg = <3>;
                phy-mode = "rgmii";
            };
            phy4: ethernet-phy@4 {
                reg = <4>;
                phy-mode = "rgmii";
            };
            phy1f: ethernet-phy@1f {
                reg = <0x1f>;
                phy-mode = "rgmii";
            };
        };
    };

    gsw@10110000 {
        ralink,port4 = "gmac";
        mediatek,mt7530 = <1>;
    };

    pcie@10140000 {
        status = "okay";
    };

    ehci@101c0000 {
        status = "okay";
    };

    ohci@101c1000 {
        status = "okay";
    };
};

Thanks for all your help!

Your dts-file desribe only external mt7530 gigabit switch and say nothing of atheros ar8337. I think that you may try something like

/dts-v1/;

/include/ "mt7620a.dtsi"

/ {
    compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc";
    model = "Ralink MT7620a + AR8337 evaluation board";

    palmbus@10000000 {
        spi@b00 {
            status = "okay";

            m25p80@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "s25fl064k";
                reg = <0 0>;
                linux,modalias = "m25p80", "s25fl064k";
                spi-max-frequency = <10000000>;

                partition@0 {
                    label = "u-boot";
                    reg = <0x0 0x30000>;
                    read-only;
                };

                partition@30000 {
                    label = "u-boot-env";
                    reg = <0x30000 0x10000>;
                    read-only;
                };

                factory: partition@40000 {
                    label = "factory";
                    reg = <0x40000 0x10000>;
                    read-only;
                };

                partition@50000 {
                    label = "firmware";
                    reg = <0x50000 0x7b0000>;
                };
            };
        };
    };

    pinctrl {
        state_default: pinctrl0 {
            gpio {
                ralink,group = "i2c", "uartf";
                ralink,function = "gpio";
            };
        };
    };

    ethernet@10100000 {
        status = "okay";

        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

        ralink,port-map = "llllw";

        port@5 {
            status = "okay";
            ralink,fixed-link = <1000 1 1 1>;
            phy-mode = "rgmii";
        };

        mdio-bus {
            status = "okay";

            phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "rgmii";
        device_type = "ethernet-phy"; 
            qca,ar8327-initvals = < 
            0x00004 0x7600000   /* PAD0_MODE */ 
            0x00008 0x1000000   /* PAD5_MODE */ 
            0x0000c 0x80        /* PAD6_MODE */ 
            0x000e4 0xaa545     /* MAC_POWER_SEL */ 
            0x000e0 0xc74164de  /* SGMII_CTRL */ 
            0x0007c 0x4e        /* PORT0_STATUS */ 
            0x00094 0x4e        /* PORT6_STATUS */ 
            >; 
            };
            phy4: ethernet-phy@4 {
                reg = <4>;
                phy-mode = "rgmii";
            };
        };
    };

    gsw@10110000 {
        ralink,port4 = "gmac";
    };

    pcie@10140000 {
        status = "okay";
    };

    ehci@101c0000 {
        status = "okay";
    };

    ohci@101c1000 {
        status = "okay";
    };
};

I'm not sure of ar8327-initvals. And possibly gsw@10110000 section must be totally remove from dts-file (not only mt7530 switch).

Thank you Serge! That has helped a bit, now the Atheros ar8216 driver on longer probes blindly but it still doesn't appear to work. I've tried various qca,init-vals values from the net but none of them worked. The kernel panics as soon as the boot is complete, see below (truncated a bit at the right, I copied it from a limited width serial terminal).

[    0.000000] Linux version 3.18.14 (root@razubuntu) (gcc version 4.8.3 (OpenW5
[    0.000000] Board has DDR2                                                   
[    0.000000] Analog PMU set to hw control                                     
[    0.000000] Digital PMU set to hw control                                    
[    0.000000] SoC Type: Ralink MT7620A ver:2 eco:6                             
[    0.000000] bootconsole [early0] enabled                                     
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)                          
[    0.000000] MIPS: machine is Ralink MT7620a + MT7530 evaluation board        
[    0.000000] Determined physical RAM map:                                     
[    0.000000]  memory: 04000000 @ 00000000 (usable)                            
[    0.000000] Initrd not found or empty - disabling initrd                     
[    0.000000] Zone ranges:                                                     
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]                           
[    0.000000] Movable zone start for each node                                 
[    0.000000] Early memory node ranges                                         
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]                          
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x03ffffff]                 
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.  
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bys
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa6
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jff2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)              
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)    
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)     
[    0.000000] Writing ErrCtl register=0004045c                                 
[    0.000000] Readback ErrCtl register=0004045c                                
[    0.000000] Memory: 61360K/65536K available (2529K kernel code, 128K rwdata,)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1       
[    0.000000] NR_IRQS:256                                                      
[    0.000000] CPU Clock: 580MHz                                                
[    0.000000] systick: running - mult: 214748, shift: 32                       
[    0.010000] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)          
[    0.070000] pid_max: default: 32768 minimum: 301                             
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)      
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) 
[    0.090000] pinctrl core: initialized pinctrl subsystem                      
[    0.100000] NET: Registered protocol family 16                               
[    0.430000] mt7620-pci 10140000.pcie: PCIE0 no card, disable it(RST&CLK)     
[    0.440000] mt7620-pci: probe of 10140000.pcie failed with error -1          
[    0.460000] rt2880_gpio 10000600.gpio: registering 24 gpios                  
[    0.470000] rt2880_gpio 10000600.gpio: registering 24 irq handlers           
[    0.480000] rt2880_gpio 10000638.gpio: registering 16 gpios                  
[    0.490000] rt2880_gpio 10000638.gpio: registering 16 irq handlers           
[    0.500000] rt2880_gpio 10000660.gpio: registering 32 gpios                  
[    0.510000] rt2880_gpio 10000660.gpio: registering 32 irq handlers           
[    0.520000] rt2880_gpio 10000688.gpio: registering 1 gpios                   
[    0.530000] rt2880_gpio 10000688.gpio: registering 1 irq handlers            
[    0.540000] Switched to clocksource systick                                  
[    0.550000] NET: Registered protocol family 2                                
[    0.550000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)  
[    0.570000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)         
[    0.580000] TCP: Hash tables configured (established 1024 bind 1024)         
[    0.590000] TCP: reno registered                                             
[    0.600000] UDP hash table entries: 256 (order: 0, 4096 bytes)               
[    0.610000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)          
[    0.620000] NET: Registered protocol family 1                                
[    0.630000] rt-timer 10000100.timer: maximum frequency is 2441Hz             
[    0.650000] futex hash table entries: 256 (order: -1, 3072 bytes)            
[    0.680000] squashfs: version 4.0 (2009/01/31) Phillip Lougher               
[    0.690000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORI.
[    0.710000] msgmni has been set to 119                                       
[    0.720000] io scheduler noop registered                                     
[    0.720000] io scheduler deadline registered (default)                       
[    0.740000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[147]           
[    0.750000] drivers/phy/phy-ralink-usb.c:ralink_usb_phy_probe[161]           
[    0.760000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled         
[    0.770000] console [ttyS0] disabled                                         
[    0.780000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baudA
[    0.800000] console [ttyS0] enabled                                          
[    0.800000] console [ttyS0] enabled                                          
[    0.800000] bootconsole [early0] disabled                                    
[    0.800000] bootconsole [early0] disabled                                    
[    0.800000] m25p80 spi32766.0: found w25q128, expected s25fl064k             
[    0.800000] m25p80 spi32766.0: w25q128 (16384 Kbytes)                        
[    0.800000] 4 ofpart partitions found on MTD device spi32766.0               
[    0.800000] Creating 4 MTD partitions on "spi32766.0":                       
[    0.800000] 0x000000000000-0x000000030000 : "u-boot"                         
[    0.800000] 0x000000030000-0x000000040000 : "u-boot-env"                     
[    0.800000] 0x000000040000-0x000000050000 : "factory"                        
[    0.800000] 0x000000050000-0x000000800000 : "firmware"                       
[    0.800000] 2 uimage-fw partitions found on MTD device firmware              
[    0.800000] 0x000000050000-0x000000167e65 : "kernel"                         
[    0.800000] 0x000000167e65-0x000000800000 : "rootfs"                         
[    0.800000] mtd: device 5 (rootfs) set to be root filesystem                 
[    0.800000] 1 squashfs-split partitions found on MTD device rootfs           
[    0.800000] 0x000000340000-0x000000800000 : "rootfs_data"                    
[    0.800000] libphy: Fixed MDIO Bus: probed                                   
[    0.800000] ralink_soc_eth 10100000.ethernet: generated random MAC address 08
[    0.800000] libphy: mdio: probed                                             
[    0.800000] switch0: Atheros AR8337 rev. 2 switch registered on mdio-bus     
[    1.130000] ralink_soc_eth 10100000.ethernet: using fixed link parameters    
[    1.140000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver           
[    1.150000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq5
[    1.170000] rt2880_wdt 10000120.watchdog: Initialized                        
[    1.180000] TCP: cubic registered                                            
[    1.190000] NET: Registered protocol family 17                               
[    1.200000] bridge: automatic filtering via arp/ip/ip6tables has been deprec.
[    1.220000] 8021q: 802.1Q VLAN Support v1.8                                  
[    1.250000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5. 
[    1.260000] Freeing unused kernel memory: 136K (8031e000 - 80340000)         
[    3.410000] init: Console is alive                                           
[    3.410000] init: - watchdog -                                               
[    5.990000] usbcore: registered new interface driver usbfs                   
[    6.000000] usbcore: registered new interface driver hub                     
[    6.010000] usbcore: registered new device driver usb                        
[    6.030000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver       
[    6.030000] ehci-platform: EHCI generic platform driver                      
[    6.030000] phy phy-usbphy.0: remote usb device wakeup disabled              
[    6.030000] phy phy-usbphy.0: UTMI 16bit 30MHz                               
[    6.030000] ehci-platform 101c0000.ehci: EHCI Host Controller                
[    6.030000] ehci-platform 101c0000.ehci: new USB bus registered, assigned bu1
[    6.030000] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000           
[    6.350000] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00          
[    6.360000] hub 1-0:1.0: USB hub found                                       
[    6.370000] hub 1-0:1.0: 1 port detected                                     
[    6.380000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver           
[    6.390000] ohci-platform: OHCI generic platform driver                      
[    6.400000] ohci-platform 101c1000.ohci: Generic Platform OHCI controller    
[    6.420000] ohci-platform 101c1000.ohci: new USB bus registered, assigned bu2
[    6.430000] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000           
[    6.500000] hub 2-0:1.0: USB hub found                                       
[    6.510000] hub 2-0:1.0: 1 port detected                                     
[    6.690000] usb 1-1: new high-speed USB device number 2 using ehci-platform  
[    6.710000] init: - preinit -                                                
[    6.860000] hub 1-1:1.0: USB hub found                                       
[    6.870000] hub 1-1:1.0: 4 ports detected                                    
[    7.340000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/)
[    7.340000] 8021q: adding VLAN 0 to HW filter on device eth0                 
[    7.340000] random: mktemp urandom read with 10 bits of entropy available    
Press the [f] key and hit [enter] to enter failsafe mode                        
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level    
[    7.660000] usb 1-1.3: new high-speed USB device number 3 using ehci-platform
[    7.780000] hub 1-1.3:1.0: USB hub found                                     
[    7.790000] hub 1-1.3:1.0: 4 ports detected                                  
[   10.600000] mount_root: jffs2 not ready yet, using temporary tmpfs overlay   
[   10.630000] ralink_soc_eth 10100000.ethernet eth0: port 5 link down          
[   10.640000] procd: - early -                                                 
[   10.650000] procd: - watchdog -                                              
[   11.590000] procd: - ubus -                                                  
[   12.910000] procd: - init -                                                  
Please press Enter to activate this console.                                    
[   13.670000] NET: Registered protocol family 10                               
[   13.680000] ip6_tables: (C) 2000-2006 Netfilter Core Team                    
[   13.710000] Loading modules backported from Linux version master-2015-03-09-5
[   13.720000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   13.740000] ip_tables: (C) 2000-2006 Netfilter Core Team                     
[   13.760000] nf_conntrack version 0.5.0 (960 buckets, 3840 max)               
[   13.810000] xt_time: kernel timezone is -0000                                
[   13.850000] cfg80211: Calling CRDA to update world regulatory domain         
[   13.890000] cfg80211: World regulatory domain updated:                       
[   13.890000] cfg80211:  DFS Master region: unset                              
[   13.890000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_ga)
[   13.890000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 )
[   13.890000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 )
[   13.890000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 )
[   13.890000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 )
[   13.890000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz A)
[   13.890000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000)
[   13.890000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 )
[   13.890000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0)
[   13.890000] PPP generic driver version 2.4.2                                 
[   13.890000] NET: Registered protocol family 24                               
[   13.890000] rt2800_wmac 10180000.wmac: failed to load eeprom property        
[   13.890000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Info - Loading EE.
[   13.890000] rt2800_wmac 10180000.wmac: Direct firmware load for soc_wmac.eep2
[   13.890000] rt2800_wmac 10180000.wmac: Falling back to user helper           
[   14.250000] firmware soc_wmac.eeprom: firmware_loading_store: map pages faild
[   14.260000] ieee80211 phy0: rt2x00lib_request_eeprom_file: Error - Failed to.
[   14.280000] rt2800_wmac: probe of 10180000.wmac failed with error -11        
[   20.330000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0   
[   20.340000] jffs2_build_filesystem(): unlocking the mtd device... done.      
[   20.350000] jffs2_build_filesystem(): erasing all blocks after the end marke 
[   23.700000] ralink_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/)
[   23.720000] 8021q: adding VLAN 0 to HW filter on device eth0                 
[   23.780000] CPU 0 Unable to handle kernel paging request at virtual address 8
[   23.800000] Oops[#1]:                                                        
[   23.800000] CPU: 0 PID: 772 Comm: netifd Not tainted 3.18.14 #25             
[   23.800000] task: 83b94000 ti: 83b7c000 task.ti: 83b7c000                    
[   23.800000] $ 0   : 00000000 00000000 00000000 00000000                      
[   23.800000] $ 4   : 83990000 00000000 0000001f 00000004                      
[   23.800000] $ 8   : 00000010 80008f40 83135b80 00000000                      
[   23.800000] $12   : 00000004 772073a0 00000000 00000000                      
[   23.800000] $16   : 83985c00 838f0000 83b74440 83135b00                      
[   23.800000] $20   : 00000001 00630158 00430000 00a52d9c                      
[   23.800000] $24   : 00000000 801bb594                                        
[   23.800000] $28   : 83b7c000 83b7dd40 0042ded4 801b43b8                      
[   23.800000] Hi    : 00000004                                                 
[   23.800000] Lo    : 9d874000                                                 
[   23.800000] epc   : 00000000   (null)                                        
[   23.800000]     Not tainted                                                  
[   23.800000] ra    : 801b43b8 ar8xxx_phy_read_status+0x15c/0x190              
[   23.800000] Status: 1100a403 KERNEL EXL IE                                   
[   23.800000] Cause : 50800008                                                 
[   23.800000] BadVA : 00000000                                                 
[   23.800000] PrId  : 00019650 (MIPS 24KEc)                                    
[   23.800000] Modules linked in: rt2800soc rt2800pci rt2800mmio rt2800lib pppon
[   23.800000] Process netifd (pid: 772, threadinfo=83b7c000, task=83b94000, tl)
[   23.800000] Stack : 83b7ddf0 83b7de08 fffffffe 800a77a8 01000101 00000001 000
          83990000 83b7ddb8 83b74440 83135b00 00000001 00630158 00430000 00a52dc
          0042ded4 801bb5ec 83818910 834da220 83818910 00000000 8345cde0 830dd80
          8327ea00 80265774 ffffff9c 83b7ded0 ffffff69 800ab4a4 00000001 0000000
          00000000 00000000 00000000 00000000 00000000 00000000 00000000 0000000
          ...                                                                   
[   23.800000] Call Trace:                                                      
[   23.800000] [<800a77a8>] path_put+0x18/0x2c                                  
[   23.800000] [<801bb5ec>] fe_get_settings+0x58/0x78                           
[   23.800000] [<80265774>] port_cost+0x18/0x100                                
[   23.800000] [<800ab4a4>] filename_lookup.isra.52+0x34/0xa0                   
[   23.800000] [<80265fec>] br_add_if+0x1ac/0x48c                               
[   23.800000] [<801f6280>] dev_ifsioc+0x30c/0x330                              
[   23.800000] [<801f5f0c>] dev_load+0x18/0x80                                  
[   23.800000] [<801f687c>] dev_ioctl+0x5d8/0x6c8                               
[   23.800000] [<800afbcc>] do_vfs_ioctl+0x4d4/0x5e0                            
[   23.800000] [<800a403c>] SyS_stat64+0x18/0x3c                                
[   23.800000] [<800a0c60>] __fput+0x1c0/0x1e8                                  
[   23.800000] [<800afd28>] SyS_ioctl+0x50/0x94                                 
[   23.800000] [<80006b5c>] handle_sys+0x11c/0x140                              
[   23.800000]                                                                  
[   23.800000]                                                                  
Code: (Bad address in epc)                                                      
[   23.800000]                                                                  
[   24.350000] ---[ end trace a9a0137d6cfef71b ]---

Current DTS (just the Ethernet section) looks like this:

    ethernet@10100000 {
        status = "okay";

        pinctrl-names = "default";
        pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>;

        ralink,port-map = "llllw";

        port@5 {
            status = "okay";
            ralink,fixed-link = <1000 1 1 1>;
            phy-mode = "rgmii";
        };

        mdio-bus {
            status = "okay";

            phy0: ethernet-phy@0 {
                reg = <0>;
                phy-mode = "rgmii";
                        qca,ar8327-initvals = <

                                        0x00004 0x07600000 /* PAD0_MODE */
                                        0x00008 0x00000000 /* PAD5_MODE */
                                        0x0000c 0x01000000 /* PAD6_MODE */
                                        0x00010 0x40000000 /* POWER_ON_STRIP */
                                        0x00050 0xcf35cf35 /* LED_CTRL0 */
                                        0x00054 0xcf35cf35 /* LED_CTRL1 */
                                        0x00058 0xcf35cf35 /* LED_CTRL2 */
                                        0x0005c 0x03ffff00 /* LED_CTRL3 */
                                        0x0007c 0x0000007e /* PORT0_STATUS */
                                >;

            };
            phy4: ethernet-phy@4 {
                reg = <4>;
                phy-mode = "rgmii";
            };
            phy1f: ethernet-phy@1f {
                reg = <0x1f>;
                phy-mode = "rgmii";
            };
        };
    };

        gsw@10110000 {
                ralink,port4 = "gmac";
                mediatek,mt7530 = <1>;
        };

I've had to keep the mediatek,mt7530 line, without it the Atheros driver doesn't appear to be loaded:

[    0.800000] ralink_soc_eth 10100000.ethernet: generated random MAC address 72:15:88:88:f0:18
[    0.800000] libphy: mdio: probed
[    0.800000] ralink_soc_eth 10100000.ethernet: using fixed link parameters
[    0.800000] ralink_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.120000] ralink_soc_eth 10100000.ethernet eth0: ralink at 0xb0100000, irq 5
[    1.140000] rt2880_wdt 10000120.watchdog: Initialized

The same thing happens I remove the gsw@10110000 section altogether - no Atheros driver loaded, no switch detected.

I wonder why the Atheros driver only gets probed when the gsw@10110000  section is still present and the mt7530 switch is enabled... maybe it doesn't look for a driver if that line is missing???

Thank you once again,
Razvan

Ok, I've tried a few other configurations but I can't seem to be able to make this work. So is there someone (maybe Serge or someone else) that would be willing to help (for a fee)? I can either give you remote access to one of these boards (SSH into a Linux machine that has an USB serial adapter going into the board console, an Ethernet cable going into port #2 (port #1 works, we need all 5 to work) and a remote power switch if you need to turn it on/off).

We only have two of these boards at this point, so I can't ship one to you, but we should be getting more in a couple of weeks. If anyone feels up to it, please PM me. Once again, we will pay you for your effort.

To summarize, we need the MT7620A to detect the QCA8337 switch and use it to access each of the 5 Ethernet ports separately. I can provide you a config that makes it see 3 of the ports (1, 4 and 5) using the MT7620 switch, not Atheros. It works ok with those 3, we need all 5.

If you think I should post this somewhere else as well, please let me know.

Thanks again,
Razvan

The discussion might have continued from here.