mb/google/octopus: do LPC/eSPI pad configuration at board-level

Do LPC/eSPI pad configuration at board-level to match other platforms by
adding an appropriate early gpio table in the bootblock.

The soc code gets dropped in CB:49410.

Change-Id: Ie33bae481f430a1c4410a0a4e2b2a34a3e78adaa
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49411
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Michael Niewöhner 2020-12-21 17:09:08 +01:00
parent 8b0636e06f
commit 732e9e6382
3 changed files with 13 additions and 2 deletions

View File

@ -3,7 +3,6 @@
#include <baseboard/variants.h> #include <baseboard/variants.h>
#include <bootblock_common.h> #include <bootblock_common.h>
#include <ec/ec.h> #include <ec/ec.h>
#include <intelblocks/lpc_lib.h>
#include <soc/gpio.h> #include <soc/gpio.h>
void bootblock_mainboard_init(void) void bootblock_mainboard_init(void)
@ -11,7 +10,8 @@ void bootblock_mainboard_init(void)
const struct pad_config *pads, *override_pads; const struct pad_config *pads, *override_pads;
size_t num, override_num; size_t num, override_num;
lpc_configure_pads(); pads = mainboard_early_bootblock_gpio_table(&num);
gpio_configure_pads(pads, num);
/* /*
* Perform EC init before configuring GPIOs. This is because variant * Perform EC init before configuring GPIOs. This is because variant

View File

@ -292,6 +292,16 @@ const struct pad_config *__weak variant_early_override_gpio_table(size_t *num)
return NULL; return NULL;
} }
static const struct pad_config early_bootblock_gpio_table[] = {
PAD_NC(GPIO_154, NONE), /* LPC_CLKRUNB -- NC for eSPI */
};
const struct pad_config *mainboard_early_bootblock_gpio_table(size_t *num)
{
*num = ARRAY_SIZE(early_bootblock_gpio_table);
return early_bootblock_gpio_table;
}
/* GPIOs needed prior to ramstage. */ /* GPIOs needed prior to ramstage. */
static const struct pad_config early_gpio_table[] = { static const struct pad_config early_gpio_table[] = {
PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */ PAD_CFG_GPI(GPIO_190, NONE, DEEP), /* PCH_WP_OD */

View File

@ -10,6 +10,7 @@
/* The next set of functions return the gpio table and fill in the number of /* The next set of functions return the gpio table and fill in the number of
* entries for each table. */ * entries for each table. */
const struct pad_config *mainboard_early_bootblock_gpio_table(size_t *num);
const struct pad_config *variant_base_gpio_table(size_t *num); const struct pad_config *variant_base_gpio_table(size_t *num);
const struct pad_config *variant_override_gpio_table(size_t *num); const struct pad_config *variant_override_gpio_table(size_t *num);
const struct pad_config *variant_early_gpio_table(size_t *num); const struct pad_config *variant_early_gpio_table(size_t *num);