blob: 54236a1ffc03fc39c901672f9f6718bcb27ba12d [file] [log] [blame]
Angel Pons89ab2502020-04-03 01:22:28 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Bill XIE012ef772018-11-29 20:37:35 +08002
Bill XIE012ef772018-11-29 20:37:35 +08003#include <console/console.h>
4#include <cbfs.h>
5#include <northbridge/intel/sandybridge/raminit_native.h>
Elyes HAOUASa1e22b82019-03-18 22:49:36 +01006#include <string.h>
Bill XIE012ef772018-11-29 20:37:35 +08007#include <southbridge/intel/bd82x6x/pch.h>
8#include <ec/lenovo/pmh7/pmh7.h>
9
10const struct southbridge_usb_port mainboard_usb_ports[] = {
11 { 1, 0, 0 }, /* SSP1: right */
12 { 1, 0, 1 }, /* SSP2: left, EHCI Debug */
Elyes HAOUAS44f558e2020-02-24 13:26:04 +010013 { 1, 1, 3 }, /* SSP3: dock USB3 */
14 { 1, 1, -1 }, /* B0P4: wwan USB */
15 { 1, 1, 2 }, /* B0P5: dock USB2 */
Bill XIE012ef772018-11-29 20:37:35 +080016 { 0, 0, -1 }, /* B0P6 */
17 { 0, 0, -1 }, /* B0P7 */
18 { 1, 2, -1 }, /* B0P8: unknown */
19 { 1, 0, -1 }, /* B1P1: smart card reader */
20 { 0, 2, 5 }, /* B1P2 */
21 { 1, 1, -1 }, /* B1P3: fingerprint reader */
22 { 0, 0, -1 }, /* B1P4 */
Elyes HAOUAS44f558e2020-02-24 13:26:04 +010023 { 1, 1, -1 }, /* B1P5: wlan USB */
Bill XIE012ef772018-11-29 20:37:35 +080024 { 1, 1, -1 }, /* B1P6: Camera */
25};
26
27void mainboard_get_spd(spd_raw_data *spd, bool id_only)
28{
Peter Lemenkov6b7d40a2020-01-22 11:40:16 +010029 /* C1S0 is a soldered RAM with no real SPD. Use stored SPD. */
Bill XIE012ef772018-11-29 20:37:35 +080030 size_t spd_file_len = 0;
Julius Werner834b3ec2020-03-04 16:52:08 -080031 void *spd_file = cbfs_map("spd.bin", &spd_file_len);
Bill XIE012ef772018-11-29 20:37:35 +080032
33 if (!spd_file || spd_file_len < sizeof(spd_raw_data))
34 die("SPD data for C1S0 not found.");
35
36 memcpy(&spd[0], spd_file, spd_file_len);
37 read_spd(&spd[2], 0x51, id_only);
38}