[BPI-R64] OpenWRT kernel 5.4.40 running from eMMC

Why not just disable the block with /* */ ? This dts is not needed for r64

Thank you. I renamed &pcie to &pcie0 just to make it compile.

But now it looks like that I’ve lost mk7615e completely.

Starting kernel ...

[ATF][    23.907478]save kernel info
[ATF][    23.910680]Kernel_EL2
[ATF][    23.913436]Kernel is 64Bit
[ATF][    23.916624]pc=0x41080000, r0=0x6bff6000, r1=0x0
INFO:    BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO:    BL3-1: Next image address = 0x41080000
INFO:    BL3-1: Next image spsr = 0x3c9
[ATF][    23.934890]el3_exit
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.4.42 ([email protected]) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13342-e35e40ad82)) #0 SMP Sat May 20
[    0.000000] Machine model: Bananapi BPI-R64
[    0.000000] On node 0 totalpages: 262096
[    0.000000]   DMA32 zone: 4096 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 262096 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 20 pages/cpu s43608 r8192 d30120 u81920
[    0.000000] pcpu-alloc: s43608 r8192 d30120 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258000
[    0.000000] Kernel command line: board=bpi-r64 console=ttyS0,115200n1 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rootwait servi2
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1018396K/1048384K available (6590K kernel code, 432K rwdata, 1896K rodata, 448K init, 285K bss, 29988K reserved,)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     CONFIG_RCU_FANOUT set to non-default value of 32.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] random: get_random_bytes called from start_kernel+0x2d4/0x430 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000003] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.000169] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=50000)
[    0.000176] pid_max: default: 32768 minimum: 301
[    0.000262] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000272] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.001153] ASID allocator initialised with 65536 entries
[    0.001202] rcu: Hierarchical SRCU implementation.
[    0.001462] smp: Bringing up secondary CPUs ...
[    0.001778] Detected VIPT I-cache on CPU1
[    0.001815] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.001869] smp: Brought up 1 node, 2 CPUs
[    0.001875] SMP: Total of 2 processors activated.
[    0.001879] CPU features: detected: 32-bit EL0 Support
[    0.001883] CPU features: detected: CRC32 instructions
[    0.001984] CPU: All CPU(s) started at EL2
[    0.001993] alternatives: patching kernel code
[    0.005269] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.005283] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.005374] pinctrl core: initialized pinctrl subsystem
[    0.005801] NET: Registered protocol family 16
[    0.006082] DMA: preallocated 256 KiB pool for atomic allocations
[    0.017038] GPIO line 499 (asm_sel) hogged as output/high
[    0.029753] SCSI subsystem initialized
[    0.029903] libata version 3.00 loaded.
[    0.030037] usbcore: registered new interface driver usbfs
[    0.030063] usbcore: registered new interface driver hub
[    0.030090] usbcore: registered new device driver usb
[    0.030865] Bluetooth: Core ver 2.22
[    0.030899] NET: Registered protocol family 31
[    0.030902] Bluetooth: HCI device and connection manager initialized
[    0.030910] Bluetooth: HCI socket layer initialized
[    0.030916] Bluetooth: L2CAP socket layer initialized
[    0.030927] Bluetooth: SCO socket layer initialized
[    0.031408] clocksource: Switched to clocksource arch_sys_counter
[    0.031880] thermal_sys: Registered thermal governor 'fair_share'
[    0.031882] thermal_sys: Registered thermal governor 'bang_bang'
[    0.031887] thermal_sys: Registered thermal governor 'step_wise'
[    0.031890] thermal_sys: Registered thermal governor 'user_space'
[    0.031894] thermal_sys: Registered thermal governor 'power_allocator'
[    0.032150] NET: Registered protocol family 2
[    0.032419] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.032438] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.032489] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.032594] TCP: Hash tables configured (established 8192 bind 8192)
[    0.032680] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.032701] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.032794] NET: Registered protocol family 1
[    0.032813] PCI: CLS 0 bytes, default 64
[    0.033576] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.036898] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.036909] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.050240] mtk-tphy 1a0c4000.usb-phy: failed to get ref_clk(id-1)
[    0.053430] mt-pmic-pwrap 10001000.pwrap: unexpected interrupt int=0x1
[    0.067414] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.068049] printk: console [ttyS0] disabled
[    0.088395] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 118, base_baud = 1562500) is a ST16650V2
[    0.629806] printk: console [ttyS0] enabled
[    0.654669] 11004000.serial: ttyS1 at MMIO 0x11004000 (irq = 119, base_baud = 1562500) is a ST16650V2
[    0.664352] 1100c000.serial: ttyS2 at MMIO 0x1100c000 (irq = 125, base_baud = 17499995) is a MediaTek BTIF
[    0.674087] serial serial0: tty port ttyS2 registered
[    0.679345] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.686878] libphy: Fixed MDIO Bus: probed
[    0.714308] libphy: mdio: probed
[    0.717576] mtk_soc_eth 1b100000.ethernet: generated random MAC address 6a:da:5c:29:1b:ae
[    0.726019] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffffc011500000, irq 134
[    0.735173] mtk_soc_eth 1b100000.ethernet: generated random MAC address 66:08:0e:1e:72:8a
[    0.743555] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xffffffc011500000, irq 134
[    0.752764] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.759288] ehci-pci: EHCI PCI platform driver
[    0.763758] ehci-platform: EHCI generic platform driver
[    0.769092] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.775295] ohci-platform: OHCI generic platform driver
[    0.781056] usbcore: registered new interface driver usb-storage
[    0.787444] rtc_mt7622 10212800.rtc: registered as rtc0
[    0.793327] Driver for 1-wire Dallas network protocol.
[    0.798682] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values
[    0.807869] mtk-wdt 10212000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    0.815701] Bluetooth: HCI UART driver ver 2.3
[    0.820142] Bluetooth: HCI UART protocol H4 registered
[    0.825275] Bluetooth: HCI UART protocol BCSP registered
[    0.830633] Bluetooth: HCI UART protocol Broadcom registered
[    0.836306] Bluetooth: HCI UART protocol QCA registered
[    0.867736] mtk-msdc 11240000.mmc: Got CD GPIO
[    0.897879] NET: Registered protocol family 10
[    0.902965] Segment Routing with IPv6
[    0.906676] NET: Registered protocol family 17
[    0.911139] 8021q: 802.1Q VLAN Support v1.8
[    0.925745] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    0.932298] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    0.938134] mtk-pcie 1a143000.pcie:   MEM 0x20000000..0x27ffffff -> 0x20000000
[    0.988509] mtk-msdc 11230000.mmc: phase: [map:fffffff] [maxlen:28] [final:9]
[    0.996416] mmc0: new HS200 MMC card at address 0001
[    1.002539] mmcblk0: mmc0:0001 008G30 7.28 GiB 
[    1.007975] mmcblk0boot0: mmc0:0001 008G30 partition 1 4.00 MiB
[    1.014791] mmcblk0boot1: mmc0:0001 008G30 partition 2 4.00 MiB
[    1.020775] mmcblk0rpmb: mmc0:0001 008G30 partition 3 4.00 MiB, chardev (250:0)
[    1.029282]  mmcblk0: p1 p2
[    1.045492] mtk-pcie 1a143000.pcie: Port0 link down
[    1.050519] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00
[    1.056707] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.062190] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff]
[    1.069061] pci_bus 0000:00: scanning bus
[    1.074279] pci_bus 0000:00: fixups for bus
[    1.078459] pci_bus 0000:00: bus scan returning with max=00
[    1.084251] mtk-pcie 1a145000.pcie: host bridge /pcie@1a145000 ranges:
[    1.090783] mtk-pcie 1a145000.pcie: Parsing ranges property...
[    1.096623] mtk-pcie 1a145000.pcie:   MEM 0x28000000..0x2fffffff -> 0x28000000
[    1.103932] mtk-pcie 1a145000.pcie: IRQ index 1 not found
[    1.209357] mtk-pcie 1a145000.pcie: Port1 link down
[    1.214328] mtk-pcie 1a145000.pcie: PCI host bridge to bus 0001:00
[    1.220510] pci_bus 0001:00: root bus resource [bus 00-ff]
[    1.225993] pci_bus 0001:00: root bus resource [mem 0x28000000-0x2fffffff]
[    1.232864] pci_bus 0001:00: scanning bus
[    1.238011] pci_bus 0001:00: fixups for bus
[    1.242193] pci_bus 0001:00: bus scan returning with max=00
[    1.247885] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    1.256068] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    1.827418] mt753x gsw@0: LAN/WAN VLAN setting=wllll
[    1.832837] mt753x gsw@0: Switch is MediaTek MT7531BE rev 0
[    6.474879] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[    6.480115] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 1
[    6.489162] xhci-mtk 1a0c0000.usb: hcc params 0x01403198 hci version 0x96 quirks 0x0000000000210010
[    6.498233] xhci-mtk 1a0c0000.usb: irq 130, io mem 0x1a0c0000
[    6.504368] hub 1-0:1.0: USB hub found
[    6.508134] hub 1-0:1.0: 2 ports detected
[    6.512354] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[    6.517584] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 2
[    6.524980] xhci-mtk 1a0c0000.usb: Host supports USB 3.0 SuperSpeed
[    6.531274] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.539587] hub 2-0:1.0: USB hub found
[    6.543340] hub 2-0:1.0: 1 port detected
[    6.547600] rtc_mt7622 10212800.rtc: setting system clock to 2020-05-29T11:36:50 UTC (1590752210)
[    6.562687] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    6.570845] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    6.577818] Freeing unused kernel memory: 448K
[    6.587407] Run /sbin/init as init process
[    6.640761] init: Console is alive
[    6.644264] init: - watchdog -
[    6.683513] random: fast init done
[    6.769251] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.782971] ehci-fsl: Freescale EHCI Host controller driver
[    6.793066] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.808844] init: - preinit -
[    6.889308] mtk_soc_eth 1b100000.ethernet: PPE started
[    6.894490] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    6.902809] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
Press the [f] key and hit [enter] to enter failsafe mode
Press [    6.919436] usb 1-2: new high-speed USB device number 2 using xhci-mtk
the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.147106] usb-storage 1-2:1.0: USB Mass Storage device detected
[    7.153441] random: procd: uninitialized urandom read (4 bytes read)
[    7.153468] scsi host0: usb-storage 1-2:1.0
[    8.197074] scsi 0:0:0:0: Direct-Access     JetFlash Transcend 4GB    8.07 PQ: 0 ANSI: 2
[    8.206292] sd 0:0:0:0: [sda] 7847936 512-byte logical blocks: (4.02 GB/3.74 GiB)
[    8.213936] sd 0:0:0:0: [sda] Write Protect is off
[    8.218728] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[    8.223917] sd 0:0:0:0: [sda] No Caching mode page found
[    8.229231] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    8.422453]  sda: sda1
[    8.425753] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   10.936852] mount_root: mounting /dev/root
[   10.942710] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   10.948232] mount_root: loading kmods from internal overlay
[   10.962171] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   10.969796] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   11.097395] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.110282] procd: - early -
[   11.113237] procd: - watchdog -
[   11.631049] procd: - watchdog -
[   11.634313] procd: - ubus -
[   11.641140] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.687434] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.693899] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.700507] procd: - init -
Please press Enter to activate this console.
[   11.781378] urngd: v1.0.2 started.
[   11.801564] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.807706] random: crng init done
[   11.811324] random: 6 urandom warning(s) missed due to ratelimiting
[   11.825835] tun: Universal TUN/TAP device driver, 1.6
[   11.841368] cryptodev: driver 1.10 loaded.
[   11.848235] i2c /dev entries driver
[   11.858441] hidraw: raw HID events driver (C) Jiri Kosina
[   11.866060] Mirror/redirect action on
[   11.873352] u32 classifier
[   11.876092]     input device check on
[   11.879749]     Actions configured
[   11.900076] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   11.905411] Bluetooth: BNEP filters: protocol multicast
[   11.910643] Bluetooth: BNEP socket layer initialized
[   11.917486] usbcore: registered new interface driver btusb
[   11.923904] usbcore: registered new interface driver cdc_wdm
[   11.930150] Loading modules backported from Linux version v5.7-rc3-0-g6a8b55ed4056
[   11.937735] Backport generated by backports.git v5.7-rc3-1-0-gc0c7d2bb
[   11.945442] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[   11.951393] Bluetooth: HIDP socket layer initialized
[   11.966364] Bluetooth: RFCOMM TTY layer initialized
[   11.971285] Bluetooth: RFCOMM socket layer initialized
[   11.976438] Bluetooth: RFCOMM ver 1.11
[   11.981809] usbcore: registered new interface driver ums-alauda
[   11.988284] usbcore: registered new interface driver ums-cypress
[   11.994636] usbcore: registered new interface driver ums-datafab
[   12.000938] usbcore: registered new interface driver ums-freecom
[   12.007256] usbcore: registered new interface driver ums-isd200
[   12.013484] usbcore: registered new interface driver ums-jumpshot
[   12.019863] usbcore: registered new interface driver ums-karma
[   12.026067] usbcore: registered new interface driver ums-sddr09
[   12.032307] usbcore: registered new interface driver ums-sddr55
[   12.038592] usbcore: registered new interface driver ums-usbat
[   12.048576] wireguard: WireGuard 1.0.20200520 loaded. See www.wireguard.com for information.
[   12.057034] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
[   12.076533] xt_time: kernel timezone is -0000
[   12.081505] usbcore: registered new interface driver cdc_ether
[   12.139656] mt7622-wmac 18000000.wmac: Invalid MAC address, using random address fa:2c:f2:67:82:e2
[   12.149686] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.172091] PPP generic driver version 2.4.2
[   12.177543] NET: Registered protocol family 24
[   12.183392] usbcore: registered new interface driver qmi_wwan
[   12.189357] mt7622-wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20190801210006a
[   12.189357] 
[   12.200925] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.219505] mt7622-wmac 18000000.wmac: N9 Firmware Version: 2.0, Build Time: 20200131180931
[   18.416722] mtk_soc_eth 1b100000.ethernet eth0: Link is Down
[   18.425276] mtk_soc_eth 1b100000.ethernet: 0x100 = 0xffff9070, 0x10c = 0x100808ff
[   18.432804] mtk_soc_eth 1b100000.ethernet: reset pse
[   18.522186] mtk_soc_eth 1b100000.ethernet: PPE started
[   18.527423] debugfs: Directory 'mtk_ppe' with parent '/' already present!
[   18.534270] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   18.542799] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   18.552071] br-lan: port 1(eth0) entered blocking state
[   18.557369] br-lan: port 1(eth0) entered disabled state
[   18.562825] device eth0 entered promiscuous mode
[   18.573352] br-lan: port 1(eth0) entered blocking state
[   18.578610] br-lan: port 1(eth0) entered forwarding state
[   18.589158] mtk_soc_eth 1b100000.ethernet eth1: configuring for fixed/rgmii link mode
[   18.597171] mtk_soc_eth 1b100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx

And here is iw dev output

root@OpenWrt:/# iw dev
phy#0
        Interface wlan0
                ifindex 4
                wdev 0x1
                addr fa:2c:f2:67:82:e2
                type managed
                txpower 6.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0

you have an bpi-r64, right? not the reference-board or the elecom…

then you need to look in the mt7622-bananapi-r64.dts if the pcie0/1 are enabled. show us output of lspci

lspci is empty. I had to recompile once again to include busybox.

mt7622-bananapi-bpi-r64.dts is as follows.

/*
 * Copyright (c) 2018 MediaTek Inc.
 * Author: Ryder Lee <[email protected]>
 *
 * SPDX-License-Identifier: (GPL-2.0 OR MIT)
 */

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

#include "mt7622.dtsi"
#include "mt6380.dtsi"

/ {
	model = "Bananapi BPI-R64";
	compatible = "bananapi,bpi-r64", "mediatek,mt7622";

	aliases {
		serial0 = &uart0;
	};

	chosen {
		stdout-path = "serial0:115200n8";
		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512 debug loglevel=7 rootfstype=squashfs,ext4 earlyprintk block2mtd.block2mtd=/dev/mmcblk0,65536,eMMC,5 mtdparts=eMMC:768k(preloader)ro,512k(uboot),512k(uboot-env),256k(Factory),64M(firmware),2048M(usrdata)";
	};

	cpus {
		cpu@0 {
			proc-supply = <&mt6380_vcpu_reg>;
			sram-supply = <&mt6380_vm_reg>;
		};

		cpu@1 {
			proc-supply = <&mt6380_vcpu_reg>;
			sram-supply = <&mt6380_vm_reg>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		factory {
			label = "factory";
			linux,code = <BTN_0>;
			gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
		};

		wps {
			label = "wps";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&pio 102 GPIO_ACTIVE_HIGH>;
		};
	};

	gsw: gsw@0 {
		compatible = "mediatek,mt753x";
		mediatek,ethsys = <&ethsys>;
		#address-cells = <1>;
		#size-cells = <0>;
	};

	leds {
		compatible = "gpio-leds";

		green {
			label = "bpi-r64:pio:green";
			gpios = <&pio 89 GPIO_ACTIVE_HIGH>;
			default-state = "off";
		};

		red {
			label = "bpi-r64:pio:red";
			gpios = <&pio 88 GPIO_ACTIVE_HIGH>;
			default-state = "off";
		};
	};

	memory {
		reg = <0 0x40000000 0 0x40000000>;
	};

	reg_1p8v: regulator-1p8v {
		compatible = "regulator-fixed";
		regulator-name = "fixed-1.8V";
		regulator-min-microvolt = <1800000>;
		regulator-max-microvolt = <1800000>;
		regulator-always-on;
	};

	reg_3p3v: regulator-3p3v {
		compatible = "regulator-fixed";
		regulator-name = "fixed-3.3V";
		regulator-min-microvolt = <3300000>;
		regulator-max-microvolt = <3300000>;
		regulator-boot-on;
		regulator-always-on;
	};

	reg_5v: regulator-5v {
		compatible = "regulator-fixed";
		regulator-name = "fixed-5V";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		regulator-boot-on;
		regulator-always-on;
	};
};

&bch {
	status = "disabled";
};

&btif {
	status = "okay";
};

&cir {
	pinctrl-names = "default";
	pinctrl-0 = <&irrx_pins>;
	status = "okay";
};

&eth {
	status = "okay";
	gmac0: mac@0 {
		compatible = "mediatek,eth-mac";
		reg = <0>;
		phy-mode = "2500base-x";

		fixed-link {
			speed = <2500>;
			full-duplex;
			pause;
		};
	};

	gmac1: mac@1 {
		compatible = "mediatek,eth-mac";
		reg = <1>;
		phy-mode = "rgmii";

		fixed-link {
			speed = <1000>;
			full-duplex;
			pause;
		};
	};

	mdio: mdio-bus {
		#address-cells = <1>;
		#size-cells = <0>;
	};
};

&gsw {
        mediatek,mdio = <&mdio>;
        mediatek,portmap = "wllll";
        mediatek,mdio_master_pinmux = <0>;
        reset-gpios = <&pio 54 0>;
        interrupt-parent = <&pio>;
        interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;
        status = "okay";

        port5: port@5 {
                compatible = "mediatek,mt753x-port";
                reg = <5>;
                phy-mode = "rgmii";
                fixed-link {
                        speed = <1000>;
                        full-duplex;
                };
        };

        port6: port@6 {
                compatible = "mediatek,mt753x-port";
                reg = <6>;
                phy-mode = "sgmii";
                fixed-link {
                        speed = <2500>;
                        full-duplex;
                };
        };
};

&i2c1 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c1_pins>;
	status = "okay";
};

&i2c2 {
	pinctrl-names = "default";
	pinctrl-0 = <&i2c2_pins>;
	status = "okay";
};

&mmc0 {
	pinctrl-names = "default", "state_uhs";
	pinctrl-0 = <&emmc_pins_default>;
	pinctrl-1 = <&emmc_pins_uhs>;
	status = "okay";
	bus-width = <8>;
	max-frequency = <50000000>;
	cap-mmc-highspeed;
	mmc-hs200-1_8v;
	vmmc-supply = <&reg_3p3v>;
	vqmmc-supply = <&reg_1p8v>;
	assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
	assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
	non-removable;

	emmc@0 {
		#address-cells = <1>;
		#size-cells = <1>;
		compatible = "mmc-card";
		reg = <0>;

		partitions {
				compatible = "fixed-partitions";
				#address-cells = <1>;
				#size-cells = <1>;

				partition@0 {
						label = "preloader";
						reg = <0x0000000 0x000c0000>;
						read-only;
				};

				partition@c0000 {
						label = "uboot";
						reg = <0x00c0000 0x00140000>;
				};

				partition@140000 {
						label = "uboot-env";
						reg = <0x0140000 0x001c0000>;
				};

				factory: partition@1c0000 {
						label = "Factory";
						reg = <0x01c0000 0x00200000>;
				};

				partition@200000 {
						label = "firmware";
						reg = <0x0200000 0x02200000>;
				};

				partition@2200000 {
						label = "usrdata";
						reg = <0x2200000 0x82200000>;
				};
		};
	};
};

&mmc1 {
	pinctrl-names = "default", "state_uhs";
	pinctrl-0 = <&sd0_pins_default>;
	pinctrl-1 = <&sd0_pins_uhs>;
	status = "okay";
	bus-width = <4>;
	max-frequency = <50000000>;
	cap-sd-highspeed;
	r_smpl = <1>;
	cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>;
	vmmc-supply = <&reg_3p3v>;
	vqmmc-supply = <&reg_3p3v>;
	assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
	assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
};

&nandc {
	pinctrl-names = "default";
	pinctrl-0 = <&parallel_nand_pins>;
	status = "disabled";
};

&nor_flash {
	pinctrl-names = "default";
	pinctrl-0 = <&spi_nor_pins>;
	status = "disabled";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
	};
};

&pcie0 {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie0_pins>;
	status = "okay";
};

&pcie1 {
	pinctrl-names = "default";
	pinctrl-0 = <&pcie1_pins>;
	status = "okay";
};

&pio {
	/* Attention: GPIO 90 is used to switch between PCIe@1,0 and
	 * SATA functions. i.e. output-high: PCIe, output-low: SATA
	 */
	asm_sel {
		gpio-hog;
		gpios = <90 GPIO_ACTIVE_HIGH>;
		output-high;
	};

	/* eMMC is shared pin with parallel NAND */
	emmc_pins_default: emmc-pins-default {
		mux {
			function = "emmc", "emmc_rst";
			groups = "emmc";
		};

		/* "NDL0","NDL1","NDL2","NDL3","NDL4","NDL5","NDL6","NDL7",
		 * "NRB","NCLE" pins are used as DAT0,DAT1,DAT2,DAT3,DAT4,
		 * DAT5,DAT6,DAT7,CMD,CLK for eMMC respectively
		 */
		conf-cmd-dat {
			pins = "NDL0", "NDL1", "NDL2",
			       "NDL3", "NDL4", "NDL5",
			       "NDL6", "NDL7", "NRB";
			input-enable;
			bias-pull-up;
		};

		conf-clk {
			pins = "NCLE";
			bias-pull-down;
		};
	};

	emmc_pins_uhs: emmc-pins-uhs {
		mux {
			function = "emmc";
			groups = "emmc";
		};

		conf-cmd-dat {
			pins = "NDL0", "NDL1", "NDL2",
			       "NDL3", "NDL4", "NDL5",
			       "NDL6", "NDL7", "NRB";
			input-enable;
			drive-strength = <4>;
			bias-pull-up;
		};

		conf-clk {
			pins = "NCLE";
			drive-strength = <4>;
			bias-pull-down;
		};
	};

	eth_pins: eth-pins {
		mux {
			function = "eth";
			groups = "mdc_mdio", "rgmii_via_gmac2";
		};
	};

	i2c1_pins: i2c1-pins {
		mux {
			function = "i2c";
			groups =  "i2c1_0";
		};
	};

	i2c2_pins: i2c2-pins {
		mux {
			function = "i2c";
			groups =  "i2c2_0";
		};
	};

	i2s1_pins: i2s1-pins {
		mux {
			function = "i2s";
			groups =  "i2s_out_mclk_bclk_ws",
				  "i2s1_in_data",
				  "i2s1_out_data";
		};

		conf {
			pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
			       "I2S_WS", "I2S_MCLK";
			drive-strength = <12>;
			bias-pull-down;
		};
	};

	irrx_pins: irrx-pins {
		mux {
			function = "ir";
			groups =  "ir_1_rx";
		};
	};

	irtx_pins: irtx-pins {
		mux {
			function = "ir";
			groups =  "ir_1_tx";
		};
	};

	/* Parallel nand is shared pin with eMMC */
	parallel_nand_pins: parallel-nand-pins {
		mux {
			function = "flash";
			groups = "par_nand";
		};
	};

	pcie0_pins: pcie0-pins {
		mux {
			function = "pcie";
			groups = "pcie0_pad_perst",
				 "pcie0_1_waken",
				 "pcie0_1_clkreq";
		};
	};

	pcie1_pins: pcie1-pins {
		mux {
			function = "pcie";
			groups = "pcie1_pad_perst",
				 "pcie1_0_waken",
				 "pcie1_0_clkreq";
		};
	};

	pmic_bus_pins: pmic-bus-pins {
		mux {
			function = "pmic";
			groups = "pmic_bus";
		};
	};

	pwm7_pins: pwm1-2-pins {
		mux {
			function = "pwm";
			groups = "pwm_ch7_2";
		};
	};

	wled_pins: wled-pins {
		mux {
			function = "led";
			groups = "wled";
		};
	};

	sd0_pins_default: sd0-pins-default {
		mux {
			function = "sd";
			groups = "sd_0";
		};

		/* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
		 *  "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
		 *  DAT2, DAT3, CMD, CLK for SD respectively.
		 */
		conf-cmd-data {
			pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
			       "I2S2_IN","I2S4_OUT";
			input-enable;
			drive-strength = <8>;
			bias-pull-up;
		};
		conf-clk {
			pins = "I2S3_OUT";
			drive-strength = <12>;
			bias-pull-down;
		};
		conf-cd {
			pins = "TXD3";
			bias-pull-up;
		};
	};

	sd0_pins_uhs: sd0-pins-uhs {
		mux {
			function = "sd";
			groups = "sd_0";
		};

		conf-cmd-data {
			pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
			       "I2S2_IN","I2S4_OUT";
			input-enable;
			bias-pull-up;
		};

		conf-clk {
			pins = "I2S3_OUT";
			bias-pull-down;
		};
	};

	/* Serial NAND is shared pin with SPI-NOR */
	serial_nand_pins: serial-nand-pins {
		mux {
			function = "flash";
			groups = "snfi";
		};
	};

	spic0_pins: spic0-pins {
		mux {
			function = "spi";
			groups = "spic0_0";
		};
	};

	spic1_pins: spic1-pins {
		mux {
			function = "spi";
			groups = "spic1_0";
		};
	};

	/* SPI-NOR is shared pin with serial NAND */
	spi_nor_pins: spi-nor-pins {
		mux {
			function = "flash";
			groups = "spi_nor";
		};
	};

	/* serial NAND is shared pin with SPI-NOR */
	serial_nand_pins: serial-nand-pins {
		mux {
			function = "flash";
			groups = "snfi";
		};
	};

	uart0_pins: uart0-pins {
		mux {
			function = "uart";
			groups = "uart0_0_tx_rx" ;
		};
	};

	uart2_pins: uart2-pins {
		mux {
			function = "uart";
			groups = "uart2_1_tx_rx" ;
		};
	};

	watchdog_pins: watchdog-pins {
		mux {
			function = "watchdog";
			groups = "watchdog";
		};
	};
};

&pwm {
	pinctrl-names = "default";
	pinctrl-0 = <&pwm7_pins>;
	status = "okay";
};

&pwrap {
	pinctrl-names = "default";
	pinctrl-0 = <&pmic_bus_pins>;

	status = "okay";
};

&sata {
	status = "disable";
};

&sata_phy {
	status = "disable";
};

&spi0 {
	pinctrl-names = "default";
	pinctrl-0 = <&spic0_pins>;
	status = "okay";
};

&spi1 {
	pinctrl-names = "default";
	pinctrl-0 = <&spic1_pins>;
	status = "okay";
};

&ssusb {
	vusb33-supply = <&reg_3p3v>;
	vbus-supply = <&reg_5v>;
	status = "okay";
};

&u3phy {
	status = "okay";
};

&uart0 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins>;
	status = "okay";
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&uart2_pins>;
	status = "okay";
};

&watchdog {
	pinctrl-names = "default";
	pinctrl-0 = <&watchdog_pins>;
	status = "okay";
};

&wmac {
	status = "okay";
};

&wmac {
	status = "okay";
};

Dts looks right…from your dmesg it looks like both ports are down…maybe something power-related? Can you compare your dtsi with mine (5.4-main branch except switch driver)? Have you added the other patches i’ve mentioned (irq handling, class fix)?

Looks like I found the culprit.

I just needed to apply all four patches from Spilt PCIe node to comply with hardware design series. I had to make some modifications as I mentioned above since mt7622-rfb1.dts from OpenWRT is a little bit different from what the patch is expecting (see attachments).

1002_1-dt-bindings-PCI-Mediatek-Update-PCIe-binding.patch (9.0 KB)

1002_2-mediatek-Use-regmap-to-get-shared-pcie-cfg-base.patch (2.7 KB)

1002_3-Split_PCIe_node_for_MT2712-MT7622.patch (7.9 KB)

1002_4-ARM-dts-mediatek-Update-mt7629-PCIe-node.patch (2.0 KB)

BTW is there a more elegant way of obtaining these patches rather than select - copy - paste to text editor - save as .patch - put in patches-5.4 dir?

Starting kernel ...

[ATF][    26.267559]save kernel info
[ATF][    26.270760]Kernel_EL2
[ATF][    26.273516]Kernel is 64Bit
[ATF][    26.276704]pc=0x41080000, r0=0x6bff6000, r1=0x0
INFO:    BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO:    BL3-1: Next image address = 0x41080000
INFO:    BL3-1: Next image spsr = 0x3c9
[ATF][    26.294971]el3_exit
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.4.42 ([email protected]) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13342-e35e40ad82)) #0 SMP Fri May 20
[    0.000000] Machine model: Bananapi BPI-R64
[    0.000000] On node 0 totalpages: 262096
[    0.000000]   DMA32 zone: 4096 pages used for memmap
[    0.000000]   DMA32 zone: 0 pages reserved
[    0.000000]   DMA32 zone: 262096 pages, LIFO batch:63
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 20 pages/cpu s43608 r8192 d30120 u81920
[    0.000000] pcpu-alloc: s43608 r8192 d30120 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258000
[    0.000000] Kernel command line: board=bpi-r64 console=ttyS0,115200n1 earlyprintk root=/dev/mmcblk0p2 rootfstype=ext4 rootwait servi2
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 1018396K/1048384K available (6590K kernel code, 432K rwdata, 1896K rodata, 448K init, 285K bss, 29988K reserved,)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     CONFIG_RCU_FANOUT set to non-default value of 32.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] random: get_random_bytes called from start_kernel+0x2d4/0x430 with crng_init=0
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000003] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.000168] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=50000)
[    0.000175] pid_max: default: 32768 minimum: 301
[    0.000260] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000271] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.001153] ASID allocator initialised with 65536 entries
[    0.001203] rcu: Hierarchical SRCU implementation.
[    0.001461] smp: Bringing up secondary CPUs ...
[    0.001782] Detected VIPT I-cache on CPU1
[    0.001819] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.001873] smp: Brought up 1 node, 2 CPUs
[    0.001880] SMP: Total of 2 processors activated.
[    0.001884] CPU features: detected: 32-bit EL0 Support
[    0.001888] CPU features: detected: CRC32 instructions
[    0.001988] CPU: All CPU(s) started at EL2
[    0.001998] alternatives: patching kernel code
[    0.005276] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.005288] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.005379] pinctrl core: initialized pinctrl subsystem
[    0.005808] NET: Registered protocol family 16
[    0.006088] DMA: preallocated 256 KiB pool for atomic allocations
[    0.017063] GPIO line 499 (asm_sel) hogged as output/high
[    0.029735] SCSI subsystem initialized
[    0.029890] libata version 3.00 loaded.
[    0.030022] usbcore: registered new interface driver usbfs
[    0.030052] usbcore: registered new interface driver hub
[    0.030078] usbcore: registered new device driver usb
[    0.030859] Bluetooth: Core ver 2.22
[    0.030890] NET: Registered protocol family 31
[    0.030894] Bluetooth: HCI device and connection manager initialized
[    0.030901] Bluetooth: HCI socket layer initialized
[    0.030908] Bluetooth: L2CAP socket layer initialized
[    0.030919] Bluetooth: SCO socket layer initialized
[    0.031382] clocksource: Switched to clocksource arch_sys_counter
[    0.031850] thermal_sys: Registered thermal governor 'fair_share'
[    0.031853] thermal_sys: Registered thermal governor 'bang_bang'
[    0.031858] thermal_sys: Registered thermal governor 'step_wise'
[    0.031861] thermal_sys: Registered thermal governor 'user_space'
[    0.031865] thermal_sys: Registered thermal governor 'power_allocator'
[    0.032119] NET: Registered protocol family 2
[    0.032394] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.032413] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.032464] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.032570] TCP: Hash tables configured (established 8192 bind 8192)
[    0.032658] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.032680] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.032770] NET: Registered protocol family 1
[    0.032789] PCI: CLS 0 bytes, default 64
[    0.033547] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.036898] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.036909] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.050389] mtk-tphy 1a0c4000.usb-phy: failed to get ref_clk(id-1)
[    0.053638] mt-pmic-pwrap 10001000.pwrap: unexpected interrupt int=0x1
[    0.067647] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.068299] printk: console [ttyS0] disabled
[    0.088649] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 118, base_baud = 1562500) is a ST16650V2
[    0.630082] printk: console [ttyS0] enabled
[    0.654977] 11004000.serial: ttyS1 at MMIO 0x11004000 (irq = 119, base_baud = 1562500) is a ST16650V2
[    0.664689] 1100c000.serial: ttyS2 at MMIO 0x1100c000 (irq = 125, base_baud = 17499995) is a MediaTek BTIF
[    0.674422] serial serial0: tty port ttyS2 registered
[    0.679677] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.687251] libphy: Fixed MDIO Bus: probed
[    0.714662] libphy: mdio: probed
[    0.717928] mtk_soc_eth 1b100000.ethernet: generated random MAC address c6:eb:14:54:30:ca
[    0.726374] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffffc011520000, irq 134
[    0.735526] mtk_soc_eth 1b100000.ethernet: generated random MAC address fa:17:a9:bf:07:90
[    0.743901] mtk_soc_eth 1b100000.ethernet eth1: mediatek frame engine at 0xffffffc011520000, irq 134
[    0.753108] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.759632] ehci-pci: EHCI PCI platform driver
[    0.764101] ehci-platform: EHCI generic platform driver
[    0.769436] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    0.775625] ohci-platform: OHCI generic platform driver
[    0.781397] usbcore: registered new interface driver usb-storage
[    0.787765] rtc_mt7622 10212800.rtc: registered as rtc0
[    0.793646] Driver for 1-wire Dallas network protocol.
[    0.798993] mtk-thermal 1100b000.thermal: Device not calibrated, using default calibration values
[    0.808183] mtk-wdt 10212000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    0.816018] Bluetooth: HCI UART driver ver 2.3
[    0.820460] Bluetooth: HCI UART protocol H4 registered
[    0.825593] Bluetooth: HCI UART protocol BCSP registered
[    0.830951] Bluetooth: HCI UART protocol Broadcom registered
[    0.836628] Bluetooth: HCI UART protocol QCA registered
[    0.867707] mtk-msdc 11240000.mmc: Got CD GPIO
[    0.897832] NET: Registered protocol family 10
[    0.902895] Segment Routing with IPv6
[    0.906609] NET: Registered protocol family 17
[    0.911072] 8021q: 802.1Q VLAN Support v1.8
[    0.925772] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    0.932323] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    0.938159] mtk-pcie 1a143000.pcie:   MEM 0x20000000..0x27ffffff -> 0x20000000
[    0.969503] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00
[    0.975692] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.981174] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff]
[    0.988045] pci_bus 0000:00: scanning bus
[    0.992080] pci 0000:00:00.0: [14c3:3258] type 01 class 0x060400
[    0.998176] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x1ffffffff 64bit pref]
[    1.007056] pci_bus 0000:00: fixups for bus
[    1.011252] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    1.017949] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.025968] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    1.032798] pci_bus 0000:01: scanning bus
[    1.036937] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[    1.043170] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    1.050887] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:00.0 (capable of 4.000 Gb/)
[    1.065983] pci_bus 0000:01: fixups for bus
[    1.070164] pci_bus 0000:01: bus scan returning with max=01
[    1.075738] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.082362] pci_bus 0000:00: bus scan returning with max=01
[    1.087946] pci 0000:00:00.0: BAR 0: no space for [mem size 0x200000000 64bit pref]
[    1.095599] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x200000000 64bit pref]
[    1.103599] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.110385] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    1.117774] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.122751] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.129775] mtk-pcie 1a145000.pcie: host bridge /pcie@1a145000 ranges:
[    1.136303] mtk-pcie 1a145000.pcie: Parsing ranges property...
[    1.142137] mtk-pcie 1a145000.pcie:   MEM 0x28000000..0x2fffffff -> 0x28000000
[    1.168099] mtk-msdc 11230000.mmc: phase: [map:fffffff] [maxlen:28] [final:9]
[    1.176016] mmc0: new HS200 MMC card at address 0001
[    1.182132] mmcblk0: mmc0:0001 008G30 7.28 GiB 
[    1.187577] mmcblk0boot0: mmc0:0001 008G30 partition 1 4.00 MiB
[    1.194381] mmcblk0boot1: mmc0:0001 008G30 partition 2 4.00 MiB
[    1.200357] mmcblk0rpmb: mmc0:0001 008G30 partition 3 4.00 MiB, chardev (250:0)
[    1.208857]  mmcblk0: p1 p2
[    1.249492] mtk-pcie 1a145000.pcie: Port1 link down
[    1.254486] mtk-pcie 1a145000.pcie: PCI host bridge to bus 0001:00
[    1.260669] pci_bus 0001:00: root bus resource [bus 00-ff]
[    1.266153] pci_bus 0001:00: root bus resource [mem 0x28000000-0x2fffffff]
[    1.273026] pci_bus 0001:00: scanning bus
[    1.278255] pci_bus 0001:00: fixups for bus
[    1.282437] pci_bus 0001:00: bus scan returning with max=00
[    1.288171] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    1.296360] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    1.859399] mt753x gsw@0: LAN/WAN VLAN setting=wllll
[    1.864836] mt753x gsw@0: Switch is MediaTek MT7531BE rev 0
[    6.511476] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[    6.516714] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 1
[    6.525762] xhci-mtk 1a0c0000.usb: hcc params 0x01403198 hci version 0x96 quirks 0x0000000000210010
[    6.534833] xhci-mtk 1a0c0000.usb: irq 130, io mem 0x1a0c0000
[    6.540976] hub 1-0:1.0: USB hub found
[    6.544741] hub 1-0:1.0: 2 ports detected
[    6.548978] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[    6.554208] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus number 2
[    6.561605] xhci-mtk 1a0c0000.usb: Host supports USB 3.0 SuperSpeed
[    6.567899] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    6.576205] hub 2-0:1.0: USB hub found
[    6.579966] hub 2-0:1.0: 1 port detected
[    6.584219] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01T00:14:21 UTC (946685661)
[    6.599325] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    6.607477] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    6.614473] Freeing unused kernel memory: 448K
[    6.627389] Run /sbin/init as init process
[    6.680739] init: Console is alive
[    6.684242] init: - watchdog -
[    6.726757] random: fast init done
[    6.809320] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.823175] ehci-fsl: Freescale EHCI Host controller driver
[    6.833232] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    6.841037] init: - preinit -
[    6.922076] mtk_soc_eth 1b100000.ethernet: PPE started
[    6.927266] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    6.935611] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
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
[   10.969474] mount_root: mounting /dev/root
[   10.975366] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   10.980936] mount_root: loading kmods from internal overlay
[   10.994885] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[   11.002503] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[   11.079661] urandom-seed: Seeding with /etc/urandom.seed
[   11.093866] procd: - early -
[   11.096801] procd: - watchdog -
[   11.612900] procd: - watchdog -
[   11.616159] procd: - ubus -
[   11.623019] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.669206] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.675667] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.682285] procd: - init -
Please press Enter to activate this console.
[   11.769213] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.773068] urngd: v1.0.2 started.
[   11.787062] tun: Universal TUN/TAP device driver, 1.6
[   11.802151] random: crng init done
[   11.805573] random: 7 urandom warning(s) missed due to ratelimiting
[   11.807487] cryptodev: driver 1.10 loaded.
[   11.818851] i2c /dev entries driver
[   11.829040] hidraw: raw HID events driver (C) Jiri Kosina
[   11.836503] Mirror/redirect action on
[   11.843855] u32 classifier
[   11.846558]     input device check on
[   11.850241]     Actions configured
[   11.870641] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   11.875990] Bluetooth: BNEP filters: protocol multicast
[   11.881222] Bluetooth: BNEP socket layer initialized
[   11.888063] usbcore: registered new interface driver btusb
[   11.894526] usbcore: registered new interface driver cdc_wdm
[   11.900862] Loading modules backported from Linux version v5.7-rc3-0-g6a8b55ed4056
[   11.908442] Backport generated by backports.git v5.7-rc3-1-0-gc0c7d2bb
[   11.916168] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[   11.922122] Bluetooth: HIDP socket layer initialized
[   11.937166] Bluetooth: RFCOMM TTY layer initialized
[   11.942077] Bluetooth: RFCOMM socket layer initialized
[   11.947231] Bluetooth: RFCOMM ver 1.11
[   11.952953] usbcore: registered new interface driver ums-alauda
[   11.959517] usbcore: registered new interface driver ums-cypress
[   11.966085] usbcore: registered new interface driver ums-datafab
[   11.972436] usbcore: registered new interface driver ums-freecom
[   11.978912] usbcore: registered new interface driver ums-isd200
[   11.985152] usbcore: registered new interface driver ums-jumpshot
[   11.991573] usbcore: registered new interface driver ums-karma
[   11.997785] usbcore: registered new interface driver ums-sddr09
[   12.004032] usbcore: registered new interface driver ums-sddr55
[   12.010291] usbcore: registered new interface driver ums-usbat
[   12.020258] wireguard: WireGuard 1.0.20200520 loaded. See www.wireguard.com for information.
[   12.028709] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
[   12.048120] xt_time: kernel timezone is -0000
[   12.053074] usbcore: registered new interface driver cdc_ether
[   12.096966] mt7615e 0000:01:00.0: assign IRQ: got 139
[   12.102078] pci 0000:00:00.0: enabling device (0000 -> 0002)
[   12.107742] pci 0000:00:00.0: enabling bus mastering
[   12.112717] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[   12.118798] mt7615e 0000:01:00.0: enabling bus mastering
[   12.125907] mt7615e 0000:01:00.0: Invalid MAC address, using random address 3e:a3:f4:1d:c7:db
[   12.135936] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.157301] mt7622-wmac 18000000.wmac: Invalid MAC address, using random address 6e:b2:d5:8b:f0:34
[   12.167561] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   12.175450] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   12.175450] 
[   12.195206] PPP generic driver version 2.4.2
[   12.201006] NET: Registered protocol family 24
[   12.206635] usbcore: registered new interface driver qmi_wwan
[   12.213157] mt7615e 0000:01:00.0: N9 Firmware Version: 2.0, Build Time: 20200131181812
[   12.221756] mt7622-wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20190801210006a
[   12.221756] 
[   12.232303] kmodloader: done loading kernel modules from /etc/modules.d/*
[   12.246908] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190121161307
[   12.263510] mt7622-wmac 18000000.wmac: N9 Firmware Version: 2.0, Build Time: 20200131180931
[   13.564852] mtk_soc_eth 1b100000.ethernet eth0: Link is Down
[   13.573336] mtk_soc_eth 1b100000.ethernet: 0x100 = 0xffff9070, 0x10c = 0x100808ff
[   13.580846] mtk_soc_eth 1b100000.ethernet: reset pse
[   13.671845] mtk_soc_eth 1b100000.ethernet: PPE started
[   13.677060] debugfs: Directory 'mtk_ppe' with parent '/' already present!
[   13.683890] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   13.692253] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[   13.698920] br-lan: port 1(eth0) entered blocking state
[   13.706190] br-lan: port 1(eth0) entered disabled state
[   13.711646] device eth0 entered promiscuous mode
[   13.717901] br-lan: port 1(eth0) entered blocking state
[   13.723176] br-lan: port 1(eth0) entered forwarding state
[   13.736030] mtk_soc_eth 1b100000.ethernet eth1: configuring for fixed/rgmii link mode
[   13.744068] mtk_soc_eth 1b100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx

Now I have both WiFi cards operational.

phy#1
        Interface wlan1
                ifindex 5
                wdev 0x100000001
                addr 52:43:4e:e7:4d:c6
                type managed
                txpower 6.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
phy#0
        Interface wlan0
                ifindex 7
                wdev 0x2
                addr aa:60:e3:c5:e6:f2
                type managed
                txpower 6.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0

Two things bother me though.

  1. For some reason OpenWRT generated config files in such a way that radio0 is wlan1 and vice versa.
  2. Txpower on both cards seems to be limited to 6 dBm. Is there a way to increase it?
2 Likes

Nice to see there is an official patch now…i got them here or by email and collected over time :slight_smile:

I don’t know if openwrts build-system can handle mbox files…then you can click “series” button in the upper right corner if patchwork site to download a “git am” compatible file with all patches from the series

Maybe you can change that by modifying udev-files.

There is a discussion about the 6dbm issue,but afaik no working solution…here is a hint why this happens,but afair patch was bot accepted and maybe not compatible with mainline code

@svintuss As for 6dbm limit. Compile mt76 driver with eeprom.c from git on top of this thread. This is working for me on mt7622. I do not have 7615 so cannot check.

1 Like

After replacing eeprom.c mt7615 is non-functional: It became a clone of mt7622 device (same MAC, system thinks it’s 2.4 GHz).

Compare this output to my previous post: ifindex, wdev and addr are different.

root@OpenWrt:/# iw dev
phy#1
        Interface wlan1
                ifindex 15
                wdev 0x100000005
                addr 00:0c:43:26:60:00
                type AP
                txpower 20.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
phy#0
        Interface wlan0
                ifindex 16
                wdev 0x7
                addr 00:0c:43:26:60:00
                type managed
                txpower 20.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0

I’m sure this is because the fixed eeprom-data in mt76_get_of_eeprom called for every device handled by the driver

Do you see your mac-address? :grin:

This function should be called only for mt7622 wifi and not mt7615…

If i see this you see that with the eeprom-data all cards will be handled as 7622 because of first 2 bytes

You need something like this in mt76_get_eeprom function:

switch (mt76_chip(dev)) {
    case 0x7622: /*here existing content*/ break;
    case 0x7615: /*eeprom data for 7615*/ break;
}

But make sure function returns 1 else it will break mt76_eeprom_init…

1 Like

Thank you, @frank-w. Do you have any ideas where can I get eeprom data for 7615?

@niebieski20 where did you get mt7622 eeprom?

You can skip the eeprom part for mt7615 in a first step (only write eeprom data for mt7622) but let function return always 1. I guess he used the eeprom-data normaly written to mtd partition in openwrt

have modified eeprom.c like i’ve mentioned…

eeprom.c (7,3 KB)

Thank you.

Am I getting this right?

static int
mt76_get_of_eeprom(struct mt76_dev *dev, int len)
{

	switch (mt76_chip(dev)) {
    		case 0x7622:

			static const u8 eeprom[] = {
				 0x22, 0x76, 0x05, 0x00, 0x00, 0x0C, 0x43, 0x26, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0x44, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x20, 0x00, 0x00, 0xB3, 0x40, 0xB6, 0xC3, 0xC3, 0x26, 0x00, 0x00, 0x00, 0x41, 0xC4, 0x26, 0x00, 0x00, 0x00, 0x41, 0xC4, 0x26, 0x00, 0x00, 0x00, 0xC0, 0xC5, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC3, 0xC3, 0xC2, 0xC1, 0x00, 0xC3, 0x00, 0xC3,
		  0x00, 0x81, 0x81, 0x81, 0x83, 0xC1, 0xC1, 0x82, 0x83, 0x83, 0x83, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x84, 0x00, 0x2E, 0x00, 0x90, 0x00, 0x00, 0x87, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
		  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
		};
			memcpy(dev->eeprom.data, eeprom, 0x400);

			break;
    		
		case 0x7615: /*eeprom data for 7615*/ 
			break;
		};


	int ret; 
	ret = 1;  // this part makes the function to always return 1, right?
	return ret;

}

Can images from this post be of any help in extracting mt7615 eeprom? Full support for mt7615 WiFi is claimed.

http://forum.banana-pi.org/t/bpi-r64-new-image-lede17-openwrt-image-kernel-4-4-177-sd-emmc-booting-2020-04-09/10924

lspci in this LEDE image looks like this.

root@LEDE:/# lspci

0000:00:00.0 Unclassified device [0002]: MEDIATEK Corp. Device 7622
0001:00:00.0 PCI bridge: MEDIATEK Corp. Device 5396
0001:01:00.0 Unclassified device [0002]: MEDIATEK Corp. Device 7615

basicly yes, but i have renamed the data-const and moved outside the switch for better readability. also the ret-lines can be merged to int ret=1; or easier “return 1;” as replacement for the 3 lines

i think you do not need any additional eeprom-data, because card should have it’s own burned onto it. i had also used mt7622 without any additional eeprom-data, but i have no mt7615 which may breaḱ and have not yet looked at the 6dbm-issue (i guess eeprom-data is fix for this)

Ok, so this is what I came up with.

static int
mt76_get_of_eeprom(struct mt76_dev *dev, int len)
{

	static const u8 eeprom_mt7622[] = {
		 0x22, 0x76, 0x05, 0x00, 0x00, 0x0C, 0x43, 0x26, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x00, 0x00, 0x44, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x20, 0x00, 0x00, 0xB3, 0x40, 0xB6, 0xC3, 0xC3, 0x26, 0x00, 0x00, 0x00, 0x41, 0xC4, 0x26, 0x00, 0x00, 0x00, 0x41, 0xC4, 0x26, 0x00, 0x00, 0x00, 0xC0, 0xC5, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC6, 0xC6, 0xC3, 0xC3, 0xC2, 0xC1, 0x00, 0xC3, 0x00, 0xC3,
  0x00, 0x81, 0x81, 0x81, 0x83, 0xC1, 0xC1, 0x82, 0x83, 0x83, 0x83, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x84, 0x00, 0x2E, 0x00, 0x90, 0x00, 0x00, 0x87, 0x8A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x77, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};


	switch (mt76_chip(dev)) {
    		case 0x7622: /*write eeprom data for 7622*/ 
			memcpy(dev->eeprom.data, eeprom_mt7622, 0x400);
			break;
    		
		case 0x7615: /*write eeprom data for 7615*/ 
			break;
		};


	return 1; // this part makes the function to always return 1, right?

}

As a result I should have mt7622 working on 20dBm and mt7615 functional but limited to 6dBm, right?

1 Like

right, just try it out…i have not yet tested it…

Thanks, I’ve got mt7615 functionality back, but it’s still limited to 6dBm.

root@OpenWrt:/# iw dev
phy#1
        Interface wlan1
                ifindex 8
                wdev 0x100000002
                addr 00:0c:43:26:60:00
                type AP
                txpower 20.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
phy#0
        Interface wlan0
                ifindex 7
                wdev 0x2
                addr 42:03:a1:a3:81:24
                ssid testssid
                type managed
                channel 48 (5240 MHz), width: 80 MHz, center1: 5210 MHz
                txpower 6.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
1 Like

The connection issue is fixed by

https://patchwork.kernel.org/patch/11580563/

https://pastebin.com/NSh9f6Dp

It works for @Kosyak

Hello all. I took a break from further experimentation to get the BPI MT7615 PICe card working on my BPI R64 rev 1.1. I was able to get the 2020-05-08 update ,Debian10 with kernel 5.4.0 installed on eMMC and the MT7615 is working somewhat satisfactorily with it.

I am trying to keep the MT7622 and DRAM chips cooler using a 5V fan (extracted from an old laptap). Can someone help me how to control the fan speed using PWM? I have hooked the fan to the fan socket (which is besides the WPS switch), but presently it runs at full speed. The schematic shows FAN_OUT has different labels: GPIO97/PWM_CH3/TXD4 or G12, PWM3 I don’t know exactly how to try out different PWM duty cycles from the command line. I will eventually do it programatically.

I can start a new topic to discuss this request if it is not appropriate here.

A new topic discussing about the pwm would be better and created it [BPI-R64] PWM-support

1 Like