| 1 |
|
| 2 |
|
| 3 |
#include <baseboard/variants.h> |
| 4 |
#include <soc/pci_devs.h> |
| 5 |
#include <fw_config.h> |
| 6 |
#include <sar.h> |
| 7 |
#include <soc/amd/picasso/chip.h> |
| 8 |
#include <static.h> |
| 9 |
|
| 10 |
static const fsp_ddi_descriptor hdmi_ddi_descriptors[] = { |
| 11 |
{ |
| 12 |
.connector_type = EDP, |
| 13 |
.aux_index = AUX1, |
| 14 |
.hdp_index = HDP1 |
| 15 |
}, |
| 16 |
{ |
| 17 |
.connector_type = HDMI, |
| 18 |
.aux_index = AUX2, |
| 19 |
.hdp_index = HDP2 |
| 20 |
}, |
| 21 |
{ |
| 22 |
.connector_type = DP, |
| 23 |
.aux_index = AUX4, |
| 24 |
.hdp_index = HDP4, |
| 25 |
} |
| 26 |
}; |
| 27 |
|
| 28 |
void variant_get_dxio_ddi_descriptors(const fsp_dxio_descriptor **dxio_descs, |
| 29 |
size_t *dxio_num, |
| 30 |
const fsp_ddi_descriptor **ddi_descs, |
| 31 |
size_t *ddi_num) |
| 32 |
{ |
| 33 |
*dxio_descs = baseboard_get_dxio_descriptors(dxio_num); |
| 34 |
|
| 35 |
*ddi_descs = &hdmi_ddi_descriptors[0]; |
| 36 |
*ddi_num = ARRAY_SIZE(hdmi_ddi_descriptors); |
| 37 |
} |
| 38 |
|
| 39 |
void variant_devtree_update(void) |
| 40 |
{ |
| 41 |
struct soc_amd_picasso_config *soc_cfg; |
| 42 |
soc_cfg = config_of_soc(); |
| 43 |
|
| 44 |
if (board_id() <= 2 || board_id() == BOARD_ID_UNKNOWN) |
| 45 |
return; |
| 46 |
|
| 47 |
|
| 48 |
if (variant_has_wwan()) { |
| 49 |
soc_cfg->acp_i2s_use_external_48mhz_osc = 1; |
| 50 |
|
| 51 |
|
| 52 |
soc_cfg->edp_phy_override = ENABLE_EDP_TUNINGSET; |
| 53 |
|
| 54 |
soc_cfg->edp_physel = 0x1; |
| 55 |
|
| 56 |
soc_cfg->edp_tuningset.dp_vs_pemph_level = 0x01; |
| 57 |
soc_cfg->edp_tuningset.margin_deemph = 0x004b; |
| 58 |
soc_cfg->edp_tuningset.deemph_6db4 = 0x00; |
| 59 |
soc_cfg->edp_tuningset.boostadj = 0x80; |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
const char *get_wifi_sar_cbfs_filename(void) |
| 77 |
{ |
| 78 |
int sar_config; |
| 79 |
|
| 80 |
sar_config = variant_gets_sar_config(); |
| 81 |
|
| 82 |
switch (sar_config) { |
| 83 |
case 1: |
| 84 |
return "wifi_sar-vilboz-0.hex"; |
| 85 |
case 3: |
| 86 |
return "wifi_sar-vilboz-2.hex"; |
| 87 |
case 5: |
| 88 |
return "wifi_sar-vilboz-1.hex"; |
| 89 |
case 7: |
| 90 |
return "wifi_sar-vilboz-3.hex"; |
| 91 |
default: |
| 92 |
return WIFI_SAR_CBFS_DEFAULT_FILENAME; |
| 93 |
} |
| 94 |
} |