mb/intel/minnow3: do UART pad configuration 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: I0b956427a9cec56d06b03f7f05138f75137b4ea3 Signed-off-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49437 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
3840bcc19e
commit
f6d320060d
|
@ -1,14 +1,15 @@
|
||||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||||
|
|
||||||
#include <bootblock_common.h>
|
#include <bootblock_common.h>
|
||||||
|
#include <soc/gpio.h>
|
||||||
|
|
||||||
#include "gpio.h"
|
#include "gpio.h"
|
||||||
|
|
||||||
void bootblock_mainboard_init(void)
|
void bootblock_mainboard_early_init(void)
|
||||||
{
|
{
|
||||||
const struct pad_config *pads;
|
const struct pad_config *pads;
|
||||||
size_t num;
|
size_t num;
|
||||||
|
|
||||||
/* Configure GPIOs needed prior to ramstage. */
|
|
||||||
pads = early_gpio_table(&num);
|
pads = early_gpio_table(&num);
|
||||||
gpio_configure_pads(pads, num);
|
gpio_configure_pads(pads, num);
|
||||||
}
|
}
|
||||||
|
|
|
@ -279,6 +279,9 @@ const struct pad_config *gpio_table(size_t *num)
|
||||||
|
|
||||||
/* GPIOs needed prior to ramstage. */
|
/* GPIOs needed prior to ramstage. */
|
||||||
static const struct pad_config early_gpio_table_config[] = {
|
static const struct pad_config early_gpio_table_config[] = {
|
||||||
|
PAD_CFG_NF(GPIO_46, UP_20K, DEEP, NF1), /* LPSS_UART2_RXD */
|
||||||
|
PAD_CFG_NF(GPIO_47, UP_20K, DEEP, NF1), /* LPSS_UART2_TXD */
|
||||||
|
|
||||||
PAD_CFG_NF(GPIO_134, UP_20K, DEEP, NF2), /* ISH_I2C0_SDA/IO-OD */
|
PAD_CFG_NF(GPIO_134, UP_20K, DEEP, NF2), /* ISH_I2C0_SDA/IO-OD */
|
||||||
PAD_CFG_NF(GPIO_135, UP_20K, DEEP, NF2), /* ISH_I2C0_SCL/IO-OD */
|
PAD_CFG_NF(GPIO_135, UP_20K, DEEP, NF2), /* ISH_I2C0_SCL/IO-OD */
|
||||||
PAD_CFG_NF(GPIO_136, UP_20K, DEEP, NF2), /* ISH_I2C1_SDA/IO-OD */
|
PAD_CFG_NF(GPIO_136, UP_20K, DEEP, NF2), /* ISH_I2C1_SDA/IO-OD */
|
||||||
|
|
Loading…
Reference in New Issue