summaryrefslogtreecommitdiff
path: root/include/power
diff options
context:
space:
mode:
authorChris Morgan <macromorgan@hotmail.com>2022-05-27 21:18:20 +0300
committerKever Yang <kever.yang@rock-chips.com>2022-06-29 06:42:10 +0300
commit30975fb73d51f65d95e9508e4af9c85badd5388c (patch)
tree4d2325fd71c45dd00d82c50d8fcb3f007f783ca5 /include/power
parentad607512f5757f4485968efd5bcf2c0245a8a235 (diff)
downloadu-boot-30975fb73d51f65d95e9508e4af9c85badd5388c.tar.xz
rockchip: Add option to prevent booting on power plug-in
For Rockchip boards with the all rk8xx series PMICs (excluding the rk808), it is sometimes desirable to not boot whenever the device is plugged in. An example would be for the Odroid Go Advance. This provides a configurable option to check the PMIC says it was powered because of a plug-in event. 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. This patch parallels the work done in the following patch series: https://lore.kernel.org/u-boot/20220121133732.2397273-1-andre.przywara@arm.com/ Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include/power')
-rw-r--r--include/power/rk8xx_pmic.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/power/rk8xx_pmic.h b/include/power/rk8xx_pmic.h
index 8ff0af35c5..3cbfc02195 100644
--- a/include/power/rk8xx_pmic.h
+++ b/include/power/rk8xx_pmic.h
@@ -214,6 +214,9 @@ enum {
#define RK817_ON_SOURCE 0xf5
#define RK817_OFF_SOURCE 0xf6
+#define RK8XX_ON_PWRON BIT(7)
+#define RK8XX_ON_PLUG_IN BIT(6)
+
struct reg_data {
u8 reg;
u8 val;