[PATCH] realtek: ZyXEL GS1900-48: drop gpio-restart

Birger Koblitz mail at birger-koblitz.de
Tue Feb 22 14:39:38 PST 2022


the information on the external GPIO resetting the board of
the Zyxel GS1900-48 comes from the hardware configuration
reported by the stock firmware. It says:
GS1900# show board
====== Reset =================
Type: GPIO
Using the rtk gpio commands in u-boot this can be confirmed.

Similarly the information on the XGS1250 comes from the output
of the "show tech-support" command which shows:
  ZYXEL XGS1250-12
  Board GPIO
Device  Pin  Direction  Default  Current  Purpose
------- ---- ---------- -------- -------- --------
INT     0    OUT        0        0
INT     1    IN         1        1        FAN_CONTROL
INT     6    IN         1        0        HW_VER_BIT1
INT     7    IN         1        1        HW_VER_BIT0
INT     11   OUT        0        0        FAN_EN
INT     15   OUT        0        0        TX_DIS_P11
INT     16   IN         0        0        SFP_Present_P11
INT     17   IN         0        1        SFP_LOS_P11
INT     20   IN         0        0        TX_FAULT_P11
INT     21   OUT        1        1        RESET_PHY
INT     22   IN         1        1        RST_BTN_OUT
I also tested this in u-boot and toggling that output 21 definitely
only resets the PHYs (port leds turn off), not the entire board.


On 22/02/2022 23:00, Sander Vanheule wrote:
> On Mon, 2022-02-21 at 21:23 +0100, Birger Koblitz wrote:
>> Hi,
>>> I just checked with my multimeter, and while the GPIO5 on the RTL8231 does go high/low
>>> when I set the output high/low from Linux, my device certainly doesn't reset. The
>>> other
>>> GPIO lines on the chip do work, since SFP modules are correctly detected.
>>> Birger, just to be sure, can you confirm that your device does reset with GPIO5 on the
>>> RTL8231?
>> Yes, it does.There is a warning, but then it reliably resets. That was why I left it
>> in as is.
> I had another hard look at my board, to check if something may be wrong physically, but I
> cannot find anything. My device's board looks identical to the pictures on the switch wiki
> [1], which I think you uploaded earlier.
> There is some reset logic on the board [2], but I cannot figure out how GPIO5 would be
> connected to it electrically. Unless I missed a via connecting to that pin on the RTL8231,
> GPIO5 only appears to lead to TP2. GPIO5/TP2 does not appear to be connected electrically
> to any part of the circuit next to SW1. I could add a bodge wire to connect TP2 to pad
> U25:3, but gpio-restart should really work on unmodified hardware.
> Does my description of the hard reset circuit on the wiki match your board?
> FWIW, the GPIO description reported by the stock firmware on the XGS1250-12 claims that
> internal GPIO21 can be used to reset the board, but you noted in the DTS it actually only
> resets the phy-s. So it wouldn't be the first time the reported board config is partially
> incorrect.
> Best,
> Sander
> [1] https://svanheule.net/switches/gs1900-48#board_details
> [2] https://svanheule.net/switches/gs1900-48#hard_reset_circuit

More information about the openwrt-devel mailing list