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/gpio.h>
4 #include <baseboard/variants.h>
5 #include <gpio.h>
6 #include <soc/gpio.h>
7 #include <baseboard/variants.h>
8 
9 /* This table is used by guybrush variant */
10 static const struct soc_amd_gpio override_ramstage_gpio_table[] = {
11  /* Unused TP247*/
12  PAD_NC(GPIO_3),
13  /* Unused TP218*/
14  PAD_NC(GPIO_4),
15  /* Unused TP245*/
16  PAD_NC(GPIO_8),
17  /* Unused TP244*/
18  PAD_NC(GPIO_11),
19  /* Unused TP194*/
20  PAD_NC(GPIO_17),
21  /* Unused TP195*/
22  PAD_NC(GPIO_18),
23  /* Unused TP243*/
24  PAD_NC(GPIO_21),
25  /* Unused TP196*/
26  PAD_NC(GPIO_24),
27  /* Unused TP219*/
28  PAD_NC(GPIO_42),
29  /* Unused TP217*/
30  PAD_NC(GPIO_69),
31  /* Unused TP235*/
33  /* Unused TP205*/
35  /* Unused TP226*/
37  /* Unused TP225*/
39  /* Unused TP227*/
41  /* SOC_TCHPAD_INT_ODL */
42  PAD_SCI(GPIO_9, PULL_NONE, LEVEL_LOW),
43 };
44 
45 static const struct soc_amd_gpio override_early_gpio_table[] = {
46  /* Unused TP245*/
47  PAD_NC(GPIO_8),
48  /* Unused TP195*/
49  PAD_NC(GPIO_18),
50  /* Unused TP196*/
51  PAD_NC(GPIO_24),
52  /* Unused TP217*/
53  PAD_NC(GPIO_69),
54 };
55 
56 /* This table is used by guybrush variant */
57 static const struct soc_amd_gpio override_pcie_gpio_table[] = {
58  /* Unused TP195*/
59  PAD_NC(GPIO_18),
60  /* Unused TP217*/
61  PAD_NC(GPIO_69),
62 };
63 
64 
65 static const struct soc_amd_gpio override_bootblock_gpio_table[] = {
66  /* Unused TP196*/
67  PAD_NC(GPIO_24),
68 };
69 
70 const struct soc_amd_gpio *variant_override_gpio_table(size_t *size)
71 {
74 }
75 
77 {
80 }
81 
83 {
86 }
87 
89 {
92 }
#define GPIO_18
Definition: gpio_ftns.h:17
#define GPIO_17
Definition: gpio_ftns.h:16
#define GPIO_11
Definition: gpio_ftns.h:13
#define ARRAY_SIZE(a)
Definition: helpers.h:12
#define PULL_NONE
Definition: buildOpts.c:72
const struct pad_config *__weak variant_override_gpio_table(size_t *num)
Definition: gpio.c:450
const struct soc_amd_gpio *__weak variant_bootblock_override_gpio_table(size_t *size)
Definition: gpio.c:324
const struct soc_amd_gpio *__weak variant_early_override_gpio_table(size_t *size)
Definition: gpio.c:317
const struct soc_amd_gpio *__weak variant_pcie_override_gpio_table(size_t *size)
Definition: gpio.c:330
static const struct soc_amd_gpio override_pcie_gpio_table[]
Definition: gpio.c:57
static const struct soc_amd_gpio override_ramstage_gpio_table[]
Definition: gpio.c:10
static const struct soc_amd_gpio override_bootblock_gpio_table[]
Definition: gpio.c:65
static const struct soc_amd_gpio override_early_gpio_table[]
Definition: gpio.c:45
#define GPIO_69
Definition: gpio.h:55
#define GPIO_8
Definition: gpio.h:29
#define GPIO_24
Definition: gpio.h:42
#define GPIO_4
Definition: gpio.h:25
#define GPIO_140
Definition: gpio.h:87
#define GPIO_116
Definition: gpio.h:78
#define GPIO_115
Definition: gpio.h:77
#define GPIO_9
Definition: gpio.h:30
#define GPIO_3
Definition: gpio.h:24
#define GPIO_142
Definition: gpio.h:89
#define GPIO_144
Definition: gpio.h:91
#define GPIO_21
Definition: gpio.h:39
#define GPIO_42
Definition: gpio.h:50
#define PAD_SCI(pin, pull, trigger)
Definition: gpio_defs.h:229
#define PAD_NC(pin)
Definition: gpio_defs.h:263