diff options
author | Mary Ruthven <mruthven@chromium.org> | 2021-01-05 18:03:07 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-29 21:11:08 +0000 |
commit | e744e0e4721066b55d23adf3908009ecb6296c97 (patch) | |
tree | c57060050658dc17703eed1cce9132d4e0e00a23 | |
parent | bb423686b6daaf3a2fe8cf59cc1a8b2376c8fc96 (diff) | |
download | chrome-ec-e744e0e4721066b55d23adf3908009ecb6296c97.tar.gz |
coil: brdprop BOARD_SLAVE->BOARD_PERIPH
BUG=b:175244613
TEST=make buildall -j
Change-Id: I6743d715ff9b2b46aad212d8496b1314e89fa685
Signed-off-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2613455
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
(cherry picked from commit 1f788361bd6bba87bdd2c2c5c57abc1e775527c2)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3003953
Reviewed-by: Andrey Pronin <apronin@chromium.org>
(cherry picked from commit 7277456a4bb338c441b621c773b3f68a8a707355)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3059148
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
-rw-r--r-- | board/cr50/board.c | 34 | ||||
-rw-r--r-- | board/cr50/board.h | 4 | ||||
-rw-r--r-- | board/cr50/scratch_reg1.h | 8 |
3 files changed, 23 insertions, 23 deletions
diff --git a/board/cr50/board.c b/board/cr50/board.c index b7099effc0..baf79cf354 100644 --- a/board/cr50/board.c +++ b/board/cr50/board.c @@ -154,12 +154,12 @@ int board_rst_pullup_needed(void) int board_tpm_uses_i2c(void) { - return !!(board_properties & BOARD_SLAVE_CONFIG_I2C); + return !!(board_properties & BOARD_PERIPH_CONFIG_I2C); } int board_tpm_uses_spi(void) { - return !!(board_properties & BOARD_SLAVE_CONFIG_SPI); + return !!(board_properties & BOARD_PERIPH_CONFIG_SPI); } int board_uses_closed_source_set1(void) @@ -276,58 +276,58 @@ const struct strap_desc strap_regs[] = { "a12"}, }; -#define BOARD_PROPERTIES_DEFAULT (BOARD_SLAVE_CONFIG_I2C | BOARD_USE_PLT_RESET) +#define BOARD_PROPERTIES_DEFAULT (BOARD_PERIPH_CONFIG_I2C | BOARD_USE_PLT_RESET) static struct board_cfg board_cfg_table[] = { /* SPI Variants: DIOA12 = 1M PD, DIOA6 = 1M PD */ /* Kevin/Gru: DI0A9 = 5k PD, DIOA1 = 1M PU */ { .strap_cfg = 0x02, - .board_properties = BOARD_SLAVE_CONFIG_SPI | + .board_properties = BOARD_PERIPH_CONFIG_SPI | BOARD_NEEDS_SYS_RST_PULL_UP, }, /* Asurada: DI0A9 = 5k PD, DIOA1 = 5k PU */ { .strap_cfg = 0x03, - .board_properties = BOARD_SLAVE_CONFIG_SPI | + .board_properties = BOARD_PERIPH_CONFIG_SPI | BOARD_NEEDS_SYS_RST_PULL_UP | BOARD_CCD_REC_LID_PIN_DIOA1, }, /* Poppy: DI0A9 = 1M PU, DIOA1 = 1M PU */ { .strap_cfg = 0x0A, - .board_properties = BOARD_SLAVE_CONFIG_SPI | + .board_properties = BOARD_PERIPH_CONFIG_SPI | BOARD_USE_PLT_RESET, }, /* Mistral: DI0A9 = 1M PU, DIOA1 = 5k PU */ { .strap_cfg = 0x0B, - .board_properties = BOARD_SLAVE_CONFIG_SPI | + .board_properties = BOARD_PERIPH_CONFIG_SPI | BOARD_USE_PLT_RESET | BOARD_NO_INA_SUPPORT | BOARD_CLOSED_LOOP_RESET, }, /* Kukui: DI0A9 = 5k PU, DIOA1 = 5k PU */ { .strap_cfg = 0x0F, - .board_properties = BOARD_SLAVE_CONFIG_SPI | + .board_properties = BOARD_PERIPH_CONFIG_SPI | BOARD_USE_PLT_RESET, }, /* I2C Variants: DIOA9 = 1M PD, DIOA1 = 1M PD */ /* Reef/Eve: DIOA12 = 5k PD, DIOA6 = 1M PU */ { .strap_cfg = 0x20, - .board_properties = BOARD_SLAVE_CONFIG_I2C | + .board_properties = BOARD_PERIPH_CONFIG_I2C | BOARD_USE_PLT_RESET, }, /* Rowan: DIOA12 = 5k PD, DIOA6 = 5k PU */ { .strap_cfg = 0x30, - .board_properties = BOARD_SLAVE_CONFIG_I2C | + .board_properties = BOARD_PERIPH_CONFIG_I2C | BOARD_DEEP_SLEEP_DISABLED | BOARD_DETECT_AP_WITH_UART, }, /* Sarien/Arcada: DIOA12 = 1M PD, DIOA6 = 5k PU */ { .strap_cfg = 0x70, - .board_properties = BOARD_SLAVE_CONFIG_I2C | + .board_properties = BOARD_PERIPH_CONFIG_I2C | BOARD_USE_PLT_RESET | BOARD_WP_DISABLE_DELAY | BOARD_CLOSED_SOURCE_SET1 | BOARD_NO_INA_SUPPORT | BOARD_ALLOW_CHANGE_TPM_MODE, @@ -335,14 +335,14 @@ static struct board_cfg board_cfg_table[] = { /* Dedede/Puff/Volteer: DIOA9 = 5K PU, DIOA1 = 1M PU */ { .strap_cfg = 0x0E, - .board_properties = BOARD_SLAVE_CONFIG_SPI | + .board_properties = BOARD_PERIPH_CONFIG_SPI | BOARD_USE_PLT_RESET | BOARD_EC_CR50_COMM_SUPPORT | BOARD_CCD_REC_LID_PIN_DIOA9, }, /* Zork: DIOA12 = 5K PU, DIOA6 = 1M PU */ { .strap_cfg = 0xE0, - .board_properties = BOARD_SLAVE_CONFIG_I2C | + .board_properties = BOARD_PERIPH_CONFIG_I2C | BOARD_USE_PLT_RESET | BOARD_EC_CR50_COMM_SUPPORT, }, }; @@ -1440,9 +1440,9 @@ static int get_strap_config(uint8_t *config) */ if (use_i2c && use_spi) { spi_prop = (GREG32(PMU, LONG_LIFE_SCRATCH1) & - BOARD_SLAVE_CONFIG_SPI); + BOARD_PERIPH_CONFIG_SPI); i2c_prop = (GREG32(PMU, LONG_LIFE_SCRATCH1) & - BOARD_SLAVE_CONFIG_I2C); + BOARD_PERIPH_CONFIG_I2C); /* Make sure exactly one interface is selected */ if ((i2c_prop && spi_prop) || (!spi_prop && !i2c_prop)) return EC_ERROR_INVAL; @@ -1465,7 +1465,7 @@ static uint32_t get_properties(void) #ifdef H1_RED_BOARD CPRINTS("Unconditionally enabling SPI and platform reset"); - return (BOARD_SLAVE_CONFIG_SPI | BOARD_USE_PLT_RESET); + return (BOARD_PERIPH_CONFIG_SPI | BOARD_USE_PLT_RESET); #endif if (get_strap_config(&config) != EC_SUCCESS) { /* @@ -1495,7 +1495,7 @@ static uint32_t get_properties(void) * get_strap_config() returned EC_SUCCESS. */ if (config & 0xa) { - properties = BOARD_SLAVE_CONFIG_SPI; + properties = BOARD_PERIPH_CONFIG_SPI; /* * Determine PLT_RST_L vs SYS_RST_L. Any board with a pullup on * DIOA9 uses PLT_RST_L. diff --git a/board/cr50/board.h b/board/cr50/board.h index 2df5d17a3a..04f8b65835 100644 --- a/board/cr50/board.h +++ b/board/cr50/board.h @@ -288,13 +288,13 @@ int board_use_plt_rst(void); */ int board_rst_pullup_needed(void); /** - * Return the state of the BOARD_SLAVE_CONFIG_I2C board strap option. + * Return the state of the BOARD_PERIPH_CONFIG_I2C board strap option. * * @return 0 if option is not set, !=0 if option set. */ int board_tpm_uses_i2c(void); /** - * Return the state of the BOARD_SLAVE_CONFIG_SPI board strap option. + * Return the state of the BOARD_PERIPH_CONFIG_SPI board strap option. * * @return 0 if option is not set, !=0 if option set. */ diff --git a/board/cr50/scratch_reg1.h b/board/cr50/scratch_reg1.h index 73b2fffb0c..0e5b081bb4 100644 --- a/board/cr50/scratch_reg1.h +++ b/board/cr50/scratch_reg1.h @@ -11,8 +11,8 @@ * Bit assignments of the LONG_LIFE_SCRATCH1 register. This register survives * all kinds of resets, it is cleared only on the Power ON event. */ -#define BOARD_SLAVE_CONFIG_SPI BIT(0) /* TPM uses SPI interface */ -#define BOARD_SLAVE_CONFIG_I2C BIT(1) /* TPM uses I2C interface */ +#define BOARD_PERIPH_CONFIG_SPI BIT(0) /* TPM uses SPI interface */ +#define BOARD_PERIPH_CONFIG_I2C BIT(1) /* TPM uses I2C interface */ /* * The gaps are left to ensure backwards compatibility with the earliest cr50 @@ -120,8 +120,8 @@ BOARD_EC_CR50_COMM_SUPPORT | \ BOARD_NEEDS_SYS_RST_PULL_UP | \ BOARD_NO_INA_SUPPORT | \ - BOARD_SLAVE_CONFIG_I2C | \ - BOARD_SLAVE_CONFIG_SPI | \ + BOARD_PERIPH_CONFIG_I2C | \ + BOARD_PERIPH_CONFIG_SPI | \ BOARD_USE_PLT_RESET | \ BOARD_WP_DISABLE_DELAY) |