diff options
author | Marek BehĂșn | 2019-05-02 16:53:37 +0200 |
---|---|---|
committer | Stefan Roese | 2019-05-03 08:14:39 +0200 |
commit | 539f0242f3c6398fe13cbbd584c23dc6cfb4ba04 (patch) | |
tree | 4992589968a333a2bf5b47a1d49ec7331678656d /arch/arm | |
parent | 2151926b0886c17338cd7cba22ffb6dec65c5867 (diff) |
arm: mvebu: turris_omnia: add RESET button handling
There is a Factory RESET button on the back side of the Turris Omnia
router. When user presses this button before powering the device up and
keeps it pressed, the microcontroller prevents the main CPU from booting
and counts how long the RESET button is being pressed (and indicates
this by lighting up front LEDs).
The idea behind this is that the user can boot the device into several
Factory RESET modes.
This patch adds support for U-Boot to read into which Factory RESET mode
the user booted the device. The value is an integer stored into the
omnia_reset environment variable. It is 0 if the button was not pressed
at all during power up, otherwise it is the number identifying the
Factory RESET mode.
This patch also changes bootcmd to a special hardcoded value if Factory
RESET button was pressed during device powerup. This special bootcmd
value sets the colors of all the LEDs on the front panel to green and
then tries to load the rescue image from the SPI flash memory and boot
it.
Signed-off-by: Marek BehĂșn <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-mvebu/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig index fc29c3b084b..a832e1dc8c9 100644 --- a/arch/arm/mach-mvebu/Kconfig +++ b/arch/arm/mach-mvebu/Kconfig @@ -116,6 +116,7 @@ config TARGET_DB_88F6820_AMC config TARGET_TURRIS_OMNIA bool "Support Turris Omnia" select 88F6820 + select BOARD_LATE_INIT select DM_I2C select I2C_MUX select I2C_MUX_PCA954x |