ARM: meson: Temporary fix for OdroidC4 SD card reboot issue 05/248105/2
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 20 Nov 2020 12:17:46 +0000 (13:17 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 20 Nov 2020 14:08:35 +0000 (15:08 +0100)
For the proper reboot OdroidC4 requires to switch TFLASH_VDD_EN pin to
the input (high impedance?) mode. This should be handled by the proper
reset driver, but until then implement this logic in the common code.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I7333cc5b28817823fbc05a39162eb9e06b034a6f

arch/arm/mach-meson/board-common.c
configs/odroid-c4_defconfig

index a69bf52..a2bb0f9 100644 (file)
@@ -11,6 +11,7 @@
 #include <asm/arch/boot.h>
 #include <env.h>
 #include <asm/cache.h>
+#include <asm/gpio.h>
 #include <asm/ptrace.h>
 #include <linux/libfdt.h>
 #include <linux/err.h>
@@ -194,6 +195,14 @@ void reset_cpu(ulong addr)
 #else
 void reset_cpu(ulong addr)
 {
+#ifdef CONFIG_TIZEN_ODROID_C4
+       unsigned int gpio;
+       const char *str_gpio = "aobus-banks3";
+
+       gpio_lookup_name(str_gpio, NULL, NULL, &gpio);
+       gpio_request(gpio, "reboot");
+       gpio_direction_input(gpio);
+#endif
        psci_system_reset();
 }
 #endif
index 3d1a254..76976f2 100644 (file)
@@ -1,5 +1,6 @@
 CONFIG_ARM=y
 CONFIG_SYS_BOARD="odroid-n2"
+CONFIG_ARM_SMCCC=y
 CONFIG_ARCH_MESON=y
 CONFIG_SYS_TEXT_BASE=0x01000000
 CONFIG_NR_DRAM_BANKS=1
@@ -10,6 +11,7 @@ CONFIG_TIZEN_ODROID_C4=y
 CONFIG_DEBUG_UART_BASE=0xff803000
 CONFIG_DEBUG_UART_CLOCK=24000000
 CONFIG_IDENT_STRING=" odroid-c4"
+# CONFIG_PSCI_RESET is not set
 CONFIG_DEFAULT_DEVICE_TREE="meson-sm1-odroid-c4"
 CONFIG_DEBUG_UART=y
 CONFIG_OF_BOARD_SETUP=y