Support for Linksys EA7500 V2

Hi, I am trying to get Openwrt working on Linksys EA7500 V2, spec:

MT7621N
MT7615 Wifi chip
128MB NAND
256MB RAM

For now I can get the initramfs to boot and wired network is working, however, I cant seems to make it recognize the MT7615 chip, (lspci returns empty)

I appreciate any help, thanks in advance!

Openwrt bootlog

dmesg
[    0.000000] Linux version 4.14.132 (jksl@jksl-ZenBook-Pro-15-UX550GDX-UX580GD) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10588-7b73cad7be)) #0 SMP Tue Jul 30 13:00:52 2019
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is Linksys EA7500 V2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 10000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000] free_area_init_node: node 0, pgdat 805ee4c0, node_mem_map 81003000
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] random: get_random_bytes called from start_kernel+0x9c/0x4d8 with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26064 r8192 d23088 u57344
[    0.000000] pcpu-alloc: s26064 r8192 d23088 u57344 alloc=14*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Writing ErrCtl register=00012400
[    0.000000] Readback ErrCtl register=00012400
[    0.000000] Memory: 248692K/262144K available (4784K kernel code, 251K rwdata, 1036K rodata, 4284K init, 254K bss, 13452K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.007806] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.073979] pid_max: default: 32768 minimum: 301
[    0.078799] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.085308] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.094475] Hierarchical SRCU implementation.
[    0.099697] smp: Bringing up secondary CPUs ...
[    0.106300] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.106310] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.106321] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.106457] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.164455] Synchronize counters for CPU 1: done.
[    0.200175] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.200184] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.200193] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.200268] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.255683] Synchronize counters for CPU 2: done.
[    0.287536] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.287545] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.287553] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.287631] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.340866] Synchronize counters for CPU 3: done.
[    0.370732] smp: Brought up 1 node, 4 CPUs
[    0.378714] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.388512] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.394920] pinctrl core: initialized pinctrl subsystem
[    0.401514] NET: Registered protocol family 16
[    0.409240] rt2880-pinmux pinctrl: error claiming hogs: -22
[    0.414774] rt2880-pinmux pinctrl: could not claim hogs: -22
[    0.420401] rt2880-pinmux: probe of pinctrl failed with error -22
[    0.432042] FPU Affinity set after 11720 emulations
[    0.432586] mt7621-pci 1e140000.pcie: could not find pctldev for node /pinctrl/pcie, deferring probe
[    0.450996] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.456844] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.462554] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.471173] clocksource: Switched to clocksource GIC
[    0.477885] NET: Registered protocol family 2
[    0.482844] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.489731] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.496223] TCP: Hash tables configured (established 2048 bind 2048)
[    0.502636] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.508394] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.514878] NET: Registered protocol family 1
[    0.519176] PCI: CLS 0 bytes, default 32
[    4.131110] 4 CPUs re-calibrate udelay(lpj = 2916352)
[    4.137722] Crashlog allocated RAM at address 0x3f00000
[    4.143143] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    4.158701] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    4.164478] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    4.176250] random: fast init done
[    4.181638] io scheduler noop registered
[    4.185473] io scheduler deadline registered (default)
[    4.191620] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    4.199263] console [ttyS0] disabled
[    4.202858] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    4.211839] console [ttyS0] enabled
[    4.218694] bootconsole [early0] disabled
[    4.227307] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    4.234185] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    4.241408] Enable NFI Clock
[    4.244281] # MTK NAND # : Use HW ECC
[    4.247940] Device not found, ID: c2f1
[    4.251694] Not Support this Device! 

[    4.255422] chip_mode=00000001
[    4.258459] Support this Device in MTK table! c2f1 

[    4.263431] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    4.269889] nand: device found, Manufacturer ID: 0xc2, Chip ID: 0xf1
[    4.276229] nand: Macronix NAND 128MiB 3,3V 8-bit
[    4.280911] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.288484] Scanning device for bad blocks
[    4.534092] 11 fixed-partitions partitions found on MTD device MT7621-NAND
[    4.540934] Creating 11 MTD partitions on "MT7621-NAND":
[    4.546247] 0x000000000000-0x000000080000 : "boot"
[    4.552265] 0x000000080000-0x0000000c0000 : "u_env"
[    4.558235] 0x0000000c0000-0x000000100000 : "Factory"
[    4.564433] 0x000000100000-0x000000140000 : "s_env"
[    4.570380] 0x000000140000-0x000000180000 : "devinfo"
[    4.576561] 0x000000180000-0x000000580000 : "kernel"
[    4.582687] 0x000000580000-0x000002980000 : "rootfs"
[    4.588949] mtd: device 6 (rootfs) set to be root filesystem
[    4.595220] mtdsplit: no squashfs found in "rootfs"
[    4.600112] 0x000002980000-0x000002d80000 : "alt_kernel"
[    4.606575] 0x000002d80000-0x000005180000 : "alt_rootfs"
[    4.613272] 0x000005180000-0x000005280000 : "sysdiag"
[    4.619433] 0x000005280000-0x000007f80000 : "syscfg"
[    4.625896] [mtk_nand] probe successfully!
[    4.630677] Signature matched and data read!
[    4.634962] load_fact_bbt success 1023
[    4.639390] libphy: Fixed MDIO Bus: probed
[    4.712911] mtk_soc_eth 1e100000.ethernet: generated random MAC address b6:6c:ca:75:bd:40
[    4.721267] libphy: mdio: probed
[    6.136392] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    6.143106] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    6.153968] NET: Registered protocol family 10
[    6.159978] Segment Routing with IPv6
[    6.163799] NET: Registered protocol family 17
[    6.168295] 8021q: 802.1Q VLAN Support v1.8
[    6.174348] mt7621-pci 1e140000.pcie: could not find pctldev for node /pinctrl/pcie, deferring probe
[    6.184105] hctosys: unable to open rtc device (rtc0)
[    6.204799] Freeing unused kernel memory: 4284K
[    6.209328] This architecture does not have kernel memory protection.
[    6.228475] init: Console is alive
[    6.232273] init: - watchdog -
[    6.248164] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.263585] usbcore: registered new interface driver usbfs
[    6.269175] usbcore: registered new interface driver hub
[    6.274664] usbcore: registered new device driver usb
[    6.283492] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.290937] ehci-platform: EHCI generic platform driver
[    6.301927] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vbus not found, using dummy regulator
[    6.310598] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[    6.319533] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.324881] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    6.341244] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    6.350411] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    6.357311] hub 1-0:1.0: USB hub found
[    6.361204] hub 1-0:1.0: 2 ports detected
[    6.365877] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.371260] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    6.378725] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
[    6.385256] mt7621-pci 1e140000.pcie: could not find pctldev for node /pinctrl/pcie, deferring probe
[    6.394524] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.403529] hub 2-0:1.0: USB hub found
[    6.407358] hub 2-0:1.0: 1 port detected
[    6.412242] mt7621-pci 1e140000.pcie: could not find pctldev for node /pinctrl/pcie, deferring probe
[    6.424361] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.451444] init: - preinit -
[    6.587681] mtk_soc_eth 1e100000.ethernet: PPE started
[    7.953712] mtk_soc_eth 1e100000.ethernet eth0: port 1 link up
[    8.167497] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[    9.715592] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[    9.730228] procd: - early -
[    9.733280] procd: - watchdog -
[   10.371303] procd: - watchdog -
[   10.374764] procd: - ubus -
[   10.382696] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.431665] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.438345] random: ubusd: uninitialized urandom read (4 bytes read)
[   10.445641] procd: - init -
[   10.684627] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.695752] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   10.700081] urngd: v1.0.0 started.
[   10.706619] Loading modules backported from Linux version v5.2-rc7-0-g6fbc7275c7a9
[   10.714200] Backport generated by backports.git v5.2-rc7-1-0-g021a6ba1
[   10.722551] ip_tables: (C) 2000-2006 Netfilter Core Team
[   10.734397] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[   10.778626] xt_time: kernel timezone is -0000
[   10.831211] PPP generic driver version 2.4.2
[   10.836748] NET: Registered protocol family 24
[   10.843771] kmodloader: done loading kernel modules from /etc/modules.d/*
[   10.849718] random: crng init done
[   10.853951] random: 7 urandom warning(s) missed due to ratelimiting
[   25.453675] mtk_soc_eth 1e100000.ethernet: PPE started
[   25.463646] device eth0 entered promiscuous mode
[   25.469018] br-lan: port 1(eth0.2) entered blocking state
[   25.474544] br-lan: port 1(eth0.2) entered disabled state
[   25.480553] device eth0.2 entered promiscuous mode
[   25.488280] br-lan: port 1(eth0.2) entered blocking state
[   25.493771] br-lan: port 1(eth0.2) entered forwarding state
[   25.499906] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   26.522117] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
root@OpenWrt:/# 

Here is my dts file:

// SPDX-License-Identifier: GPL-2.0
/dts-v1/;

#include "mt7621.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "linksys,ea7500-v2", "mediatek,mt7621-soc";
	model = "Linksys EA7500 V2";

	chosen {
		bootargs = "console=ttyS0,115200";
	};

};

&nand {
	status = "okay";

	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;
		
		partition@0 {
			label = "boot";
			reg = <0x0 0x080000>;
			read-only;
		};

		partition@80000 {
			label = "u_env";
			reg = <0x080000 0x040000>;
			read-only;
		};

		Factory: partition@c0000 {
			label = "Factory";
			reg = <0x0c0000 0x040000>;
			read-only;
		};

		partition@100000 {
			label = "s_env";
			reg = <0x100000 0x040000>;
			read-only;
		};

		partition@140000 {
			label = "devinfo";
			reg = <0x140000 0x040000>;
			read-only;
		};

		partition@180000 {
			label = "kernel";
			reg = <0x180000 0x400000>; //4MB kernel
		};

		partition@580000 {
			label = "rootfs";
			reg = <0x580000 0x2400000>;
		};
		
		partition@2980000 {
			label = "alt_kernel";
			reg = <0x2980000 0x400000>;
			read-only;
		};
		
		partition@2d80000 {
			label = "alt_rootfs";
			reg = <0x2d80000 0x2400000>;
			read-only;
		};
		
		partition@5180000 {
			label = "sysdiag";
			reg = <0x5180000 0x100000>;
			read-only;
		};
	
		partition@5280000 {
			label = "syscfg";
			reg = <0x5280000 0x2d00000>;
			read-only;
		};
	};
};

&pcie {
	status = "okay";
};

&pcie0 {
	mt76@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x8000>;
		ieee80211-freq-limit = <5000000 6000000>;
	};
};

&pcie1 {
	mt76@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x0000>;
		ieee80211-freq-limit = <2400000 2500000>;
	};
};

A post was merged into an existing topic: Adding OpenWrt support for Linksys EA7500 v2