120-net-macb-add-support-for-sama7g5-emac-interface.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From a42f90357cfcfcf5cdade4594ad79a1eae633a9f Mon Sep 17 00:00:00 2001
  2. From: Claudiu Beznea <[email protected]>
  3. Date: Wed, 9 Dec 2020 15:03:39 +0200
  4. Subject: [PATCH 120/247] net: macb: add support for sama7g5 emac interface
  5. Add support for SAMA7G5 10/100Mbps interface.
  6. Signed-off-by: Claudiu Beznea <[email protected]>
  7. Reviewed-by: Andrew Lunn <[email protected]>
  8. Signed-off-by: David S. Miller <[email protected]>
  9. ---
  10. drivers/net/ethernet/cadence/macb_main.c | 9 +++++++++
  11. 1 file changed, 9 insertions(+)
  12. --- a/drivers/net/ethernet/cadence/macb_main.c
  13. +++ b/drivers/net/ethernet/cadence/macb_main.c
  14. @@ -4496,6 +4496,14 @@ static const struct macb_config sama7g5_
  15. .usrio = &sama7g5_usrio,
  16. };
  17. +static const struct macb_config sama7g5_emac_config = {
  18. + .caps = MACB_CAPS_USRIO_DEFAULT_IS_MII_GMII | MACB_CAPS_USRIO_HAS_CLKEN,
  19. + .dma_burst_length = 16,
  20. + .clk_init = macb_clk_init,
  21. + .init = macb_init,
  22. + .usrio = &sama7g5_usrio,
  23. +};
  24. +
  25. static const struct of_device_id macb_dt_ids[] = {
  26. { .compatible = "cdns,at32ap7000-macb" },
  27. { .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
  28. @@ -4514,6 +4522,7 @@ static const struct of_device_id macb_dt
  29. { .compatible = "cdns,zynq-gem", .data = &zynq_config },
  30. { .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
  31. { .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
  32. + { .compatible = "microchip,sama7g5-emac", .data = &sama7g5_emac_config },
  33. { /* sentinel */ }
  34. };
  35. MODULE_DEVICE_TABLE(of, macb_dt_ids);