| 1 |
|
| 2 |
|
| 3 |
#include <fw_config.h> |
| 4 |
#include <baseboard/variants.h> |
| 5 |
#include <baseboard/gpio.h> |
| 6 |
#include <console/console.h> |
| 7 |
#include <drivers/intel/gma/opregion.h> |
| 8 |
#include <sar.h> |
| 9 |
#include <delay.h> |
| 10 |
|
| 11 |
#define FM350_RST_DEALY_MS 20 |
| 12 |
#define FM350_PERST_DEALY_MS 30 |
| 13 |
|
| 14 |
static const struct pad_config fm350_rst_pad[] = { |
| 15 |
|
| 16 |
PAD_CFG_GPO_LOCK(GPP_F12, 1, LOCK_CONFIG), |
| 17 |
}; |
| 18 |
static const struct pad_config fm350_perst_pad[] = { |
| 19 |
|
| 20 |
PAD_CFG_GPO(GPP_H21, 1, DEEP), |
| 21 |
}; |
| 22 |
|
| 23 |
void variant_update_soc_chip_config(struct soc_intel_alderlake_config *config) |
| 24 |
{ |
| 25 |
|
| 26 |
if (fw_config_probe(FW_CONFIG(EXT_VR, EXT_VR_PRESENT))) { |
| 27 |
config->ext_fivr_settings.configure_ext_fivr = 1; |
| 28 |
|
| 29 |
config->ext_fivr_settings.v1p05_enable_bitmap = |
| 30 |
FIVR_ENABLE_ALL_SX & ~FIVR_ENABLE_S0; |
| 31 |
|
| 32 |
config->ext_fivr_settings.vnn_enable_bitmap = |
| 33 |
FIVR_ENABLE_ALL_SX; |
| 34 |
|
| 35 |
config->ext_fivr_settings.vnn_sx_enable_bitmap = |
| 36 |
FIVR_ENABLE_ALL_SX; |
| 37 |
|
| 38 |
config->ext_fivr_settings.v1p05_supported_voltage_bitmap = |
| 39 |
FIVR_VOLTAGE_NORMAL; |
| 40 |
|
| 41 |
config->ext_fivr_settings.vnn_supported_voltage_bitmap = |
| 42 |
FIVR_VOLTAGE_MIN_ACTIVE; |
| 43 |
|
| 44 |
config->ext_fivr_settings.v1p05_voltage_mv = 1050; |
| 45 |
config->ext_fivr_settings.vnn_voltage_mv = 780; |
| 46 |
config->ext_fivr_settings.vnn_sx_voltage_mv = 1050; |
| 47 |
config->ext_fivr_settings.v1p05_icc_max_ma = 500; |
| 48 |
config->ext_fivr_settings.vnn_icc_max_ma = 500; |
| 49 |
} |
| 50 |
} |
| 51 |
|
| 52 |
const char *get_wifi_sar_cbfs_filename(void) |
| 53 |
{ |
| 54 |
return get_wifi_sar_fw_config_filename(FW_CONFIG_FIELD(WIFI_SAR_ID)); |
| 55 |
} |
| 56 |
|
| 57 |
void variant_init(void) |
| 58 |
{ |
| 59 |
if (fw_config_probe(FW_CONFIG(WWAN_5G, WWAN_5G_PRESENT))) { |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
mdelay(FM350_RST_DEALY_MS); |
| 68 |
gpio_configure_pads(fm350_rst_pad, ARRAY_SIZE(fm350_rst_pad)); |
| 69 |
mdelay(FM350_PERST_DEALY_MS); |
| 70 |
gpio_configure_pads(fm350_perst_pad, ARRAY_SIZE(fm350_perst_pad)); |
| 71 |
} |
| 72 |
} |
| 73 |
|
| 74 |
const char *mainboard_vbt_filename(void) |
| 75 |
{ |
| 76 |
if (fw_config_probe(FW_CONFIG(PANEL_IVO_BOE, IVO_BOE_PRESENT))) { |
| 77 |
printk(BIOS_INFO, "Use vbt-pujjo1e.bin\n"); |
| 78 |
return "vbt-pujjo1e.bin"; |
| 79 |
} |
| 80 |
printk(BIOS_INFO, "Use vbt.bin\n"); |
| 81 |
return "vbt.bin"; |
| 82 |
} |