From 394a3fc1a2f2ab0eb61dc32231cb94e8ed55e845 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 20 Nov 2020 13:17:46 +0100 Subject: [PATCH] ARM: meson: Temporary fix for OdroidC4 SD card reboot issue 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 Change-Id: I7333cc5b28817823fbc05a39162eb9e06b034a6f --- arch/arm/mach-meson/board-common.c | 9 +++++++++ configs/odroid-c4_defconfig | 2 ++ 2 files changed, 11 insertions(+) diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index a69bf52..a2bb0f9 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -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 diff --git a/configs/odroid-c4_defconfig b/configs/odroid-c4_defconfig index 3d1a254..76976f2 100644 --- a/configs/odroid-c4_defconfig +++ b/configs/odroid-c4_defconfig @@ -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 -- 2.7.4