| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | 
							- From 0085cd8576ceeaddeedf973b939b41ba96e3f77c Mon Sep 17 00:00:00 2001
 
- From: Claudiu Beznea <[email protected]>
 
- Date: Wed, 9 Dec 2020 15:03:38 +0200
 
- Subject: [PATCH 119/247] net: macb: add support for sama7g5 gem interface
 
- Add support for SAMA7G5 gigabit ethernet interface.
 
- Signed-off-by: Claudiu Beznea <[email protected]>
 
- Reviewed-by: Andrew Lunn <[email protected]>
 
- Signed-off-by: David S. Miller <[email protected]>
 
- ---
 
-  drivers/net/ethernet/cadence/macb_main.c | 17 +++++++++++++++++
 
-  1 file changed, 17 insertions(+)
 
- --- a/drivers/net/ethernet/cadence/macb_main.c
 
- +++ b/drivers/net/ethernet/cadence/macb_main.c
 
- @@ -4383,6 +4383,14 @@ static const struct macb_usrio_config ma
 
-  	.refclk = MACB_BIT(CLKEN),
 
-  };
 
-  
 
- +static const struct macb_usrio_config sama7g5_usrio = {
 
- +	.mii = 0,
 
- +	.rmii = 1,
 
- +	.rgmii = 2,
 
- +	.refclk = BIT(2),
 
- +	.hdfctlen = BIT(6),
 
- +};
 
- +
 
-  static const struct macb_config fu540_c000_config = {
 
-  	.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_JUMBO |
 
-  		MACB_CAPS_GEM_HAS_PTP,
 
- @@ -4476,6 +4484,14 @@ static const struct macb_config zynq_con
 
-  	.usrio = &macb_default_usrio,
 
-  };
 
-  
 
- +static const struct macb_config sama7g5_gem_config = {
 
- +	.caps = MACB_CAPS_GIGABIT_MODE_AVAILABLE | MACB_CAPS_CLK_HW_CHG,
 
- +	.dma_burst_length = 16,
 
- +	.clk_init = macb_clk_init,
 
- +	.init = macb_init,
 
- +	.usrio = &sama7g5_usrio,
 
- +};
 
- +
 
-  static const struct of_device_id macb_dt_ids[] = {
 
-  	{ .compatible = "cdns,at32ap7000-macb" },
 
-  	{ .compatible = "cdns,at91sam9260-macb", .data = &at91sam9260_config },
 
- @@ -4493,6 +4509,7 @@ static const struct of_device_id macb_dt
 
-  	{ .compatible = "cdns,zynqmp-gem", .data = &zynqmp_config},
 
-  	{ .compatible = "cdns,zynq-gem", .data = &zynq_config },
 
-  	{ .compatible = "sifive,fu540-c000-gem", .data = &fu540_c000_config },
 
- +	{ .compatible = "microchip,sama7g5-gem", .data = &sama7g5_gem_config },
 
-  	{ /* sentinel */ }
 
-  };
 
-  MODULE_DEVICE_TABLE(of, macb_dt_ids);
 
 
  |