| 1 |
|
| 2 |
|
| 3 |
#include <bootblock_common.h> |
| 4 |
#include <superio/ite/it8718f/it8718f.h> |
| 5 |
#include <superio/ite/common/ite.h> |
| 6 |
#include <northbridge/intel/i945/i945.h> |
| 7 |
#include <southbridge/intel/i82801gx/i82801gx.h> |
| 8 |
|
| 9 |
#define SERIAL_DEV PNP_DEV(0x2e, IT8718F_SP1) |
| 10 |
#define GPIO_DEV PNP_DEV(0x2e, IT8718F_GPIO) |
| 11 |
#define EC_DEV PNP_DEV(0x2e, IT8718F_EC) |
| 12 |
|
| 13 |
void bootblock_mainboard_early_init(void) |
| 14 |
{ |
| 15 |
|
| 16 |
ite_reg_write(GPIO_DEV, 0x25, 0x40); |
| 17 |
ite_reg_write(GPIO_DEV, 0x26, 0x3f); |
| 18 |
ite_reg_write(GPIO_DEV, 0x28, 0x41); |
| 19 |
ite_reg_write(GPIO_DEV, 0x29, 0x88); |
| 20 |
ite_reg_write(GPIO_DEV, 0x2c, 0x1c); |
| 21 |
ite_reg_write(GPIO_DEV, 0x62, 0x08); |
| 22 |
ite_kill_watchdog(GPIO_DEV); |
| 23 |
ite_reg_write(GPIO_DEV, 0xb1, 0x01); |
| 24 |
ite_reg_write(GPIO_DEV, 0xb8, 0x80); |
| 25 |
ite_reg_write(GPIO_DEV, 0xbb, 0x40); |
| 26 |
ite_reg_write(GPIO_DEV, 0xc0, 0x00); |
| 27 |
ite_reg_write(GPIO_DEV, 0xc3, 0x00); |
| 28 |
ite_reg_write(GPIO_DEV, 0xc8, 0x00); |
| 29 |
ite_reg_write(GPIO_DEV, 0xcb, 0x00); |
| 30 |
ite_reg_write(GPIO_DEV, 0xf6, 0x26); |
| 31 |
ite_reg_write(GPIO_DEV, 0xfc, 0x01); |
| 32 |
|
| 33 |
ite_reg_write(EC_DEV, 0x70, 0x00); |
| 34 |
ite_reg_write(EC_DEV, 0x30, 0xff); |
| 35 |
|
| 36 |
ite_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); |
| 37 |
|
| 38 |
|
| 39 |
ite_reg_write(GPIO_DEV, 0xEF, 0x7E); |
| 40 |
} |
| 41 |
|
| 42 |
void mainboard_late_rcba_config(void) |
| 43 |
{ |
| 44 |
|
| 45 |
RCBA32(CG) = 0x00000001; |
| 46 |
} |