mb/google/volteer: do UART pad config at board-level
UART pad configuration should not be done in common code, because that may cause short circuits, when the user sets a wrong UART index. Thus, add the corresponding pads to the early UART gpio table for the board as a first step. Common UART pad config code then gets dropped in CB:48829. Also switch to `bootblock_mainboard_early_init` to configure the pads in early bootblock before console initialization, to make the console work as early as possible. The board does not do any other gpio configuration in bootblock, so this should not influence behaviour in a negative way (e.g. breaking overrides). Change-Id: I5e07584d7857052c7a9388331a475f5a073af038 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49425 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
parent
e31bfef2b0
commit
cf2f7005f6
15 changed files with 70 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
#include <baseboard/variants.h>
|
||||
#include <bootblock_common.h>
|
||||
|
||||
void bootblock_mainboard_init(void)
|
||||
void bootblock_mainboard_early_init(void)
|
||||
{
|
||||
const struct pad_config *pads;
|
||||
size_t num;
|
||||
|
|
|
@ -398,6 +398,11 @@ static const struct pad_config gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -125,6 +125,11 @@ static const struct pad_config override_gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -164,6 +164,11 @@ static const struct pad_config override_gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -178,6 +178,11 @@ static const struct pad_config override_gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -196,6 +196,11 @@ const struct pad_config *variant_override_gpio_table(size_t *num)
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -107,6 +107,11 @@ static const struct pad_config override_gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -153,6 +153,11 @@ static const struct pad_config gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -187,6 +187,11 @@ const struct pad_config *variant_override_gpio_table(size_t *num)
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -195,6 +195,11 @@ const struct pad_config *variant_override_gpio_table(size_t *num)
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -17,7 +17,10 @@ const struct pad_config *variant_base_gpio_table(size_t *num)
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
};
|
||||
|
||||
const struct pad_config *variant_early_gpio_table(size_t *num)
|
||||
|
|
|
@ -185,6 +185,11 @@ const struct pad_config *variant_override_gpio_table(size_t *num)
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -208,6 +208,11 @@ static const struct pad_config override_gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -210,6 +210,11 @@ static const struct pad_config override_gpio_table[] = {
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
|
@ -237,6 +237,11 @@ const struct pad_config *variant_override_gpio_table(size_t *num)
|
|||
|
||||
/* Early pad configuration in bootblock */
|
||||
static const struct pad_config early_gpio_table[] = {
|
||||
/* C8 : UART0 RX */
|
||||
PAD_CFG_NF(GPP_C8, NONE, DEEP, NF1),
|
||||
/* C9 : UART0 TX */
|
||||
PAD_CFG_NF(GPP_C9, NONE, DEEP, NF1),
|
||||
|
||||
/* A12 : SATAXPCIE1 ==> M2_SSD_PEDET */
|
||||
PAD_CFG_NF(GPP_A12, NONE, DEEP, NF1),
|
||||
/* A13 : PMC_I2C_SCL ==> BT_DISABLE_L */
|
||||
|
|
Loading…
Reference in a new issue