Support for Dlink DAP-1620

The main question was:
Can you reproduce 1st case and show logs again?

This is when I set :
mediatek,fixed-link = <1000 1 1 1>;

root@OpenWrt:/# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0C:43:76:20:58
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5

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:156 errors:0 dropped:0 overruns:0 frame:0
          TX packets:156 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10608 (10.3 KiB)  TX bytes:10608 (10.3 KiB)

wlan0     Link encap:Ethernet  HWaddr 44:E6:35:AE:A6:55
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1     Link encap:Ethernet  HWaddr 00:0C:43:76:20:58
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@OpenWrt:/# swconfig dev mt7620 show
Global attributes:
        enable_vlan: 1
        mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 3
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

        mirror_monitor_port: 0
        arl_table: address resolution table

Port 0:
        mib: Port 0 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:0 link:down
Port 1:
        mib: Port 1 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:2 link:down
Port 3:
        mib: Port 3 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        mib: Port 5 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:5 link:up speed:1000baseT full-duplex
Port 6:
        mib: Port 6 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:6 link:up speed:1000baseT full-duplex
Port 7:
        mib: Port 7 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:7 link:down
root@OpenWrt:/#

But as I told I never got any traffic on the interface also switch port doesn't even lingt up like cable not pluged.

You miss something. In 1st log P5 recieved 7 packets from external computer (RxGPC = 7) but these packets was dropped because of wrong switch config (RxEPC2 =7):

TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 7
RxBOC      : 0
RxGOC      : 854
RxEPC1     : 0
RxEPC2     : 7

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:5 link:up speed:1000baseT full-duplex

I think that isn't possible without cable connection.
So current state:

  • no link and traffic on port 5
  • no traffic between ports 5 and 6

Pls check this config:

	port@5 {
		status = "okay";
		phy-mode = "rgmii";
		phy-handle = <&phy1>;
	};
	mdio-bus {
			status = "okay";
			phy1: ethernet-phy@1 {
				reg = <1>;
				phy-mode = "rgmii";
			};
		};

configure switch with commands:

swconfig dev mt7620 set reset 1
swconfig dev mt7620 set enable_vlan 1
swconfig dev mt7620 vlan 1 set ports '5 6'
swconfig dev mt7620 set apply 1

Then ping any host from device (simply to generate network traffic) and show logs.

With this config link is always down, I think maybe it needs to be reseted.
the internal switch will only show link is up when I do "mediatek,fixed-link = <1000 1 1 1>;"
but phisically cable is always down I never saw it up exept u-boot.
traffic on that link maybe was caused when I was looking for gpios or playing with port assigment, but I never had any activity on phisical link.

But you are not sure and you don't find correct gpio number for this function, do you?
It's possible. But uboot source don't reset rtl8211e and use phy address 1.

It's incorrect config. In this case network subsystem ignore real physical state of connection. phy-handle=<&phy1>; option force switch periodically poll real physical state of phy1 through mdio bus and show correct link/speed settings.

Without this config I never saw physical link UP , how did you find out that it uses phy address 1 ?
and as I understood from Support for Edimax EW-7476RPC reset is neede after internal switch initialization because RTL8211E doesn't work after. I tried to look in official sources that I posted above but couldn't find an answer.

In file DAP-1620_A1_v103b08_FOSS\Source\platform\MT7620\u-boot_DAP-1620.config:

P5_MAC_TO_PHY_MODE=y
# P5_RGMII_TO_MAC_MODE is not set
# P5_MII_TO_MAC_MODE is not set
# P5_RMII_TO_MAC_MODE is not set
MAC_TO_GIGAPHY_MODE_ADDR=0x1
P4_MAC_TO_NONE_MODE=y

I'm using this config :

&ethernet {
	pinctrl-names = "default";
	pinctrl-0 = <&rgmii1_pins &mdio_pins >;
	mtd-mac-address = <&factory 0x4>;
    ralink,port-map = "wllll";
	mediatek,mdio-mode = <1>;


	port@5 {
		status = "okay";
		phy-mode = "rgmii";
		phy-handle = <&phy1>;
	};
	mdio-bus {
			status = "okay";
			phy1: ethernet-phy@1 {
				reg = <1>;
				phy-mode = "rgmii";
			};
		};

};

&gsw {
	mediatek,port5 = "gmac";
};

But link never goes up, I run out of ideas.

OMG Words

without logs say nothing to me

This is my dts:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;

#include "mt7620a.dtsi"

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

/ {
	compatible = "dlink,dap-1620-a1", "ralink,mt7620a-soc";
	model = "D-Link DAP-1620 A1";

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_status;
		led-running = &led_power;
		led-upgrade = &led_status;
	};
	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio0 1 0>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&gpio0 2 0>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};
    leds {
		compatible = "gpio-leds";

		led_power: power {
			label = "dap-1620-a1:green:power";
			gpios = <&gpio2 0 1>;
		};
		lan {
			label = "dap-1620:green:lan";
			gpios = <&gpio0 12 1>;
		};
		led_status: status {
			label = "dap-1620-a1:red:status";
			gpios = <&gpio0 13 1>;
		};

		wlan2g {
			label = "dap-1620-a1:green:wlan2g";
			gpios = <&gpio0 8 1>;
			linux,default-trigger = "phy1radio";
		};

		wlan5g {
			label = "dap-1620-a1:green:wlan5g";
			gpios = <&gpio0 11 1>;
			linux,default-trigger = "phy0radio";
		};

		wps {
			label = "dap-1620-a1:red:wps";
			gpios = <&gpio0 9 1>;
		};
	};
};

&gpio1 {
	status = "okay";
};

&gpio2 {
	status = "okay";
};

&spi0 {
	status = "okay";

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

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

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

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

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

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


&state_default {
	default {
		groups = "ephy", "uartf", "spi refclk", "wled";
		function = "gpio";
	};
};

&pcie {
	status = "okay";
};

&pcie0 {
	wifi@0,0 {
		reg = <0x0000 0 0 0 0>;
		ieee80211-freq-limit = <5000000 6000000>;
		mtd-mac-address-increment = <(2)>;

		led {
			led-sources = <2>;
			led-active-low;
		};
	};
};

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

&ethernet {
	pinctrl-names = "default";
	pinctrl-0 = <&rgmii1_pins &mdio_pins >;
	mtd-mac-address = <&factory 0x4>;
    ralink,port-map = "wllll";
	mediatek,mdio-mode = <1>;


	port@5 {
		status = "okay";
		phy-mode = "rgmii";
		phy-handle = <&phy1>;
	};
	mdio-bus {
			status = "okay";
			phy1: ethernet-phy@1 {
				reg = <1>;
				phy-mode = "rgmii";
			};
		};

};

&gsw {
	mediatek,port5 = "gmac";
};

&wmac {
	status = "okay";
	ralink,mtd-eeprom = <&factory 0x0>;
	ralink,5ghz = <0>;
	mtd-mac-address-increment = <1>;
};

Boot Log:

U-Boot 1.1.3 (Mar 21 2016 - 16:55:00)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb0000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 4.1.1.0
--------------------------------------------
ASIC 7620_MP (Port5<->Phy)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Mar 21 2016  Time:16:55:00
Cameo Version: v1.00 Build:02
Module Name: D-Link DAP-1620A1
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =64 Mbytes
raspi_read: from:50000 len:40
raspi_read: from:4f0000 len:40

=================================================
Check image validation:
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> Failed
Image1 Header Checksum --> OK
Image1 Data Checksum --> raspi_read: from:50040 len:1d903c
OK

Image1: OK Image2: Broken
Only Image2 is borken!!

=================================================

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                     0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
   Image Name:   MIPS OpenWrt Linux-5.4.60
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1937468 Bytes =  1.8 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:1d903c
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 5.4.60 (root@buntu18) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14267-18fbb9aa21)) #0 Tue Aug 25 18:54:24 2020
[    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: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link DAP-1620 A1
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=0007e6ee
[    0.000000] Readback ErrCtl register=0007e6ee
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57564K/65536K available (4576K kernel code, 200K rwdata, 1024K rodata, 1232K init, 205K bss, 7972K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015473] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.059569] pid_max: default: 32768 minimum: 301
[    0.068947] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083355] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.105516] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.124819] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.138435] pinctrl core: initialized pinctrl subsystem
[    0.149347] NET: Registered protocol family 16
[    0.642425] PCI host bridge /pcie@10140000 ranges:
[    0.651820]  MEM 0x0000000020000000..0x000000002fffffff
[    0.662192]   IO 0x0000000010160000..0x000000001016ffff
[    0.694885] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.705940] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.718526] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.729537] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.742142] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.753153] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.766251] PCI host bridge to bus 0000:00
[    0.774302] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.787920] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.799691] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.813190] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.828983] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.840913] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.853349] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.865885] pci 0000:00:00.0: supports D1
[    0.873766] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.887148] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.903163] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    0.915048] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    0.928509] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.941905] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.955852] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.968902] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.982053] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.995179] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.009026] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.022528] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    1.036892] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    1.050402] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    1.064949] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    1.079294] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.089158] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.102655] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    1.117129] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    1.141807] clocksource: Switched to clocksource systick
[    1.153699] NET: Registered protocol family 2
[    1.163180] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.179751] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.194910] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.208928] TCP: Hash tables configured (established 1024 bind 1024)
[    1.221707] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.234615] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.248776] NET: Registered protocol family 1
[    1.257402] PCI: CLS 0 bytes, default 32
[    1.268009] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    1.282215] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    1.303517] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.315027] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.351547] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.365279] printk: console [ttyS0] disabled
[    1.373755] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    1.393392] printk: console [ttyS0] enabled
[    1.393392] printk: console [ttyS0] enabled
[    1.409973] printk: bootconsole [early0] disabled
[    1.409973] printk: bootconsole [early0] disabled
[    1.434466] spi spi0.0: force spi mode3
[    1.443113] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    1.453126] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.465790] Creating 4 MTD partitions on "spi0.0":
[    1.475346] 0x000000000000-0x000000030000 : "u-boot"
[    1.486394] 0x000000030000-0x000000040000 : "nvram"
[    1.497234] 0x000000040000-0x000000050000 : "factory"
[    1.508391] 0x000000050000-0x000000800000 : "firmware"
[    1.522793] 2 uimage-fw partitions found on MTD device firmware
[    1.534658] Creating 2 MTD partitions on "firmware":
[    1.544564] 0x000000000000-0x0000001d907c : "kernel"
[    1.555560] 0x0000001d907c-0x0000007b0000 : "rootfs"
[    1.566528] mtd: device 5 (rootfs) set to be root filesystem
[    1.579551] 1 squashfs-split partitions found on MTD device rootfs
[    1.591959] 0x0000004a7000-0x0000007b0000 : "rootfs_data"
[    1.604704] libphy: Fixed MDIO Bus: probed
[    1.622332] gsw: setting port4 to ephy mode
[    1.631148] libphy: mdio: probed
[    1.638757] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:01 [uid=03a2940d, driver=Generic PHY]
[    1.660015] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.672564] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.689609] rt2880_wdt 10000120.watchdog: Initialized
[    1.701190] NET: Registered protocol family 10
[    1.714930] Segment Routing with IPv6
[    1.722446] NET: Registered protocol family 17
[    1.731398] 8021q: 802.1Q VLAN Support v1.8
[    1.749047] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.770122] Freeing unused kernel memory: 1232K
[    1.779171] This architecture does not have kernel memory protection.
[    1.792002] Run /sbin/init as init process
[    1.985737] random: fast init done
[    2.815207] init: Console is alive
[    2.822401] init: - watchdog -
[    3.984077] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.136869] rt2880-pinmux pinctrl: pin 1 is not set to gpio mux
[    4.148762] rt2880-pinmux pinctrl: request() failed for pin 1
[    4.160218] rt2880-pinmux pinctrl: pin-1 (pio:1) status -22
[    4.171333] gpio-keys keys: unable to claim gpio 1, err=-22
[    4.182465] gpio-keys: probe of keys failed with error -22
[    4.198734] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.215215] init: - preinit -
[    5.371006] random: jshn: uninitialized urandom read (4 bytes read)
[    5.469558] random: jshn: uninitialized urandom read (4 bytes read)
[    5.574244] random: jshn: uninitialized urandom read (4 bytes read)
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
[    6.283889] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    6.326918] urandom-seed: Seed file not found (/etc/urandom.seed)
[    6.439308] procd: - early -
[    6.445263] procd: - watchdog -
[    6.647501] procd: - watchdog -
[    6.654153] procd: - ubus -
[    6.808095] urandom_read: 5 callbacks suppressed
[    6.808105] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.834232] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.851927] procd: - init -
Please press Enter to activate this console.
[    7.800742] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.025310] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[    8.039775] Backport generated by backports.git v5.8-1-0-g79400d9e
[    8.128283] xt_time: kernel timezone is -0000
[    8.360311] mt76x2e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    8.372938] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[    8.441430] urngd: jent-rng init failed, err: 2
[    8.511601] mt76x2e 0000:01:00.0: Invalid MAC address, using random address 86:db:84:fd:f4:d1
[    8.531447] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[    8.549696] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[    8.560660] mt76x2e 0000:01:00.0: Build: 1
[    8.568824] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[    8.585689] mt76x2e 0000:01:00.0: Firmware running!
[    8.721005] PPP generic driver version 2.4.2
[    8.732992] NET: Registered protocol family 24
[    8.786615] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    8.801099] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    8.816565] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[    8.864303] kmodloader: done loading kernel modules from /etc/modules.d/*
[   16.493998] random: crng init done
[   56.942908] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   56.982193] jffs2_build_filesystem(): unlocking the mtd device...
[   56.982203] done.
[   56.998377] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   85.779367] done.
[   85.798168] jffs2: notice: (1386) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   86.096289] overlayfs: upper fs does not support tmpfile.

Swcinfig:

BusyBox v1.31.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r14267-18fbb9aa21
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:0C:43:76:20:58
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:5

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:128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8704 (8.5 KiB)  TX bytes:8704 (8.5 KiB)

wlan0     Link encap:Ethernet  HWaddr 84:DB:84:FD:F4:D1
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1     Link encap:Ethernet  HWaddr 00:0C:43:76:20:58
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

root@OpenWrt:/# swconfig dev mt7620 set reset 1
root@OpenWrt:/# swconfig dev mt7620 set enable_vlan 0
root@OpenWrt:/# swconfig dev mt7620 set apply 1
root@OpenWrt:/# swconfig dev mt7620 show
Global attributes:
        enable_vlan: 0
        mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 3
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

        mirror_monitor_port: 0
        arl_table: address resolution table

Port 0:
        mib: Port 0 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:0 link:down
Port 1:
        mib: Port 1 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:2 link:down
Port 3:
        mib: Port 3 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        mib: Port 5 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        mib: Port 6 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:6 link:up speed:1000baseT full-duplex
Port 7:
        mib: Port 7 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:7 link:down
root@OpenWrt:/#

dmesg:

root@OpenWrt:/# dmesg
[    0.000000] Linux version 5.4.60 (root@buntu18) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14267-18fbb9aa21)) #0 Tue Aug 25 18:54:24 2020
[    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: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link DAP-1620 A1
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000]   Normal zone: 144 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=0007e6ee
[    0.000000] Readback ErrCtl register=0007e6ee
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57564K/65536K available (4576K kernel code, 200K rwdata, 1024K rodata, 1232K init, 205K bss, 7972K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015473] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.059569] pid_max: default: 32768 minimum: 301
[    0.068947] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083355] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.105516] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.124819] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.138435] pinctrl core: initialized pinctrl subsystem
[    0.149347] NET: Registered protocol family 16
[    0.642425] PCI host bridge /pcie@10140000 ranges:
[    0.651820]  MEM 0x0000000020000000..0x000000002fffffff
[    0.662192]   IO 0x0000000010160000..0x000000001016ffff
[    0.694885] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.705940] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.718526] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.729537] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.742142] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.753153] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.766251] PCI host bridge to bus 0000:00
[    0.774302] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.787920] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.799691] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.813190] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.828983] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.840913] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.853349] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.865885] pci 0000:00:00.0: supports D1
[    0.873766] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.887148] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.903163] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    0.915048] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    0.928509] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.941905] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.955852] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.968902] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.982053] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.995179] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.009026] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.022528] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    1.036892] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    1.050402] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    1.064949] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    1.079294] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.089158] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.102655] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    1.117129] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    1.141807] clocksource: Switched to clocksource systick
[    1.153699] NET: Registered protocol family 2
[    1.163180] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.179751] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.194910] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.208928] TCP: Hash tables configured (established 1024 bind 1024)
[    1.221707] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.234615] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.248776] NET: Registered protocol family 1
[    1.257402] PCI: CLS 0 bytes, default 32
[    1.268009] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    1.282215] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    1.303517] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.315027] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.351547] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.365279] printk: console [ttyS0] disabled
[    1.373755] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    1.393392] printk: console [ttyS0] enabled
[    1.409973] printk: bootconsole [early0] disabled
[    1.434466] spi spi0.0: force spi mode3
[    1.443113] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    1.453126] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.465790] Creating 4 MTD partitions on "spi0.0":
[    1.475346] 0x000000000000-0x000000030000 : "u-boot"
[    1.486394] 0x000000030000-0x000000040000 : "nvram"
[    1.497234] 0x000000040000-0x000000050000 : "factory"
[    1.508391] 0x000000050000-0x000000800000 : "firmware"
[    1.522793] 2 uimage-fw partitions found on MTD device firmware
[    1.534658] Creating 2 MTD partitions on "firmware":
[    1.544564] 0x000000000000-0x0000001d907c : "kernel"
[    1.555560] 0x0000001d907c-0x0000007b0000 : "rootfs"
[    1.566528] mtd: device 5 (rootfs) set to be root filesystem
[    1.579551] 1 squashfs-split partitions found on MTD device rootfs
[    1.591959] 0x0000004a7000-0x0000007b0000 : "rootfs_data"
[    1.604704] libphy: Fixed MDIO Bus: probed
[    1.622332] gsw: setting port4 to ephy mode
[    1.631148] libphy: mdio: probed
[    1.638757] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:01 [uid=03a2940d, driver=Generic PHY]
[    1.660015] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.672564] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.689609] rt2880_wdt 10000120.watchdog: Initialized
[    1.701190] NET: Registered protocol family 10
[    1.714930] Segment Routing with IPv6
[    1.722446] NET: Registered protocol family 17
[    1.731398] 8021q: 802.1Q VLAN Support v1.8
[    1.749047] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.770122] Freeing unused kernel memory: 1232K
[    1.779171] This architecture does not have kernel memory protection.
[    1.792002] Run /sbin/init as init process
[    1.985737] random: fast init done
[    2.815207] init: Console is alive
[    2.822401] init: - watchdog -
[    3.984077] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.136869] rt2880-pinmux pinctrl: pin 1 is not set to gpio mux
[    4.148762] rt2880-pinmux pinctrl: request() failed for pin 1
[    4.160218] rt2880-pinmux pinctrl: pin-1 (pio:1) status -22
[    4.171333] gpio-keys keys: unable to claim gpio 1, err=-22
[    4.182465] gpio-keys: probe of keys failed with error -22
[    4.198734] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.215215] init: - preinit -
[    5.371006] random: jshn: uninitialized urandom read (4 bytes read)
[    5.469558] random: jshn: uninitialized urandom read (4 bytes read)
[    5.574244] random: jshn: uninitialized urandom read (4 bytes read)
[    6.283889] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    6.326918] urandom-seed: Seed file not found (/etc/urandom.seed)
[    6.439308] procd: - early -
[    6.445263] procd: - watchdog -
[    6.647501] procd: - watchdog -
[    6.654153] procd: - ubus -
[    6.808095] urandom_read: 5 callbacks suppressed
[    6.808105] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.834232] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.851927] procd: - init -
[    7.800742] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.025310] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[    8.039775] Backport generated by backports.git v5.8-1-0-g79400d9e
[    8.128283] xt_time: kernel timezone is -0000
[    8.360311] mt76x2e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    8.372938] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[    8.441430] urngd: jent-rng init failed, err: 2
[    8.511601] mt76x2e 0000:01:00.0: Invalid MAC address, using random address 86:db:84:fd:f4:d1
[    8.531447] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[    8.549696] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[    8.560660] mt76x2e 0000:01:00.0: Build: 1
[    8.568824] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[    8.585689] mt76x2e 0000:01:00.0: Firmware running!
[    8.598262] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    8.721005] PPP generic driver version 2.4.2
[    8.732992] NET: Registered protocol family 24
[    8.786615] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    8.801099] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    8.816565] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[    8.830531] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[    8.864303] kmodloader: done loading kernel modules from /etc/modules.d/*
[   16.493998] random: crng init done
[   56.942908] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   56.982193] jffs2_build_filesystem(): unlocking the mtd device...
[   56.982203] done.
[   56.998377] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   85.779367] done.
[   85.798168] jffs2: notice: (1386) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   86.096289] overlayfs: upper fs does not support tmpfile.
root@OpenWrt:/#

Phisical connection never goes up.

Ok.
First of all please correct dts:

  1. Add "i2c" into groups:
&state_default {
	default {
		groups = "i2c", "ephy", "uartf", "spi refclk", "wled";
		function = "gpio";
	};
};

to remove this error:

[    4.136869] rt2880-pinmux pinctrl: pin 1 is not set to gpio mux
[    4.148762] rt2880-pinmux pinctrl: request() failed for pin 1
[    4.160218] rt2880-pinmux pinctrl: pin-1 (pio:1) status -22
[    4.171333] gpio-keys keys: unable to claim gpio 1, err=-22
[    4.182465] gpio-keys: probe of keys failed with error -22
  1. Totally remove this block (it's incorrect for snapshot):
&pinctrl {
	state_default: pinctrl0 {
		gpio {
			ralink,group = "i2c", "uartf", "nd_sd", "rgmii2";
			ralink,function = "gpio";
		};
	};
};
  1. Copy option mediatek,mdio-mode = <1>; into mdio-bus block:
	mdio-bus {
			status = "okay";
			mediatek,mdio-mode = <1>;
			phy1: ethernet-phy@1 {
				reg = <1>;
				phy-mode = "rgmii";
			};
		};

Some comments.
From uboot code we know that RTL8211E have phy address 1 at mdio bus. Our dts connects port 5 of switch to phy1 with phy-handle = <&phy1>; and kernel did this job:

[    1.638757] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:01 [uid=03a2940d, driver=Generic PHY]

The problem that RTL8211E have phy_id (uid)=0x001cc915 and its own realtek phy driver (if you've included it into firmware). I think that phy_id(uid)=03a2940d is phy_id of internal switch phy. As I said before internal phy of mt7620 switch have phy addresses 0-4 at mdio bus and conflict wtih RTL8211E. Option mediatek,mdio-mode = <1>; must disable internal phy and diconnect them from mdio bus.
If I'm right all these changes in dts must show in bootlog something like:

[    1.638757] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:01 [uid=001cc915, driver=RTL8211E Gigabit Ethernet]

Pls check this variant.
And variant two. Add option mediatek,ephy-base-address = <8>; into gsw block:

&gsw {
	mediatek,port5 = "gmac";
	mediatek,ephy-base-address = <8>;
};

2nd variant don't disable internal phy but change its phy addresses from 0-4 to 8-12.
Don't forget logs :slight_smile:

1 Like

There is some progress:
dts:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;

#include "mt7620a.dtsi"

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

/ {
	compatible = "dlink,dap-1620-a1", "ralink,mt7620a-soc";
	model = "D-Link DAP-1620 A1";

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_status;
		led-running = &led_power;
		led-upgrade = &led_status;
	};
	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio0 1 0>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&gpio0 2 0>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};
    leds {
		compatible = "gpio-leds";

		led_power: power {
			label = "dap-1620-a1:green:power";
			gpios = <&gpio2 0 1>;
		};
		lan {
			label = "dap-1620:green:lan";
			gpios = <&gpio0 12 1>;
		};
		led_status: status {
			label = "dap-1620-a1:red:status";
			gpios = <&gpio0 13 1>;
		};

		wlan2g {
			label = "dap-1620-a1:green:wlan2g";
			gpios = <&gpio0 8 1>;
			linux,default-trigger = "phy1radio";
		};

		wlan5g {
			label = "dap-1620-a1:green:wlan5g";
			gpios = <&gpio0 11 1>;
			linux,default-trigger = "phy0radio";
		};

		wps {
			label = "dap-1620-a1:red:wps";
			gpios = <&gpio0 9 1>;
		};
	};
};

&gpio1 {
	status = "okay";
};

&gpio2 {
	status = "okay";
};

&spi0 {
	status = "okay";

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

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

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

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

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

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


&state_default {
	default {
		groups ="i2c", "ephy", "uartf", "spi refclk", "wled";
		function = "gpio";
	};
};

&pcie {
	status = "okay";
};

&pcie0 {
	wifi@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x8000>;
		mediatek,2ghz = <0>;
	};
};

&ethernet {
	pinctrl-names = "default";
	pinctrl-0 = <&rgmii1_pins &mdio_pins >;
	mtd-mac-address = <&factory 0x4>;
    ralink,port-map = "wllll";

	port@5 {
		status = "okay";
		phy-mode = "rgmii";
		phy-handle = <&phy1>;
	};
	mdio-bus {
			status = "okay";
			mediatek,mdio-mode = <1>;
			phy1: ethernet-phy@1 {
				reg = <1>;
				phy-mode = "rgmii";
			};
		};

};

&gsw {
	mediatek,port5 = "gmac";
};

&wmac {
	ralink,mtd-eeprom = <&factory 0x0>;
};

boot log:

U-Boot 1.1.3 (Mar 21 2016 - 16:55:00)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb0000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 4.1.1.0
--------------------------------------------
ASIC 7620_MP (Port5<->Phy)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Mar 21 2016  Time:16:55:00
Cameo Version: v1.00 Build:02
Module Name: D-Link DAP-1620A1
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =64 Mbytes
raspi_read: from:50000 len:40
raspi_read: from:4f0000 len:40

=================================================
Check image validation:
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> Failed
Image1 Header Checksum --> OK
Image1 Data Checksum --> raspi_read: from:50040 len:1d8ffe
OK

Image1: OK Image2: Broken
Only Image2 is borken!!

=================================================

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                                                              0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
   Image Name:   MIPS OpenWrt Linux-5.4.60
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1937406 Bytes =  1.8 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:1d8ffe
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 5.4.60 (root@buntu18) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14267-18fbb9aa21)) #0 Tue Aug 25 18:54:24 2020
[    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: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link DAP-1620 A1
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=0007e4ee
[    0.000000] Readback ErrCtl register=0007e4ee
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57568K/65536K available (4576K kernel code, 200K rwdata, 1024K rodata, 1232K init, 205K bss, 7968K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015473] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.059575] pid_max: default: 32768 minimum: 301
[    0.068952] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083360] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.105446] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.124748] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.138360] pinctrl core: initialized pinctrl subsystem
[    0.149278] NET: Registered protocol family 16
[    0.642332] PCI host bridge /pcie@10140000 ranges:
[    0.651728]  MEM 0x0000000020000000..0x000000002fffffff
[    0.662100]   IO 0x0000000010160000..0x000000001016ffff
[    0.694853] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.705908] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.718475] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.729481] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.742104] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.753113] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.766217] PCI host bridge to bus 0000:00
[    0.774267] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.787887] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.799657] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.813156] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.828949] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.840879] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.853316] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.865853] pci 0000:00:00.0: supports D1
[    0.873732] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.887189] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.903207] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    0.915093] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    0.928553] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.941951] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.956025] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.969076] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.982226] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.995352] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.009199] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.022701] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    1.037065] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    1.050575] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    1.065121] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    1.079467] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.089331] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.102828] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    1.117302] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    1.142059] clocksource: Switched to clocksource systick
[    1.153941] NET: Registered protocol family 2
[    1.163433] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.180002] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.195163] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.209181] TCP: Hash tables configured (established 1024 bind 1024)
[    1.221959] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.234867] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.248993] NET: Registered protocol family 1
[    1.257619] PCI: CLS 0 bytes, default 32
[    1.268251] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    1.282478] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    1.303735] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.315245] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.351832] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.365559] printk: console [ttyS0] disabled
[    1.374045] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    1.393666] printk: console [ttyS0] enabled
[    1.393666] printk: console [ttyS0] enabled
[    1.410255] printk: bootconsole [early0] disabled
[    1.410255] printk: bootconsole [early0] disabled
[    1.434765] spi spi0.0: force spi mode3
[    1.443406] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    1.453419] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.466083] Creating 4 MTD partitions on "spi0.0":
[    1.475640] 0x000000000000-0x000000030000 : "u-boot"
[    1.486684] 0x000000030000-0x000000040000 : "nvram"
[    1.497510] 0x000000040000-0x000000050000 : "factory"
[    1.508668] 0x000000050000-0x000000800000 : "firmware"
[    1.523123] 2 uimage-fw partitions found on MTD device firmware
[    1.534988] Creating 2 MTD partitions on "firmware":
[    1.544894] 0x000000000000-0x0000001d903e : "kernel"
[    1.555878] 0x0000001d903e-0x0000007b0000 : "rootfs"
[    1.566831] mtd: device 5 (rootfs) set to be root filesystem
[    1.579850] 1 squashfs-split partitions found on MTD device rootfs
[    1.592258] 0x0000004a7000-0x0000007b0000 : "rootfs_data"
[    1.604983] libphy: Fixed MDIO Bus: probed
[    1.622237] gsw: setting port4 to ephy mode
[    1.631046] libphy: mdio: probed
[    1.638769] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:01 [uid=001cc915, driver=Generic PHY]
[    1.660023] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.672564] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.689615] rt2880_wdt 10000120.watchdog: Initialized
[    1.701157] NET: Registered protocol family 10
[    1.714891] Segment Routing with IPv6
[    1.722406] NET: Registered protocol family 17
[    1.731354] 8021q: 802.1Q VLAN Support v1.8
[    1.748957] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.770041] Freeing unused kernel memory: 1232K
[    1.779072] This architecture does not have kernel memory protection.
[    1.791902] Run /sbin/init as init process
[    1.977990] random: fast init done
[    2.814766] init: Console is alive
[    2.821957] init: - watchdog -
[    3.981942] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.140018] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.157507] init: - preinit -
[    5.312553] random: jshn: uninitialized urandom read (4 bytes read)
[    5.411473] random: jshn: uninitialized urandom read (4 bytes read)
[    5.514627] random: jshn: uninitialized urandom read (4 bytes read)
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
[    6.369626] jffs2: notice: (446) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (5 unchecked, 1 orphan) and 7 of xref (1 dead, 0 orphan) found.
[    6.402175] mount_root: switching to jffs2 overlay
[    6.440252] overlayfs: upper fs does not support tmpfile.
[    6.458460] urandom-seed: Seeding with /etc/urandom.seed
[    6.581382] procd: - early -
[    6.587345] procd: - watchdog -
[    6.792853] procd: - watchdog -
[    6.800015] procd: - ubus -
[    6.955282] urandom_read: 5 callbacks suppressed
[    6.955292] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.981271] random: ubusd: uninitialized urandom read (4 bytes read)
[    6.998925] procd: - init -
Please press Enter to activate this console.
[    7.975441] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.193102] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[    8.207575] Backport generated by backports.git v5.8-1-0-g79400d9e
[    8.294482] xt_time: kernel timezone is -0000
[    8.528105] mt76x2e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    8.540754] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[    8.612876] urngd: jent-rng init failed, err: 2
[    8.687710] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[    8.706126] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[    8.717089] mt76x2e 0000:01:00.0: Build: 1
[    8.725254] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[    8.742100] mt76x2e 0000:01:00.0: Firmware running!
[    8.877293] PPP generic driver version 2.4.2
[    8.889251] NET: Registered protocol family 24
[    8.942547] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    8.957015] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    8.972483] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[    9.020435] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.131827] random: crng init done

ifconfig eth0 up:

root@OpenWrt:/# ifconfig
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:96 errors:0 dropped:0 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6528 (6.3 KiB)  TX bytes:6528 (6.3 KiB)

root@OpenWrt:/# ip link set eth0 up
[   36.201514] 8021q: adding VLAN 0 to HW filter on device eth0
root@OpenWrt:/# [   36.536060] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/Full duplex)
[   37.186158] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (100Mbps/Full duplex)

root@OpenWrt:/#
root@OpenWrt:/# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0C:43:76:20:58
          inet6 addr: fe80::20c:43ff:fe76:2058/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:840 (840.0 B)
          Interrupt:5

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:128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:128 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8704 (8.5 KiB)  TX bytes:8704 (8.5 KiB)

swconfig:

root@OpenWrt:/# swconfig dev mt7620 set reset 1
root@OpenWrt:/# swconfig dev mt7620 set enable_vlan 0
root@OpenWrt:/# swconfig dev mt7620 set apply 1
root@OpenWrt:/# swconfig dev mt7620 show
Global attributes:
        enable_vlan: 0
        mib: Switch MIB counters
PPE_AC_BCNT0: 0
PPE_AC_PCNT0: 0
PPE_AC_BCNT63: 0
PPE_AC_PCNT63: 0
PPE_MTR_CNT0: 0
PPE_MTR_CNT63: 0
GDM1_TX_GBCNT: 0
GDM1_TX_GPCNT: 0
GDM1_TX_SKIPCNT: 0
GDM1_TX_COLCNT: 0
GDM1_RX_GBCNT1: 0
GDM1_RX_GPCNT1: 0
GDM1_RX_OERCNT: 0
GDM1_RX_FERCNT: 0
GDM1_RX_SERCNT: 0
GDM1_RX_LERCNT: 0
GDM1_RX_CERCNT: 0
GDM1_RX_FCCNT: 0
GDM2_TX_GBCNT: 0
GDM2_TX_GPCNT: 0
GDM2_TX_SKIPCNT: 0
GDM2_TX_COLCNT: 0
GDM2_RX_GBCNT: 0
GDM2_RX_GPCNT: 0
GDM2_RX_OERCNT: 0
GDM2_RX_FERCNT: 0
GDM2_RX_SERCNT: 0
GDM2_RX_LERCNT: 3
GDM2_RX_CERCNT: 0
GDM2_RX_FCCNT: 0

        mirror_monitor_port: 0
        arl_table: address resolution table
Port 6: MAC 00:0c:43:76:20:58
Port 6: MAC 00:0c:43:76:20:58
Port 5: MAC 00:0e:c6:b8:d7:61
Port 5: MAC 00:0e:c6:b8:d7:61

Port 0:
        mib: Port 0 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:0 link:down
Port 1:
        mib: Port 1 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:2 link:down
Port 3:
        mib: Port 3 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        mib: Port 5 MIB counters
TxGPC      : 2
TxBOC      : 0
TxGOC      : 308
TxEPC      : 0
RxGPC      : 2466
RxBOC      : 0
RxGOC      : 263008
RxEPC1     : 0
RxEPC2     : 1833

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 1
        link: port:5 link:up speed:100baseT full-duplex
Port 6:
        mib: Port 6 MIB counters
TxGPC      : 633
TxBOC      : 0
TxGOC      : 65933
TxEPC      : 0
RxGPC      : 8
RxBOC      : 0
RxGOC      : 1172
RxEPC1     : 0
RxEPC2     : 6

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 1
        link: port:6 link:up speed:1000baseT full-duplex
Port 7:
        mib: Port 7 MIB counters
TxGPC      : 0
TxBOC      : 0
TxGOC      : 0
TxEPC      : 0
RxGPC      : 0
RxBOC      : 0
RxGOC      : 0
RxEPC1     : 0
RxEPC2     : 0

        enable_mirror_rx: 0
        enable_mirror_tx: 0
        pvid: 0
        link: port:7 link:down
VLAN 1:
        vid: 1
        ports: 5 6
root@OpenWrt:/#

Now when I connect to wireless I don't receive IP and I need to put eth0 up to become active but still don't receive IP on it but now link is connected.

Excellent. I think that dts config is correct now. BTW return back kmod-phy-realtek driver. It may be helpful in the future.
As I see you don't configure lan interface in userspace. So you have to run

Simply add your borad into target/linux/ramips/mt7620/base-files/etc/board.d/02_network. Something like:

	zte,q7|\
	dlink,dap-1620-a1)
		ucidef_add_switch "switch0"
		ucidef_add_switch_attr "switch0" "enable" "false"
		ucidef_set_interface_lan "eth0"
		;;

About eth0 up I said above. Your device is Access Point (AP) and have only one network interface. AP usually don't run neither dhcp server nor firewall. In typical case AP join wifi and lan interface into bridge. And this bridge simply forward client's dhcp request to upper router. To be accessed for management AP can request ip for itself too.
To simplify show your /etc/config/network file and we correct it.

Good I received active link . Thank you.
my curent dts is :

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;

#include "mt7620a.dtsi"

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

/ {
	compatible = "dlink,dap-1620-a1", "ralink,mt7620a-soc";
	model = "D-Link DAP-1620 A1";

	aliases {
		led-boot = &led_power;
		led-failsafe = &led_status;
		led-running = &led_power;
		led-upgrade = &led_status;
	};
	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio0 1 0>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&gpio0 2 0>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};
    leds {
		compatible = "gpio-leds";

		led_power: power {
			label = "dap-1620-a1:green:power";
			gpios = <&gpio2 0 1>;
		};
		lan {
			label = "dap-1620:green:lan";
			gpios = <&gpio0 12 1>;
		};
		led_status: status {
			label = "dap-1620-a1:red:status";
			gpios = <&gpio0 13 1>;
		};

		wlan2g {
			label = "dap-1620-a1:green:wlan2g";
			gpios = <&gpio0 8 1>;
			linux,default-trigger = "phy1radio";
		};

		wlan5g {
			label = "dap-1620-a1:green:wlan5g";
			gpios = <&gpio0 11 1>;
			linux,default-trigger = "phy0radio";
		};

		wps {
			label = "dap-1620-a1:red:wps";
			gpios = <&gpio0 9 1>;
		};
	};
};

&gpio1 {
	status = "okay";
};

&gpio2 {
	status = "okay";
};

&spi0 {
	status = "okay";

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

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

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

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

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

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


&state_default {
	default {
		groups ="i2c", "ephy", "uartf", "spi refclk", "wled";
		function = "gpio";
	};
};

&pcie {
	status = "okay";
};

&pcie0 {
	wifi@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x8000>;
		ieee80211-freq-limit = <5000000 6000000>;
		mtd-mac-address = <&factory 0x28>;
		mtd-mac-address-increment = <2>;
	};
};

&ethernet {
	pinctrl-names = "default";
	pinctrl-0 = <&rgmii1_pins &mdio_pins >;
	mtd-mac-address = <&factory 0x4>;
    ralink,port-map = "wllll";

	port@5 {
		status = "okay";
		phy-mode = "rgmii";
		phy-handle = <&phy1>;
	};
	mdio-bus {
			status = "okay";
			mediatek,mdio-mode = <1>;
			phy1: ethernet-phy@1 {
				reg = <1>;
				phy-mode = "rgmii";
			};
		};

};

&gsw {
	mediatek,port5 = "gmac";
};

&wmac {
	ralink,mtd-eeprom = <&factory 0>;
};

Boot log:

U-Boot 1.1.3 (Mar 21 2016 - 16:55:00)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb0000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 4.1.1.0
--------------------------------------------
ASIC 7620_MP (Port5<->Phy)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Mar 21 2016  Time:16:55:00
Cameo Version: v1.00 Build:02
Module Name: D-Link DAP-1620A1
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =64 Mbytes
raspi_read: from:50000 len:40
raspi_read: from:4f0000 len:40

=================================================
Check image validation:
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> Failed
Image1 Header Checksum --> OK
Image1 Data Checksum --> raspi_read: from:50040 len:1d9017
OK

Image1: OK Image2: Broken
Only Image2 is borken!!

=================================================

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                                                                                        0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
   Image Name:   MIPS OpenWrt Linux-5.4.60
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1937431 Bytes =  1.8 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:1d9017
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 5.4.60 (root@buntu18) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14267-18fbb9aa21)) #0 Tue Aug 25 18:54:24 2020
[    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: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link DAP-1620 A1
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=0007e6ee
[    0.000000] Readback ErrCtl register=0007e6ee
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57564K/65536K available (4576K kernel code, 200K rwdata, 1024K rodata, 1232K init, 205K bss, 7972K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015474] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.059579] pid_max: default: 32768 minimum: 301
[    0.068955] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083362] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.105462] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.124766] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.138379] pinctrl core: initialized pinctrl subsystem
[    0.149305] NET: Registered protocol family 16
[    0.642374] PCI host bridge /pcie@10140000 ranges:
[    0.651771]  MEM 0x0000000020000000..0x000000002fffffff
[    0.662143]   IO 0x0000000010160000..0x000000001016ffff
[    0.694827] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.705881] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.718463] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.729470] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.742074] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.753080] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.766177] PCI host bridge to bus 0000:00
[    0.774228] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.787847] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.799617] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.813117] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.828908] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.840840] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.853276] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.865813] pci 0000:00:00.0: supports D1
[    0.873693] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.887219] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.903237] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    0.915123] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    0.928583] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.941982] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.956140] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.969192] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.982353] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.995468] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    1.009315] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    1.022817] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    1.037180] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    1.050691] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    1.065237] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    1.079582] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.089447] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    1.102943] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    1.117420] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    1.142137] clocksource: Switched to clocksource systick
[    1.154028] NET: Registered protocol family 2
[    1.163516] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.180086] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.195246] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    1.209265] TCP: Hash tables configured (established 1024 bind 1024)
[    1.222044] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.234951] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.249078] NET: Registered protocol family 1
[    1.257703] PCI: CLS 0 bytes, default 32
[    1.268338] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    1.282557] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    1.303821] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.315331] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.351905] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.365628] printk: console [ttyS0] disabled
[    1.374117] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    1.393737] printk: console [ttyS0] enabled
[    1.393737] printk: console [ttyS0] enabled
[    1.410325] printk: bootconsole [early0] disabled
[    1.410325] printk: bootconsole [early0] disabled
[    1.434826] spi spi0.0: force spi mode3
[    1.443467] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    1.453481] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.466145] Creating 4 MTD partitions on "spi0.0":
[    1.475702] 0x000000000000-0x000000030000 : "u-boot"
[    1.486751] 0x000000030000-0x000000040000 : "nvram"
[    1.497584] 0x000000040000-0x000000050000 : "factory"
[    1.508739] 0x000000050000-0x000000800000 : "firmware"
[    1.523191] 2 uimage-fw partitions found on MTD device firmware
[    1.535055] Creating 2 MTD partitions on "firmware":
[    1.544961] 0x000000000000-0x0000001d9057 : "kernel"
[    1.555939] 0x0000001d9057-0x0000007b0000 : "rootfs"
[    1.566907] mtd: device 5 (rootfs) set to be root filesystem
[    1.579928] 1 squashfs-split partitions found on MTD device rootfs
[    1.592336] 0x0000004a7000-0x0000007b0000 : "rootfs_data"
[    1.605064] libphy: Fixed MDIO Bus: probed
[    1.622294] gsw: setting port4 to ephy mode
[    1.631123] libphy: mdio: probed
[    1.638829] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:01 [uid=001cc915, driver=Generic PHY]
[    1.660086] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.672615] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.689662] rt2880_wdt 10000120.watchdog: Initialized
[    1.701204] NET: Registered protocol family 10
[    1.714894] Segment Routing with IPv6
[    1.722405] NET: Registered protocol family 17
[    1.731361] 8021q: 802.1Q VLAN Support v1.8
[    1.748956] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.770010] Freeing unused kernel memory: 1232K
[    1.779059] This architecture does not have kernel memory protection.
[    1.791889] Run /sbin/init as init process
[    1.986075] random: fast init done
[    2.814828] init: Console is alive
[    2.822020] init: - watchdog -
[    3.981851] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.139934] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.157432] init: - preinit -
[    5.311457] random: jshn: uninitialized urandom read (4 bytes read)
[    5.409773] random: jshn: uninitialized urandom read (4 bytes read)
[    5.545087] random: jshn: uninitialized urandom read (4 bytes read)
[    5.979101] 8021q: adding VLAN 0 to HW filter on device eth0
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
[    6.961930] jffs2: notice: (458) jffs2_build_xattr_subsystem: complete building xattr subsystem, 6 of xdatum (5 unchecked, 1 orphan) and 7 of xref (1 dead, 0 orphan) found.
[    6.994572] mount_root: switching to jffs2 overlay
[    7.038558] overlayfs: upper fs does not support tmpfile.
[    7.056938] urandom-seed: Seeding with /etc/urandom.seed
[    7.193371] procd: - early -
[    7.199328] procd: - watchdog -
[    7.408469] procd: - watchdog -
[    7.415138] procd: - ubus -
[    7.497492] urandom_read: 5 callbacks suppressed
[    7.497501] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.522483] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.540174] procd: - init -
Please press Enter to activate this console.
[    8.497311] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.565923] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[    8.580397] Backport generated by backports.git v5.8-1-0-g79400d9e
[    8.668832] xt_time: kernel timezone is -0000
[    8.900782] mt76x2e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    8.913408] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[    9.076051] urngd: jent-rng init failed, err: 2
[    9.141392] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[    9.159548] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[    9.170510] mt76x2e 0000:01:00.0: Build: 1
[    9.178675] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[    9.195542] mt76x2e 0000:01:00.0: Firmware running!
[    9.330882] PPP generic driver version 2.4.2
[    9.342836] NET: Registered protocol family 24
[    9.396405] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    9.410886] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    9.426352] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[    9.550198] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.487266] random: crng init done
[   24.299342] 8021q: adding VLAN 0 to HW filter on device eth0
[   24.342705] br-lan: port 1(eth0) entered blocking state
[   24.353199] br-lan: port 1(eth0) entered disabled state
[   24.364039] device eth0 entered promiscuous mode
[   35.832813] br-lan: port 1(eth0) entered blocking state
[   35.843255] br-lan: port 1(eth0) entered forwarding state
[   35.856606] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   35.875829] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (100Mbps/Full duplex)
[   39.326214] br-lan: port 1(eth0) entered disabled state
[   39.785771] br-lan: port 1(eth0) entered blocking state
[   39.796212] br-lan: port 1(eth0) entered forwarding state
[   39.824143] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/Full duplex)
[   39.944769] br-lan: port 1(eth0) entered disabled state
[   40.534911] br-lan: port 1(eth0) entered blocking state
[   40.545353] br-lan: port 1(eth0) entered forwarding state
[   40.615875] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (100Mbps/Full duplex)

Some things to polish but at least I can close it )
Strange that connection starts at 1Gbps after drops to 100mbps in u-boot when I upload firmware it's always 1Gbps.
Buttons still don't work GPIOS seems to be fine , all LEDs working axcept one that shows lan status.
Otherwise without you and s_2 support of this device would be imposible, thanks.

Also in Luci I see "Switch switch0 has an unknown topology - the VLAN settings might not be accurate." and non of the ports are active.

1 Like

It's possible that you set wrong polarity.for button. Try gpios = <&gpio0 1 1>; or more correctly
gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; for "reset" (and "wps" too).

You can configure lan status in LEDS menu of web interface or more correctly add into target/linux/ramips/mt7620/base-files/etc/board.d/01_leds.:

	dlink,dap-1620-a1)
	ucidef_set_led_switch "lan" "lan" "$boardname:green:lan"  "switch0" "0x20"
	;;

It's normal warning because vlan support is disabled.

Awesome work guys! :slight_smile: :+1:

Sorry I didn't have much time for testing during the last weeks, however as mentioned earlier, I don't have much experience with the details of the ramips target anyways, so thanks to @123serge123 for helping out with the gmac stuff!

@xromansx few more things when polishing the code for a Pull Request:
In the meantime, the $boardname prefix has been removed from LED labels in current ramips master, so you can shorten e.g. "dap-1620-a1:green:power"; to be just "green:power"; etc.
Also the /dts-v1/; line can be dropped now, as it was recently moved to the .dtsi files for the individual SOCs.

For the factory image, feel free to use my build recipe append-md5sum-salted, which was intially made for DAP-1320 Rev C3 (as mentioned in Post #20):

This should allow the image to be flashed also via normal Web UI, not just Recovery or tftp.

Can't want to test the image next week, thanks guys! :slight_smile:

Buttons seems to be working now, Thanks
Led also working fine had typo in dts.

Regarding the switch I was thinking it should show active port5 but it's sowing active CPU(eth0) last port.

Regarding Gbit connection maybe I should force 1Gb, it's always 100Mbps.

Thanks.

Used latest sources, enabled realtek phy in kernel now driver identifies correct adapter but speed still 100Mbps, and also lan led stop working. Latest logs:

U-Boot 1.1.3 (Mar 21 2016 - 16:55:00)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb0000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 29
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
*** Warning - bad CRC, using default environment

============================================
Ralink UBoot Version: 4.1.1.0
--------------------------------------------
ASIC 7620_MP (Port5<->Phy)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Mar 21 2016  Time:16:55:00
Cameo Version: v1.00 Build:02
Module Name: D-Link DAP-1620A1
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 580 MHZ ####
 estimate memory size =64 Mbytes
raspi_read: from:50000 len:40
raspi_read: from:4f0000 len:40

=================================================
Check image validation:
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> Failed
Image1 Header Checksum --> OK
Image1 Data Checksum --> raspi_read: from:50040 len:1d992e
OK

Image1: OK Image2: Broken
Only Image2 is borken!!

=================================================

Please choose the operation:
   1: Load system code to SDRAM via TFTP.
   2: Load system code then write to Flash via TFTP.
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   7: Load Boot Loader code then write to Flash via Serial.
   9: Load Boot Loader code then write to Flash via TFTP.                                                                                      0

3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
   Image Name:   MIPS OpenWrt Linux-5.4.71
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1939758 Bytes =  1.8 MB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:1d992e
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64

Starting kernel ...

[    0.000000] Linux version 5.4.71 (root@buntu18) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r14724-c78e123d5a)) #0 Mon Oct 19 12:53:27 2020
[    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: MediaTek MT7620A ver:2 eco:6
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019650 (MIPS 24KEc)
[    0.000000] MIPS: machine is D-Link DAP-1620 A1
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16240
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    0.000000] Writing ErrCtl register=0007e4e0
[    0.000000] Readback ErrCtl register=0007e4e0
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57564K/65536K available (4583K kernel code, 210K rwdata, 1020K rodata, 1220K init, 205K bss, 7972K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x32c/0x518 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource: systick: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 583261500 ns
[    0.000000] systick: enable autosleep mode
[    0.000000] systick: running - mult: 214748, shift: 32
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000011] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.015474] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.059562] pid_max: default: 32768 minimum: 301
[    0.068933] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.083340] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.105444] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.124753] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.138353] pinctrl core: initialized pinctrl subsystem
[    0.149274] NET: Registered protocol family 16
[    0.420339] PCI host bridge /pcie@10140000 ranges:
[    0.429734]  MEM 0x0000000020000000..0x000000002fffffff
[    0.440106]   IO 0x0000000010160000..0x000000001016ffff
[    0.473400] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.484452] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.497035] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.508043] rt2880_gpio 10000638.gpio: registering 16 irq handlers
[    0.520650] rt2880_gpio 10000660.gpio: registering 32 gpios
[    0.531657] rt2880_gpio 10000660.gpio: registering 32 irq handlers
[    0.544753] PCI host bridge to bus 0000:00
[    0.552807] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.566421] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.578191] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.591691] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.607484] pci 0000:00:00.0: [1814:0801] type 01 class 0x060400
[    0.619412] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.631848] pci 0000:00:00.0: reg 0x14: [mem 0x20200000-0x2020ffff]
[    0.644383] pci 0000:00:00.0: supports D1
[    0.652268] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.666041] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[    0.677941] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    0.691390] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    0.704794] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.718850] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.731898] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.745064] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.758174] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.772017] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[    0.785519] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[    0.799881] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.813397] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[    0.827947] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[    0.842287] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.852155] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x200fffff]
[    0.865650] pci 0000:00:00.0:   bridge window [mem 0x20100000-0x201fffff pref]
[    0.880122] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.905045] clocksource: Switched to clocksource systick
[    0.916922] NET: Registered protocol family 2
[    0.926415] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.942975] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.958147] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.972162] TCP: Hash tables configured (established 1024 bind 1024)
[    0.984939] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.997850] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.011961] NET: Registered protocol family 1
[    1.020583] PCI: CLS 0 bytes, default 32
[    1.031316] rt-timer 10000100.timer: maximum frequency is 1220Hz
[    1.045552] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    1.066492] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.078001] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.114932] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.128674] printk: console [ttyS0] disabled
[    1.137144] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    1.156780] printk: console [ttyS0] enabled
[    1.156780] printk: console [ttyS0] enabled
[    1.173367] printk: bootconsole [early0] disabled
[    1.173367] printk: bootconsole [early0] disabled
[    1.198212] spi spi0.0: force spi mode3
[    1.206851] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    1.216861] 4 fixed-partitions partitions found on MTD device spi0.0
[    1.229523] Creating 4 MTD partitions on "spi0.0":
[    1.239080] 0x000000000000-0x000000030000 : "u-boot"
[    1.250056] 0x000000030000-0x000000040000 : "nvram"
[    1.260881] 0x000000040000-0x000000050000 : "factory"
[    1.272044] 0x000000050000-0x000000800000 : "firmware"
[    1.286607] 2 uimage-fw partitions found on MTD device firmware
[    1.298469] Creating 2 MTD partitions on "firmware":
[    1.308376] 0x000000000000-0x0000001d996e : "kernel"
[    1.319338] 0x0000001d996e-0x0000007b0000 : "rootfs"
[    1.330249] mtd: device 5 (rootfs) set to be root filesystem
[    1.343319] 1 squashfs-split partitions found on MTD device rootfs
[    1.355723] 0x0000004c7000-0x0000007b0000 : "rootfs_data"
[    1.368432] libphy: Fixed MDIO Bus: probed
[    1.388767] gsw: setting port4 to ephy mode
[    1.397630] libphy: mdio: probed
[    1.405584] mtk_soc_eth 10100000.ethernet: connected port 5 to PHY at mdio-bus:01 [uid=001cc915, driver=RTL8211E Gigabit Ethernet]
[    1.429239] mtk_soc_eth 10100000.ethernet: loaded mt7620 driver
[    1.441782] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    1.458825] rt2880_wdt 10000120.watchdog: Initialized
[    1.470396] NET: Registered protocol family 10
[    1.484204] Segment Routing with IPv6
[    1.491724] NET: Registered protocol family 17
[    1.500676] 8021q: 802.1Q VLAN Support v1.8
[    1.518371] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    1.539365] Freeing unused kernel memory: 1220K
[    1.548412] This architecture does not have kernel memory protection.
[    1.561243] Run /sbin/init as init process
[    1.784977] random: fast init done
[    2.462030] init: Console is alive
[    2.469240] init: - watchdog -
[    3.601799] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    3.756793] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.774263] init: - preinit -
[    5.143579] random: jshn: uninitialized urandom read (4 bytes read)
[    5.243237] random: jshn: uninitialized urandom read (4 bytes read)
[    5.379098] random: jshn: uninitialized urandom read (4 bytes read)
[    5.976647] 8021q: adding VLAN 0 to HW filter on device eth0
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
[    6.768230] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    6.786736] urandom-seed: Seed file not found (/etc/urandom.seed)
[    6.900452] procd: - early -
[    6.906406] procd: - watchdog -
[    7.107666] procd: - watchdog -
[    7.114351] procd: - ubus -
[    7.195286] urandom_read: 5 callbacks suppressed
[    7.195295] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.218269] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.232783] procd: - init -
Please press Enter to activate this console.
[    8.195397] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.258914] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[    8.273381] Backport generated by backports.git v5.8-1-0-g79400d9e
[    8.363385] xt_time: kernel timezone is -0000
[    8.518110] mt76x2e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    8.530805] mt76x2e 0000:01:00.0: ASIC revision: 76120044
[    8.671246] urngd: jent-rng init failed, err: 2
[    8.739150] mt76x2e 0000:01:00.0: ROM patch build: 20141115060606a
[    8.757513] mt76x2e 0000:01:00.0: Firmware Version: 0.0.00
[    8.768475] mt76x2e 0000:01:00.0: Build: 1
[    8.776638] mt76x2e 0000:01:00.0: Build Time: 201507311614____
[    8.793489] mt76x2e 0000:01:00.0: Firmware running!
[    8.892543] PPP generic driver version 2.4.2
[    8.904835] NET: Registered protocol family 24
[    8.980594] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[    8.995085] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 6352, rev 0500 detected
[    9.010551] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 7620 detected
[    9.123171] kmodloader: done loading kernel modules from /etc/modules.d/*
[   17.021319] random: crng init done
▒▒^@▒[   55.742358] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   55.779312] jffs2_build_filesystem(): unlocking the mtd device...
[   55.779321] done.
[   55.795539] jffs2_build_filesystem(): erasing all blocks after the end marker...
[   56.660661] 8021q: adding VLAN 0 to HW filter on device eth0
[   56.769869] br-lan: port 1(eth0) entered blocking state
[   56.780363] br-lan: port 1(eth0) entered disabled state
[   56.791187] device eth0 entered promiscuous mode
^@[   62.046723] br-lan: port 1(eth0) entered blocking state
[   62.057171] br-lan: port 1(eth0) entered forwarding state
[   62.096949] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   62.813429] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (100Mbps/Full duplex)
[   84.891028] done.
[   84.895048] jffs2: notice: (1420) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   85.159223] overlayfs: upper fs does not support tmpfile.
^@[   86.999220] br-lan: port 1(eth0) entered disabled state
[   87.280785] br-lan: port 1(eth0) entered blocking state
[   87.291228] br-lan: port 1(eth0) entered forwarding state
[   87.406476] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (1000Mbps/Full duplex)
[   87.532815] br-lan: port 1(eth0) entered disabled state
[   87.758463] br-lan: port 1(eth0) entered blocking state
[   87.768904] br-lan: port 1(eth0) entered forwarding state
[   87.886236] br-lan: port 1(eth0) entered disabled state
▒^@^@[   88.125448] br-lan: port 1(eth0) entered blocking state
[   88.135892] br-lan: port 1(eth0) entered forwarding state
[   88.361760] br-lan: port 1(eth0) entered disabled state
[   88.571706] mtk_soc_eth 10100000.ethernet eth0: port 5 link up (100Mbps/Full duplex)
[   88.602352] br-lan: port 1(eth0) entered blocking state
[   88.612785] br-lan: port 1(eth0) entered forwarding state

One of possible reason is rgmii interface synchronization lost at 1Gbps speed. I don't know which clock is "faster" (internal switch port 5 or rtl8211e)/ So try:

  1. Add rgmii internal delay at port 5:
	port@5 {
		status = "okay";
		phy-mode = "rgmii-id";
		phy-handle = <&phy1>;
	};
  1. Or add rgmii internal delay at rtl8211e (only work if realtek phy driver is loaded):
			phy1: ethernet-phy@1 {
				reg = <1>;
				phy-mode = "rgmii-id";
			};

For this situation swconfig dev switch0 show is more informative.