Debian Codegraph @

src/mainboard/acer/g43t-am3/variants/q45t-am/gpio.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <southbridge/intel/common/gpio.h>
4
5 static const struct pch_gpio_set1 pch_gpio_set1_mode = {
6 .gpio0 = GPIO_MODE_GPIO,
7 .gpio1 = GPIO_MODE_GPIO,
8 .gpio6 = GPIO_MODE_GPIO,
9 .gpio7 = GPIO_MODE_GPIO,
10 .gpio9 = GPIO_MODE_GPIO,
11 .gpio13 = GPIO_MODE_GPIO,
12 .gpio14 = GPIO_MODE_GPIO,
13 .gpio17 = GPIO_MODE_GPIO,
14 .gpio18 = GPIO_MODE_GPIO,
15 .gpio20 = GPIO_MODE_GPIO,
16 .gpio27 = GPIO_MODE_GPIO,
17 .gpio28 = GPIO_MODE_GPIO,
18 };
19
20 static const struct pch_gpio_set1 pch_gpio_set1_direction = {
21 .gpio0 = GPIO_DIR_INPUT,
22 .gpio1 = GPIO_DIR_INPUT,
23 .gpio6 = GPIO_DIR_INPUT,
24 .gpio7 = GPIO_DIR_INPUT,
25 .gpio9 = GPIO_DIR_OUTPUT,
26 .gpio13 = GPIO_DIR_INPUT,
27 .gpio14 = GPIO_DIR_INPUT,
28 .gpio17 = GPIO_DIR_INPUT,
29 .gpio18 = GPIO_DIR_OUTPUT,
30 .gpio20 = GPIO_DIR_OUTPUT,
31 .gpio27 = GPIO_DIR_OUTPUT,
32 .gpio28 = GPIO_DIR_OUTPUT,
33 };
34
35 static const struct pch_gpio_set1 pch_gpio_set1_level = {
36 .gpio9 = GPIO_LEVEL_HIGH,
37 .gpio18 = GPIO_LEVEL_HIGH,
38 .gpio20 = GPIO_LEVEL_LOW,
39 .gpio27 = GPIO_LEVEL_LOW,
40 .gpio28 = GPIO_LEVEL_HIGH,
41 };
42
43 static const struct pch_gpio_set1 pch_gpio_set1_invert = {
44 .gpio6 = GPIO_INVERT,
45 .gpio13 = GPIO_INVERT,
46 };
47
48 static const struct pch_gpio_set1 pch_gpio_set1_blink = {
49 .gpio18 = GPIO_BLINK,
50
51 };
52
53 static const struct pch_gpio_set2 pch_gpio_set2_mode = {
54 .gpio32 = GPIO_MODE_GPIO,
55 .gpio33 = GPIO_MODE_GPIO,
56 .gpio34 = GPIO_MODE_GPIO,
57 .gpio35 = GPIO_MODE_NATIVE,
58 .gpio36 = GPIO_MODE_NATIVE,
59 .gpio37 = GPIO_MODE_NATIVE,
60 .gpio38 = GPIO_MODE_NATIVE,
61 .gpio39 = GPIO_MODE_NATIVE,
62 .gpio48 = GPIO_MODE_NATIVE,
63 .gpio49 = GPIO_MODE_GPIO,
64 .gpio56 = GPIO_MODE_GPIO,
65 .gpio57 = GPIO_MODE_GPIO,
66 .gpio58 = GPIO_MODE_NATIVE,
67 .gpio60 = GPIO_MODE_GPIO,
68 };
69
70 static const struct pch_gpio_set2 pch_gpio_set2_direction = {
71 .gpio32 = GPIO_DIR_OUTPUT,
72 .gpio33 = GPIO_DIR_INPUT,
73 .gpio34 = GPIO_DIR_INPUT,
74 .gpio49 = GPIO_DIR_OUTPUT,
75 .gpio56 = GPIO_DIR_INPUT,
76 .gpio57 = GPIO_DIR_INPUT,
77 .gpio60 = GPIO_DIR_OUTPUT,
78 };
79
80 static const struct pch_gpio_set2 pch_gpio_set2_level = {
81 .gpio32 = GPIO_LEVEL_HIGH,
82 .gpio49 = GPIO_LEVEL_HIGH,
83 .gpio60 = GPIO_LEVEL_LOW,
84 };
85
86 static const struct pch_gpio_set3 pch_gpio_set3_mode = {
87 .gpio72 = GPIO_MODE_GPIO,
88 };
89
90 static const struct pch_gpio_set3 pch_gpio_set3_direction = {
91 .gpio72 = GPIO_DIR_INPUT,
92 };
93
94 const struct pch_gpio_map mainboard_gpio_map = {
95 .set1 = {
96 .mode = &pch_gpio_set1_mode,
97 .direction = &pch_gpio_set1_direction,
98 .level = &pch_gpio_set1_level,
99 .blink = &pch_gpio_set1_blink,
100 .invert = &pch_gpio_set1_invert,
101 },
102 .set2 = {
103 .mode = &pch_gpio_set2_mode,
104 .direction = &pch_gpio_set2_direction,
105 .level = &pch_gpio_set2_level,
106 },
107 .set3 = {
108 .mode = &pch_gpio_set3_mode,
109 .direction = &pch_gpio_set3_direction,
110 },
111
112 };