Skip to contentSkip to conversation

arm: mvebu: fix boot from UART on ClearFog Base

PATCH New Baruch Siach 2 participants 4 messages Sep 24, 2017 – Sep 26, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 arm: mvebu: fix boot from UART on ClearFog Base

The ClearFog Base boot from UART when setting the DIP switches to 01001. Unfortunately, the SPL code sometimes fails to detect the UART boot method at run-time. Add an alternative SAR UART boot value to fix this.

Note that this alternative value is not documented (Armada 38x Hardware Specifications, Table 48). But experimentations showed it on the ClearFog Base.

---
v2: put BOOT_FROM_UART_ALT under #ifdef to avoid build break for other
mvebu variants

---
 arch/arm/mach-mvebu/include/mach/soc.h | 1 +
 arch/arm/mach-mvebu/spl.c              | 3 +++
 2 files changed, 4 insertions(+)
arch/arm/mach-mvebu/include/mach/soc.h +1 -0
index 0900e4008c12..44bac63b4447 100644
@@ -139,6 +139,7 @@
 #define BOOT_DEV_SEL_MASK	(0x3f << BOOT_DEV_SEL_OFFS)
 
 #define BOOT_FROM_UART		0x28
+#define BOOT_FROM_UART_ALT	0x3f
 #define BOOT_FROM_SPI		0x32
 #define BOOT_FROM_MMC		0x30
 #define BOOT_FROM_MMC_ALT	0x31
arch/arm/mach-mvebu/spl.c +3 -0
index 3cf02a54cea2..a72a769f7c74 100644
@@ -42,6 +42,9 @@ static u32 get_boot_device(void)
 		return BOOT_DEVICE_MMC1;
 #endif
 	case BOOT_FROM_UART:
+#ifdef BOOT_FROM_UART_ALT
+	case BOOT_FROM_UART_ALT:
+#endif
 		return BOOT_DEVICE_UART;
 	case BOOT_FROM_SPI:
 	default:
Signature · 1 line
2.14.1
#1 lore raw

PATCH v2 2/2 arm: mvebu: clearfog: document boot from UART

---
 board/solidrun/clearfog/README | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
board/solidrun/clearfog/README +20 -0
index 2cfa5bfc8637..ef1e3bf42666 100644
@@ -16,3 +16,23 @@ $ sudo dd if=u-boot-spl.kwb of=/dev/sdX bs=512 seek=1
 
 Please use the correct device node for your setup instead
 of "/dev/sdX" here!
+
+Boot from UART:
+---------------
+
+Connect the on-board micro-USB (CF Pro: CON11, CF Base: CON5)
+to your host.
+
+Set the SW1 DIP switches to UART boot (0: OFF, 1: ON):
+
+  ClearFog Base: 01001
+  ClearFog Pro:  11110
+
+Run the following command to initiate U-Boot download:
+
+  ./tools/kwboot -b u-boot-spl.kwb /dev/ttyUSBX
+
+Use the correct UART device node for /dev/ttyUSBX.
+
+When download finishes start your favorite terminal emulator
+on /dev/ttyUSBX.
Signature · 1 line
2.14.1
#2 lore raw

PATCH v2 2/2 arm: mvebu: clearfog: document boot from UART

Quoted 4 lines · Baruch Siach
---
  board/solidrun/clearfog/README | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)

Applied to u-boot-marvell/master.

Thanks,
Stefan

#3 lore raw

PATCH v2 1/2 arm: mvebu: fix boot from UART on ClearFog Base

In reply to Baruch Siach
Quoted 4 lines · Baruch Siach

The ClearFog Base boot from UART when setting the DIP switches to 01001. Unfortunately, the SPL code sometimes fails to detect the UART boot method at run-time. Add an alternative SAR UART boot value to fix this.

Quoted 8 lines

Note that this alternative value is not documented (Armada 38x Hardware Specifications, Table 48). But experimentations showed it on the ClearFog Base.

---
v2: put BOOT_FROM_UART_ALT under #ifdef to avoid build break for other
mvebu variants

Applied to u-boot-marvell/master.

Thanks,
Stefan