Support for new Archer c5 v4

It looks like the exactly same board. You can check fcc files:

https://apps.fcc.gov/eas/GetApplicationAttachment.html?id=3729805

The switch chip is the one closer to the ethernet ports with a black heatsink.

I also compared the u-boot logs. Yours:


AbraKdabra

mietekn

12d

It used to be:

U-Boot 1.1.3 (Nov 19 2018 - 11:11:36)

Board: Ralink APSoC DRAM:  64 MB
relocate_code Pointer at: 83fb4000
enable ephy clock...done. rf reg 29 = 5
SSC disabled.
spi_wait_nsec: 29
spi device id: c8 40 17 c8 40 (4017c840)
Warning: un-recognized chip ID, please update bootloader!
============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC 7620_MP (Port5<->GigaSW)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Nov 19 2018  Time:11:11:36
============================================
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
rt_rtl8367_init(1705):Begin
Wait for RTL8367C Ready
.
RTL8367C is ready now!
rt_rtl8367_init(1749):Call Func rt_rtl8367_enableRgmii()

continue to starting system.                                                  0
disable switch forward...

And yours:

U-Boot 1.1.3 (Jul 14 2022 - 09:08:23)

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: 1c 70 17 1c 70 (70171c70)
find flash: EN25QH64A
============================================
Ralink UBoot Version: 5.0.0.0
--------------------------------------------
ASIC 7620_MP (Port5<->GigaSW)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Jul 14 2022  Time:09:08:23
============================================
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
rt_rtl8367_init(1688):Begin
Wait for RTL8367C Ready
.
RTL8367C is ready now!
switch debug=========switchChip:4
rt_rtl8367_init(1742):Call Func rt_rtl8367_enableRgmii()

Besides fixing the "un-recognized chip ID", there is an extra line at:

8367C is ready now!
switch debug=========switchChip:4
rt_rtl8367_init(1742):Call Func rt_rtl8367_enableRgmii()

That switch debug might be our clue.