diff options
-rw-r--r-- | src/soc/intel/jasperlake/fsp_params.c | 21 | ||||
-rw-r--r-- | src/soc/intel/jasperlake/include/soc/usb.h | 39 |
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 |