mb/google/nissa/var/rull: add ssd timing and modify ssd GPIO pins of rtd3
[coreboot2.git] / src / mainboard / google / zork / variants / vilboz / variant.c
blob00e72cb6f68ca41d77465ec70f75f817f5c4308a
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>
8 #include <static.h>
10 static const fsp_ddi_descriptor hdmi_ddi_descriptors[] = {
11 { // DDI0, DP0, eDP
12 .connector_type = EDP,
13 .aux_index = AUX1,
14 .hdp_index = HDP1
16 { // DDI1, DP1, DB OPT2 USB-C1 / DB OPT3 MST hub
17 .connector_type = HDMI,
18 .aux_index = AUX2,
19 .hdp_index = HDP2
21 { // DDI2, DP3, USB-C0
22 .connector_type = DP,
23 .aux_index = AUX4,
24 .hdp_index = HDP4,
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)
33 *dxio_descs = baseboard_get_dxio_descriptors(dxio_num);
35 *ddi_descs = &hdmi_ddi_descriptors[0];
36 *ddi_num = ARRAY_SIZE(hdmi_ddi_descriptors);
39 void variant_devtree_update(void)
41 struct soc_amd_picasso_config *soc_cfg;
42 soc_cfg = config_of_soc();
44 if (board_id() <= 2 || board_id() == BOARD_ID_UNKNOWN)
45 return;
47 /* b:/174121847 Use external OSC to mitigate noise for WWAN sku. */
48 if (variant_has_wwan()) {
49 soc_cfg->acp_i2s_use_external_48mhz_osc = 1;
51 /* eDP phy tuning settings */
52 soc_cfg->edp_phy_override = ENABLE_EDP_TUNINGSET;
53 /* bit vector of phy, bit0=1: DP0, bit1=1: DP1, bit2=1: DP2 bit3=1: DP3 */
54 soc_cfg->edp_physel = 0x1;
55 /* override for 0.6v 0db swing 1, pre-emphasis 0 */
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;
64 +----------+------+--------+--------+------+--+---------+--+---------+
65 | |Vilboz|Vilboz14|Vilboz14|Vilboz|NA|Vilboz360|NA|Vilboz360|
66 | |WiFi |WiFi |LTE |LTE | |WiFi | |LTE |
67 +----------+------+--------+--------+------+--+---------+--+---------+
68 |SAR[25] |0 |0 |0 |0 |1 |1 |1 |1 |
69 |SAR[24] |0 |0 |1 |1 |0 |0 |1 |1 |
70 |SAR[23] |0 |1 |0 |1 |0 |1 |0 |1 |
71 +----------+------+--------+--------+------+--+---------+--+---------+
72 |SAR_config|0 |1 |2 |3 |4 |5 |6 |7 |
73 +----------+------+--------+--------+------+--+---------+--+---------+
76 const char *get_wifi_sar_cbfs_filename(void)
78 int sar_config;
80 sar_config = variant_gets_sar_config();
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;