• Martin Blumenstingl's avatar
    arm64: dts: meson: use the generic Ethernet PHY reset GPIO bindings · f29cabf2
    Martin Blumenstingl authored
    The snps,reset-gpio bindings are deprecated in favour of the generic
    "Ethernet PHY reset" bindings.
    
    Replace snps,reset-gpio from the &ethmac node with reset-gpios in the
    ethernet-phy node. The old snps,reset-active-low property is now encoded
    directly as GPIO flag inside the reset-gpios property.
    
    snps,reset-delays-us is converted to reset-assert-us and
    reset-deassert-us. reset-assert-us is the second cell from
    snps,reset-delays-us while reset-deassert-us was the third cell.
    
    Instead of blindly copying the old values (which seems strange since
    they gave the PHY one second to come out of reset) over this also
    updates the delays based on the datasheets:
    - the Realtek RTL8211F PHY needs a 10ms assert delay (the datasheet
      mentions: "For a complete PHY reset, this pin must be asserted low
      for at least 10ms") and a 30ms deassert delay (the datasheet
      mentions: "Wait for a further 30ms (for internal circuits settling
      time) before accessing the PHY register". This applies to the
      following boards: GXBB NanoPi K2, GXBB Odroid-C2, GXBB Vega S95
      variants, GXBB Wetek variants, GXL P230, GXM Khadas VIM2, GXM Nexbox
      A1, GXM Q200, GXM RBox Pro boards.
    - the ICPlus IP101GR PHY needs a 10ms assert delay (the datasheet
      mentions: "Trst | Reset period | 10ms") and a deassert delay of 10ms
      as well (the datasheet mentions: "Tclk_MII_rdy | MII/RMII clock
      output ready after reset released | 10ms"). This applies to the GXBB
      Nexbox A95X board.
    - the Micrel KSZ9031 seems to require a 100us delay but use the same
      (seemingly safe) values from RTL8211F due to lack of a board to verify
      this. This applies to the GXBB P200 board.
    
    The GXBB P201 board is left out from this conversion because it doesn't
    have a dedicated PHY node (because it's not clear which PHY is used on
    that board).
    Reviewed-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
    Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
    Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
    f29cabf2
meson-gxbb-nanopi-k2.dts 7.82 KB