Skip to content
  • John Crispin's avatar
    staging: mt7621-eth: add mdio support for mt762X family · 14befc2d
    John Crispin authored
    
    
    NeilBrown: this patch originally contained soc-mt7620.c
      but as I cannot test that, I removed it.  Some functions
      from mdio-mt7620.c are needed for soc-mt7621.c support
      - fixed  mt7620_has_carrier() to read correct register.
    
    Original comment:
    
    Add support for SoCs from the mt7620 family. These all have one dedicated
    external gbit port and a builtin 5 port 100mbit switch. Additionally one
    of the 5 switch ports can be changed to become an additional gbit port
    that we can attach a phy to. MT7620 was the first SoC released after
    Ralink was acquired by MTK and has seen a lot of changes to the core.
    
    With MT7620 we have seen the addition of some advanced features such as
    TX vlan offloading, RX scatter gather and TSO. Newer MTK SoCs are based on
    this design.
    
    Although the builtin MT7530 is gbit capable, the builtin PHYs are only
    100mbit. There are boards in the wild that use one of the gbit MACs to
    attach an external MT7530. For this to work a few hacks need to be applied
    to reorganize the MDIO address mappings and autopolling for the SoC to
    correctly work with the external switch. This is however not part of the
    series and will be part of a later series once we evaluated if we want to
    use DSA or switchdev.
    
    Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
    Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
    Signed-off-by: default avatarMichael Lee <igvtee@gmail.com>
    Signed-off-by: default avatarNeilBrown <neil@brown.name>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    14befc2d