1. 23 Mar, 2018 10 commits
  2. 22 Mar, 2018 25 commits
  3. 19 Mar, 2018 5 commits
    • NeilBrown's avatar
      staging: mt7621-dts: add dts files · d59578da
      NeilBrown authored
      Add device tree source for mt7621 and gnubee1 to
      make testing easier.
      Signed-off-by: default avatarNeilBrown <neil@brown.name>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d59578da
    • John Crispin's avatar
      staging: mt7621-eth: mediatek: add Kconfig and Makefile · 792c11c8
      John Crispin authored
      This patch adds the Makefile and Kconfig required to make the driver build.
      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>
      792c11c8
    • John Crispin's avatar
      staging: mt7621-eth: add support for mt7621 · 3497a53a
      John Crispin authored
      Add support for SoCs from the mt7621 family. These all have 2 GMAC ports,
      both of which are attached to the same internal 1000MBit switch. Currently
      we only support GMAC1 as the sole CPU port. MT7621 is very similar to
      MT7620 with only a few registers having different offsets. MT7621 is the
      first SoC to have the new QDMA engine builtin. The older PDMA engine is
      also present. unfortunatley, to get the best performance we need to run RX
      on PDMA and TX on QDMA. This SoC is also the first to have TX vlan
      offloading and TSO6 support.
      
      NeilBrown: the driver didn't work when I tested, so I changed it
        to match known-working code as much as possible.  This included
        converting to the PDMA engine for TX.
      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>
      3497a53a
    • 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
    • John Crispin's avatar
      staging: mt7621-eth: add gigabit switch driver (GSW) · f079b640
      John Crispin authored
      The GSW is found in all of the 1000mbit SoCs. it has 5 external ports,
      1-2 cpu ports and 1 further port that the internal HW offloading engine
      connects to. The switch core used is a MT7530, which also exists as a
      standalone chip. Although these SoCs (mt7620/1/3) share the same switch
      core, the bring up of these is slightly different. One of the reasons is
      that on mt7620 the switch core is mmio mapped while MT7621/3 talks to the
      switch via MDIO addr 0x1f. Additionally, the SoCs have different MAC types
      and some of them have TRGMII support. MT7621 can do 1,2gbit and MT7623 is
      able to do 2,6gbit. The support for the TRGMII bring up is not part of this
      series as the code is based on the SDK driver and has between 1500 and 2000
      magic values that still need to be converted to defines.
      
      Because of these differences we have 3 separate drivers for these 3 SoCs.
      These drivers are very basic and only provides basic init and irq support.
      
      The SoC and switch core both have support for a special tag making DSA
      support possible.
      
      NeilBrown:
       - added setting to mt7621_hw_init to match working code from libreCMC
       This needs to be converted to use switchdev.
      Signed-off-by: default avatarJohn Crispin <blogic@openwrt.org>
      Signed-off-by: default avatarNeilBrown <neil@brown.name>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f079b640