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 */
24
PAD_NC
(
GPIO_141
),
25
/* GPIO_143 NC */
26
PAD_NC
(
GPIO_143
),
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 */
45
PAD_NC
(
GPIO_141
),
46
/* GPIO_143 NC */
47
PAD_NC
(
GPIO_143
),
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) {
59
*size =
ARRAY_SIZE
(
woomax_bid0_gpio_set_stage_ram
);
60
return
woomax_bid0_gpio_set_stage_ram
;
61
}
62
*size =
ARRAY_SIZE
(
woomax_gpio_set_stage_ram
);
63
return
woomax_gpio_set_stage_ram
;
64
}
ARRAY_SIZE
#define ARRAY_SIZE(a)
Definition:
helpers.h:12
google_chromeec_cbi_get_board_version
int google_chromeec_cbi_get_board_version(uint32_t *version)
Definition:
ec.c:870
variant_override_gpio_table
const struct pad_config *__weak variant_override_gpio_table(size_t *num)
Definition:
gpio.c:450
woomax_bid0_gpio_set_stage_ram
static const struct soc_amd_gpio woomax_bid0_gpio_set_stage_ram[]
Definition:
gpio.c:6
woomax_gpio_set_stage_ram
static const struct soc_amd_gpio woomax_gpio_set_stage_ram[]
Definition:
gpio.c:29
GPIO_90
#define GPIO_90
Definition:
gpio.h:66
GPIO_143
#define GPIO_143
Definition:
gpio.h:90
GPIO_89
#define GPIO_89
Definition:
gpio.h:65
GPIO_69
#define GPIO_69
Definition:
gpio.h:55
GPIO_5
#define GPIO_5
Definition:
gpio.h:26
GPIO_84
#define GPIO_84
Definition:
gpio.h:60
GPIO_141
#define GPIO_141
Definition:
gpio.h:88
GPIO_4
#define GPIO_4
Definition:
gpio.h:25
GPIO_140
#define GPIO_140
Definition:
gpio.h:87
GPIO_6
#define GPIO_6
Definition:
gpio.h:27
PAD_NC
#define PAD_NC(pin)
Definition:
gpio_defs.h:263
PAD_GPO
#define PAD_GPO(pin, direction)
Definition:
gpio_defs.h:220
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
soc_amd_gpio
Definition:
gpio.h:11
src
mainboard
google
zork
variants
woomax
gpio.c
Generated by
1.9.1