Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2018 Arthur Heymans <arthur@aheymans.xyz> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | */ |
| 16 | |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 17 | #include <southbridge/intel/i82801jx/i82801jx.h> |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 18 | #include <northbridge/intel/x4x/x4x.h> |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 19 | #include <superio/winbond/w83667hg-a/w83667hg-a.h> |
| 20 | #include <superio/winbond/common/winbond.h> |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 21 | |
| 22 | #define SERIAL_DEV PNP_DEV(0x2e, W83667HG_A_SP1) |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 23 | |
Arthur Heymans | bf53acc | 2019-11-11 21:14:39 +0100 | [diff] [blame^] | 24 | void mb_lpc_setup(void) |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 25 | { |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 26 | /* TODO? */ |
| 27 | RCBA32(RCBA_CG) = 0xbf7f001f; |
| 28 | RCBA32(0x3430) = 0x00000002; |
| 29 | RCBA32(0x3f00) = 0x00000038; |
Arthur Heymans | bf53acc | 2019-11-11 21:14:39 +0100 | [diff] [blame^] | 30 | |
| 31 | winbond_enable_serial(SERIAL_DEV, CONFIG_TTYS0_BASE); |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 32 | } |
| 33 | |
Arthur Heymans | bf53acc | 2019-11-11 21:14:39 +0100 | [diff] [blame^] | 34 | void mb_get_spd_map(u8 spd_map[4]) |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 35 | { |
Arthur Heymans | bf53acc | 2019-11-11 21:14:39 +0100 | [diff] [blame^] | 36 | spd_map[0] = 0x50; |
| 37 | spd_map[1] = 0x51; |
| 38 | spd_map[2] = 0x52; |
| 39 | spd_map[3] = 0x53; |
Arthur Heymans | 1541256 | 2018-07-18 11:48:47 +0200 | [diff] [blame] | 40 | } |