mb/google/nissa/var/joxer: Configure descriptor for eMMC or UFS
Joxer will have both eMMC and UFS SKUs, which require different settings in the descriptor. So update the descriptor at run-time based on fw_config. By default, the descriptor is configured for UFS. This configuration still boots fine on eMMC SKUs, it just might cause problems with S0ix. This is a temporary workaround. It will be removed once we've implemented a proper solution for configuring the descriptor differently for different SKUs. BUG=b:238234376 TEST=Make an identical change for nivviks. On both nivviks (eMMC) and nirwen (UFS), check that it boots and that the logs show the descriptor being configured as expected. Change-Id: I14232eb773936f2ecd183687208d332136935601 Signed-off-by: Reka Norman <rekanorman@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/65870 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kangheui Won <khwon@chromium.org>
This commit is contained in:
parent
202f60b960
commit
1411ecf6f0
|
@ -254,6 +254,7 @@ config BOARD_GOOGLE_KULDAX
|
||||||
|
|
||||||
config BOARD_GOOGLE_JOXER
|
config BOARD_GOOGLE_JOXER
|
||||||
bool "-> Joxer"
|
bool "-> Joxer"
|
||||||
|
select ALDERLAKE_CONFIGURE_DESCRIPTOR
|
||||||
select BOARD_GOOGLE_BASEBOARD_NISSA
|
select BOARD_GOOGLE_BASEBOARD_NISSA
|
||||||
select DRIVERS_GENESYSLOGIC_GL9750
|
select DRIVERS_GENESYSLOGIC_GL9750
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0-only
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
bootblock-y += gpio.c
|
bootblock-y += gpio.c
|
||||||
|
bootblock-y += variant.c
|
||||||
|
|
||||||
romstage-y += gpio.c
|
romstage-y += gpio.c
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||||
|
|
||||||
|
#include <baseboard/variants.h>
|
||||||
|
#include <console/console.h>
|
||||||
|
#include <fw_config.h>
|
||||||
|
#include <soc/bootblock.h>
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TODO(b/229022567): This is a workaround which will be removed once we
|
||||||
|
* implement a proper solution for configuring the descriptor differently for
|
||||||
|
* different SKUs.
|
||||||
|
*/
|
||||||
|
void variant_update_descriptor(void)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* UfsCont1Config = "Disabled"
|
||||||
|
* IshSupported = "No"
|
||||||
|
*/
|
||||||
|
struct descriptor_byte emmc_bytes[] = {
|
||||||
|
{ 0x1f8, 0x55 },
|
||||||
|
{ 0x1f9, 0x55 },
|
||||||
|
{ 0xc18, 0x89 },
|
||||||
|
{ 0xc1d, 0xb8 },
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* UfsCont1Config = "X2"
|
||||||
|
* IshSupported = "Yes"
|
||||||
|
*/
|
||||||
|
struct descriptor_byte ufs_bytes[] = {
|
||||||
|
{ 0x1f8, 0x95 },
|
||||||
|
{ 0x1f9, 0x59 },
|
||||||
|
{ 0xc18, 0x09 },
|
||||||
|
{ 0xc1d, 0x28 },
|
||||||
|
};
|
||||||
|
|
||||||
|
if (fw_config_probe(FW_CONFIG(STORAGE, STORAGE_UFS))) {
|
||||||
|
printk(BIOS_INFO, "Configuring descriptor for UFS\n");
|
||||||
|
configure_descriptor(ufs_bytes, ARRAY_SIZE(ufs_bytes));
|
||||||
|
} else {
|
||||||
|
printk(BIOS_INFO, "Configuring descriptor for eMMC\n");
|
||||||
|
configure_descriptor(emmc_bytes, ARRAY_SIZE(emmc_bytes));
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue