Skip to content

Commit 63ba020

Browse files
LeoCX-Tsaiamstan
authored andcommitted
fwk: dogwood: store force psu status to flashrom
store the force psu option status to flashrom then we can use this status to do chose 3A device condition BRANCH=fwk-dogwood-27111 BUG=https://app.clickup.com/t/86ev2xjqm TEST=into BIOS setup menu enable Force PSU on, reboot the EC(fully power off) check the status can read back status after EC on. Signed-off-by: LeoCX_Tsai <LeoCX_Tsai@compal.com>
1 parent 5892d68 commit 63ba020

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

zephyr/program/framework/include/flash_storage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ enum ec_flash_flags_idx {
1818
FLASH_FLAGS_ENABLE_GPU_MUX = 3,
1919
FLASH_FLAGS_ENABLE_GPU_DETECT = 4,
2020
FLASH_FLAGS_ENABLE_WOL = 5,
21+
FLASH_FLAGS_FORCE_PSU = 6,
2122
FLASH_FLAGS_MAX = 64
2223
};
2324

zephyr/program/framework/src/board_function.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ void bios_function_detect(void)
6767

6868
#ifndef CONFIG_PLATFORM_EC_FRAMEWORK_MINI_PC
6969
flash_storage_update(FLASH_FLAGS_STANDALONE, get_standalone_mode() ? 1 : 0);
70+
#else
71+
flash_storage_update(FLASH_FLAGS_FORCE_PSU, force_enable_psu);
7072
#endif
7173
#ifdef CONFIG_BOARD_LOTUS
7274
flash_storage_update(FLASH_FLAGS_INPUT_MODULE_POWER, get_detect_mode());
@@ -126,6 +128,9 @@ static void bios_function_init(void)
126128
#ifndef CONFIG_PLATFORM_EC_FRAMEWORK_MINI_PC
127129
if (flash_storage_get(FLASH_FLAGS_STANDALONE))
128130
set_standalone_mode(1);
131+
#else
132+
/* before sequence start need to read back psu status */
133+
force_enable_psu = flash_storage_get(FLASH_FLAGS_FORCE_PSU);
129134
#endif
130135
#ifdef CONFIG_BOARD_LOTUS
131136
set_detect_mode(flash_storage_get(FLASH_FLAGS_INPUT_MODULE_POWER));

0 commit comments

Comments
 (0)