Revert "ec/starlabs/merlin: Add support for enabling the mirror flag"
This reverts commit b42ca4d0b2
.
Reason for revert: The mirror flag "0x01" is mirror once, which
relies on the EC remembering that it's been mirrored. However, the
EC forgets this if it's been without power for 20 minutes or so.
Even if power is connected then, it'll instantly try to mirror and
it can't charge whilst doing it. It can either result in
incomplete EC firmware, or a loop where it's constantly trying to
mirror.
Change-Id: I79da9143cc63459e7e29431eff2cb14200424b37
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72678
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
parent
132fb3cc52
commit
2285b72d06
|
@ -64,13 +64,6 @@ config EC_STARLABS_MAX_CHARGE
|
|||
help
|
||||
Select if the mainboard supports limiting the maximum charge of the battery.
|
||||
|
||||
config EC_STARLABS_MIRROR_FLAG
|
||||
bool
|
||||
default n
|
||||
depends on EC_STARLABS_ITE
|
||||
help
|
||||
Select if the EC should mirror the EC firmware contained in the coreboot ROM.
|
||||
|
||||
config EC_STARLABS_MERLIN
|
||||
bool "Use open-source Merlin EC Firmware"
|
||||
default n
|
||||
|
|
|
@ -98,10 +98,6 @@
|
|||
#define KBL_DISABLED 0x00
|
||||
#define KBL_ENABLED 0xdd
|
||||
|
||||
/* Mirror Flag */
|
||||
#define MIRROR_DISABLED 0x00
|
||||
#define MIRROR_ENABLED 0x01
|
||||
|
||||
uint16_t ec_get_version(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -70,7 +70,6 @@ static void merlin_init(struct device *dev)
|
|||
* trackpad_state
|
||||
* kbl_brightness
|
||||
* kbl_state
|
||||
* mirror_flag
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -248,25 +247,6 @@ static void merlin_init(struct device *dev)
|
|||
1,
|
||||
kbl_state,
|
||||
ARRAY_SIZE(kbl_state)));
|
||||
|
||||
/*
|
||||
* Mirror Flag
|
||||
*
|
||||
* Setting: mirror_flag
|
||||
*
|
||||
* Values: Off, On
|
||||
* Default: On
|
||||
*/
|
||||
const uint8_t mirror_flag[] = {
|
||||
MIRROR_DISABLED,
|
||||
MIRROR_ENABLED
|
||||
};
|
||||
if (CONFIG(EC_STARLABS_MIRROR_FLAG))
|
||||
ec_write(ECRAM_MIRROR_FLAG,
|
||||
get_ec_value_from_option("mirror_flag",
|
||||
1,
|
||||
mirror_flag,
|
||||
ARRAY_SIZE(mirror_flag)));
|
||||
}
|
||||
|
||||
static struct device_operations ops = {
|
||||
|
|
|
@ -23,5 +23,5 @@
|
|||
#define ECRAM_MAX_CHARGE 0x1a
|
||||
#define ECRAM_FAN_MODE 0x1b
|
||||
#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_MIRROR_FLAG 0x05
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
#define ECRAM_MAX_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_FAN_MODE dead_code_t(uint8_t)
|
||||
#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_MIRROR_FLAG 0x04
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
#define ECRAM_KBL_BRIGHTNESS 0x36
|
||||
#define ECRAM_FN_LOCK_STATE 0x70
|
||||
#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_MIRROR_FLAG 0x05
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
#define ECRAM_KBL_BRIGHTNESS 0x19
|
||||
#define ECRAM_FN_LOCK_STATE 0x2c
|
||||
#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_MIRROR_FLAG 0x04
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
#define ECRAM_MAX_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_FAN_MODE dead_code_t(uint8_t)
|
||||
#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_MIRROR_FLAG 0x04
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
#define ECRAM_MAX_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_FAN_MODE dead_code_t(uint8_t)
|
||||
#define ECRAM_FAST_CHARGE 0x18
|
||||
#define ECRAM_MIRROR_FLAG dead_code_t(uint8_t)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
#define ECRAM_FN_CTRL_REVERSE 0x43
|
||||
#define ECRAM_MAX_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_MIRROR_FLAG 0x04
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,6 +20,5 @@
|
|||
#define ECRAM_FAN_MODE 0x50
|
||||
#define ECRAM_MAX_CHARGE 0x51
|
||||
#define ECRAM_FAST_CHARGE 0x52
|
||||
#define ECRAM_MIRROR_FLAG 0x05
|
||||
|
||||
#endif
|
||||
|
|
|
@ -23,6 +23,5 @@
|
|||
#define ECRAM_MAX_CHARGE 0x1a
|
||||
#define ECRAM_FAN_MODE 0x1b
|
||||
#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
|
||||
#define ECRAM_MIRROR_FLAG 0x05
|
||||
|
||||
#endif
|
||||
|
|
|
@ -58,7 +58,6 @@ config BOARD_STARLABS_STARBOOK_ADL
|
|||
select DRIVERS_INTEL_PMC
|
||||
select EC_STARLABS_KBL_LEVELS
|
||||
select EC_STARLABS_MAX_CHARGE
|
||||
select EC_STARLABS_MIRROR_FLAG
|
||||
select EC_STARLABS_NEED_ITE_BIN
|
||||
select MEMORY_MAPPED_TPM
|
||||
select SOC_INTEL_ALDERLAKE
|
||||
|
|
Loading…
Reference in New Issue