Furquan Shaikh has submitted this change. ( https://review.coreboot.org/c/coreboot/+/48556 )
Change subject: mb/google/zork/var/vilboz: Add enable acp_i2s_use_external_48mhz_osc flag ......................................................................
mb/google/zork/var/vilboz: Add enable acp_i2s_use_external_48mhz_osc flag
Add enable acp_i2s_use_external_48mhz_osc flag and then WWAN sku will use external clock source at next build.
BUG=b:174121847 BRANCH=zork TEST=build vilboz and check MISC_CLK_CNTL1.
Signed-off-by: John Su john_su@compal.corp-partner.google.com Change-Id: Ida747938373f648524b1e7f34bc69e372a69c4f9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/48556 Reviewed-by: Felix Held felix-coreboot@felixheld.de Reviewed-by: EricR Lai ericr_lai@compal.corp-partner.google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/mainboard/google/zork/variants/baseboard/helpers.c M src/mainboard/google/zork/variants/baseboard/include/baseboard/variants.h M src/mainboard/google/zork/variants/vilboz/variant.c 3 files changed, 20 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved EricR Lai: Looks good to me, approved
diff --git a/src/mainboard/google/zork/variants/baseboard/helpers.c b/src/mainboard/google/zork/variants/baseboard/helpers.c index d12a8ed4..bea0887 100644 --- a/src/mainboard/google/zork/variants/baseboard/helpers.c +++ b/src/mainboard/google/zork/variants/baseboard/helpers.c @@ -46,6 +46,9 @@ /* 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 @@ 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 f6e7e7c..aeff49b 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 @@ 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 cbc160e..fd38e1d 100644 --- a/src/mainboard/google/zork/variants/vilboz/variant.c +++ b/src/mainboard/google/zork/variants/vilboz/variant.c @@ -31,3 +31,13 @@ *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; +}