diff options
author | Chris Morgan <macromorgan@hotmail.com> | 2022-01-21 13:37:32 +0000 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2022-01-30 01:25:00 +0000 |
commit | 52bcc4f053bd25e3508887da01c9e8cddac49b2e (patch) | |
tree | bbb02dd3a127e2900821268dffaff1aad953a661 /arch/arm/mach-sunxi/Kconfig | |
parent | 78592c094e7a81cc099b3f71b05463ddcabe2a73 (diff) | |
download | u-boot-52bcc4f053bd25e3508887da01c9e8cddac49b2e.tar.gz |
sunxi: Add option to prevent booting on power plug-in
For sunxi boards with the AXP209, AXP221, AXP809, and AXP818 PMICs
(plus possibly others, I only confirmed the datasheets for these),
it is sometimes desirable to not boot whenever the device is
plugged in. An example would be when using the NTC CHIP inside a
PocketCHIP.
This provides a configurable option to check if bit 0 of
register 0 of the PMIC says it was powered because of a power button
press (0) or a plug-in event (1). If the value is 1 and this option
is selected, the device shuts down shortly after printing a message
to console stating the reason why it's shutting down. Powering up the
board with the power button is not affected.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
[Andre: reword to speak of boot, remove #ifdefs]
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'arch/arm/mach-sunxi/Kconfig')
-rw-r--r-- | arch/arm/mach-sunxi/Kconfig | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig index 2c18cf02d1..d7f9a03152 100644 --- a/arch/arm/mach-sunxi/Kconfig +++ b/arch/arm/mach-sunxi/Kconfig @@ -785,6 +785,16 @@ config AXP_GPIO ---help--- Say Y here to enable support for the gpio pins of the axp PMIC ICs. +config AXP_DISABLE_BOOT_ON_POWERON + bool "Disable device boot on power plug-in" + depends on AXP209_POWER || AXP221_POWER || AXP809_POWER || AXP818_POWER + default n + ---help--- + Say Y here to prevent the device from booting up because of a plug-in + event. When set, the device will boot into the SPL briefly to + determine why it was powered on, and if it was determined because of + a plug-in event instead of a button press event it will shut back off. + config VIDEO_SUNXI bool "Enable graphical uboot console on HDMI, LCD or VGA" depends on !MACH_SUN8I_A83T |