[PATCH 1/2] realtek: netgear-gigabit: Enable RTL8231

Sander Vanheule sander at svanheule.net
Fri Nov 26 04:55:32 PST 2021

Hi Bjørn,

On Fri, 2021-11-26 at 13:41 +0100, Bjørn Mork wrote:
> Sander Vanheule <sander at svanheule.net> writes:
> > To everyone in CC, could you please verify that the RTL8231 is present
> > in your device(s) at address 31. On my GS110TPP the status LEDs are
> > located on external GPIOs 31, 32, and 34. Other devices configure the
> > same pins as outputs, so it is possible the status LED(s) is (are) also
> > present on these pins on other devices. For the GS310TP, external GPIO
> > functionality can also be tested through the lines for the SFP cages.
> Tested on GS108Tv3.  I assume this verifies the RTL8231 presence?:
> root at OpenWrt:/# dmesg|grep 8231
> [    0.443725] Probing RTL8231 GPIOs
> [    0.447454] rtl8231_init called, MDIO bus ID: 31

If the chip isn't present at the specified address, the probe continues anyway,
since it doesn't check for chip presence at the moment. See my other series with
RTL8231 driver patches for that functionality:


> Not 100% sure, but I believe the status LED is green/amber only.  Never
> seen any other color.  Don't know how you want this expressed in DT but
> the gpio to colour map is
> 31  32
> hi  hi  off
> lo  hi  green
> hi  lo  amber
> lo  lo  off
> Almost looks like the two LEDs are wired in opposite directions between
> those two GPIOs.

Going from the board pictures on biot's wiki, this is more or less what I
expected. The LED is a single 2-pin component, with two LEDs wired in anti-
parallel (like the bi-color, 2-pin switch port LEDs).

It is currently not possible to express mutual exclusion on LEDs in the device
map or multiple color components in one housing, unless there's an explicit RGB
driver. Two GPIO LEDs will be the best we can do for now, although improvements
were discussed on the linux leds mailing list recently.

> Tried gpios 33, 34 and 35 as well without any visible effect.  Let me
> know if I should test any other numbers.
> Tested-by: Bjørn Mork <bjorn at mork.no>

This is fine, since it confirms you can control the external GPIOs with an
RTL8231 at SMI address 31. Thank you for testing!


More information about the openwrt-devel mailing list