Debian Codegraph @

src/mainboard/google/guybrush/variants/dewatt/gpio.c

raw symbols SCIP
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
7 /* This table is used by guybrush variant */
8 static const struct soc_amd_gpio override_ramstage_gpio_table[] = {
9 /* Unused TP247*/
10 PAD_NC(GPIO_3),
11 /* Unused TP218*/
12 PAD_NC(GPIO_4),
13 /* Unused TP245*/
14 PAD_NC(GPIO_8),
15 /* Unused TP244*/
16 PAD_NC(GPIO_11),
17 /* Unused TP194*/
18 PAD_NC(GPIO_17),
19 /* Unused TP195*/
20 PAD_NC(GPIO_18),
21 /* Unused TP243*/
22 PAD_NC(GPIO_21),
23 /* Unused TP196*/
24 PAD_NC(GPIO_24),
25 /* Unused TP219*/
26 PAD_NC(GPIO_42),
27 /* Unused TP217*/
28 PAD_NC(GPIO_69),
29 /* Unused TP235*/
30 PAD_NC(GPIO_115),
31 /* Unused TP205*/
32 PAD_NC(GPIO_116),
33 /* Unused TP226*/
34 PAD_NC(GPIO_140),
35 /* Unused TP225*/
36 PAD_NC(GPIO_142),
37 /* Unused TP227*/
38 PAD_NC(GPIO_144),
39 /* SOC_TCHPAD_INT_ODL */
40 PAD_SCI(GPIO_9, PULL_NONE, LEVEL_LOW),
41 };
42
43 static const struct soc_amd_gpio override_early_gpio_table[] = {
44 /* Unused TP245*/
45 PAD_NC(GPIO_8),
46 /* Unused TP195*/
47 PAD_NC(GPIO_18),
48 /* Unused TP196*/
49 PAD_NC(GPIO_24),
50 /* Unused TP217*/
51 PAD_NC(GPIO_69),
52 };
53
54 /* This table is used by guybrush variant */
55 static const struct soc_amd_gpio override_romstage_gpio_table[] = {
56 /* Unused TP195*/
57 PAD_NC(GPIO_18),
58 /* Unused TP217*/
59 PAD_NC(GPIO_69),
60 };
61
62
63 static const struct soc_amd_gpio override_bootblock_gpio_table[] = {
64 /* Unused TP196*/
65 PAD_NC(GPIO_24),
66 };
67
68 const struct soc_amd_gpio *variant_override_gpio_table(size_t *size)
69 {
70 *size = ARRAY_SIZE(override_ramstage_gpio_table);
71 return override_ramstage_gpio_table;
72 }
73
74 const struct soc_amd_gpio *variant_early_override_gpio_table(size_t *size)
75 {
76 *size = ARRAY_SIZE(override_early_gpio_table);
77 return override_early_gpio_table;
78 }
79
80 const struct soc_amd_gpio *variant_romstage_override_gpio_table(size_t *size)
81 {
82 *size = ARRAY_SIZE(override_romstage_gpio_table);
83 return override_romstage_gpio_table;
84 }
85
86 const struct soc_amd_gpio *variant_bootblock_override_gpio_table(size_t *size)
87 {
88 *size = ARRAY_SIZE(override_bootblock_gpio_table);
89 return override_bootblock_gpio_table;
90 }