summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXingyu Wu <xingyu.wu@starfivetech.com>2023-09-06 09:42:02 +0300
committerXingyu Wu <xingyu.wu@starfivetech.com>2023-09-07 04:34:13 +0300
commit67df54127e38f1351c38293abd08d817e33394c7 (patch)
tree2ace7fb36e9ade2b2b23a82e0c5ea83be9dec20d
parent706fab8ccb290393c721c1f7e4e26bc0fa9e8d57 (diff)
downloadu-boot-67df54127e38f1351c38293abd08d817e33394c7.tar.xz
cmd: fastboot: Add presetting on StarFive SoC before fastboot
Add the presetting about usb as device in fastboot function. Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com>
-rw-r--r--cmd/fastboot.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmd/fastboot.c b/cmd/fastboot.c
index 033a2c95e8..fa6863ccc7 100644
--- a/cmd/fastboot.c
+++ b/cmd/fastboot.c
@@ -43,6 +43,14 @@ static int do_fastboot_usb(int argc, char *const argv[],
char *endp;
int ret;
+#ifdef CONFIG_FASTBOOT_STARFIVE_MAX_BLK_WRITE
+#define RUN_FB_SF_PRESETTING \
+ "fdt set /soc/usbdrd starfive,usb2-only <0x1>;" \
+ "fdt set /soc/usbdrd/usb@10100000 dr_num_mode <0x2>;"
+
+ run_command_list(RUN_FB_SF_PRESETTING, -1, 0);
+#endif
+
if (argc < 2)
return CMD_RET_USAGE;