From a962b7cff4bd9f16dabc75917dc76e9ff959ad13 Mon Sep 17 00:00:00 2001 From: Sumit Garg Date: Wed, 1 Feb 2023 19:28:54 +0530 Subject: net: dwc_eth_qos: Allow platform to override tx/rx_fifo_sz The GMAC controller on QCS404 SoC (support added by upcoming patch) fails to work with maximum tx/rx_fifo_sz supported by the hardware (16K). So allow platforms to override FIFO size using corresponding DT node properties. Signed-off-by: Sumit Garg Reviewed-by: Ramon Fried --- drivers/net/dwc_eth_qos.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/net/dwc_eth_qos.h') diff --git a/drivers/net/dwc_eth_qos.h b/drivers/net/dwc_eth_qos.h index 8fccd6f0572..466a792de7a 100644 --- a/drivers/net/dwc_eth_qos.h +++ b/drivers/net/dwc_eth_qos.h @@ -276,6 +276,7 @@ struct eqos_priv { bool started; bool reg_access_ok; bool clk_ck_enabled; + unsigned int tx_fifo_sz, rx_fifo_sz; }; void eqos_inval_desc_generic(void *desc); -- cgit v1.2.3 From d382025dc555b4e847877bb9b2d492ad1127d144 Mon Sep 17 00:00:00 2001 From: Sumit Garg Date: Wed, 1 Feb 2023 19:28:55 +0530 Subject: net: dwc_eth_qos: Add Qcom ethernet driver glue layer The Qualcom ETHQOS hardware supports an RGMII macro which needs to be configured according to following link speeds: - SPEED_1000 - SPEED_100 - SPEED_10 So add a corresponding glue driver to configure RGMII macro. Signed-off-by: Sumit Garg Reviewed-by: Ramon Fried --- drivers/net/dwc_eth_qos.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/net/dwc_eth_qos.h') diff --git a/drivers/net/dwc_eth_qos.h b/drivers/net/dwc_eth_qos.h index 466a792de7a..fddbe9336c9 100644 --- a/drivers/net/dwc_eth_qos.h +++ b/drivers/net/dwc_eth_qos.h @@ -253,6 +253,7 @@ struct eqos_priv { struct eqos_mtl_regs *mtl_regs; struct eqos_dma_regs *dma_regs; struct eqos_tegra186_regs *tegra186_regs; + void *eqos_qcom_rgmii_regs; struct reset_ctl reset_ctl; struct gpio_desc phy_reset_gpio; struct clk clk_master_bus; @@ -277,6 +278,7 @@ struct eqos_priv { bool reg_access_ok; bool clk_ck_enabled; unsigned int tx_fifo_sz, rx_fifo_sz; + u32 reset_delays[3]; }; void eqos_inval_desc_generic(void *desc); @@ -286,3 +288,4 @@ void eqos_flush_buffer_generic(void *buf, size_t size); int eqos_null_ops(struct udevice *dev); extern struct eqos_config eqos_imx_config; +extern struct eqos_config eqos_qcom_config; -- cgit v1.2.3