blob: 338b9186237fa0a88177b5771f359126d123dc5c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __BASEBOARD_VARIANTS_H__
#define __BASEBOARD_VARIANTS_H__
#include <stddef.h>
#include <boardid.h>
#include <ec/google/chromeec/ec.h>
#include <soc/platform_descriptors.h>
#include "chip.h"
const struct sci_source *variant_gpe_table(size_t *num);
const struct soc_amd_gpio *variant_early_gpio_table(size_t *size);
/*
* This function provides base GPIO configuration table. It is typically provided by
* baseboard using a weak implementation. If GPIO configuration for a variant differs
* significantly from the baseboard, then the variant can also provide a strong implementation
* of this function.
*/
const struct soc_amd_gpio *variant_base_gpio_table(size_t *size);
/*
* This function allows variant to override any GPIOs that are different than the base GPIO
* configuration provided by variant_base_gpio_table().
*/
const struct soc_amd_gpio *variant_override_gpio_table(size_t *size);
/*
* This function provides GPIO table for the pads that need to be configured when entering
* sleep.
*/
const struct soc_amd_gpio *variant_sleep_gpio_table(size_t *size, int slp_typ);
/* Modify devictree settings during ramstage. */
void variant_devtree_update(void);
/* Update audio configuration in devicetree during ramstage. */
void variant_audio_update(void);
/* Update bluetooth configuration in devicetree during ramstage. */
void variant_bluetooth_update(void);
/* Update touchscreen configuration in devicetree during ramstage. */
void variant_touchscreen_update(void);
/* Configure PCIe GPIOs as per variant sequencing requirements. */
void variant_pcie_gpio_configure(void);
/* Per variant FSP-S initialization, default implementation in baseboard and
* overrideable by the variant. */
void variant_get_dxio_ddi_descriptors(const fsp_dxio_descriptor **dxio_descs,
size_t *dxio_num,
const fsp_ddi_descriptor **ddi_descs,
size_t *ddi_num);
/* Provide the descriptors for the associated baseboard for the variant. These functions
* can be used for obtaining the baseboard's descriptors if the variant followed the
* baseboard. */
const fsp_dxio_descriptor *baseboard_get_dxio_descriptors(size_t *num);
const fsp_ddi_descriptor *baseboard_get_ddi_descriptors(size_t *num);
/* Retrieve attributes from FW_CONFIG in CBI. */
/* Return 0 if non-existent, 1 if present. */
int variant_has_emmc(void);
/* Return 0 if non-existent, 1 if present. */
int variant_has_nvme(void);
/* Determine if booting in factory by using CROS_SKU_UNPROVISIONED. */
int boot_is_factory_unprovisioned(void);
/* Return true if variant uses v3 version of reference schematics. */
bool variant_uses_v3_schematics(void);
/* Return true if variant uses v3.6 version of reference schematics. */
bool variant_uses_v3_6_schematics(void);
/* Return true if variant uses CODEC_GPI pin for headphone jack interrupt. */
bool variant_uses_codec_gpi(void);
/* Return true if variant has active low power enable fow WiFi. */
bool variant_has_active_low_wifi_power(void);
/* Return value of daughterboard ID */
int variant_get_daughterboard_id(void);
#endif /* __BASEBOARD_VARIANTS_H__ */
|