4 #include <baseboard/variants.h>
16 #include <soc/pci_devs.h>
21 #include <variant/gpio.h>
23 #define FIZZ_SKU_ID_I7_U42 0x4
24 #define FIZZ_SKU_ID_I5_U42 0x5
25 #define FIZZ_SKU_ID_I3_U42 0x6
26 #define FIZZ_SKU_ID_I7_U22 0x3
27 #define FIZZ_SKU_ID_I5_U22 0x2
28 #define FIZZ_SKU_ID_I3_U22 0x1
29 #define FIZZ_SKU_ID_CEL_U22 0x0
30 #define FIZZ_PL2_U42 44
31 #define FIZZ_PL2_U22 29
32 #define FIZZ_PSYSPL2_U22 65
33 #define FIZZ_PSYSPL2_U42 90
34 #define FIZZ_MAX_TIME_WINDOW 6
35 #define FIZZ_MIN_DUTYCYCLE 4
40 #define SET_PSYSPL2(w) (9 * (w) / 10)
44 const gpio_t sku_id_gpios[] = {
106 u16 volts_mv, current_ma;
116 if ((1 <<
sku) & u42_mask)
125 if ((1 <<
sku) & u42_mask)
129 watts = ((
u32)volts_mv * current_ma) / 1000000;
136 if ((1 <<
sku) & u42_mask)
147 const gpio_t oem_id_gpios[] = {
157 static int oem_id = -1;
176 static char sku_str[7];
191 const char *oem_id =
NULL;
192 const char *oem_table_id =
NULL;
198 start_addr = current;
208 oem_id, oem_table_id, oem_revision);
210 if (end_addr != start_addr)
221 soc_conf = &conf->power_limits_config;
228 #define GPIO_HDMI_HPD GPP_E13
229 #define GPIO_DP_HPD GPP_E14
243 "HPD not ready after %ldms. Abort.\n", timeout);
254 static const long display_timeout_ms = 3000;
struct chip_operations mainboard_ops
void acpi_add_table(acpi_rsdp_t *rsdp, void *table)
Add an ACPI table to the RSDT (and XSDT) structure, recalculate length and checksum.
int display_init_required(void)
#define printk(level,...)
void mdelay(unsigned int msecs)
void mainboard_ec_init(void)
int google_chromeec_wait_for_displayport(long timeout_ms)
Wait for DisplayPort to be ready.
int google_chromeec_cbi_get_oem_id(uint32_t *id)
Get data from Cros Board Info.
int google_chromeec_get_usb_pd_power_info(enum usb_chg_type *type, uint16_t *current_max, uint16_t *voltage_max)
int google_chromeec_cbi_get_sku_id(uint32_t *id)
static void mainboard_init(struct device *dev)
static unsigned long mainboard_write_acpi_tables(const struct device *device, unsigned long current, acpi_rsdp_t *rsdp)
const char * smbios_system_sku(void)
#define FIZZ_MAX_TIME_WINDOW
void __weak variant_chip_display_init(void)
static uint8_t read_sku_id_from_gpio(void)
static uint8_t board_oem_id(void)
static uint8_t read_oem_id_from_gpio(void)
#define FIZZ_SKU_ID_I7_U42
static uint8_t board_sku_id(void)
static void mainboard_chip_init(void *chip_info)
static void mainboard_set_power_limits(struct soc_power_limits_config *conf)
#define FIZZ_SKU_ID_I3_U42
static void mainboard_enable(struct device *dev)
static void wait_for_hpd(gpio_t gpio, long timeout)
#define FIZZ_SKU_ID_I5_U42
#define FIZZ_MIN_DUTYCYCLE
void variant_nhlt_init(struct nhlt *nhlt)
void __weak variant_nhlt_oem_overrides(const char **oem_id, const char **oem_table_id, uint32_t *oem_revision)
int gpio_get(gpio_t gpio)
uint32_t gpio_base2_value(const gpio_t gpio[], int num_gpio)
void gpio_input(gpio_t gpio)
struct nhlt * nhlt_init(void)
uintptr_t nhlt_soc_serialize_oem_overrides(struct nhlt *nhlt, uintptr_t acpi_addr, const char *oem_id, const char *oem_table_id, uint32_t oem_revision)
static int stopwatch_expired(struct stopwatch *sw)
static long stopwatch_duration_msecs(struct stopwatch *sw)
static void stopwatch_init_msecs_expire(struct stopwatch *sw, long ms)
#define BIOS_INFO
BIOS_INFO - Expected events.
#define BIOS_WARNING
BIOS_WARNING - Bad configuration.
const struct pad_config *__weak variant_gpio_table(size_t *num)
const struct smm_save_state_ops *legacy_ops __weak
void gpio_configure_pads(const struct soc_amd_gpio *gpio_list_ptr, size_t size)
program a particular set of GPIO
void(* init)(void *chip_info)
void(* init)(struct device *dev)
struct device_operations * ops
uint32_t tdp_psyspl3_dutycycle
uint16_t tdp_pl2_override
uint32_t tdp_psyspl3_time
int snprintf(char *buf, size_t size, const char *fmt,...)
Note: This file is only for POSIX compatibility, and is meant to be chain-included via string....