Support for RTL838x based managed switches

I want an OpenWRT switch with more than one SFP+ Port.

The Xikestor SKS 7300-4X4T would meet my needs better than the SKS8300-8X,
but it is not supported (yet?).
The SKS8300-8X is supported in a snapshot release, hopefully in a stable release soon.

It seems to have problems with certain SFP+ Modules.
I am not sure, where the problem is, maybe it cannot use more than one different
speed in all used ports or all ports only support 10G, I do not know.

Also it is not available new anymore.

The SKS8310-8X seems to be available, has a built in fan. It probably
needs that fan, because the predecessor would overheat.
Maybe the image of the SKS8300-8X could work, but noone tried yet.

I would try it, if there is a chance, that following requirements can be met in the end:
Support for DAC connections to random other switches or NICs.
Support for 10G Base-T SFP+ modules in general, better 2.5G/5G/10G Modules

I run my onti (same as the sks8300) with 1, 2.5 and 10gbit copper SFP as well as a 10gbit DAC. Definitely mixed speed works.

In fairness, 2.5gbit needed a simple kernel patch, it's up thread.

I would however strongly recommend to make sure it has some airflow (I have a slow 140mm fan blowing across it), it gets very hot otherwise. Beats the apparently noisy fan in the 8310 in my book.

1/2 because character limit

Hi, I recently acquired the D-Link DGS-1210-08P rev G1. After some research here I found that this one is not explicitly supported (according to the wiki). However, by comparing the pcbs and going with what rkunze said, I think this one is identical the 10P rev F1 model.

Here are some logs:

bootloader
U-Boot 2011.12.(2.1.5.67086)-Candidate1 (Jan 03 2018 - 11:01:20)

Board: RTL838x CPU:500MHz LXB:200MHz MEM:300MHz
DRAM:  128 MB
SPI-F: 1x32 MB
Loading 1024B env. variables from offset 0x80000
Board Model = DGS-1210-08P-G1 Cameo_bdinfo_get_BoardID [293] 
Switch Model: RTL8380M_INTPHY_2FIB_1G_DEMO (Port Count: 10)
Switch Chip: RTL8380
**************************************************
#### RTL8218B config - MAC ID = 8 ####
Now Internal PHY
Net:   Net Initialization Skipped
rtl8380#0
Hit Esc key to stop autoboot:  1  0 

Loading Runtime Image ......
## Booting kernel from Legacy Image at b4100000 ...
   Image Name:   
   Created:      2018-01-03  11:14:21 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    933542 Bytes = 911.7 KB
   Load Address: 80000000
   Entry Point:  80222000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

Linux version 2.6.19 (simon@208Server) (gcc version 3.4.4 mipssde-6.03.00-20051020) #22 PREEMPT Wed Jan 3 11:14:06 CST 2018
CPU revision is: 00019070
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 07a00000 @ 00000000 (usable)
Built 1 zonelists.  Total pages: 30988
Kernel command line: console=ttyS0,115200 mem=122M noinitrd root=/dev/mtdblock4 rw rootfstype=squashfs csb=0x0140A28B cso=0x0793FB09 csf=0x4860B3F7 sfin=<NULL>,32MB,9080864;9080864 
Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
Primary data cache 16kB, 2-way, linesize 16 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
PID hash table entries: 512 (order: 9, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Memory: 121344k/124928k available (1786k kernel code, 3460k reserved, 393k data, 104k init, 0k highmem)
Mount-cache hash table entries: 512
Checking for 'wait' instruction...  available.
NET: Registered protocol family 16
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 4096 bind 2048)
TCP reno registered
squashfs: version 3.3 (2007/10/31) Phillip Lougher
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler anticipatory registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver $Revision: 1.1.1.1 $ 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x0 (irq = 31) is a 16550A
Probe: SPI CS1 Flash Type MX25L25635F
Creating 9 MTD partitions on "Total SPI FLASH":
0x00000000-0x00080000 : "BOOT"
0x00080000-0x000c0000 : "BDINFO"
0x000c0000-0x00100000 : "BDINFO2"
0x00100000-0x00280000 : "KERNEL1"
0x00280000-0x00e80000 : "ROOTFS1"
0x00e80000-0x01000000 : "KERNEL2"
0x01000000-0x01040000 : "SYSINFO"
0x01040000-0x01c40000 : "ROOTFS2"
0x01c40000-0x02000000 : "JFFS2"
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Mounted root (squashfs filesystem) readonly.
Freeing unused kernel memory: 104k freed

init started:  BusyBox v1.00 (2018.01.03-03:13+0000) multi-call binary

Starting pid 14, console : '/etc/rc'
Init RTCORE Driver Module....OK

 Complete NpHwInit  
RTK.0> open /bin/poe.bin fail
POE_SUCCESS




DGS-1210-08P login:
dlink cli output
DGS-1210-08P login: admin

Password: 


DGS-1210-08P> ?
USEREXEC commands :
  config account admin password <passwd>
  config configuration config_id <integer (1-2)> {delete | boot_up }
  config ipif <ipif_name> { ipaddress <ip-address> <subnet-mask> gateway <gw-add
ress> | dhcp | bootp }
  config ipif <ipif_name> { ipv6 ipv6address <ipv6networkaddr> | dhcpv6_client {
enable | disable}}
  debug info
  download { firmware_fromTFTP {<ipaddr>|<ipv6addr>} <path_filename> | cfg_fromT
FTP {<ip_addr>| <ipv6_addr>} <path_filename> config_id <integer (1-2)>}
  logout
  ping <ip_addr>
  ping6 <ipv6addr>
  reboot
  reset config
  save [config config_id <integer (1-2)> ]
  show boot_file
  show firmware information
  show ipif [<ipif_name>]
  show route { ipv4 | ipv6 }
  show switch
  upload {firmware_toTFTP {<ip_addr>| <ipv6_addr>} <path_filename> | cfg_toTFTP 

e[K
--More--e[Ke
                
e[K{<ip_addr>| <ipv6_addr>} <path_filename> config_id <integer (1-2)>}
e[27m
                       

DGS-1210-08P> show boot_file
Bootup Firmware : image_1
Bootup Configuration : config_1

DGS-1210-08P> show firmware information
Version      : 7.10.008
Size         : 12288000 Bytes
Updated Time : 01/01/1970 00:00:00
From         : 10.90.90.90
User         : Anonymous (unknown)


DGS-1210-08P> show switch
System name                       : 
System Contact                    : 
System Location                   : 
System up time                    : 0 days, 0 hrs, 1 min, 2 secs
System Time                       : 01/01/2017 00:00:40
System hardware version           : G1
System firmware version           : 7.10.008
System boot version               : 1.00.002
System serial number              : REDACTED
MAC Address                       : 00-AD-24-AE-FD-60


DGS-1210-08P>      debug info
% sgementation fault log file :

File doesn't exist !!! 
% ARP table : 

Address          Hardware Address   Type  Interface  Mapping  

-------          ----------------   ----  ---------  -------  
10.0.0.0         ff-ff-ff-ff-ff-ff  ARPA  vlan1      Static    
10.90.90.90      00-ad-24-ae-fd-60  ARPA  vlan1      Static    
10.255.255.255   ff-ff-ff-ff-ff-ff  ARPA  vlan1      Static    

% MAC table : 

Vlan    Mac Address         Type     Ports
----    -----------         ----     -----

Total Mac Addresses displayed: 0

% POE MCU VERSION : 
PoeVersion        : 24 (0x18)
PoeExtVersion     : 33  (0x21)


DGS-1210-08P> System will Reboot....
some uboot commands
u-boot># 
Abort
Ctrl-c was pressed..(Changing to u-boot console mode(0)) 
<INTERRUPT>
u-boot># ?
?       - alias for 'help'
base    - print or set address offset
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
cmp     - memory compare
cp      - memory copy
crc32   - checksum calculation
dhcp    - boot image via network using DHCP/TFTP protocol
env     - environment handling commands
erase   - erase FLASH memory
flinfo  - print FLASH memory information
go      - start application at address 'addr'
help    - print command description/usage
iminfo  - print header information for application image
loadb   - load binary file over serial line (kermit mode)
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
md      - memory display
mdram_test- mdram_test   - do DRAM test.
mflash_test- mflash_test   - do flash test.
mm      - memory modify (auto-incrementing address)
mtest   - simple RAM read/write test
mw      - memory write (fill)
nm      - memory modify (constant address)
ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
protect - enable or disable FLASH write protection
reset   - Perform RESET of the CPU
rtk     - rtk     - Realtek commands

run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
setenv  - set environment variables
sf      - SPI flash sub-system
sleep   - delay execution for some time
tftpboot- boot image via network using TFTP protocol
version - print monitor, compiler and linker version
u-boot># iminfo

## Checking Image at b4100000 ...
   Legacy image found
   Image Name:   
   Created:      2018-01-03  11:14:21 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    933542 Bytes = 911.7 KB
   Load Address: 80000000
   Entry Point:  80222000
   Verifying Checksum ... OK
u-boot># version

U-Boot 2011.12.(2.1.5.67086)-Candidate1 (Jan 03 2018 - 11:01:20)
mips-linux-uclibc-gcc (GCC) 3.4.4 mipssde-6.03.00-20051020
GNU ld (Linux/GNU Binutils) 2.18.50.0.1.20070908
u-boot># printenv
BID=112
Board_Version=32
Boot_Version=1.00.002
Serial_Number=REDACTED
addargs=setenv bootargs console=$(console_device),$(baudrate) mem=$(memsize) noinitrd root=$(image) rw rootfstype=squashfs
baudrate=115200
boardmodel=RTL8380M_INTPHY_2FIB_1G_DEMO
bootcmd=run addargs ; bootm 0xb4100000
bootdelay=1
bootstop=off
console_device=ttyS0
ethact=rtl8380#0
ethaddr=00:ad:24:ae:fd:60
gatewayip=10.90.90.254
hw_version=G1
image=/dev/mtdblock4
ipaddr=10.90.90.90
memsize=122M
netmask=255.0.0.0
serverip=192.168.1.111
stderr=serial
stdin=serial
stdout=serial

Environment size: 601/1020 bytes
u-boot># base
Base Address: 0x00000000
u-boot># help rtk
rtk - rtk     - Realtek commands


Usage:
rtk object action
        - SOC commands.
rtk network on
        - Enable the networking function
rtk netowkr off
        - Disable the networking function
rtk testmode [mode] [port]
        - Set default value for specific testing
rtk ext-pinGet [pinNum]
        - get external 8231 GPIO pin status
rtk ext-pinSet [pinNum] [status]
        - set external 8231 GPIO pin status
rtk smi list
				 - list all smi group
rtk smi init [group_id] [sck_pin] [sda_pin] [8/16 access type] [chipid] [delay] [name]
        - create a smi group and init
rtk smi read [group_id] [reg]
rtk smi write [group_id] [reg] [data]
rtk pinGet [pinNum]
        - get internal GPIO pin status
rtk pinSet [pinNum] [status]
        - set internal GPIO pin status
rtk ledtest [port] [led_index]
        - led test
rtk ledtest-bank [round]
        - led back on/off test
rtk loopback ext [port-start] [port-end] [round]
        - port traffic external loopback test
rtk loopback int [port-start] [port-end] [round]
        - port traffic internal loopback test
rtk txportpkt [port-id] [round]
        - tx packet from CPU to specific port test
rtk ldps [port] [ on | off ]
        - Enable/Disable link-down power saving (LDPS) of PHY
rtk green [port] [ on | off ]
        - Enable/Disable green feature of PHY
rtk cross-over [port] [ auto | mdi | mdix ]
        - Configure cross-over mode as Auto, Force-MDI, or Force-MDIX of PHY.

u-boot># rtk smi list

 Index SCK_DEV SCK_PIN SDA_DEV SDA_PIN TYPE   ID   Delay Name 
=================================================================
u-boot>#  

So I tftp booted the openwrt-24.10.0-realtek-rtl838x-d-link_dgs-1210-10p-initramfs-kernel.bin and it seems to work:

--- see 2/2

2/2

OpenWRT serial boot log
u-boot># tftpboot 0x8f000000 10.90.90.92:image.bin:image.bin :image.bin 1:image.bin0:image.bin0:image.bin
Using rtl8380#0 device
TFTP from server 10.90.90.100; our IP address is 10.90.90.90
Filename 'image.bin'.
Load address: 0x8f000000
Loading: *Got ARP REPLY, mac addr (6c:4b:90:10:7d:b2), ip addr (10.90.90.100)
#################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ######################################################
done
Bytes transferred = 6503474 (633c32 hex)
u-boot># bootm

Loading Runtime Image ......
## Booting kernel from Legacy Image at 8f000000 ...
   Image Name:   MIPS OpenWrt Linux-6.6.73
   Created:      2025-02-03  23:09:37 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    6503410 Bytes = 6.2 MB
   Load Address: 80100000
   Entry Point:  80100000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...

[    0.000000] Linux version 6.6.73 (builder@buildhost) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 13.3.0 r28427-6df0e3d02a) 13.3.0, GNU ld (GNU Binutils) 2.42) #0 Mon Feb  3 23:09:37 2025
[    0.000000] RTL838X model is 83806800
[    0.000000] SoC Type: RTL8380
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019070 (MIPS 4KEc)
[    0.000000] MIPS: machine is D-Link DGS-1210-10P
[    0.000000] earlycon: ns16550a0 at MMIO 0x18002000 (options '115200n8')
[    0.000000] printk: bootconsole [ns16550a0] enabled
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Using appended Device Tree.
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
[    0.000000] Primary data cache 16kB, 2-way, VIPT, cache aliases, linesize 16 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Kernel command line: earlycon
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32480
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 109084K/131072K available (6974K kernel code, 621K rwdata, 900K rodata, 11912K init, 235K bss, 21988K 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] rtl83xx-clk: initialized, CPU 500 MHz, MEM 300 MHz (8 Bit DDR3), LXB 200 MHz
[    0.000000] clocksource: realtek_otto_timer: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 38225208801 ns
[    0.000006] sched_clock: 28 bits at 3125kHz, resolution 320ns, wraps every 42949672800ns
[    0.009457] Calibrating delay loop... 498.89 BogoMIPS (lpj=2494464)
[    0.136043] pid_max: default: 32768 minimum: 301
[    0.157774] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.166063] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.193881] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1 rcu_task_cpu_ids=1.
[    0.218927] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.230043] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.242002] pinctrl core: initialized pinctrl subsystem
[    0.253990] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.289967] rtl83xx-clk clock-controller: rate setting enabled, CPU 300-625 MHz, MEM 300-300 MHz, LXB 200-200 MHz, OVERCLOCK AT OWN RISK
[    0.310793] clocksource: Switched to clocksource realtek_otto_timer
[    0.336996] NET: Registered PF_INET protocol family
[    0.343244] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.354680] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.364283] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.373043] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.381728] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.389682] TCP: Hash tables configured (established 1024 bind 1024)
[    0.398694] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.407376] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.414959] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.424659] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.454376] workingset: timestamp_bits=14 max_order=15 bucket_order=1
[    0.464783] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.471442] jffs2: version 2.2 (NAND) (SUMMARY) (ZLIB) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.523731] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.562962] pinctrl-single 1b001000.pinmux: 32 pins, size 4
[    0.570744] pinctrl-single 1b00a000.pinmux: 32 pins, size 4
[    0.580478] Probing RTL8231 GPIOs
[    0.584337] rtl8231_init called, MDIO bus ID: 0
[    0.592240] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.615958] printk: console [ttyS0] disabled
[    0.622357] 18002000.uart: ttyS0 at MMIO 0x18002000 (irq = 31, base_baud = 12500000) is a 16550A
[    0.632352] printk: console [ttyS0] enabled
[    0.632352] printk: console [ttyS0] enabled
[    0.641831] printk: bootconsole [early0] disabled
[    0.641831] printk: bootconsole [early0] disabled
[    0.731247] printk: bootconsole [ns16550a0] disabled
[    0.731247] printk: bootconsole [ns16550a0] disabled
[    0.764257] 18002100.uart: ttyS1 at MMIO 0x18002100 (irq = 30, base_baud = 12500000) is a 16550A
[    0.899958] brd: module loaded
[    0.922420] spi-nor spi0.0: mx25l25635e (32768 Kbytes)
[    0.928432] 8 fixed-partitions partitions found on MTD device spi0.0
[    0.935751] OF: Bad cell count for /soc/spi@1200/flash@0/partitions
[    0.942942] OF: Bad cell count for /soc/spi@1200/flash@0/partitions
[    0.950574] Creating 8 MTD partitions on "spi0.0":
[    0.956208] 0x000000000000-0x000000080000 : "u-boot"
[    1.011585] 0x000000080000-0x0000000c0000 : "u-boot-env"
[    1.032098] 0x0000000c0000-0x000000100000 : "board-name"
[    1.041944] 0x000000100000-0x000000e80000 : "firmware"
[    1.068939] 0x000000e80000-0x000001000000 : "kernel2"
[    1.091916] 0x000001000000-0x000001040000 : "sysinfo"
[    1.111888] 0x000001040000-0x000001c40000 : "rootfs2"
[    1.121754] 0x000001c40000-0x000002000000 : "jffs2"
[    1.167647] Probing RTL838X eth device pdev: 818a6e00, dev: 818a6e10
[    1.224787] Found SoC ID: 8380: RTL8380, family 8380
[    1.230561] rtl8380_init_mac
[    1.233999] Using MAC 000000ad24aefd60
[    2.025679] Realtek RTL8218B (internal) mdio-bus:08: Detected internal RTL8218B
[    2.034015] Firmware loaded. Size 1184, magic: 83808380
[    5.324729] Realtek RTL8380 SERDES mdio-bus:18: Detected internal RTL8380 SERDES
[    5.333177] Firmware loaded. Size 1184, magic: 83808380
[    5.339121] SDS power down value: 3
[    5.367153] PLL control register: efffffff
[    5.371887] SDS power down value now: 3f
[    5.376305] Configuration of SERDES done
[    5.419846] i2c_dev: i2c /dev entries driver
[    5.436960] NET: Registered PF_INET6 protocol family
[    5.484467] Segment Routing with IPv6
[    5.488841] In-situ OAM (IOAM) with IPv6
[    5.493828] NET: Registered PF_PACKET protocol family
[    5.499657] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    5.515802] 8021q: 802.1Q VLAN Support v1.8
[    5.634377] i2c-gpio i2c-gpio-0: Slow GPIO pins might wreak havoc into I2C/SMBus bus timing
[    5.644522] i2c-gpio i2c-gpio-0: using lines 542 (SDA) and 543 (SCL)
[    5.652591] i2c-gpio i2c-gpio-1: Slow GPIO pins might wreak havoc into I2C/SMBus bus timing
[    5.662691] i2c-gpio i2c-gpio-1: using lines 537 (SDA) and 538 (SCL)
[    5.670950] sfp sfp-p9: Host maximum power 1.0W
[    5.677153] sfp sfp-p10: Host maximum power 1.0W
[    6.040656] Realtek RTL8218B (internal) rtl838x slave mii-0:08: Detected internal RTL8218B
[    6.050064] Firmware loaded. Size 1184, magic: 83808380
[    9.349142] Realtek RTL8380 SERDES rtl838x slave mii-0:18: Detected internal RTL8380 SERDES
[    9.358664] Firmware loaded. Size 1184, magic: 83808380
[    9.364707] SDS power down value: 3
[    9.392791] PLL control register: f
[    9.396763] SDS power down value now: 3f
[    9.401243] Configuration of SERDES done
[    9.689004] In rtl83xx_vlan_setup
[    9.692900] UNKNOWN_MC_PMASK: 000000001fffffff
[    9.697907] VLAN profile 0: L2 learning: 1, UNKN L2MC FLD PMSK 511, 		UNKN IPMC FLD PMSK 511, UNKN IPv6MC FLD PMSK: 511
[   10.730834] rtl83xx_enable_phy_polling:          500ff00
[   11.771193] rtl83xx-switch switch@1b000000: configuring for fixed/internal link mode
[   11.780867] rtl83xx-switch switch@1b000000: Link is Up - 1Gbps/Full - flow control off
[   11.790244] rtl83xx-switch switch@1b000000 lan1 (uninitialized): PHY [mdio-bus:08] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.811567] rtl83xx-switch switch@1b000000 lan2 (uninitialized): PHY [mdio-bus:09] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.832721] rtl83xx-switch switch@1b000000 lan3 (uninitialized): PHY [mdio-bus:0a] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.854776] rtl83xx-switch switch@1b000000 lan4 (uninitialized): PHY [mdio-bus:0b] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.875937] rtl83xx-switch switch@1b000000 lan5 (uninitialized): PHY [mdio-bus:0c] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.897195] rtl83xx-switch switch@1b000000 lan6 (uninitialized): PHY [mdio-bus:0d] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.918485] rtl83xx-switch switch@1b000000 lan7 (uninitialized): PHY [mdio-bus:0e] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.939509] rtl83xx-switch switch@1b000000 lan8 (uninitialized): PHY [mdio-bus:0f] driver [Realtek RTL8218B (internal)] (irq=POLL)
[   11.962824] rtl838x-eth 1b00a300.ethernet eth0: entered promiscuous mode
[   11.970557] DSA: tree 0 setup
[   11.974176] LINK state irq: 20
[   11.977699] In rtl83xx_setup_qos
[   11.981432] Setting up RTL838X QoS
[   11.985263] RTL838X_PRI_SEL_TBL_CTRL(i): 00033112
[   11.990526] Current Intprio2queue setting: 00000000
[   11.996072] QM_PKT2CPU_INTPRI_MAP: 00fac688
[   12.001127] rtl838x_dbgfs_init called
[   12.009102] rtl83xx_fib_event_work_do: FIB4 default rule failed
[   12.016011] rtl83xx_fib_event_work_do: FIB4 default rule failed
[   12.037713] clk: Disabling unused clocks
[   12.175764] Freeing unused kernel image (initmem) memory: 11912K
[   12.182653] This architecture does not have kernel memory protection.
[   12.189903] Run /init as init process
[   12.194105]   with arguments:
[   12.197457]     /init
[   12.200009]   with environment:
[   12.203609]     HOME=/
[   12.206284]     TERM=linux
[   13.859070] init: Console is alive
[   13.864058] init: - watchdog -
[   13.904261] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   13.919956] gpio_button_hotplug: loading out-of-tree module taints kernel.
[   13.938352] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   13.957904] init: - preinit -
[   16.950970] random: crng init done
mtd_get_mac_ascii: partition u-boot-env2 not found!
mtd_get_mac_ascii: partition u-boot-env2 not found!
Cannot parse config file '/etc/fw_env.config': No such file or directory
Failed to find NVMEM device
[   19.827551] RESETTING 8380, CPU_PORT 28
[   20.032723] rtl838x-eth 1b00a300.ethernet eth0: configuring for fixed/internal link mode
[   20.041788] In rtl838x_mac_config, mode 1
[   20.049302] rtl83xx-switch switch@1b000000 lan1: configuring for phy/internal link mode
[   20.058679] rtl838x-eth 1b00a300.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   20.068563] 8021q: adding VLAN 0 to HW filter on device lan1
[   20.085716] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   20.093416] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   20.138579] rtl83xx_fib_event_work_do: FIB4 failed
[   20.154530] rtl83xx_fib_event_work_do: FIB4 failed
[   20.159955] rtl83xx_fib_event_work_do: FIB4 failed
[   20.284960] RTL8380 Link change: status: 1, ports 100
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
[   21.290973] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   23.356234] RTL8380 Link change: status: 1, ports 100
[   23.454054] rtl83xx-switch switch@1b000000 lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   24.672098] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[   24.677919] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[   24.691090] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[   24.713176] rtl83xx-switch switch@1b000000 lan1: Link is Down
[   24.719656] RTL8380 Link change: status: 1, ports 100
[   24.753548] procd: - early -
[   24.757592] procd: - watchdog -
[   25.679230] procd: - watchdog -
[   25.684093] procd: - ubus -
[   25.753041] procd: - init -
Please press Enter to activate this console.
[   27.463192] kmodloader: loading kernel modules from /etc/modules.d/*
[   27.810287] kmodloader: done loading kernel modules from /etc/modules.d/*
[   29.776322] urngd: v1.0.2 started.
[   37.892563] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   74.264867] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   74.354174] in rtl838x_eth_stop
[   74.357927] rtl838x-eth 1b00a300.ethernet eth0: Link is Down
[   74.923988] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   74.931561] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   74.939064] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   74.946599] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   75.293512] RESETTING 8380, CPU_PORT 28
[   75.498685] rtl838x-eth 1b00a300.ethernet eth0: configuring for fixed/internal link mode
[   75.507758] In rtl838x_mac_config, mode 1
[   75.563003] rtl838x-eth 1b00a300.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[   75.574939] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   75.582619] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   76.071149] rtl83xx-switch switch@1b000000 lan1: configuring for phy/internal link mode
[   76.111407] 8021q: adding VLAN 0 to HW filter on device lan1
[   76.293564] switch: port 1(lan1) entered blocking state
[   76.299472] switch: port 1(lan1) entered disabled state
[   76.305569] rtl83xx-switch switch@1b000000 lan1: entered allmulticast mode
[   76.313429] rtl838x-eth 1b00a300.ethernet eth0: entered allmulticast mode
[   76.322037] rtl83xx-switch switch@1b000000 lan1: entered promiscuous mode
[   76.481878] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   76.525177] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   77.271443] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   77.278924] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   77.786152] rtl83xx-switch switch@1b000000 lan2: configuring for phy/internal link mode
[   77.828701] 8021q: adding VLAN 0 to HW filter on device lan2
[   78.221441] switch: port 2(lan2) entered blocking state
[   78.227350] switch: port 2(lan2) entered disabled state
[   78.233467] rtl83xx-switch switch@1b000000 lan2: entered allmulticast mode
[   78.304215] rtl83xx-switch switch@1b000000 lan2: entered promiscuous mode
[   79.005548] RTL8380 Link change: status: 1, ports 100
[   79.526081] rtl83xx-switch switch@1b000000 lan3: configuring for phy/internal link mode
[   79.568884] 8021q: adding VLAN 0 to HW filter on device lan3
[   79.895682] switch: port 3(lan3) entered blocking state
[   79.901710] switch: port 3(lan3) entered disabled state
[   79.907677] rtl83xx-switch switch@1b000000 lan3: entered allmulticast mode
[   79.953265] rtl83xx-switch switch@1b000000 lan3: entered promiscuous mode
[   80.751485] rtl83xx-switch switch@1b000000 lan4: configuring for phy/internal link mode
[   80.761128] rtl83xx-switch switch@1b000000 lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   80.786639] 8021q: adding VLAN 0 to HW filter on device lan4
[   80.803787] switch: port 1(lan1) entered blocking state
[   80.809693] switch: port 1(lan1) entered forwarding state
[   81.102547] switch: port 4(lan4) entered blocking state
[   81.108452] switch: port 4(lan4) entered disabled state
[   81.114556] rtl83xx-switch switch@1b000000 lan4: entered allmulticast mode
[   81.161363] rtl83xx-switch switch@1b000000 lan4: entered promiscuous mode
[   81.812062] rtl83xx-switch switch@1b000000 lan5: configuring for phy/internal link mode
[   81.829875] 8021q: adding VLAN 0 to HW filter on device lan5
[   82.035664] switch: port 5(lan5) entered blocking state
[   82.041711] switch: port 5(lan5) entered disabled state
[   82.047677] rtl83xx-switch switch@1b000000 lan5: entered allmulticast mode
[   82.056402] rtl83xx-switch switch@1b000000 lan5: entered promiscuous mode
[   82.561645] rtl83xx-switch switch@1b000000 lan6: configuring for phy/internal link mode
[   82.577692] 8021q: adding VLAN 0 to HW filter on device lan6
[   82.771112] switch: port 6(lan6) entered blocking state
[   82.777020] switch: port 6(lan6) entered disabled state
[   82.783118] rtl83xx-switch switch@1b000000 lan6: entered allmulticast mode
[   82.791830] rtl83xx-switch switch@1b000000 lan6: entered promiscuous mode
[   83.281204] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   83.288681] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[   83.297393] rtl83xx-switch switch@1b000000 lan7: configuring for phy/internal link mode
[   83.322136] 8021q: adding VLAN 0 to HW filter on device lan7
[   83.486016] switch: port 7(lan7) entered blocking state
[   83.492094] switch: port 7(lan7) entered disabled state
[   83.498091] rtl83xx-switch switch@1b000000 lan7: entered allmulticast mode
[   83.506948] rtl83xx-switch switch@1b000000 lan7: entered promiscuous mode
[   83.991210] rtl83xx-switch switch@1b000000 lan8: configuring for phy/internal link mode
[   84.011262] 8021q: adding VLAN 0 to HW filter on device lan8
[   84.197863] switch: port 8(lan8) entered blocking state
[   84.203913] switch: port 8(lan8) entered disabled state
[   84.209880] rtl83xx-switch switch@1b000000 lan8: entered allmulticast mode
[   84.218652] rtl83xx-switch switch@1b000000 lan8: entered promiscuous mode
[   84.300008] rtl83xx-switch switch@1b000000 lan9: configuring for inband/1000base-x link mode
[   84.309924] 8021q: adding VLAN 0 to HW filter on device lan9
[   84.343927] switch: port 9(lan9) entered blocking state
[   84.349835] switch: port 9(lan9) entered disabled state
[   84.355940] rtl83xx-switch switch@1b000000 lan9: entered allmulticast mode
[   84.364729] rtl83xx-switch switch@1b000000 lan9: entered promiscuous mode
[   84.439239] rtl83xx-switch switch@1b000000 lan10: configuring for inband/1000base-x link mode
[   84.449293] 8021q: adding VLAN 0 to HW filter on device lan10
[   84.482238] switch: port 10(lan10) entered blocking state
[   84.488337] switch: port 10(lan10) entered disabled state
[   84.494656] rtl83xx-switch switch@1b000000 lan10: entered allmulticast mode
[   84.503527] rtl83xx-switch switch@1b000000 lan10: entered promiscuous mode
[   84.561105] rtl83xx_fib_event: FIB_RULE ADD/DEL for IPv6 not supported
[  465.330682] sfp sfp-p10: module 10Gtek           ASF85-24-X2-D    rev V01  sn WTGSXH50398      dc 170331  
[  492.322953] RTL8380 Link chanch@1b000000 lan10: Link is Up - 1Gbps/Full - flow control rx/tx
[  492.373120] switch: port 10(lan10) entered blocking state
[[  506.410251] RTL8380 Link change: status: 1, ports 5000000
[  506.416752] rtl83xx-switch switch@1b000000 lan9: Link is Down
[  506.429980] switch: port 9(lan9) entered disabled state
[  506.440116] rtl83xx-switch switch@1b000000 lan10: Link is Down
[  506.446839] RTL8380 Link change: status: 1, ports 5000000
[  506.453218] switch: port 10(lan10) entered disabled state
[  506.463372] rtl83xx-switch switch@1b000000 lan10: Link is Up - 1Gbps/Full - flow control rx/tx
[  506.473276] switch: port 10(lan10) entered blocking state
[  506.479374] switch: port 10(lan10) entered forwarding state
[  506.489704] rtl83xx-switch switch@1b000000 lan9: Link is Up - 1Gbps/Full - flow control rx/tx
[  506.500395] switch: port 9(lan9) entered blocking state
[  506.506456] switch: port 9(lan9) entered forwarding state
[  599.180703] RTL8380 Link change: status: 1, ports 5000000
[  599.194153] rtl83xx-switch switch@1b000000 lan9: Link is Down
[  599.200660] rtl83xx-switch switch@1b000000 lan10: Link is Down
[  599.207603] switch: port 9(lan9) entered disabled state
[  599.214323] switch: port 10(lan10) entered disabled state
[  641.791399] sfp sfp-p9: module removed
^Chis console.


BusyBox v1.36.1 (2025-02-03 ______        __
 |       |.---  |_
 |   -   ||  _  |  -__|   ____||   __|_____|__|__||________||__|  |____|
          |__| W ------------------------------- 24.10.0, r28427-6df0e3d02a
 -----------------------------------------------------
=== 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:~# 

Before writing to flash, is this the expected result? Is there anything in the bootlog that would indicate an error? Or is there anything specific I should test?

If not, should the 08P rev G1 just be added to the wiki as identical to the 10P rev F1 or should we also add it to the device tree, respectively these files:

  • (new) /target/linux/realtek/dts/rtl8380_d-link_dgs-1210-08p.dts not sure why 10p has rtl8382 in its file name when wiki says it's rtl8380M.
  • (modified) /package/boot/uboot-tools/uboot-envtools/files/realtek just adding the device name around line 20
  • (modified) /target/linux/realtek/image/rtl838x.mk just adding another block like for the others

Regarding the .dts file: I guess this would probably look exactly like rtl8382_d-link_dgs-1210-10p.dts just with a different model name.
Just like rtl8382_d-link_dgs-1210-20.dts and rtl8382_d-link_dgs-1210-16.dts which also seem to be the same device.

1 Like

Did you beat me to the 15€ one on ebay.de? :smiley:

The rtl838x (sub-)target is relatively uniform, especially for model ranges of the same vendor, but each device will still require its own firmware image with its own DTS. The good news, you can probably copy most of that from the DGS-1210-10p, but you will need to check the port assignments (plug in a cable with something on the other end, check logread -f for up/ down messages and compare it against the port number) and drop the two ports the -08p variant doesn't have. It's not going to be difficult, but it will still need doing.

I'll check the port assignment just to be sure but 10p and 08p both have 10 ports (8 RJ45, 2 SFP). From what I can tell, it's the exact same pcb. See also this post from a while back:

The only thing that's maybe different is rtl8382 on the 10p F1 vs. rtl8380 on the 08p G1.
My stock boot log indicates rtl8380, so I'm going with that. The heatsink mounting is soldered and I'm not removing that.

rtl8382 vs. rtl8380 seems to only make a difference in two functions: one for vlan and one for qos

What I don't understand is why the 10P code indicates rtl8382 in its .dts filename and in the rtl838x.mk file even when the boot log indicates rtl8380, see this old post in this thread:

Not familiar with the build process, so I don't know if that actually has any impact or if it only does if it is also referenced in the .dts file, like with the one of the 10MP.dts

Also maybe one oddity: /etc/config/poe contains:

config global
        option budget '170'

config port
        option enable   '1'
        option id       '1'
        option name     'lan1'
        option poe_plus '1'
        option priority '2'

Shouldn't this by default be 65, like indicated here ?

I haven't used realtek-poe until now and I couldn't find any manual, so I don't know what's to expect here. Guess I'll have to look through the code.


Small world, eh? Many opportunities to get switches like these for cheap. You'll get yours soon as well, hopefully :smiley:

1 Like

I think all the 10-port versions (08P-g, 10P-f, 10MP-f) use the rtl8380 (which only support up to 10 ports as far as i can tell), the rtl8382 is used for versions with up to 28 ports). DGS-1210-10p with rtl8382 is probably wrong but may work anyway.

I am going to try flash my DGS-1210-24P-g with the DGS-1210-28P-f firmware. They both have 28 ports and looks identical otherwise as well. For some reason D-link doesn't count the SFP/combo-ports in the G revision when assigning model names. DGS-1210-24-g = DGS-1210-28-f and DGS-1210-48-g = DGS-1210-52-f. Hence its probably very easy to get all 4 of the "non supported" G-versions supported under their right names.

I can confirm that the D-Link DGS-1210-24P rev G already is supported (but under wrong name) if you use the DGS-1210-28P rev F firmware. Power LED, reset button, all ports and port LEDs work. PoE also work but the config have to entered manually after install.

Same with the DGS-1210-24P after fresh install. Change to whats specified in realtek/base-files/etc/board.d and that is working.

This was fixed in the realtek-poe packaging for OpenWRT - need to investigate why we aren't seeing the correct Poe config, should be generated from board.json - ok looks like it stalled

Please review, comment and try to help. This has been a journey of changes, arguments and reverted commits but looks like openwrt/packages is where it should live.

Have anybody tried the 8xRJ45 variant of the 8 port XikeStor 10G switch that is SK8300-8T ?

I measured across those capacitors on my XGS1250-12 (no version indicated), and it is 0.718V

@bmork was wondering if the thermal driver you wrote could also work on rtl839x as well as rtl838x ?

The register layout will be different. Someone with the hardware has to add support and test it.

I have a couple of the switches and am willing to build and test, but I'm not sure about picking the correct register locations here.

Thanks for confirming! Then I need to dig deeper as it has to have another fault.

Look at @svanheule 's excellent register browser. There are two sensors here:

Problem is guessing what all the configuration means, unless you also find a datasheet documenting this.

Thanks, I'll try to to adapt the maple thermal driver to do core0 on cypress and see if the masking and shifting is the same on rtl839x or if I get garbage data.

I've also observed random reboots on the two rtl839x switches I've got - anytime from every 6 hours to every 5 days. Very hard to diagnose!
Going to leave a serial port logger on one to see what it's doing.

On which version? I've got >60 days uptime with 24.10.0 on my JG927A.