From 9203b2b7d069d074a85a171f7b84de7552a0d4e9 Mon Sep 17 00:00:00 2001 From: Keith Short Date: Tue, 3 Aug 2021 12:29:48 -0600 Subject: COIL: Update SPI references to controller/peripheral Update SPI references to controller/peripheral for inclusivity. BUG=b:163885307 BRANCH=none TEST=compare_build.sh Signed-off-by: Keith Short Change-Id: I19b02fb949aad9ade569c4658a904e9ce59e27c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3066272 Reviewed-by: Tom Hughes Reviewed-by: Jack Rosenthal Tested-by: Tom Hughes --- baseboard/kukui/emmc_ite.c | 2 +- board/burnet/board.h | 2 +- board/cerise/board.h | 2 +- board/coffeecake/board.h | 2 +- board/damu/board.h | 2 +- board/discovery-stm32f072/board.h | 2 +- board/elm/board.h | 2 +- board/fennel/board.h | 2 +- board/hatch_fp/board_rw.c | 4 +++- board/hoho/board.h | 2 +- board/jacuzzi/board.h | 2 +- board/makomo/board.h | 2 +- board/munna/board.c | 2 +- board/munna/board.h | 2 +- board/nocturne_fp/board_rw.c | 6 ++++-- board/nucleo-dartmonkey/board.c | 6 ++++-- board/nucleo-f412zg/board.c | 2 +- board/nucleo-h743zi/board.c | 2 +- board/oak/board.h | 2 +- board/rainier/board.h | 2 +- board/scarlet/board.h | 2 +- board/servo_micro/board.h | 2 +- board/stern/board.h | 2 +- board/willow/board.h | 2 +- zephyr/drivers/cros_shi/cros_shi_it8xxx2.c | 12 ++++++------ zephyr/dts/bindings/motionsense/driver/bmi160.yaml | 2 +- zephyr/dts/bindings/motionsense/driver/cros-ec,bma255.yaml | 2 +- zephyr/dts/bindings/motionsense/driver/cros-ec,kx022.yaml | 2 +- zephyr/dts/bindings/motionsense/driver/tcs3400.yaml | 2 +- 29 files changed, 42 insertions(+), 36 deletions(-) diff --git a/baseboard/kukui/emmc_ite.c b/baseboard/kukui/emmc_ite.c index 8c3e63064c..b0e1f6b3de 100644 --- a/baseboard/kukui/emmc_ite.c +++ b/baseboard/kukui/emmc_ite.c @@ -101,7 +101,7 @@ static void emmc_send_data_over_spi(uint8_t *tx, int tx_size, int rst_tx) IT83XX_SPI_CPUWTFDB0 = *(uint32_t *)(tx + i); /* * After writing data to TX FIFO is finished, this bit will - * be to indicate the SPI slave controller. + * be to indicate the SPI peripheral controller. */ IT83XX_SPI_TXFCR = IT83XX_SPI_TXFS; /* End CPU access TX FIFO */ diff --git a/board/burnet/board.h b/board/burnet/board.h index 3f92864907..f59d3d5972 100644 --- a/board/burnet/board.h +++ b/board/burnet/board.h @@ -89,7 +89,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/cerise/board.h b/board/cerise/board.h index 5cf8c06f01..ce2b692ae8 100644 --- a/board/cerise/board.h +++ b/board/cerise/board.h @@ -86,7 +86,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/coffeecake/board.h b/board/coffeecake/board.h index d655466a14..cabbb0bf4e 100644 --- a/board/coffeecake/board.h +++ b/board/coffeecake/board.h @@ -32,7 +32,7 @@ #define CONFIG_RWSIG #define CONFIG_RWSIG_TYPE_USBPD1 #define CONFIG_SHA256 -/* TODO(tbroch) Re-enable once STM spi master can be inhibited at boot so it +/* TODO(tbroch) Re-enable once STM spi controller can be inhibited at boot so it doesn't interfere with HDMI loading its f/w */ #undef CONFIG_SPI_FLASH #define CONFIG_SPI_CS_GPIO GPIO_PD_MCDP_SPI_CS_L diff --git a/board/damu/board.h b/board/damu/board.h index 6df8bb2a7a..f127df251f 100644 --- a/board/damu/board.h +++ b/board/damu/board.h @@ -85,7 +85,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/discovery-stm32f072/board.h b/board/discovery-stm32f072/board.h index d3f51f6691..78d1b25b47 100644 --- a/board/discovery-stm32f072/board.h +++ b/board/discovery-stm32f072/board.h @@ -51,7 +51,7 @@ /* Enable control of SPI over USB */ #define CONFIG_SPI_CONTROLLER -#define CONFIG_SPI_FLASH_PORT 0 /* First SPI master port */ +#define CONFIG_SPI_FLASH_PORT 0 /* First SPI controller port */ #define CONFIG_USB_SPI diff --git a/board/elm/board.h b/board/elm/board.h index 319241642c..d5d28bcd1b 100644 --- a/board/elm/board.h +++ b/board/elm/board.h @@ -170,7 +170,7 @@ #define I2C_PORT_TCPC 1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* First SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* First SPI controller port (SPI2) */ /* Timer selection */ #define TIM_CLOCK32 2 diff --git a/board/fennel/board.h b/board/fennel/board.h index 697480770c..dc73b2e132 100644 --- a/board/fennel/board.h +++ b/board/fennel/board.h @@ -91,7 +91,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/hatch_fp/board_rw.c b/board/hatch_fp/board_rw.c index 4c83c8723c..00a6b89b19 100644 --- a/board/hatch_fp/board_rw.c +++ b/board/hatch_fp/board_rw.c @@ -35,7 +35,9 @@ static void configure_fp_sensor_spi(void) /* Configure SPI GPIOs */ gpio_config_module(MODULE_SPI_CONTROLLER, 1); - /* Set all SPI master signal pins to very high speed: B12/13/14/15 */ + /* Set all SPI controller signal pins to very high speed: + * B12/13/14/15 + */ STM32_GPIO_OSPEEDR(GPIO_B) |= 0xff000000; /* Enable clocks to SPI2 module (master) */ diff --git a/board/hoho/board.h b/board/hoho/board.h index 8e6ec34b3d..635abfbeda 100644 --- a/board/hoho/board.h +++ b/board/hoho/board.h @@ -24,7 +24,7 @@ #define CONFIG_RWSIG #define CONFIG_RWSIG_TYPE_USBPD1 #define CONFIG_SHA256 -/* TODO(tbroch) Re-enable once STM spi master can be inhibited at boot so it +/* TODO(tbroch) Re-enable once STM spi controller can be inhibited at boot so it doesn't interfere with HDMI loading its f/w */ #undef CONFIG_SPI_FLASH #define CONFIG_SPI_CS_GPIO GPIO_PD_MCDP_SPI_CS_L diff --git a/board/jacuzzi/board.h b/board/jacuzzi/board.h index ef8a02a3dc..6270b308f6 100644 --- a/board/jacuzzi/board.h +++ b/board/jacuzzi/board.h @@ -102,7 +102,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/makomo/board.h b/board/makomo/board.h index 844fd95292..3c620cd823 100644 --- a/board/makomo/board.h +++ b/board/makomo/board.h @@ -90,7 +90,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/munna/board.c b/board/munna/board.c index f31c7a7e39..93a7bade4b 100644 --- a/board/munna/board.c +++ b/board/munna/board.c @@ -267,7 +267,7 @@ static void board_spi_enable(void) #ifdef CHIP_FAMILY_STM32L4 /* Set I/O speed before AF configured */ /* EMMC SPI SLAVE: PB13/14/15 */ - /* SENSORS SPI MASTER: PB10, PB12, PC2, PC3 */ + /* SENSORS SPI controller: PB10, PB12, PC2, PC3 */ STM32_GPIO_OSPEEDR(GPIO_B) |= 0xFF300000; STM32_GPIO_OSPEEDR(GPIO_C) |= 0x000000F0; diff --git a/board/munna/board.h b/board/munna/board.h index baf68470e4..96a76b11b5 100644 --- a/board/munna/board.h +++ b/board/munna/board.h @@ -113,7 +113,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/nocturne_fp/board_rw.c b/board/nocturne_fp/board_rw.c index 0a7b38b97d..abc6bf88d8 100644 --- a/board/nocturne_fp/board_rw.c +++ b/board/nocturne_fp/board_rw.c @@ -86,7 +86,9 @@ static void spi_configure(enum fp_sensor_spi_select spi_select) gpio_config_module(MODULE_SPI_CONTROLLER, 1); } - /* Set all SPI master signal pins to very high speed: pins E2/4/5/6 */ + /* Set all SPI controller signal pins to very high speed: + * pins E2/4/5/6 + */ STM32_GPIO_OSPEEDR(GPIO_E) |= 0x00003f30; /* Enable clocks to SPI4 module (master) */ STM32_RCC_APB2ENR |= STM32_RCC_PB2_SPI4; @@ -125,7 +127,7 @@ void board_init(void) gpio_enable_interrupt(GPIO_SLP_L); /* - * Enable the SPI slave interface if the PCH is up. + * Enable the SPI peripheral interface if the PCH is up. * Do not use hook_call_deferred(), because ap_deferred() will be * called after tasks with priority higher than HOOK task (very late). */ diff --git a/board/nucleo-dartmonkey/board.c b/board/nucleo-dartmonkey/board.c index a7851ec00b..ea0d11eaf5 100644 --- a/board/nucleo-dartmonkey/board.c +++ b/board/nucleo-dartmonkey/board.c @@ -76,7 +76,9 @@ static void spi_configure(void) { /* Configure SPI GPIOs */ gpio_config_module(MODULE_SPI_CONTROLLER, 1); - /* Set all SPI master signal pins to very high speed: pins E2/4/5/6 */ + /* Set all SPI controller signal pins to very high speed: + * pins E2/4/5/6 + */ STM32_GPIO_OSPEEDR(GPIO_E) |= 0x00003f30; /* Enable clocks to SPI4 module (master) */ STM32_RCC_APB2ENR |= STM32_RCC_PB2_SPI4; @@ -97,7 +99,7 @@ static void board_init(void) gpio_enable_interrupt(GPIO_SLP_L); /* - * Enable the SPI slave interface if the PCH is up. + * Enable the SPI peripheral interface if the PCH is up. * Do not use hook_call_deferred(), because ap_deferred() will be * called after tasks with priority higher than HOOK task (very late). */ diff --git a/board/nucleo-f412zg/board.c b/board/nucleo-f412zg/board.c index 4324101da9..da3b4a3d4d 100644 --- a/board/nucleo-f412zg/board.c +++ b/board/nucleo-f412zg/board.c @@ -60,7 +60,7 @@ static void board_init(void) gpio_enable_interrupt(GPIO_PCH_SLP_S0_L); /* - * Enable the SPI slave interface if the PCH is up. + * Enable the SPI peripheral interface if the PCH is up. * Do not use hook_call_deferred(), because ap_deferred() will be * called after tasks with priority higher than HOOK task (very late). */ diff --git a/board/nucleo-h743zi/board.c b/board/nucleo-h743zi/board.c index f1493658aa..c69a456425 100644 --- a/board/nucleo-h743zi/board.c +++ b/board/nucleo-h743zi/board.c @@ -60,7 +60,7 @@ static void board_init(void) gpio_enable_interrupt(GPIO_PCH_SLP_S0_L); /* - * Enable the SPI slave interface if the PCH is up. + * Enable the SPI peripheral interface if the PCH is up. * Do not use hook_call_deferred(), because ap_deferred() will be * called after tasks with priority higher than HOOK task (very late). */ diff --git a/board/oak/board.h b/board/oak/board.h index e82907a508..2c30e6185e 100644 --- a/board/oak/board.h +++ b/board/oak/board.h @@ -163,7 +163,7 @@ #define I2C_PORT_TCPC 1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* First SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* First SPI controller port (SPI2) */ /* Ambient Light Sensor address */ #define OPT3001_I2C_ADDR_FLAGS OPT3001_I2C_ADDR1_FLAGS diff --git a/board/rainier/board.h b/board/rainier/board.h index a323a90889..a980afba50 100644 --- a/board/rainier/board.h +++ b/board/rainier/board.h @@ -128,7 +128,7 @@ #define I2C_PORT_TCPC0 1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_MKBP_INPUT_DEVICES #define CONFIG_MKBP_EVENT diff --git a/board/scarlet/board.h b/board/scarlet/board.h index f8d1ba7011..5f5e1ef4bb 100644 --- a/board/scarlet/board.h +++ b/board/scarlet/board.h @@ -186,7 +186,7 @@ #define VIRTUAL_BATTERY_ADDR_FLAGS 0x0B /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_MKBP_INPUT_DEVICES #define CONFIG_MKBP_EVENT diff --git a/board/servo_micro/board.h b/board/servo_micro/board.h index 306bc0e5d7..6f4d67424b 100644 --- a/board/servo_micro/board.h +++ b/board/servo_micro/board.h @@ -76,7 +76,7 @@ /* Enable control of SPI over USB */ #define CONFIG_USB_SPI #define CONFIG_SPI_CONTROLLER -#define CONFIG_SPI_FLASH_PORT 0 /* First SPI master port */ +#define CONFIG_SPI_FLASH_PORT 0 /* First SPI controller port */ /* This is not actually an EC so disable some features. */ #undef CONFIG_WATCHDOG_HELP diff --git a/board/stern/board.h b/board/stern/board.h index 5bf23a6733..f682f2bb2b 100644 --- a/board/stern/board.h +++ b/board/stern/board.h @@ -85,7 +85,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/board/willow/board.h b/board/willow/board.h index a6907b9a9e..9ec0b9483b 100644 --- a/board/willow/board.h +++ b/board/willow/board.h @@ -81,7 +81,7 @@ #define IT8801_KEYBOARD_PWM_I2C_ADDR_FLAGS IT8801_I2C_ADDR1 /* Enable Accel over SPI */ -#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI master port (SPI2) */ +#define CONFIG_SPI_ACCEL_PORT 0 /* The first SPI controller port (SPI2) */ #define CONFIG_KEYBOARD_PROTOCOL_MKBP #define CONFIG_MKBP_EVENT diff --git a/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c b/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c index 522d48ff09..64753e0833 100644 --- a/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c +++ b/zephyr/drivers/cros_shi/cros_shi_it8xxx2.c @@ -91,9 +91,9 @@ BUILD_ASSERT(ARRAY_SIZE(spi_response_state) == SPI_STATE_COUNT); static void spi_set_state(int state) { - /* SPI slave state machine */ + /* SPI peripheral state machine */ shi_state = state; - /* Response spi slave state */ + /* Response spi peripheral state */ IT83XX_SPI_SPISRDR = spi_response_state[state]; } @@ -142,12 +142,12 @@ static void spi_response_host_data(uint8_t *out_msg_addr, int tx_size) /* * After writing data to Tx FIFO is finished, this bit will - * be to indicate the SPI slave controller. + * be to indicate the SPI peripheral controller. */ IT83XX_SPI_TXFCR = IT83XX_SPI_TXFS; /* End Tx FIFO access */ IT83XX_SPI_TXRXFAR = 0; - /* SPI slave read Tx FIFO */ + /* SPI peripheral read Tx FIFO */ IT83XX_SPI_FCR = IT83XX_SPI_SPISRTXF; } @@ -356,7 +356,7 @@ static int cros_shi_ite_init(const struct device *dev) spi_set_state(SPI_STATE_READY_TO_RECV); /* Interrupt status register(write one to clear) */ IT83XX_SPI_ISR = 0xff; - /* SPI slave controller enable (after settings are ready) */ + /* SPI peripheral controller enable (after settings are ready) */ IT83XX_SPI_SPISGCR = IT83XX_SPI_SPISCEN; /* Ensure spi chip select alt function is enabled. */ @@ -365,7 +365,7 @@ static int cros_shi_ite_init(const struct device *dev) config[i].alt_fun); } - /* Enable SPI slave interrupt */ + /* Enable SPI peripheral interrupt */ IRQ_CONNECT(DT_INST_IRQN(0), 0, shi_ite_int_handler, 0, 0); irq_enable(DT_INST_IRQN(0)); diff --git a/zephyr/dts/bindings/motionsense/driver/bmi160.yaml b/zephyr/dts/bindings/motionsense/driver/bmi160.yaml index 8f490254a3..6ca096d87a 100644 --- a/zephyr/dts/bindings/motionsense/driver/bmi160.yaml +++ b/zephyr/dts/bindings/motionsense/driver/bmi160.yaml @@ -10,7 +10,7 @@ include: motionsense-sensor-base.yaml properties: i2c-spi-addr-flags: type: string - description: i2c address or SPI slave logic GPIO + description: i2c address or SPI peripheral logic GPIO enum: - "BMI160_ADDR0_FLAGS" default: "BMI160_ADDR0_FLAGS" diff --git a/zephyr/dts/bindings/motionsense/driver/cros-ec,bma255.yaml b/zephyr/dts/bindings/motionsense/driver/cros-ec,bma255.yaml index 77d6282d7f..cbd9e82f2d 100644 --- a/zephyr/dts/bindings/motionsense/driver/cros-ec,bma255.yaml +++ b/zephyr/dts/bindings/motionsense/driver/cros-ec,bma255.yaml @@ -12,7 +12,7 @@ include: motionsense-sensor-base.yaml properties: i2c-spi-addr-flags: type: string - description: i2c address or SPI slave logic GPIO + description: i2c address or SPI peripheral logic GPIO enum: - "BMA2x2_I2C_ADDR1_FLAGS" - "BMA2x2_I2C_ADDR2_FLAGS" diff --git a/zephyr/dts/bindings/motionsense/driver/cros-ec,kx022.yaml b/zephyr/dts/bindings/motionsense/driver/cros-ec,kx022.yaml index b90d824575..8aecc32077 100644 --- a/zephyr/dts/bindings/motionsense/driver/cros-ec,kx022.yaml +++ b/zephyr/dts/bindings/motionsense/driver/cros-ec,kx022.yaml @@ -12,7 +12,7 @@ include: motionsense-sensor-base.yaml properties: i2c-spi-addr-flags: type: string - description: i2c address or SPI slave logic GPIO + description: i2c address or SPI peripheral logic GPIO enum: - "KX022_ADDR0_FLAGS" - "KX022_ADDR1_FLAGS" diff --git a/zephyr/dts/bindings/motionsense/driver/tcs3400.yaml b/zephyr/dts/bindings/motionsense/driver/tcs3400.yaml index 2fc3d7eacd..ecad7ec1a7 100644 --- a/zephyr/dts/bindings/motionsense/driver/tcs3400.yaml +++ b/zephyr/dts/bindings/motionsense/driver/tcs3400.yaml @@ -10,7 +10,7 @@ include: motionsense-sensor-base.yaml properties: i2c-spi-addr-flags: type: string - description: i2c address or SPI slave logic GPIO + description: i2c address or SPI peripheral logic GPIO enum: - "TCS3400_I2C_ADDR_FLAGS" default: "TCS3400_I2C_ADDR_FLAGS" -- cgit v1.2.1