From b535db8f1e3ec4b0af26c0013bd0e7ada3e43e53 Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Thu, 13 Nov 2025 09:08:29 +0000 Subject: [PATCH] soc/intel/cmn/usb: Add helper macro for USB 3.0 port TX configuration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduce the `USB3_PORT_TX_CFG` macro to simplify the definition of `usb3_port_config` structures. This macro allows platform code to easily configure the Transmit De-emphasis (`tx_de_emp`) value for a specific USB 3.0 port (identified by `ocpin`). This improves readability and reduces boilerplate when tuning signal integrity settings for different USB ports on the board. TEST=Able to build and boot google/kinmen. Change-Id: I42565e2c573dfcff244a81bf7bcb9749eca52c05 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/90021 Tested-by: build bot (Jenkins) Reviewed-by: Jérémy Compostella Reviewed-by: Paul Menzel --- src/soc/intel/common/block/include/intelblocks/usb.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/soc/intel/common/block/include/intelblocks/usb.h b/src/soc/intel/common/block/include/intelblocks/usb.h index 44094d29fe..e334cf5b8d 100644 --- a/src/soc/intel/common/block/include/intelblocks/usb.h +++ b/src/soc/intel/common/block/include/intelblocks/usb.h @@ -137,6 +137,13 @@ struct usb3_port_config { .tx_downscale_amp = 0x00, \ } +#define USB3_PORT_TX_CFG(pin, de_emp) { \ + .enable = 1, \ + .ocpin = (pin), \ + .tx_de_emp = (de_emp), \ + .tx_downscale_amp = 0x00, \ +} + struct tcss_port_config { uint8_t enable; uint8_t ocpin;