soc/intel/apollolake: Make SATA speed limit configurable

In cases where there are limitations on the mainboard it can be
necessary to limit the used SATA speed even though both, the SATA
controller and disk drive support a higher speed rate. The FSP parameter
'SpeedLimit' allows to set the speed limit.

It should be noted that Gen 3 equals the default value '0'. This means
that inside FSP the same code is executed.

This patch provides a chip config so that this FSP parameter can be
set as needed in the devicetree on mainboard level.

Change-Id: I9c3eda0649546e3a40eb24a015b7c6efd8f90e0f
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75364
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Mario Scheithauer 2023-05-22 14:44:27 +02:00 committed by Felix Held
parent 385f4bb965
commit f165bbdcf0
2 changed files with 11 additions and 0 deletions

View File

@ -736,6 +736,7 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *silupd)
/* SATA config */
if (is_devfn_enabled(PCH_DEVFN_SATA)) {
silconfig->SataSalpSupport = !(cfg->DisableSataSalpSupport);
silconfig->SpeedLimit = cfg->sata_speed;
memcpy(silconfig->SataPortsEnable, cfg->SataPortsEnable,
sizeof(silconfig->SataPortsEnable));
}

View File

@ -25,6 +25,13 @@ enum pnp_settings {
PNP_PERF_POWER,
};
enum sata_speed_limit {
SATA_DEFAULT = 0,
SATA_GEN1,
SATA_GEN2,
SATA_GEN3
};
struct soc_intel_apollolake_config {
/* Common structure containing soc config data required by common code*/
@ -215,6 +222,9 @@ struct soc_intel_apollolake_config {
/* Sata Power Optimisation */
uint8_t SataPwrOptimizeDisable;
/* SATA speed limit */
enum sata_speed_limit sata_speed;
};
typedef struct soc_intel_apollolake_config config_t;