blob: 65a18199e76eaa34c3a7394a78538887793846b5 [file] [log] [blame]
Angel Pons381c4eb2020-04-03 01:22:06 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Bill XIEee8da1c2017-12-16 10:15:18 +08002
Arthur Heymansfa5d0f82019-11-12 19:11:50 +01003#include <bootblock_common.h>
Bill XIEee8da1c2017-12-16 10:15:18 +08004#include <string.h>
5#include <cbfs.h>
6#include <console/console.h>
Bill XIEee8da1c2017-12-16 10:15:18 +08007#include <northbridge/intel/sandybridge/raminit_native.h>
8#include <southbridge/intel/bd82x6x/pch.h>
9#include <ec/hp/kbc1126/ec.h>
10
Bill XIEee8da1c2017-12-16 10:15:18 +080011const struct southbridge_usb_port mainboard_usb_ports[] = {
12 { 1, 1, 0 },
13 { 1, 0, 0 },
14 { 1, 1, 1 },
15 { 0, 1, 1 },
16 { 0, 0, 2 },
17 { 1, 0, 2 },
18 { 0, 0, 3 },
19 { 0, 0, 3 },
20 { 1, 0, 4 }, /* B1P1: Digitizer */
21 { 1, 0, 4 }, /* B1P2: wlan USB, EHCI debug */
22 { 1, 1, 5 }, /* B1P3: Camera */
23 { 0, 0, 5 }, /* B1P4 */
24 { 1, 0, 6 }, /* B1P5: wwan USB */
25 { 0, 0, 6 }, /* B1P6 */
26};
27
Arthur Heymansfa5d0f82019-11-12 19:11:50 +010028void bootblock_mainboard_early_init(void)
Bill XIEee8da1c2017-12-16 10:15:18 +080029{
30 kbc1126_enter_conf();
31 kbc1126_mailbox_init();
32 kbc1126_kbc_init();
33 kbc1126_ec_init();
34 kbc1126_pm1_init();
35 kbc1126_exit_conf();
36}
37
38void mainboard_get_spd(spd_raw_data *spd, bool id_only)
39{
40 /* C1S0 is a soldered RAM with no real SPD. Use stored SPD. */
41 size_t spd_file_len = 0;
Julius Werner834b3ec2020-03-04 16:52:08 -080042 void *spd_file = cbfs_map("spd.bin", &spd_file_len);
Bill XIEee8da1c2017-12-16 10:15:18 +080043
44 if (!spd_file || spd_file_len < sizeof(spd_raw_data))
45 die("SPD data for C1S0 not found.");
46
47 read_spd(&spd[0], 0x50, id_only);
48 memcpy(&spd[2], spd_file, spd_file_len);
49}