summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/google/zork/variants/baseboard/helpers.c8
-rw-r--r--src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h2
-rw-r--r--src/mainboard/google/zork/variants/vilboz/variant.c10
3 files changed, 20 insertions, 0 deletions
diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c
index d12a8ed407..bea0887940 100644
--- a/src/mainboard/google/zork/variants/baseboard/helpers.c
+++ b/src/mainboard/google/zork/variants/baseboard/helpers.c
@@ -46,6 +46,9 @@ enum {
/* Fan information */
FW_CONFIG_MASK_FAN = 0x3,
FW_CONFIG_SHIFT_FAN = 27,
+ /* WWAN presence */
+ FW_CONFIG_MASK_WWAN = 0x1,
+ FW_CONFIG_SHIFT_WWAN = 28,
};
static int get_fw_config(uint64_t *val)
@@ -88,6 +91,11 @@ int variant_has_nvme(void)
return !!extract_field(FW_CONFIG_MASK_NVME, FW_CONFIG_SHIFT_NVME);
}
+int variant_has_wwan(void)
+{
+ return !!extract_field(FW_CONFIG_MASK_WWAN, FW_CONFIG_SHIFT_WWAN);
+}
+
bool variant_uses_v3_schematics(void)
{
uint32_t board_version;
diff --git a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h
index f6e7e7c232..aeff49b6bc 100644
--- a/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h
+++ b/src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h
@@ -63,6 +63,8 @@ const fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num);
int variant_has_emmc(void);
/* Return 0 if non-existent, 1 if present. */
int variant_has_nvme(void);
+/* Return 0 if non-existent, 1 if present. */
+int variant_has_wwan(void);
/* Determine if booting in factory by using CROS_SKU_UNPROVISIONED. */
int boot_is_factory_unprovisioned(void);
diff --git a/src/mainboard/google/zork/variants/vilboz/variant.c b/src/mainboard/google/zork/variants/vilboz/variant.c
index cbc160e5c7..fd38e1d1ea 100644
--- a/src/mainboard/google/zork/variants/vilboz/variant.c
+++ b/src/mainboard/google/zork/variants/vilboz/variant.c
@@ -31,3 +31,13 @@ void variant_get_dxio_ddi_descriptors(const fsp_dxio_descriptor **dxio_descs,
*ddi_descs = &hdmi_ddi_descriptors[0];
*ddi_num = ARRAY_SIZE(hdmi_ddi_descriptors);
}
+
+void variant_devtree_update(void)
+{
+ struct soc_amd_picasso_config *soc_cfg;
+ soc_cfg = config_of_soc();
+
+ /* b:/174121847 Use external OSC to mitigate noise for WWAN sku. */
+ if (variant_has_wwan())
+ soc_cfg->acp_i2s_use_external_48mhz_osc = 1;
+}