mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / google / zork / variants / vilboz / variant.c
blobddfce69aaab10dd36e783941f84b61f228257106
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
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>
9 static const fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
10 { // DDI0, DP0, eDP
11 .connector_type = EDP,
12 .aux_index = AUX1,
13 .hdp_index = HDP1
15 { // DDI1, DP1, DB OPT2 USB-C1 / DB OPT3 MST hub
16 .connector_type = HDMI,
17 .aux_index = AUX2,
18 .hdp_index = HDP2
20 { // DDI2, DP3, USB-C0
21 .connector_type = DP,
22 .aux_index = AUX4,
23 .hdp_index = HDP4,
27 void variant_get_dxio_ddi_descriptors(const fsp_dxio_descriptor **dxio_descs,
28 size_t *dxio_num,
29 const fsp_ddi_descriptor **ddi_descs,
30 size_t *ddi_num)
32 *dxio_descs = baseboard_get_dxio_descriptors(dxio_num);
34 *ddi_descs = &hdmi_ddi_descriptors[0];
35 *ddi_num = ARRAY_SIZE(hdmi_ddi_descriptors);
38 void variant_devtree_update(void)
40 struct soc_amd_picasso_config *soc_cfg;
41 soc_cfg = config_of_soc();
43 if (board_id() <= 2 || board_id() == BOARD_ID_UNKNOWN)
44 return;
46 /* b:/174121847 Use external OSC to mitigate noise for WWAN sku. */
47 if (variant_has_wwan()) {
48 soc_cfg->acp_i2s_use_external_48mhz_osc = 1;
50 /* eDP phy tuning settings */
51 soc_cfg->edp_phy_override = ENABLE_EDP_TUNINGSET;
52 /* bit vector of phy, bit0=1: DP0, bit1=1: DP1, bit2=1: DP2 bit3=1: DP3 */
53 soc_cfg->edp_physel = 0x1;
54 /* override for 0.6v 0db swing 1, pre-emphasis 0 */
55 soc_cfg->edp_tuningset.dp_vs_pemph_level = 0x01;
56 soc_cfg->edp_tuningset.margin_deemph = 0x004b;
57 soc_cfg->edp_tuningset.deemph_6db4 = 0x00;
58 soc_cfg->edp_tuningset.boostadj = 0x80;
63 +----------+------+--------+--------+------+--+---------+--+---------+
64 | |Vilboz|Vilboz14|Vilboz14|Vilboz|NA|Vilboz360|NA|Vilboz360|
65 | |WiFi |WiFi |LTE |LTE | |WiFi | |LTE |
66 +----------+------+--------+--------+------+--+---------+--+---------+
67 |SAR[25] |0 |0 |0 |0 |1 |1 |1 |1 |
68 |SAR[24] |0 |0 |1 |1 |0 |0 |1 |1 |
69 |SAR[23] |0 |1 |0 |1 |0 |1 |0 |1 |
70 +----------+------+--------+--------+------+--+---------+--+---------+
71 |SAR_config|0 |1 |2 |3 |4 |5 |6 |7 |
72 +----------+------+--------+--------+------+--+---------+--+---------+
75 const char *get_wifi_sar_cbfs_filename(void)
77 int sar_config;
79 sar_config = variant_gets_sar_config();
81 switch (sar_config) {
82 case 1:
83 return "wifi_sar-vilboz-0.hex";
84 case 3:
85 return "wifi_sar-vilboz-2.hex";
86 case 5:
87 return "wifi_sar-vilboz-1.hex";
88 case 7:
89 return "wifi_sar-vilboz-3.hex";
90 default:
91 return WIFI_SAR_CBFS_DEFAULT_FILENAME;