summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-10-29 18:46:08 -0600
committerTom Rini <trini@konsulko.com>2024-10-29 18:46:08 -0600
commit5cca0e3f6e0ff17db92476235ea1bb9cd8cbc9eb (patch)
tree8ae4389d02430cc97d25546be0c00cf5ae6ea7d6 /drivers
parent2d79d1004d8d2ec8522c520dc205c8f199fd035e (diff)
parentd88bcd6d247a2b5d1683e393d8c9dc0259cd29f0 (diff)
Merge tag 'u-boot-imx-master-20241029' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23092 - Implement i.MX93 erratum fix on the dwc_eth_qos driver to fix RMII. - Add support for Emcraft Systems NavQ+. - Fix the size of IVT + CSF blob tacked on to u-boot.itb.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/dwc_eth_qos.c7
-rw-r--r--drivers/net/dwc_eth_qos.h1
-rw-r--r--drivers/net/dwc_eth_qos_imx.c22
3 files changed, 26 insertions, 4 deletions
diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 3415c418a93..2279481d935 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -47,10 +47,6 @@
#include <asm/cache.h>
#include <asm/gpio.h>
#include <asm/io.h>
-#ifdef CONFIG_ARCH_IMX8M
-#include <asm/arch/clock.h>
-#include <asm/mach-imx/sys_proto.h>
-#endif
#include <linux/bitfield.h>
#include <linux/delay.h>
#include <linux/printk.h>
@@ -712,6 +708,9 @@ static int eqos_start(struct udevice *dev)
*/
setbits_le32(&eqos->dma_regs->mode, EQOS_DMA_MODE_SWR);
+ if (eqos->config->ops->eqos_fix_soc_reset)
+ eqos->config->ops->eqos_fix_soc_reset(dev);
+
ret = wait_for_bit_le32(&eqos->dma_regs->mode,
EQOS_DMA_MODE_SWR, false,
eqos->config->swr_wait, false);
diff --git a/drivers/net/dwc_eth_qos.h b/drivers/net/dwc_eth_qos.h
index ce57e22a81f..123f98d5d53 100644
--- a/drivers/net/dwc_eth_qos.h
+++ b/drivers/net/dwc_eth_qos.h
@@ -248,6 +248,7 @@ struct eqos_ops {
int (*eqos_set_tx_clk_speed)(struct udevice *dev);
int (*eqos_get_enetaddr)(struct udevice *dev);
ulong (*eqos_get_tick_clk_rate)(struct udevice *dev);
+ void (*eqos_fix_soc_reset)(struct udevice *dev);
};
struct eqos_priv {
diff --git a/drivers/net/dwc_eth_qos_imx.c b/drivers/net/dwc_eth_qos_imx.c
index 642432834f5..af42f7436ce 100644
--- a/drivers/net/dwc_eth_qos_imx.c
+++ b/drivers/net/dwc_eth_qos_imx.c
@@ -216,6 +216,27 @@ static int eqos_get_enetaddr_imx(struct udevice *dev)
return 0;
}
+static void eqos_fix_soc_reset_imx(struct udevice *dev)
+{
+ struct eqos_priv *eqos = dev_get_priv(dev);
+
+ if (IS_ENABLED(CONFIG_IMX93)) {
+ /*
+ * Workaround for ERR051683 in i.MX93
+ * The i.MX93 requires speed configuration bits to be set to
+ * complete the reset procedure in RMII mode.
+ * See b536f32b5b03 ("net: stmmac: dwmac-imx: use platform
+ * specific reset for imx93 SoCs") in linux
+ */
+ if (eqos->config->interface(dev) == PHY_INTERFACE_MODE_RMII) {
+ udelay(200);
+ setbits_le32(&eqos->mac_regs->configuration,
+ EQOS_MAC_CONFIGURATION_PS |
+ EQOS_MAC_CONFIGURATION_FES);
+ }
+ }
+}
+
static struct eqos_ops eqos_imx_ops = {
.eqos_inval_desc = eqos_inval_desc_generic,
.eqos_flush_desc = eqos_flush_desc_generic,
@@ -232,6 +253,7 @@ static struct eqos_ops eqos_imx_ops = {
.eqos_set_tx_clk_speed = eqos_set_tx_clk_speed_imx,
.eqos_get_enetaddr = eqos_get_enetaddr_imx,
.eqos_get_tick_clk_rate = eqos_get_tick_clk_rate_imx,
+ .eqos_fix_soc_reset = eqos_fix_soc_reset_imx,
};
struct eqos_config __maybe_unused eqos_imx_config = {