coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
early_init.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include <bootblock_common.h>
8 
9 #define GPIO_DEV PNP_DEV(0x2e, IT8720F_GPIO)
10 
12 {
13  /* Set up GPIOs on Super I/O. */
14  ite_reg_write(GPIO_DEV, 0x25, 0x00); // GPIO set 1
15  ite_reg_write(GPIO_DEV, 0x26, 0x0c); // GPIO set 2
16  ite_reg_write(GPIO_DEV, 0x27, 0x70); // GPIO set 3
17  ite_reg_write(GPIO_DEV, 0x28, 0x40); // GPIO set 4
18  ite_reg_write(GPIO_DEV, 0x29, 0x00); // GPIO set 5
19 
20  /* Enable 3VSB during Suspend-to-RAM */
22 
23  /* Delay PWROK2 after 3VSBSW# during resume from Suspend-to-RAM */
25 }
26 
27 void mb_get_spd_map(u8 spd_map[4])
28 {
29  spd_map[0] = 0x50;
30  spd_map[1] = 0x51;
31  spd_map[2] = 0x52;
32  spd_map[3] = 0x53;
33 }
void ite_delay_pwrgd3(pnp_devfn_t dev)
Definition: early_serial.c:112
void ite_reg_write(pnp_devfn_t dev, u8 reg, u8 value)
Definition: early_serial.c:41
void ite_enable_3vsbsw(pnp_devfn_t dev)
Definition: early_serial.c:85
void bootblock_mainboard_early_init(void)
Definition: early_init.c:11
#define GPIO_DEV
Definition: early_init.c:9
void mb_get_spd_map(u8 spd_map[4])
Definition: early_init.c:27
uint8_t u8
Definition: stdint.h:45