summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-06-04 09:34:21 -0400
committerTom Rini <trini@konsulko.com>2021-06-04 09:34:21 -0400
commitc003d2cd6b415319c3e40db42b48c2815acda3d3 (patch)
treef280cf847549aec7adabaffb645a64a7a014c552 /include
parent89be8e31ccd1c53b010385ed0807eb00f0eec06a (diff)
parent176c3e7760a2e302620b8b12b29f4aa385b86087 (diff)
downloadu-boot-c003d2cd6b415319c3e40db42b48c2815acda3d3.tar.gz
u-boot-c003d2cd6b415319c3e40db42b48c2815acda3d3.tar.xz
u-boot-c003d2cd6b415319c3e40db42b48c2815acda3d3.zip
Merge https://source.denx.de/u-boot/custodians/u-boot-marvell
- mvebu: a37xx: PCI related enhancements and fixes (Pali) - mvebu: turris_omnia: Board specific updates, e.g. rescue boot cmd etc (Marek)
Diffstat (limited to 'include')
-rw-r--r--include/configs/turris_omnia.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/configs/turris_omnia.h b/include/configs/turris_omnia.h
index 0b55c14d8b..7da18f97db 100644
--- a/include/configs/turris_omnia.h
+++ b/include/configs/turris_omnia.h
@@ -108,12 +108,35 @@
#include <config_distro_bootcmd.h>
+/*
+ * The factory reset bootcommand on Omnia first sets all the front LEDs to green
+ * and then tries to load the rescue image from SPI flash memory and boot it
+ */
+#define TURRIS_OMNIA_BOOTCMD_RESCUE \
+ "i2c dev 2; " \
+ "i2c mw 0x2a.1 0x3 0x1c 1; " \
+ "i2c mw 0x2a.1 0x4 0x1c 1; " \
+ "mw.l 0x01000000 0x00ff000c; " \
+ "i2c write 0x01000000 0x2a.1 0x5 4 -s; " \
+ "setenv bootargs \"earlyprintk console=ttyS0,115200" \
+ " omniarescue=$omnia_reset rescue_mode=$omnia_reset\"; " \
+ "sf probe; " \
+ "sf read 0x1000000 0x100000 0x700000; " \
+ "lzmadec 0x1000000 0x1700000; " \
+ "if gpio input gpio@71_4; then " \
+ "bootm 0x1700000#sfp; " \
+ "else " \
+ "bootm 0x1700000; " \
+ "fi; " \
+ "bootz 0x1000000"
+
#define CONFIG_EXTRA_ENV_SETTINGS \
RELOCATION_LIMITS_ENV_SETTINGS \
LOAD_ADDRESS_ENV_SETTINGS \
"fdtfile=" CONFIG_DEFAULT_DEVICE_TREE ".dtb\0" \
"console=ttyS0,115200\0" \
"ethact=ethernet@34000\0" \
+ "bootcmd_rescue=" TURRIS_OMNIA_BOOTCMD_RESCUE "\0" \
BOOTENV
#endif /* CONFIG_SPL_BUILD */