coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gpio.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <baseboard/variants.h>
4 #include <soc/gpio.h>
5 
6 static const struct soc_amd_gpio woomax_bid0_gpio_set_stage_ram[] = {
7  /* GPIO_4 NC */
8  PAD_NC(GPIO_4),
9  /* GPIO_5 NC */
10  PAD_NC(GPIO_5),
11  /* GPIO_6 NC */
12  PAD_NC(GPIO_6),
13  /* GPIO_69 NC */
14  PAD_NC(GPIO_69),
15  /* RAM_ID_4 */
16  PAD_NC(GPIO_84),
17  /* EN_DEV_BEEP_L */
18  PAD_GPO(GPIO_89, HIGH),
19  /* TP */
20  PAD_NC(GPIO_90),
21  /* USI_RESET */
22  PAD_GPO(GPIO_140, HIGH),
23  /* GPIO_141 NC */
25  /* GPIO_143 NC */
27 };
28 
29 static const struct soc_amd_gpio woomax_gpio_set_stage_ram[] = {
30  /* GPIO_4 NC */
31  PAD_NC(GPIO_4),
32  /* GPIO_5 NC */
33  PAD_NC(GPIO_5),
34  /* GPIO_6 NC */
35  PAD_NC(GPIO_6),
36  /* GPIO_69 NC */
37  PAD_NC(GPIO_69),
38  /* RAM_ID_4 */
39  PAD_NC(GPIO_84),
40  /* EN_DEV_BEEP_L */
41  PAD_GPO(GPIO_89, HIGH),
42  /* USI_RESET */
43  PAD_GPO(GPIO_140, HIGH),
44  /* GPIO_141 NC */
46  /* GPIO_143 NC */
48 };
49 
50 const struct soc_amd_gpio *variant_override_gpio_table(size_t *size)
51 {
52  uint32_t board_version;
53 
54  /* If board version cannot be read, assume it is board_version 0. */
55  if (google_chromeec_cbi_get_board_version(&board_version) != 0)
56  board_version = 0;
57 
58  if (board_version == 0) {
61  }
64 }
#define ARRAY_SIZE(a)
Definition: helpers.h:12
int google_chromeec_cbi_get_board_version(uint32_t *version)
Definition: ec.c:870
const struct pad_config *__weak variant_override_gpio_table(size_t *num)
Definition: gpio.c:450
static const struct soc_amd_gpio woomax_bid0_gpio_set_stage_ram[]
Definition: gpio.c:6
static const struct soc_amd_gpio woomax_gpio_set_stage_ram[]
Definition: gpio.c:29
#define GPIO_90
Definition: gpio.h:66
#define GPIO_143
Definition: gpio.h:90
#define GPIO_89
Definition: gpio.h:65
#define GPIO_69
Definition: gpio.h:55
#define GPIO_5
Definition: gpio.h:26
#define GPIO_84
Definition: gpio.h:60
#define GPIO_141
Definition: gpio.h:88
#define GPIO_4
Definition: gpio.h:25
#define GPIO_140
Definition: gpio.h:87
#define GPIO_6
Definition: gpio.h:27
#define PAD_NC(pin)
Definition: gpio_defs.h:263
#define PAD_GPO(pin, direction)
Definition: gpio_defs.h:220
unsigned int uint32_t
Definition: stdint.h:14