diff options
author | Jes B. Klinke <jbk@chromium.org> | 2021-11-30 14:35:08 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-16 00:19:33 +0000 |
commit | ac6d8473101ab0f5e816af8d931c7fceac04e545 (patch) | |
tree | a2a00a04e92139acb80b815438a621bec294ea6d /board/servo_micro | |
parent | d70f555bb2b9cbd131468ecf941913897d6500b4 (diff) | |
download | chrome-ec-ac6d8473101ab0f5e816af8d931c7fceac04e545.tar.gz |
chip/stm32/usb_spi.c: Advertise endpoint name
The string USB_STR_SPI_NAME clearly was meant for defining the ASCII
label on the USB endpoint used for forwarding of SPI transactions by
servo micro and similar devices. However, it seems that it was
accidentally left unused.
This CL will add an ASCII label to the SPI endpoint (similar to how
UART and I2C forwarding endpoint have textual labels.)
Also, this CL adds a new CONFIG_USB_SPI_BUFFER_SIZE which can be used
by particular boards to override the default amount of memory reserved
for forwarding between USB and SPI. That is, the maximum size of a
single SPI transaction that can be forwarded. (The default of 298 is
too small for the future HyperDebug board, which will serve as similar
purpose to the Google's servo for OpenTitan development.)
Signed-off-by: Jes B. Klinke <jbk@chromium.org>
BUG=b:192262089
TEST=Watch forwarding of 2048 byte transactions on HyperDebug
BRANCH=None
Change-Id: Ic060194c19b0c2f33f6e861252d5fb5e993349b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3309365
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Commit-Queue: Jes Klinke <jbk@chromium.org>
Tested-by: Jes Klinke <jbk@chromium.org>
Diffstat (limited to 'board/servo_micro')
-rw-r--r-- | board/servo_micro/board.c | 1 | ||||
-rw-r--r-- | board/servo_micro/board.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/board/servo_micro/board.c b/board/servo_micro/board.c index 40982ea888..f82376a15a 100644 --- a/board/servo_micro/board.c +++ b/board/servo_micro/board.c @@ -314,6 +314,7 @@ const void *const usb_strings[] = { [USB_STR_PRODUCT] = USB_STRING_DESC("Servo Micro"), [USB_STR_SERIALNO] = 0, [USB_STR_VERSION] = USB_STRING_DESC(CROS_EC_VERSION32), + [USB_STR_SPI_NAME] = USB_STRING_DESC("SPI"), [USB_STR_I2C_NAME] = USB_STRING_DESC("I2C"), [USB_STR_USART4_STREAM_NAME] = USB_STRING_DESC("UART3"), [USB_STR_CONSOLE_NAME] = USB_STRING_DESC("Servo Shell"), diff --git a/board/servo_micro/board.h b/board/servo_micro/board.h index 6f4d67424b..1983ee13e3 100644 --- a/board/servo_micro/board.h +++ b/board/servo_micro/board.h @@ -120,6 +120,7 @@ enum usb_strings { USB_STR_PRODUCT, USB_STR_SERIALNO, USB_STR_VERSION, + USB_STR_SPI_NAME, USB_STR_I2C_NAME, USB_STR_USART4_STREAM_NAME, USB_STR_CONSOLE_NAME, |