From be847fafa71deaa3d11707c3a193a4a52f34b05d Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 24 Sep 2024 15:02:09 +0200 Subject: arm64: dts: imx8m: Always name the generated fitImage u-boot.itb Maintain backward compatibility with pre-binman u-boot file naming, the U-Boot fitImage used to be named u-boot.itb before, restore the file name after binman conversion. Signed-off-by: Marek Vasut Reviewed-by: Peng Fan --- arch/arm/dts/imx8mm-u-boot.dtsi | 1 + arch/arm/dts/imx8mn-u-boot.dtsi | 1 + arch/arm/dts/imx8mp-u-boot.dtsi | 1 + arch/arm/dts/imx8mq-u-boot.dtsi | 1 + 4 files changed, 4 insertions(+) diff --git a/arch/arm/dts/imx8mm-u-boot.dtsi b/arch/arm/dts/imx8mm-u-boot.dtsi index c02e11def5f..d31bc822532 100644 --- a/arch/arm/dts/imx8mm-u-boot.dtsi +++ b/arch/arm/dts/imx8mm-u-boot.dtsi @@ -122,6 +122,7 @@ binman_imx_fit: fit { description = "Configuration to load ATF before U-Boot"; + filename = "u-boot.itb"; #ifndef CONFIG_IMX_HAB fit,external-offset = ; #endif diff --git a/arch/arm/dts/imx8mn-u-boot.dtsi b/arch/arm/dts/imx8mn-u-boot.dtsi index 732191f5205..6875c6d44ff 100644 --- a/arch/arm/dts/imx8mn-u-boot.dtsi +++ b/arch/arm/dts/imx8mn-u-boot.dtsi @@ -193,6 +193,7 @@ binman_imx_fit: fit { description = "Configuration to load ATF before U-Boot"; + filename = "u-boot.itb"; #ifndef CONFIG_IMX_HAB fit,external-offset = ; #endif diff --git a/arch/arm/dts/imx8mp-u-boot.dtsi b/arch/arm/dts/imx8mp-u-boot.dtsi index f2655a4d0c8..56749ccacd2 100644 --- a/arch/arm/dts/imx8mp-u-boot.dtsi +++ b/arch/arm/dts/imx8mp-u-boot.dtsi @@ -148,6 +148,7 @@ binman_imx_fit: fit { description = "Configuration to load ATF before U-Boot"; + filename = "u-boot.itb"; #ifndef CONFIG_IMX_HAB fit,external-offset = ; #endif diff --git a/arch/arm/dts/imx8mq-u-boot.dtsi b/arch/arm/dts/imx8mq-u-boot.dtsi index 9b895a63857..d7a83a78f4d 100644 --- a/arch/arm/dts/imx8mq-u-boot.dtsi +++ b/arch/arm/dts/imx8mq-u-boot.dtsi @@ -106,6 +106,7 @@ binman_imx_fit: fit { description = "Configuration to load ATF before U-Boot"; + filename = "u-boot.itb"; #ifndef CONFIG_IMX_HAB fit,external-offset = ; #endif -- cgit v1.2.3 From 94d02f13dbc582cf0644a53da33cc4ad9213661f Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 24 Sep 2024 15:31:59 +0800 Subject: net: fec_mxc: Fix clk_ref rate on iMX93 i.MX93 FEC ENET port supports two mode: RGMII and RMII. For RGMII, there is an internal /2 divider, so the freq needs to set with (*2), otherwise the speed will not reach 1G and cause communication error in some network environments. For RMII, the clk path is ccm -> enet tx_clk pin -> pad loop back to enet, no /2 divider. So fix for RGMII mode with freq multiplied by 2. Fixes: 09de565f76b ("net: fec_mxc: support i.MX93") Signed-off-by: Ye Li Signed-off-by: Peng Fan --- drivers/net/fec_mxc.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 0a0d92bc2cd..d0590fd137b 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1210,10 +1210,13 @@ static int fecmxc_set_ref_clk(struct clk *clk_ref, phy_interface_t interface) else if (interface == PHY_INTERFACE_MODE_RGMII || interface == PHY_INTERFACE_MODE_RGMII_ID || interface == PHY_INTERFACE_MODE_RGMII_RXID || - interface == PHY_INTERFACE_MODE_RGMII_TXID) + interface == PHY_INTERFACE_MODE_RGMII_TXID) { freq = 125000000; - else + if (is_imx93()) + freq = freq << 1; + } else { return -EINVAL; + } ret = clk_set_rate(clk_ref, freq); if (ret < 0) -- cgit v1.2.3 From 99abeaa648052e8e99682f046b8dfd3739b4e181 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Tue, 24 Sep 2024 15:32:00 +0800 Subject: net: fec_mxc: Skip recv packet process when fec is halted After FEC is halted by calling fec_halt callback, we should not continue receiving packet. Otherwise it will process previous pending interrupts on EIR register and uses wrong rbd index as this has been reset to 0. The GRA interrupt which is triggered by issuing graceful stop command to FEC transmitter in fec_halt is processed in this case. It causes wrong receive buffer descriptors be used by FEC in next time. Signed-off-by: Ye Li Reviewed-by: Peng Fan Signed-off-by: Peng Fan --- drivers/net/fec_mxc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index d0590fd137b..50edeb4b5b6 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -818,6 +818,9 @@ static int fecmxc_recv(struct udevice *dev, int flags, uchar **packetp) return -ENOMEM; } + if (!(readl(&fec->eth->ecntrl) & FEC_ECNTRL_ETHER_EN)) + return 0; + /* Check if any critical events have happened */ ievent = readl(&fec->eth->ievent); writel(ievent, &fec->eth->ievent); -- cgit v1.2.3