Realtek switch SoC docs

mango register: LED_GLB_CTRL

Details

Name
LED_GLB_CTRL
Offset
0600
Feature
LED

Description

External LED controller global register (of the RTL8231)

default: 0x0042_9654

Fields

Name LSB Bits Description
RESERVED 25 7
LED_STREAM_XCHG 24 1

LED Copper/Fiber signal stream order

  • 0b0: copper/fiber
  • 0b1: fiber/copper
LEDIC_RESTART 23 1

Restart RTL8231 every time

Register 0x00, bit 1 (LED_Start) on RTL8231)

  • 0b0: normal operation
  • 0b1: restart
LEDIC_PAGE_ACCESS 22 1

Always reset RTL8231 page to GPIO Control Register after access

Set address 0x1f to 0x1e after each access.

  • 0b0: disable
  • 0b1: enable
LED_ACTIVE 21 1

Serial LED is active high/low

Note: Only for serial LED mode, must be set to active high when scan LED mode.

  • 0b0: active low
  • 0b1: active high
LED_SIGNAL_INVERT 20 1

LED signal stream invert mode

Note: Only for serial LED mode, must be set to enable when scan LED mode.

  • 0b0: disable
  • 0b1: enable
BLINK_TIME_SEL 17 3

LED blinking rate

Also See LED_PORT_SW_CTRL for the same rates. Does not seem to match the blink rates from RTL8231 …

On time is identical to off time (50% duty cycle).

  • 0x0 Reserved (off?)
  • 0x1: 32 ms
  • 0x2: 64 ms
  • 0x3: 128 ms
  • 0x4: 256 ms
  • 0x5: 512 ms
  • 0x6: 1024 ms
  • 0x7 Reserved (on?)
LED_CLK_SEL 15 2

Set LED period time (LED_CLK and LED_MDC)

  • Serial mode requires 0x2?
  • Scan mode requires 0x1?

Note: Can be used in serial LED mode or scan LED mode.

  • 0x0: 800 ns
  • 0x1: 400 ns
  • 0x2: 200 ns
  • 0x3: 100 ns
LED_LOAD_EN 14 1

LED load indication

Note: LED_LOAD_EN is not available when LED configuration is TX = 0x4 or RX = 0x3

  • 0b0: disable
  • 0b1: enable
SYS_LED_MODE 12 2

System LED blink mode

Note: Only valid when SYS_LED_EN = 1

  • 0x0: off
  • 0x1: 64 ms
  • 0x2: 1024 ms
  • 0x3: on
STP2_PWR_ON_LED 8 4

Power on blinking rate (step 2)

  • 0x0: off
  • 0x1: on (doesn’t sound right, default is 0x6)
  • 0x2 - 0xf: ? (todo)
STP1_PWR_ON_LED 4 4

Power on blinking rate (step 1)

  • 0x0: off
  • 0x1: on (doesn’t sound right, default is 0x5)
  • 0x2 - 0xf: ? (todo)
PWR_ON_BLINK_SEL 2 2

Power On blink time

  • 0x0: off
  • 0x1: 400 ms
  • 0x2: 800 ms
  • 0x3: 1600 ms
LED_MOD 0 2

LED data output mode

  • 0x0: off
  • 0x1: serial (shift register) output
  • 0x2: single color scan mode
  • 0x3: bi-color scan mode