Adding Device Support Intelbras AP-300 (ZEUS)

I have this router:

Brand: Intelbras
Model: AP-300
Ethernets 10/100: 2 (1 with POE)
Wireless 2.4 Ghz 300Mbps
CPU: Ralink RT3662F
RAM MB: 64
Flash MB: 8
Serial connection: 57600 / 8N1

i'm working on this router for add openwrt support.
I made a initram image and initialize it by tftp and it works with only one problem on the eth1. The eth0 and wlan0 works fine.

I need some help to fix the eth1 problem.

OEM Log

U-Boot 1.1.3 (Jul 25 2014 - 09:53:01)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb0000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 30
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.raspi_read: from:30000 len:1000
.LED RGB UP
============================================
Ralink UBoot Version: 4.0.0.0
--------------------------------------------
ASIC 3883_MP (MAC to 100SW Mode)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: DDR2
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Jul 25 2014  Time:09:53:01
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 500 MHZ ####
 estimate memory size =64 Mbytes

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-3.10.49
   Created:      2020-09-28  13:17:49 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    928962 Bytes = 907.2 kB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:e2cc2
...............   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 3.10.49 (build@runner-50ec0c25-project-43-concurrent-3) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 a00aa2) ) #1 Mon Sep 28 13:17:41 UTC 2020
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is AP300-ZEUS
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000  @  00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] 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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16255
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 61980k/65532k available (2156k kernel code, 3552k reserved, 400k data, 192k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] CPU Clock: 500MHz
[    0.000000] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.080000] pinctrl core: initialized pinctrl subsystem
[    0.090000] NET: Registered protocol family 16
[    0.110000] bio: create slab <bio-0> at 0
[    0.120000] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.130000] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.140000] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.150000] Switching to clocksource MIPS
[    0.160000] NET: Registered protocol family 2
[    0.170000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.190000] TCP: Hash tables configured (established 512 bind 512)
[    0.210000] TCP: reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.240000] NET: Registered protocol family 1
[    0.250000] rt-timer 10000100.timer: maximum frequncy is 10131Hz
[    0.260000] Load Ralink DFS Timer Module
[    0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.320000] msgmni has been set to 121
[    0.320000] io scheduler noop registered (default)
[    0.330000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.350000] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.360000] console [ttyS0] enabled, bootconsole disabled
[    0.360000] console [ttyS0] enabled, bootconsole disabled
[    0.380000] Ralink gpio driver initialized
[    0.400000] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.410000] 4 ofpart partitions found on MTD device spi0.0
[    0.420000] Creating 4 MTD partitions on "spi0.0":
[    0.430000] 0x000000000000-0x000000030000 : "Bootloader"
[    0.440000] 0x000000030000-0x000000040000 : "mib0"
[    0.450000] 0x000000040000-0x000000050000 : "Factory"
[    0.460000] 0x000000050000-0x000000800000 : "firmware"
[    0.490000] 2 uimage-fw partitions found on MTD device firmware
[    0.500000] 0x000000050000-0x000000132d02 : "kernel"
[    0.510000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.540000] 0x000000132d02-0x000000800000 : "rootfs"
[    0.550000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.580000] mtd: device 5 (rootfs) set to be root filesystem
[    0.590000] 1 squashfs-split partitions found on MTD device rootfs
[    0.600000] 0x000000690000-0x000000800000 : "rootfs_data"
[    0.620000] Ralink APSoC Ethernet Driver v3.2.4 (raeth)
[    0.630000] raeth: PDMA RX ring 128, PDMA TX ring 256. Max packet size 1536
[    0.640000] raeth: NAPI & GRO support, weight 32
[    0.650000] rt2880_wdt 10000120.watchdog: Initialized
[    0.660000] TCP: cubic registered
[    0.670000] NET: Registered protocol family 17
[    0.680000] Bridge firewalling registered
[    0.690000] 8021q: 802.1Q VLAN Support v1.8
[    0.710000] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    0.720000] Freeing unused kernel memory: 192K (80280000 - 802b0000)
procd: Console is alive
procd: - watchdog -
[    4.880000] leds-gpio gpio-leds.5: pins are not configured from the driver
procd: - preinit -
[    5.440000] raeth: HW IP/TCP/UDP checksum RX/TX offload enabled
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
jffs2 is ready
No jffs2 marker was found
[    8.880000] jffs2: notice: (259) jffs2_build_xattr_subsystem: complete building xattr subsystem, 9 of xdatum (1 unchecked, 8 orphan) and 105 of xref (0 dead, 72 orphan) found.
switching to overlay
procd: - early -
procd: - watchdog -
procd: - ubus -
procd: - init -
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
[   12.480000] NET: Registered protocol family 10
[   12.510000] sit: IPv6 over IPv4 tunneling driver
[   12.540000] nf_conntrack version 0.5.0 (971 buckets, 3884 max)
[   12.690000] ip6_tables: (C) 2000-2006 Netfilter Core Team
chroot: can't execute '/sbin/getty': No such file or directory
[   12.730000] u32 classifier
[   12.740000]     input device check on
[   12.750000]     Actions configured
[   12.780000] Mirror/redirect action on
[   12.820000] Initializing devdh module version (3.1) with 127 max entries. Listening on: (wlan) (ath) (ra)
[   12.870000] Ebtables v2.0 registered
[   12.900000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.920000] Module kmod-itbnlhub initialized
[   13.060000] xt_time: kernel timezone is -0000
[   13.090000] PPP generic driver version 2.4.2
[   13.100000] PPP MPPE Compression module registered
[   13.110000] NET: Registered protocol family 24
[   13.120000] PPP BSD Compression module registered
[   13.130000] PPP Deflate Compression module registered
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory
chroot: can't execute '/sbin/getty': No such file or directory

ap300 login: [   29.300000] raeth: HW IP/TCP/UDP checksum RX/TX offload enabled
[   29.320000] eth1: ===> VirtualIF_open
[   36.620000] rt2860v2_ap: module license 'unspecified' taints kernel.
[   36.630000] Disabling lock debugging due to kernel taint
[   36.710000]
[   36.710000]
[   36.710000] === pAd = c0594000, size = 1108400 ===
[   36.710000]
[   36.730000] <-- RTMPAllocTxRxRingMemory, Status=0
[   36.740000] <-- RTMPAllocAdapterBlock, Status=0
[   39.020000] RX DESC a20fe000  size = 8192
[   39.080000] Key1Str is Invalid key length(0) or Type(1)
[   39.090000] Key2Str is Invalid key length(0) or Type(1)
[   39.100000] Key3Str is Invalid key length(0) or Type(1)
[   39.110000] Key4Str is Invalid key length(0) or Type(1)
[   39.130000] 1. Phy Mode = 9
[   39.130000] 2. Phy Mode = 9
[   39.290000] 3. Phy Mode = 9
[   39.290000] RTMPSetPhyMode: channel is out of range, use first channel=0
[   39.310000] MCS Set = ff ff 00 00 01
[   39.320000] SYNC - BBP R4 to 20MHz.l
[   44.480000] SYNC - BBP R4 to 20MHz.l
[   44.790000] SYNC - BBP R4 to 20MHz.l
[   45.100000] SYNC - BBP R4 to 20MHz.l
[   45.410000] SYNC - BBP R4 to 20MHz.l
[   45.970000] SYNC - BBP R4 to 20MHz.l
[   46.280000] SYNC - BBP R4 to 20MHz.l
[   46.610000] SYNC - BBP R4 to 20MHz.l
[   46.920000] SYNC - BBP R4 to 20MHz.l
[   47.230000] The 2-BSSID mode is enabled, the BSSID byte5 MUST be the multiple of 2
[   47.250000] Main bssid = 58:10:8c:63:cc:1b
[   47.260000] <==== rt28xx_init, Status=0
[   47.270000] 0x1300 = 00064300
procd: - init complete -
[   60.740000] The 2-BSSID mode is enabled, the BSSID byte5 MUST be the multiple of 2
[   60.750000] acm_msg> ACM_MEM_Alloc_Num = 1
[   60.760000] acm_msg> ACM_MEM_Free_Num  = 1
[   60.820000] RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
[   61.660000]
[   61.660000]
[   61.660000] === pAd = c0d3a000, size = 1108400 ===
[   61.660000]
[   61.680000] <-- RTMPAllocTxRxRingMemory, Status=0
[   61.690000] <-- RTMPAllocAdapterBlock, Status=0
[   63.730000] RX DESC a397c000  size = 8192
[   63.770000] Key1Str is Invalid key length(0) or Type(1)
[   63.780000] Key2Str is Invalid key length(0) or Type(1)
[   63.790000] Key3Str is Invalid key length(0) or Type(1)
[   63.800000] Key4Str is Invalid key length(0) or Type(1)
[   63.820000] 1. Phy Mode = 9
[   63.820000] 2. Phy Mode = 9
[   63.830000] 3. Phy Mode = 9
[   63.840000] RTMPSetPhyMode: channel is out of range, use first channel=0
[   63.850000] MCS Set = ff ff 00 00 01
[   63.860000] SYNC - BBP R4 to 20MHz.l
[   66.470000] SYNC - BBP R4 to 20MHz.l
[   66.780000] SYNC - BBP R4 to 20MHz.l
[   67.090000] SYNC - BBP R4 to 20MHz.l
[   67.400000] SYNC - BBP R4 to 20MHz.l
[   67.710000] SYNC - BBP R4 to 20MHz.l
[   68.020000] SYNC - BBP R4 to 20MHz.l
[   68.330000] SYNC - BBP R4 to 20MHz.l
[   68.640000] SYNC - BBP R4 to 20MHz.l
[   68.950000] The 2-BSSID mode is enabled, the BSSID byte5 MUST be the multiple of 2
[   68.970000] Main bssid = 58:10:8c:63:cc:1b
[   68.980000] <==== rt28xx_init, Status=0
[   68.990000] 0x1300 = 00064300

ap300 login: admin
Password:

-----------------------------------------------------------------
  _____ _   _ _______ ______ _      ____  _____             _____
 |_   _| \ | |__   __|  ____| |    |  _ \|  __ \     /\    / ____|
   | | |  \| |  | |  | |__  | |    | |_) | |__) |   /  \  | (___
   | | | . ` |  | |  |  __| | |    |  _ <|  _  /   / /\ \  \___ \
  _| |_| |\  |  | |  | |____| |____| |_) | | \ \  / ____ \ ____) |
 |_____|_| \_|  |_|  |______|______|____/|_|  \_\/_/    \_\_____/

------------------------------------------------------------------

                  Sun Aug  7 15:30:37 BRT 2022
#

OpenWrt Log

U-Boot 1.1.3 (Jul 25 2014 - 09:53:01)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb0000
******************************
Software System Reset Occurred
******************************
spi_wait_nsec: 30
spi device id: c2 20 17 c2 20 (2017c220)
find flash: MX25L6405D
raspi_read: from:30000 len:1000
.*** Warning - bad CRC, using default environment

LED RGB UP
============================================
Ralink UBoot Version: 4.0.0.0
--------------------------------------------
ASIC 3883_MP (MAC to 100SW Mode)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: DDR2
DRAM_SIZE: 512 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 64 MBytes
Flash component: SPI Flash
Date:Jul 25 2014  Time:09:53:01
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768

 ##### The CPU freq = 500 MHZ ####
 estimate memory size =64 Mbytes

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.

You choosed 1
                                                                              0
raspi_read: from:40028 len:6
.

1: System Load Linux to SDRAM via TFTP.
 Please Input new ones /or Ctrl-C to discard
        Input device IP (10.10.10.123) ==:10.1.0.100
        Input server IP (10.10.10.3) ==:10.1.0.2
        Input Linux Kernel filename () ==:kernel.bin

 netboot_common, argc= 3

 NetTxPacket = 0x83FE5380

 KSEG1ADDR(NetTxPacket) = 0xA3FE5380

 NetLoop,call eth_halt !

 NetLoop,call eth_init !
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 Header Payload scatter function is Disable !!

 ETH_STATE_ACTIVE!!
Using Eth0 (10/100-M) device
TFTP from server 10.1.0.2; our IP address is 10.1.0.100
Filename 'kernel.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80800000
Loading: Got ARP REPLY, set server/gtwy eth addr (fc:34:97:6b:34:80)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################################
done
Bytes transferred = 4930714 (4b3c9a hex)
NetBootFileXferSize= 004b3c9a
raspi_read: from:30000 len:10000
.Erasing SPI Flash...
raspi_erase: offs:30000 len:10000
.
Writing to SPI Flash...
raspi_write: to:30000 len:10000
.
done
Automatic boot of image at addr 0x80800000 ...
## Booting image at 80800000 ...
   Image Name:   MIPS OpenWrt Linux-5.10.134
   Created:      2022-07-31  15:12:47 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    4930650 Bytes =  4.7 MB
   Load Address: 80000000
   Entry Point:  80000000
   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.10.134 (administrador@debian11) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r0+19591-f37aedbfc8) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Sun Jul 31 15:12:47 2022
[    0.000000] SoC Type: Ralink RT3883 ver:1 eco:5
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] MIPS: machine is Intelbras AP-300 (ZEUS)
[    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, VIPT, cache 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: 16256
[    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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 55236K/65536K available (3868K kernel code, 577K rwdata, 596K rodata, 4420K init, 191K bss, 10300K 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] CPU Clock: 500MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041786 ns
[    0.000014] sched_clock: 32 bits at 250MHz, resolution 4ns, wraps every 8589934590ns
[    0.015568] Calibrating delay loop... 249.44 BogoMIPS (lpj=1247232)
[    0.097851] pid_max: default: 32768 minimum: 301
[    0.107216] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.121642] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.139488] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.159143] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.178639] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.192172] pinctrl core: initialized pinctrl subsystem
[    0.203902] NET: Registered protocol family 16
[    0.224681] rt2880-pinmux pinctrl: there is not valid maps for state default
[    0.292338] rt2880_gpio 10000600.gpio: registering 24 gpios
[    0.303418] rt2880_gpio 10000600.gpio: registering 24 irq handlers
[    0.316115] rt2880_gpio 10000638.gpio: registering 16 gpios
[    0.337163] clocksource: Switched to clocksource MIPS
[    0.348751] NET: Registered protocol family 2
[    0.357761] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.373004] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.389620] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.404765] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.418774] TCP: Hash tables configured (established 1024 bind 1024)
[    0.431623] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.444568] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.458755] NET: Registered protocol family 1
[    0.467373] PCI: CLS 0 bytes, default 32
[    6.591310] rt-timer 10000100.timer: maximum frequency is 5065Hz
[    6.606749] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    6.624290] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    6.635813] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    6.658967] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    6.673018] printk: console [ttyS0] disabled
[    6.681567] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 20, base_baud = 2500000) is a Palmchip BK-3103
[    6.701229] printk: console [ttyS0] enabled
[    6.701229] printk: console [ttyS0] enabled
[    6.717791] printk: bootconsole [early0] disabled
[    6.717791] printk: bootconsole [early0] disabled
[    6.749526] spi spi0.0: force spi mode3
[    6.758920] spi-nor spi0.0: mx25l6405d (8192 Kbytes)
[    6.769008] 4 fixed-partitions partitions found on MTD device spi0.0
[    6.781701] Creating 4 MTD partitions on "spi0.0":
[    6.791271] 0x000000000000-0x000000030000 : "u-boot"
[    6.803726] 0x000000030000-0x000000040000 : "mib0"
[    6.814801] 0x000000040000-0x000000050000 : "factory"
[    6.828733] 0x000000050000-0x000000800000 : "firmware"
[    6.840916] 2 uimage-fw partitions found on MTD device firmware
[    6.852807] Creating 2 MTD partitions on "firmware":
[    6.862728] 0x000000000000-0x0000000e2d02 : "kernel"
[    6.872641] mtd: partition "kernel" doesn't end on an erase/write block -- force read-only
[    6.892549] 0x0000000e2d02-0x0000007b0000 : "rootfs"
[    6.902530] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only
[    6.922316] mtd: device 5 (rootfs) set to be root filesystem
[    6.935041] 1 squashfs-split partitions found on MTD device rootfs
[    6.947480] 0x000000638000-0x0000007b0000 : "rootfs_data"
[    7.013426] mtk_soc_eth 10100000.ethernet: using fixed link parameters
[    7.026534] mtk_soc_eth 10100000.ethernet eth0 (uninitialized): link up (100Mbps/Full duplex)
[    7.044636] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    7.061840] rt2880_wdt 10000120.watchdog: Initialized
[    7.073505] NET: Registered protocol family 10
[    7.089559] Segment Routing with IPv6
[    7.097041] NET: Registered protocol family 17
[    7.106104] 8021q: 802.1Q VLAN Support v1.8
[    7.147565] Freeing unused kernel memory: 4420K
[    7.156602] This architecture does not have kernel memory protection.
[    7.169482] Run /init as init process
[    7.989286] init: Console is alive
[    7.996737] init: - watchdog -
[    8.037512] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    8.063456] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    8.088647] init: - preinit -
[    8.503198] random: jshn: uninitialized urandom read (4 bytes read)
[    8.661952] random: jshn: uninitialized urandom read (4 bytes read)
[    8.729050] random: jshn: uninitialized urandom read (4 bytes read)
[    8.918647] mtk_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[    8.933726] 8021q: adding VLAN 0 to HW filter on device eth0
[    8.945532] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
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
[   13.169153] mtk_soc_eth 10100000.ethernet eth0: link down
[   13.195124] procd: - early -
[   13.201455] procd: - watchdog -
[   13.839362] procd: - watchdog -
[   13.847969] procd: - ubus -
[   13.865435] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.904943] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.918496] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.936651] procd: - init -
Please press Enter to activate this console.
[   14.914801] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.957485] random: ubus: uninitialized urandom read (4 bytes read)
[   14.982076] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.001631] random: jsonfilter: uninitialized urandom read (4 bytes read)
[   15.515569] urngd: v1.0.2 started.
[   15.720960] Loading modules backported from Linux version v5.15.58-0-g7d8048d4e064
[   15.736159] Backport generated by backports.git v5.15.58-1-0-g42a95ce7
[   15.780133] random: crng init done
[   15.786930] random: 20 urandom warning(s) missed due to ratelimiting
[   15.974008] PPP generic driver version 2.4.2
[   15.988129] NET: Registered protocol family 24
[   16.054121] rt2800_wmac 10180000.wmac: loaded eeprom from mtd device "factory"
[   16.068642] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3883, rev 0400 detected
[   16.084144] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 3853 detected
[   16.147903] kmodloader: done loading kernel modules from /etc/modules.d/*
[   57.931865] mtk_soc_eth 10100000.ethernet eth0: link up (100Mbps/Full duplex)
[   57.946901] 8021q: adding VLAN 0 to HW filter on device eth0
[   57.991658] br-lan: port 1(eth0) entered blocking state
[   58.002160] br-lan: port 1(eth0) entered disabled state
[   58.013051] device eth0 entered promiscuous mode
[   58.967390] br-lan: port 1(eth0) entered blocking state
[   58.977882] br-lan: port 1(eth0) entered forwarding state
[   59.057242] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.35.0 (2022-07-31 15:12:47 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03-SNAPSHOT, r0+19590-042d558536
 -----------------------------------------------------
=== 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:/#

I have this code to the eth0 that works fine. But i can't solve the code to the eth1.

./openwrt/target/linux/ramips/dts/rt3662_intelbras_ap-300.dts

&ethernet {	
	nvmem-cells = <&macaddr_factory_4>;
	nvmem-cell-names = "mac-address";

	port@0 {
		status = "okay";
		mediatek,fixed-link = <100 1 1 1>;
		phy-handle = <&phy6>;
		phy-mode = "mii";
	};

	mdio-bus {
		status = "okay";

		phy6: ethernet-phy@6 {
			reg = <6>;
			phy-mode = "mii";
		};
	};
};

Post the full dts with both port0 and port1 definitions

This is the full code for now.

#include "rt3883.dtsi"

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

/ {
	compatible = "intelbras,ap-300", "ralink,rt3662-soc", "ralink,rt3883-soc";
	model = "Intelbras AP-300 (ZEUS)";
};

&spi0 {
	status = "okay";

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

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

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

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

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

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

&gpio0 {
	status = "okay";
};

&gpio1 {
	status = "okay";
};

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

&ethernet {	
	nvmem-cells = <&macaddr_factory_4>;
	nvmem-cell-names = "mac-address";
	//mac-address-increment = <1>;

	port@0 {
		status = "okay";
		mediatek,fixed-link = <100 1 1 1>;
		phy-handle = <&phy6>;
		phy-mode = "mii";
	};

	mdio-bus {
		status = "okay";

		phy6: ethernet-phy@6 {
			reg = <6>;
			phy-mode = "mii";
		};
	};
};

&factory {
	compatible = "nvmem-cells";
	#address-cells = <1>;
	#size-cells = <1>;

	macaddr_factory_4: macaddr@4 {
		reg = <0x4 0x6>;
	};
};

i've tried this code before and it didn't work:

&ethernet {	
	nvmem-cells = <&macaddr_factory_4>;
	nvmem-cell-names = "mac-address";
	//mac-address-increment = <1>;

	port@0 {
		status = "okay";
		mediatek,fixed-link = <100 1 1 1>;
		phy-handle = <&phy6>;
		phy-mode = "mii";
	};

	port@1 {
		status = "okay";
		mediatek,fixed-link = <100 1 1 1>;
		phy-handle = <&phy7>;
		phy-mode = "mii";
	};

	mdio-bus {
		status = "okay";

		phy6: ethernet-phy@6 {
			reg = <6>;
			phy-mode = "mii";
		};
		
		phy7: ethernet-phy@7 {
			reg = <7>;
			phy-mode = "mii";
		};
	};
};

This oem kernel log have something about the eth1 but i don't know how to understand it.

[   29.300000] raeth: HW IP/TCP/UDP checksum RX/TX offload enabled
[   29.320000] eth1: ===> VirtualIF_open
[   36.620000] rt2860v2_ap: module license 'unspecified' taints kernel.
[   36.630000] Disabling lock debugging due to kernel taint
[   36.710000]
[   36.710000]
[   36.710000] === pAd = c0594000, size = 1108400 ===
[   36.710000]
[   36.730000] <-- RTMPAllocTxRxRingMemory, Status=0
[   36.740000] <-- RTMPAllocAdapterBlock, Status=0
[   39.020000] RX DESC a20fe000  size = 8192
[   39.080000] Key1Str is Invalid key length(0) or Type(1)
[   39.090000] Key2Str is Invalid key length(0) or Type(1)
[   39.100000] Key3Str is Invalid key length(0) or Type(1)
[   39.110000] Key4Str is Invalid key length(0) or Type(1)
[   39.130000] 1. Phy Mode = 9
[   39.130000] 2. Phy Mode = 9
[   39.290000] 3. Phy Mode = 9
[   39.290000] RTMPSetPhyMode: channel is out of range, use first channel=0
[   39.310000] MCS Set = ff ff 00 00 01
[   39.320000] SYNC - BBP R4 to 20MHz.l
[   44.480000] SYNC - BBP R4 to 20MHz.l
[   44.790000] SYNC - BBP R4 to 20MHz.l
[   45.100000] SYNC - BBP R4 to 20MHz.l
[   45.410000] SYNC - BBP R4 to 20MHz.l
[   45.970000] SYNC - BBP R4 to 20MHz.l
[   46.280000] SYNC - BBP R4 to 20MHz.l
[   46.610000] SYNC - BBP R4 to 20MHz.l
[   46.920000] SYNC - BBP R4 to 20MHz.l
[   47.230000] The 2-BSSID mode is enabled, the BSSID byte5 MUST be the multiple of 2
[   47.250000] Main bssid = 58:10:8c:63:cc:1b
[   47.260000] <==== rt28xx_init, Status=0
[   47.270000] 0x1300 = 00064300
procd: - init complete -
[   60.740000] The 2-BSSID mode is enabled, the BSSID byte5 MUST be the multiple of 2
[   60.750000] acm_msg> ACM_MEM_Alloc_Num = 1
[   60.760000] acm_msg> ACM_MEM_Free_Num  = 1
[   60.820000] RtmpOSNetDevDetach(): RtmpOSNetDeviceDetach(), dev->name=ra0!
[   61.660000]
[   61.660000]
[   61.660000] === pAd = c0d3a000, size = 1108400 ===
[   61.660000]
[   61.680000] <-- RTMPAllocTxRxRingMemory, Status=0
[   61.690000] <-- RTMPAllocAdapterBlock, Status=0
[   63.730000] RX DESC a397c000  size = 8192
[   63.770000] Key1Str is Invalid key length(0) or Type(1)
[   63.780000] Key2Str is Invalid key length(0) or Type(1)
[   63.790000] Key3Str is Invalid key length(0) or Type(1)
[   63.800000] Key4Str is Invalid key length(0) or Type(1)
[   63.820000] 1. Phy Mode = 9
[   63.820000] 2. Phy Mode = 9
[   63.830000] 3. Phy Mode = 9
[   63.840000] RTMPSetPhyMode: channel is out of range, use first channel=0
[   63.850000] MCS Set = ff ff 00 00 01
[   63.860000] SYNC - BBP R4 to 20MHz.l
[   66.470000] SYNC - BBP R4 to 20MHz.l
[   66.780000] SYNC - BBP R4 to 20MHz.l
[   67.090000] SYNC - BBP R4 to 20MHz.l
[   67.400000] SYNC - BBP R4 to 20MHz.l
[   67.710000] SYNC - BBP R4 to 20MHz.l
[   68.020000] SYNC - BBP R4 to 20MHz.l
[   68.330000] SYNC - BBP R4 to 20MHz.l
[   68.640000] SYNC - BBP R4 to 20MHz.l
[   68.950000] The 2-BSSID mode is enabled, the BSSID byte5 MUST be the multiple of 2
[   68.970000] Main bssid = 58:10:8c:63:cc:1b
[   68.980000] <==== rt28xx_init, Status=0
[   68.990000] 0x1300 = 00064300

This router have this two ethernet chips from atheros.
Atheros AR8032-B

If I understand correctly only eth0 (port 0) is supported by current driver.
See soc_rt3883.c and mdio_rt2880.c

is possible to use the mt7620 driver? I think that it's similar.

No. All but rt2880 and rt3883 ralink/mediatek SoCs have built-in ethernet switch. And eth0 of those chips is directly connected to it.
rt3883 (and rt2880) don't have internal switch. Usually vendors add external switch chip (connected to eth0) for router functionality. And only this configuration is supported by openwrt driver for rt2880/rt3883.

I'm trying to compile the image and I need to create a specific header like this:
magic-header

i've tried this code:

define Build/append-itb-magic
	echo -n 'd80db2a1' | \
		sed 's/../\\\\x&/g' | xargs echo -ne >> $@
	$(MKHASH) md5 $@ | \
		sed 's/../\\\\x&/g' | xargs echo -ne >> $@
endef

But, after compiling the image, the header is wrong out of order like:
image

what am I doing wrong here, please help!