Skip to contentSkip to conversation

board: phytec: phycore-imx93: Enter fastboot on USB boot by default

PATCH In review Primoz Fiser 2 participants 2 messages Feb 12 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 board: phytec: phycore-imx93: Enter fastboot on USB boot by default

In case board is booted from USB, enter fastboot by default to enable the UUU flashing. In case of abort continue with the regular bootstd scan. User also has possibility to override the default bootcmd from the environment. Last but not least, this syncs behavior with other PHYTEC boards from the i.MX family.

---
 board/phytec/phycore_imx93/phycore-imx93.c | 5 +++++
 1 file changed, 5 insertions(+)
board/phytec/phycore_imx93/phycore-imx93.c +5 -0
index cfc6d91f20f2..fe001f77d4ba 100644
@@ -44,6 +44,11 @@ int board_late_init(void)
 	case MMC1_BOOT:
 		env_set_ulong("mmcdev", 0);
 		break;
+	case USB_BOOT:
+		printf("Detect USB boot. Will enter fastboot mode!\n");
+		if (!strcmp(env_get("bootcmd"), env_get_default("bootcmd")))
+			env_set("bootcmd", "fastboot 0; bootflow scan -lb;");
+		break;
 	default:
 		break;
 	}
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Primoz Fiser

In case board is booted from USB, enter fastboot by default to enable the UUU flashing. In case of abort continue with the regular bootstd scan. User also has possibility to override the default bootcmd from the environment. Last but not least, this syncs behavior with other PHYTEC boards from the i.MX family.

Quoted 24 lines

---
 board/phytec/phycore_imx93/phycore-imx93.c | 5 +++++

 1 file changed, 5 insertions(+)
board/phytec/phycore_imx93/phycore-imx93.c +0 -0
index cfc6d91f20f2..fe001f77d4ba 100644
@@ -44,6 +44,11 @@ int board_late_init(void)

  case MMC1_BOOT:
  env_set_ulong("mmcdev", 0);
  break;

board/phytec/phycore_imx93/phycore-imx93.c +2 -0
+	case USB_BOOT:
+		printf("Detect USB boot. Will enter fastboot

mode!\n");

board/phytec/phycore_imx93/phycore-imx93.c +1 -0
+		if (!strcmp(env_get("bootcmd"),

env_get_default("bootcmd")))

board/phytec/phycore_imx93/phycore-imx93.c +1 -0
+			env_set("bootcmd", "fastboot 0; bootflow

scan -lb;");

board/phytec/phycore_imx93/phycore-imx93.c +1 -0
+		break;

  default:
  break;
  }