summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorChia-Ling Hou <chia-ling.hou@intel.com>2023-06-15 16:40:18 +0800
committerEric Lai <eric_lai@quanta.corp-partner.google.com>2023-08-10 07:31:22 +0000
commitdd1b0ec06e7af8e8cd2423ad7031979017ff04ad (patch)
treec3c7166a8c87b45d01f2afde2d87d0d30123239c /src/soc/intel
parentbd054832d29e81a003c6ecf9e9d1bc5a6c9d845c (diff)
soc/intel/jasperlake: Add configs for USB 3.1 Gen2 EV settings
Add configs for USB 3.1 Gen2 electrical validation (EV) settings so that people can set the EV settings per board in device tree. BUG=b:285811345 TEST=build coreboot and fsp with enabled fw_debug. Flashed to taranza and checked the log. All usb configs were set correctly. Change-Id: Iecd12d3db76b63ad99887dee5991d94d47f138fd Signed-off-by: Chia-Ling Hou <chia-ling.hou@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76246 Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Reka Norman <rekanorman@chromium.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/jasperlake/fsp_params.c21
-rw-r--r--src/soc/intel/jasperlake/include/soc/usb.h39
2 files changed, 60 insertions, 0 deletions
diff --git a/src/soc/intel/jasperlake/fsp_params.c b/src/soc/intel/jasperlake/fsp_params.c
index 1e6731d91c..50fc13632d 100644
--- a/src/soc/intel/jasperlake/fsp_params.c
+++ b/src/soc/intel/jasperlake/fsp_params.c
@@ -131,6 +131,27 @@ void platform_fsp_silicon_init_params_cb(FSPS_UPD *supd)
params->Usb3HsioTxDownscaleAmp[i] =
config->usb3_ports[i].tx_downscale_amp;
}
+ /* Enable USB3 Gen2 */
+ if (config->usb3_ports[i].gen2_tx_rate0_uniq_tran_enable) {
+ params->Usb3HsioTxRate0UniqTranEnable[i] = 1;
+ params->Usb3HsioTxRate0UniqTran[i] =
+ config->usb3_ports[i].gen2_tx_rate0_uniq_tran;
+ }
+ if (config->usb3_ports[i].gen2_tx_rate1_uniq_tran_enable) {
+ params->Usb3HsioTxRate1UniqTranEnable[i] = 1;
+ params->Usb3HsioTxRate1UniqTran[i] =
+ config->usb3_ports[i].gen2_tx_rate1_uniq_tran;
+ }
+ if (config->usb3_ports[i].gen2_tx_rate2_uniq_tran_enable) {
+ params->Usb3HsioTxRate2UniqTranEnable[i] = 1;
+ params->Usb3HsioTxRate2UniqTran[i] =
+ config->usb3_ports[i].gen2_tx_rate2_uniq_tran;
+ }
+ if (config->usb3_ports[i].gen2_tx_rate3_uniq_tran_enable) {
+ params->Usb3HsioTxRate3UniqTranEnable[i] = 1;
+ params->Usb3HsioTxRate3UniqTran[i] =
+ config->usb3_ports[i].gen2_tx_rate3_uniq_tran;
+ }
}
/* SATA */
diff --git a/src/soc/intel/jasperlake/include/soc/usb.h b/src/soc/intel/jasperlake/include/soc/usb.h
index 69d2d31a4c..2fee3956f1 100644
--- a/src/soc/intel/jasperlake/include/soc/usb.h
+++ b/src/soc/intel/jasperlake/include/soc/usb.h
@@ -119,6 +119,14 @@ struct usb3_port_config {
uint8_t ocpin;
uint8_t tx_de_emp;
uint8_t tx_downscale_amp;
+ uint8_t gen2_tx_rate0_uniq_tran_enable;
+ uint8_t gen2_tx_rate0_uniq_tran;
+ uint8_t gen2_tx_rate1_uniq_tran_enable;
+ uint8_t gen2_tx_rate1_uniq_tran;
+ uint8_t gen2_tx_rate2_uniq_tran_enable;
+ uint8_t gen2_tx_rate2_uniq_tran;
+ uint8_t gen2_tx_rate3_uniq_tran_enable;
+ uint8_t gen2_tx_rate3_uniq_tran;
};
#define USB3_PORT_EMPTY { \
@@ -126,6 +134,14 @@ struct usb3_port_config {
.ocpin = OC_SKIP, \
.tx_de_emp = 0x00, \
.tx_downscale_amp = 0x00, \
+ .gen2_tx_rate0_uniq_tran_enable = 0, \
+ .gen2_tx_rate0_uniq_tran = 0x00, \
+ .gen2_tx_rate1_uniq_tran_enable = 0, \
+ .gen2_tx_rate1_uniq_tran = 0x00, \
+ .gen2_tx_rate2_uniq_tran_enable = 0, \
+ .gen2_tx_rate2_uniq_tran = 0x00, \
+ .gen2_tx_rate3_uniq_tran_enable = 0, \
+ .gen2_tx_rate3_uniq_tran = 0x00, \
}
#define USB3_PORT_DEFAULT(pin) { \
@@ -133,6 +149,29 @@ struct usb3_port_config {
.ocpin = (pin), \
.tx_de_emp = 0x0, \
.tx_downscale_amp = 0x00, \
+ .gen2_tx_rate0_uniq_tran_enable = 0, \
+ .gen2_tx_rate0_uniq_tran = 0x00, \
+ .gen2_tx_rate1_uniq_tran_enable = 0, \
+ .gen2_tx_rate1_uniq_tran = 0x00, \
+ .gen2_tx_rate2_uniq_tran_enable = 0, \
+ .gen2_tx_rate2_uniq_tran = 0x00, \
+ .gen2_tx_rate3_uniq_tran_enable = 0, \
+ .gen2_tx_rate3_uniq_tran = 0x00, \
+}
+
+#define USB3_PORT_GEN2_DEFAULT(pin) { \
+ .enable = 1, \
+ .ocpin = (pin), \
+ .tx_de_emp = 0x0, \
+ .tx_downscale_amp = 0x00, \
+ .gen2_tx_rate0_uniq_tran_enable = 0, \
+ .gen2_tx_rate0_uniq_tran = 0x00, \
+ .gen2_tx_rate1_uniq_tran_enable = 0, \
+ .gen2_tx_rate1_uniq_tran = 0x00, \
+ .gen2_tx_rate2_uniq_tran_enable = 1, \
+ .gen2_tx_rate2_uniq_tran = 0x4C, \
+ .gen2_tx_rate3_uniq_tran_enable = 0, \
+ .gen2_tx_rate3_uniq_tran = 0x00, \
}
#endif