coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gsbi.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause */
2 
3 #include <soc/gpio.h>
4 #include <soc/gsbi.h>
5 #include <soc/qup.h>
6 
7 #define GPIO_FUNC_I2C 0x1
8 
10 {
11  switch (gsbi_id) {
12  case GSBI_ID_7:
17  break;
18  case GSBI_ID_4:
19  /* Configure GPIOs 13 - SCL, 12 - SDA, 2mA gpio_en */
24  break;
25  case GSBI_ID_1:
26  /* Configure GPIOs 54 - SCL, 53 - SDA, 2mA gpio_en */
31  break;
32  default:
33  return 1;
34  }
35 
36  return 0;
37 }
gsbi_id_t
Definition: gsbi.h:18
@ GSBI_ID_1
Definition: gsbi.h:19
@ GSBI_ID_7
Definition: gsbi.h:25
@ GSBI_ID_4
Definition: gsbi.h:22
#define GPIO_FUNC_I2C
Definition: gsbi.c:7
int gsbi_init_board(gsbi_id_t gsbi_id)
Definition: gsbi.c:9
@ GPIO_2MA
Definition: gpio_common.h:70
@ GPIO_NO_PULL
Definition: gpio_common.h:62
void gpio_tlmm_config_set(gpio_t gpio, unsigned int func, unsigned int pull, unsigned int drvstr, unsigned int enable)
Definition: gpio.c:32