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>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user