Merge tag 'u-boot-imx-master-20240208' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx

- Add USB support for phycore-imx8mp
- Fix environment corruption, reset on mx6sabresd
- Print reset cause on imx8
- Extend mkimage to support generating an image for i.MXRT FlexSPI
- Add new apalis and colibri variants
- Add support for phyBOARD-Segin-i.MX93 support
- Fix when FEC is primarily used instead of EQOS on i.MX93.
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 3bfdc3f..4c61d28 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -811,6 +811,8 @@
 	enum boot_src src = get_boot_src();
 	char bootcmd_str[MAX_BOOTCMD_SIZE];
 
+	bootcmd_str[0] = 0;
+
 	switch (src) {
 #ifdef IFC_NOR_BOOTCOMMAND
 	case BOOT_SOURCE_IFC_NOR:
@@ -859,6 +861,9 @@
 		break;
 	}
 
+	if (!bootcmd_str[0])
+		return 0;
+
 	ret = env_set("bootcmd", bootcmd_str);
 	if (ret) {
 		printf("Failed to set bootcmd: ret = %d\n", ret);
diff --git a/drivers/net/phy/nxp-c45-tja11xx.c b/drivers/net/phy/nxp-c45-tja11xx.c
index f701790..f24fc5b 100644
--- a/drivers/net/phy/nxp-c45-tja11xx.c
+++ b/drivers/net/phy/nxp-c45-tja11xx.c
@@ -14,6 +14,7 @@
 #include <phy.h>
 
 #define PHY_ID_TJA_1103			0x001BB010
+#define PHY_ID_TJA_1120			0x001BB031
 
 #define VEND1_DEVICE_CONTROL		0x0040
 #define DEVICE_CONTROL_RESET		BIT(15)
@@ -306,13 +307,35 @@
 	return nxp_c45_start_op(phydev);
 }
 
+static int nxp_c45_speed(struct phy_device *phydev)
+{
+	int val;
+
+	val = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL1);
+	if (val < 0)
+		return val;
+
+	if (val & MDIO_PMA_CTRL1_SPEED100)
+		phydev->speed = SPEED_100;
+	else if (val & MDIO_PMA_CTRL1_SPEED1000)
+		phydev->speed = SPEED_1000;
+	else
+		phydev->speed = 0;
+
+	return 0;
+}
+
 static int nxp_c45_startup(struct phy_device *phydev)
 {
 	u32 reg;
+	int ret;
 
 	reg = phy_read_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_STAT1);
 	phydev->link = !!(reg & MDIO_STAT1_LSTATUS);
-	phydev->speed = SPEED_100;
+	ret = nxp_c45_speed(phydev);
+	if (ret < 0)
+		return ret;
+
 	phydev->duplex = DUPLEX_FULL;
 	return 0;
 }
@@ -330,11 +353,25 @@
 	return 0;
 }
 
-U_BOOT_PHY_DRIVER(nxp_c45_tja11xx) = {
+#define NXP_C45_COMMON_FEATURES	(SUPPORTED_TP | \
+	SUPPORTED_MII)
+
+U_BOOT_PHY_DRIVER(nxp_c45_tja1103) = {
 	.name = "NXP C45 TJA1103",
 	.uid  = PHY_ID_TJA_1103,
 	.mask = 0xfffff0,
-	.features = PHY_100BT1_FEATURES,
+	.features = NXP_C45_COMMON_FEATURES | SUPPORTED_100baseT_Full,
+	.probe = &nxp_c45_probe,
+	.config = &nxp_c45_config,
+	.startup = &nxp_c45_startup,
+	.shutdown = &genphy_shutdown,
+};
+
+U_BOOT_PHY_DRIVER(nxp_c45_tja1120) = {
+	.name = "NXP C45 TJA1120",
+	.uid  = PHY_ID_TJA_1120,
+	.mask = 0xfffff0,
+	.features = NXP_C45_COMMON_FEATURES | SUPPORTED_1000baseT_Full,
 	.probe = &nxp_c45_probe,
 	.config = &nxp_c45_config,
 	.startup = &nxp_c45_startup,
diff --git a/include/phy.h b/include/phy.h
index 27effdb..e02cbdb 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -51,10 +51,6 @@
 				 PHY_100BT_FEATURES | \
 				 PHY_DEFAULT_FEATURES)
 
-#define PHY_100BT1_FEATURES	(SUPPORTED_TP | \
-				 SUPPORTED_MII | \
-				 SUPPORTED_100baseT_Full)
-
 #define PHY_GBIT_FEATURES	(PHY_BASIC_FEATURES | \
 				 PHY_1000BT_FEATURES)