Support for RTL838x based managed switches

The silkscreen on the picture is unreadable though, no way to tell which chips are sitting on that board. An extra light source might help.

Are you still seeing Broadcom PSEs?

Biggest problem with the pictures of the switches is the size and format of the PCB. A camera picture can either show the whole board with unreadable text (especially on the IC) or about a quarter of the board with actual readable text.

Here is a pictures with slightly better quality.

https://img.adminforge.de/QYHkXDOk/NiQULEu4.jpg

The Broadcom PSE might be hidden under the small heat sink on the left side.

Looks very similar to the supported GS1900-10HP. You can compare with images I uploaded at the wikidevi link. Looks like they saved build costs by going with a cheaper heat sink and input power (i.e. barrel plug vs DIN). Also see another image of a supported device at https://svanheule.net/switches/_detail/wiki/dsc01040_s.jpg?id=gs1900-10hp.

1 Like

The PoE MCU is replaced by a Nuvoton NUC029ZAN. If it's similar to the GS1900-24EP, they might have used an RTL8238 as PSE controller.

1 Like

That could very well be an indicator as all the documented Broadcom PSE based ZyXEL devices are using a STMicro STM32F100C8 MCU.

Yepp, I had a look at this list before posting my suspicion: https://svanheule.net/switches/software/poe_management

I can only see one RTL8231 on the new model. Guess that's related to the reduced number of LEDs? According to specs, the new one only has green LEDs, while most of the LEDS on the older one were green/amber.

[ 13.380000] init: - watchdog -
[ 13.430000] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 13.450000] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 13.470000] init: - preinit -
[ 13.960000] random: jshn: uninitialized urandom read (4 bytes read)
[ 14.120000] random: jshn: uninitialized urandom read (4 bytes read)
mtd_get_mac_ascii: partition u-boot-env2 not found!
mtd_get_mac_ascii: partition u-boot-env2 not found!
[ 15.220000] random: jshn: uninitialized urandom read (4 bytes read)
[ 15.320000] random: jshn: uninitialized urandom read (4 bytes read)
[ 15.480000] random: jshn: uninitialized urandom read (4 bytes read)
sh: out of range
sh: out of range
sh: out of range
sh: out of range
sh: out of range
sh: out of range
sh: out of range
sh: out of range
sh: out of range
sh: out of range
[ 16.220000] RESETTING 8380, CPU_PORT 28
[ 16.220000] rtl838x-eth 1b00a300.ethernet eth0: configuring for fixed/internal link mode
[ 16.220000] In rtl838x_mac_config, mode 1
[ 16.440000] rtl83xx-switch switch@1b000000 lan1: configuring for phy/internal link mode
[ 16.450000] In rtl838x_mac_config, mode 1
[ 16.450000] rtl838x-eth 1b00a300.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
[ 16.460000] 8021q: adding VLAN 0 to HW filter on device lan1
[ 16.470000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 16.470000] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[ 16.480000] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[ 16.530000] rtl83xx_fib_event_work_do: FIB4 failed
[ 16.550000] rtl83xx_fib_event_work_do: FIB4 failed
[ 16.550000] rtl83xx_fib_event_work_do: FIB4 failed
[ 16.570000] rtl83xx_fib_event_work_do: FIB4 failed
[ 16.570000] random: procd: 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
[ 17.830000] rtl83xx_fib_event: FIB_RULE ADD/DELL for IPv6 not supported
[ 18.900000] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[ 18.920000] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[ 18.920000] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[ 18.940000] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[ 18.980000] procd: - early -
[ 18.980000] procd: - watchdog -
[ 21.620000] procd: - watchdog -

Do you have these sh: out of range lines in your boot logs?

root@OpenWrt:/# [  480.840000] sfp sfp-p9: module IC INTRACOM      523882           rev E    sn I523882190796    dc 191101
[  480.850000] sfp sfp-p9: Unknown/unsupported extended compliance code: 0x01
[  481.080000] rtl83xx-switch switch@1b000000 lan9: PHY [i2c:sfp-p9:16] driver [Marvell 88E1111] (irq=POLL)
root@OpenWrt:/#
root@OpenWrt:/#
root@OpenWrt:/# ethtool -m lan9
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x00 (unknown or unspecified)
        Transceiver codes                         : 0x00 0x00 0x00 0x08 0x00 0x00 0x00 0x00 0x01
        Transceiver type                          : Ethernet: 1000BASE-T
        Transceiver type                          : Extended: 100G AOC or 25GAUI C2M AOC with worst BER of 5x10^(-5)
        Encoding                                  : 0x01 (8B/10B)
        BR, Nominal                               : 1300MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 0km
        Length (SMF)                              : 0m
        Length (50um)                             : 0m
        Length (62.5um)                           : 0m
        Length (Copper)                           : 100m
        Length (OM3)                              : 0m
        Laser wavelength                          : 0nm
        Vendor name                               : IC INTRACOM
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : 523882
        Vendor rev                                : E
        Option values                             : 0x00 0x1a
        Option                                    : RX_LOS implemented
        Option                                    : TX_FAULT implemented
        Option                                    : TX_DISABLE implemented
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : I523882190796
        Date code                                 : 191101
root@OpenWrt:/#

If I mount a RJ45 module in the SFP I always get this: sfp sfp-p9: Unknown/unsupported extended compliance code: 0x01.

root@OpenWrt:/# [  935.190000] sfp sfp-p9: module removed
[  939.050000] sfp sfp-p10: module removed
[  999.600000] sfp sfp-p9: module TP-Link          TL-SM311LM(UN)   rev 3.0  sn 40204203463460   dc 220424
[  999.610000] rtl83xx-switch switch@1b000000 lan9: switched to inband/1000base-x link mode
root@OpenWrt:/#
root@OpenWrt:/# ethtool -m lan9
        Identifier                                : 0x03 (SFP)
        Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
        Connector                                 : 0x07 (LC)
        Transceiver codes                         : 0x00 0x10 0x00 0x01 0x40 0x40 0x00 0x01 0x00
        Transceiver type                          : SONET: SONET reach specifier bit 1
        Transceiver type                          : Ethernet: 1000BASE-SX
        Transceiver type                          : FC: short distance (S)
        Transceiver type                          : FC: Shortwave laser w/o OFC (SN)
        Transceiver type                          : FC: 100 MBytes/sec
        Encoding                                  : 0x01 (8B/10B)
        BR, Nominal                               : 1300MBd
        Rate identifier                           : 0x00 (unspecified)
        Length (SMF,km)                           : 0km
        Length (SMF)                              : 0m
        Length (50um)                             : 550m
        Length (62.5um)                           : 550m
        Length (Copper)                           : 0m
        Length (OM3)                              : 0m
        Laser wavelength                          : 850nm
        Vendor name                               : TP-Link
        Vendor OUI                                : 00:00:00
        Vendor PN                                 : TL-SM311LM(UN)
        Vendor rev                                : 3.0
        Option values                             : 0x00 0x00
        BR margin, max                            : 0%
        BR margin, min                            : 0%
        Vendor SN                                 : 40204203463460
        Date code                                 : 220424
root@OpenWrt:/#

But if I mount a optical module the 0x01 message doesn´t come.

Do anyone know what that message means?

Yes.

ref:

2 Likes

That message seems to be printed by sfp-bus.c, because switch-case doesn't have a case for SFF8024_ECC_100G_25GAUI_C2M_AOC (0x01) and fell to default:.

Your RJ45 module should have value 0x1 at 0x24 ("Extended Specification Compliance Codes" field) in eeprom.
details: SFF-8472 (Table 5-3) and SFF-8024 (Table 4-4)

@plappermaul just rebased ontop of your patches, but having some troubles that I'm still trying to figure out. The timer just halts with not much useful information:

[    0.000000] rtl83xx-clk: initialized, SW 2450 MHz, CPU 800 MHz, MEM 600 MHz (16 Bit DDR3), LXB 175 MHz
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns

As it was working before, I must have messed up with my config somehow ...

Ok, it seems like as usual with these rj45 modules with more or less bad written eeprom.

1 Like

With the current mess of floating patches and unmerged stuff I can only say that the timer works perfectly with current master.

I highly doubt that, as master doesn't support rtl9302 :slight_smile: and obviously I'm using rtl9302 :stuck_out_tongue: but as I said, might have something gone awry during rebase, I'm comparing things to see if I can spot what's different on my end.

Hi, after switching timer to otto on rtl839x, accessing LuCI from PC is slow. (tested on Switch-M48eG PN28480K (RTL8393M))

top (status) page loading at login:

  • otto timer: 18.37 s
  • MIPS timer (disable otto timer): 2.22 s
root@OpenWrt:/# cat /proc/interrupts 
           CPU0       CPU1       
  8:      34673      34585      MIPS   0  IPI call
  9:       1114       1045      MIPS   1  IPI resched
 19:          0          0  realtek-rtl-intc  19  realtek-otto-wdt
 20:          3          7  realtek-rtl-intc  20  rtl839x-link-state
 21:          0          0  realtek-otto-gpio  18  0-0075
 22:          0          0    0-0075  15  keys
 24:       3089       3285  realtek-rtl-intc  24  eth0
 28:          0     124401  realtek-rtl-intc  28  timer@3100
 29:     124942          0  realtek-rtl-intc  29  timer@3100
 31:       2453       2783  realtek-rtl-intc  31  ttyS0
ERR:        114

BTW, I have no issue on rtl838x (Switch-M24eG PN28240K (RTL8382M)).

Not sure what it was, but after pulling master with the merged patches, and some rebasing and re-doing of things, its working again :slight_smile:

1 Like

Thanks for the (negative) feedback. Does it happen every time even after the boot process is over for a long time?

SPAM/ADVERTISING: Although the Realtek tree has been exclusively supporting switches up to now I started to include initial work for MIPS based router devices.

2 Likes