net: stmmac: dwmac-loongson: Add Loongson GNET support
The new generation Loongson LS2K2000 SoC and LS7A2000 chipset are equipped with the network controllers called Loongson GNET. It's the single and multi DMA-channels Loongson GMAC but with a PHY attached. Here is the summary of the DW GMAC features the controller has: DW GMAC IP-core: v3.73a Speeds: 10/100/1000Mbps Duplex: Full (both versions), Half (LS2K2000 GNET only) DMA-descriptors type: enhanced L3/L4 filters availability: Y VLAN hash table filter: Y PHY-interface: GMII (PHY is integrated into the chips) Remote Wake-up support: Y Mac Management Counters (MMC): Y Number of additional MAC addresses: 5 MAC Hash-based filter: Y Hash Table Size: 256 AV feature: Y (LS2K2000 GNET only) DMA channels: 8 (LS2K2000 GNET), 1 (LS7A2000 GNET) Let's update the Loongson DWMAC driver to supporting the new Loongson GNET controller. The change is mainly trivial: the driver shall be bound to the PCIe device with DID 0x7a13, and the device-specific setup() method shall be called for it. The only peculiarity concerns the integrated PHY speed change procedure. The PHY has a weird problem with switching from the low speeds to 1000Mbps mode. The speedup procedure requires the PHY-link re-negotiation. So the suggested change provide the device-specific fix_mac_speed() method to overcome the problem. Signed-off-by:Feiyang Chen <chenfeiyang@loongson.cn> Signed-off-by:
Yinggang Gu <guyinggang@loongson.cn> Acked-by:
Huacai Chen <chenhuacai@loongson.cn> Reviewed-by:
Serge Semin <fancer.lancer@gmail.com> Signed-off-by:
Yanteng Si <siyanteng@loongson.cn> Tested-by:
Serge Semin <fancer.lancer@gmail.com> Signed-off-by:
Paolo Abeni <pabeni@redhat.com>
Showing
Please register or sign in to comment