• Martin Blumenstingl's avatar
    net: stmmac: add a glue driver for the Amlogic Meson 8b / GXBB DWMAC · 566e8251
    Martin Blumenstingl authored
    The Ethernet controller available in Meson8b and GXBB SoCs is a Synopsys
    DesignWare MAC IP core which is already supported by the stmmac driver.
    
    In addition to the standard stmmac driver some Meson8b / GXBB specific
    registers have to be configured for the PHY clocks. These SoC specific
    registers are called PRG_ETHERNET_ADDR0 and PRG_ETHERNET_ADDR1 in the
    datasheet.
    These registers are not backwards compatible with those on Meson 6b,
    which is why a new glue driver is introduced. This worked for many
    boards because the bootloader programs the PRG_ETHERNET registers
    correctly. Additionally the meson6-dwmac driver only sets bit 1 of
    PRG_ETHERNET_ADDR0 which (according to the datasheet) is only used
    during reset.
    
    Currently all configuration values can be determined automatically,
    based on the configured phy-mode (which is mandatory for the stmmac
    driver). If required the tx-delay and the mux clock (so it supports
    the MPLL2 clock as well) can be made configurable in the future.
    Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
    Tested-by: default avatarKevin Hilman <khilman@baylibre.com>
    Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
    Signed-off-by: default avatarKevin Hilman <khilman@baylibre.com>
    566e8251
Makefile 1016 Bytes