summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mainboard/lenovo/haswell/Kconfig19
-rw-r--r--src/mainboard/lenovo/haswell/Makefile.inc7
-rw-r--r--src/mainboard/lenovo/haswell/romstage.c33
-rw-r--r--src/mainboard/lenovo/haswell/variants/t440p/data.vbt (renamed from src/mainboard/lenovo/haswell/data.vbt)bin4608 -> 4608 bytes
-rw-r--r--src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb (renamed from src/mainboard/lenovo/haswell/devicetree.cb)0
-rw-r--r--src/mainboard/lenovo/haswell/variants/t440p/gma-mainboard.ads (renamed from src/mainboard/lenovo/haswell/gma-mainboard.ads)0
-rw-r--r--src/mainboard/lenovo/haswell/variants/t440p/gpio.c (renamed from src/mainboard/lenovo/haswell/gpio.c)0
-rw-r--r--src/mainboard/lenovo/haswell/variants/t440p/hda_verb.c (renamed from src/mainboard/lenovo/haswell/hda_verb.c)0
-rw-r--r--src/mainboard/lenovo/haswell/variants/t440p/romstage.c39
9 files changed, 58 insertions, 40 deletions
diff --git a/src/mainboard/lenovo/haswell/Kconfig b/src/mainboard/lenovo/haswell/Kconfig
index 126e92da88..71d30f2778 100644
--- a/src/mainboard/lenovo/haswell/Kconfig
+++ b/src/mainboard/lenovo/haswell/Kconfig
@@ -1,7 +1,5 @@
-if BOARD_LENOVO_THINKPAD_T440P
-
-config BOARD_SPECIFIC_OPTIONS
- def_bool y
+config BOARD_LENOVO_HASWELL_COMMON
+ def_bool n
select BOARD_ROMSIZE_KB_12288
select EC_LENOVO_H8
select EC_LENOVO_PMH7
@@ -23,6 +21,11 @@ config BOARD_SPECIFIC_OPTIONS
select SOUTHBRIDGE_INTEL_LYNXPOINT
select SYSTEM_TYPE_LAPTOP
+config BOARD_LENOVO_THINKPAD_T440P
+ select BOARD_LENOVO_HASWELL_COMMON
+
+if BOARD_LENOVO_HASWELL_COMMON
+
config VBOOT
select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC
select GBB_FLAG_DISABLE_FWMP
@@ -38,6 +41,12 @@ config VBOOT_VBNV_OFFSET
hex
default 0x2a
+config VARIANT_DIR
+ default "t440p" if BOARD_LENOVO_THINKPAD_T440P
+
+config DEVICETREE
+ default "variants/\$(CONFIG_VARIANT_DIR)/devicetree.cb"
+
config FMDFILE
default "src/mainboard/\$(CONFIG_MAINBOARD_DIR)/vboot-rwab.fmd" if VBOOT
@@ -45,7 +54,7 @@ config MAINBOARD_DIR
default "lenovo/haswell"
config MAINBOARD_PART_NUMBER
- default "ThinkPad T440p"
+ default "ThinkPad T440p" if BOARD_LENOVO_THINKPAD_T440P
config VGA_BIOS_ID
string
diff --git a/src/mainboard/lenovo/haswell/Makefile.inc b/src/mainboard/lenovo/haswell/Makefile.inc
index ebe01aea99..8250d31184 100644
--- a/src/mainboard/lenovo/haswell/Makefile.inc
+++ b/src/mainboard/lenovo/haswell/Makefile.inc
@@ -1,2 +1,5 @@
-romstage-y += gpio.c
-ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += gma-mainboard.ads
+romstage-y += variants/$(VARIANT_DIR)/gpio.c
+romstage-y += variants/$(VARIANT_DIR)/romstage.c
+
+ramstage-y += mainboard.c
+ramstage-$(CONFIG_MAINBOARD_USE_LIBGFXINIT) += variants/$(VARIANT_DIR)/gma-mainboard.ads
diff --git a/src/mainboard/lenovo/haswell/romstage.c b/src/mainboard/lenovo/haswell/romstage.c
index 8a7da158e3..9b9a15fa21 100644
--- a/src/mainboard/lenovo/haswell/romstage.c
+++ b/src/mainboard/lenovo/haswell/romstage.c
@@ -34,36 +34,3 @@ void mb_late_romstage_setup(void)
pci_and_config32(HOST_BRIDGE, DEVEN, ~DEVEN_D1F0EN);
}
}
-
-void mb_get_spd_map(struct spd_info *spdi)
-{
- spdi->addresses[0] = 0x50;
- spdi->addresses[2] = 0x51;
-}
-
-const struct usb2_port_config mainboard_usb2_ports[MAX_USB2_PORTS] = {
- /* Length, Enable, OCn#, Location */
- { 0x0040, 1, 0, USB_PORT_BACK_PANEL }, /* USB3 */
- { 0x0040, 1, 0, USB_PORT_BACK_PANEL }, /* USB3 */
- { 0x0110, 1, 1, USB_PORT_BACK_PANEL }, /* USB2 charge */
- { 0x0040, 1, USB_OC_PIN_SKIP, USB_PORT_BACK_PANEL },
- { 0x0080, 1, USB_OC_PIN_SKIP, USB_PORT_DOCK },
- { 0x0080, 1, 2, USB_PORT_BACK_PANEL }, /* USB2 */
- { 0x0040, 1, 3, USB_PORT_BACK_PANEL },
- { 0x0040, 1, 3, USB_PORT_BACK_PANEL },
- { 0x0040, 1, 4, USB_PORT_BACK_PANEL },
- { 0x0110, 1, 4, USB_PORT_BACK_PANEL }, /* WWAN */
- { 0x0040, 1, 5, USB_PORT_INTERNAL }, /* WLAN */
- { 0x0040, 1, 5, USB_PORT_BACK_PANEL }, /* webcam */
- { 0x0080, 1, 6, USB_PORT_BACK_PANEL },
- { 0x0040, 1, 6, USB_PORT_BACK_PANEL },
-};
-
-const struct usb3_port_config mainboard_usb3_ports[MAX_USB3_PORTS] = {
- { 1, 0 },
- { 1, 0 },
- { 1, USB_OC_PIN_SKIP },
- { 1, USB_OC_PIN_SKIP },
- { 1, 1 },
- { 1, 1 }, /* WWAN */
-};
diff --git a/src/mainboard/lenovo/haswell/data.vbt b/src/mainboard/lenovo/haswell/variants/t440p/data.vbt
index 79077ccb0a..79077ccb0a 100644
--- a/src/mainboard/lenovo/haswell/data.vbt
+++ b/src/mainboard/lenovo/haswell/variants/t440p/data.vbt
Binary files differ
diff --git a/src/mainboard/lenovo/haswell/devicetree.cb b/src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb
index b7588ea77d..b7588ea77d 100644
--- a/src/mainboard/lenovo/haswell/devicetree.cb
+++ b/src/mainboard/lenovo/haswell/variants/t440p/devicetree.cb
diff --git a/src/mainboard/lenovo/haswell/gma-mainboard.ads b/src/mainboard/lenovo/haswell/variants/t440p/gma-mainboard.ads
index 62dfc38228..62dfc38228 100644
--- a/src/mainboard/lenovo/haswell/gma-mainboard.ads
+++ b/src/mainboard/lenovo/haswell/variants/t440p/gma-mainboard.ads
diff --git a/src/mainboard/lenovo/haswell/gpio.c b/src/mainboard/lenovo/haswell/variants/t440p/gpio.c
index 5494070b7a..5494070b7a 100644
--- a/src/mainboard/lenovo/haswell/gpio.c
+++ b/src/mainboard/lenovo/haswell/variants/t440p/gpio.c
diff --git a/src/mainboard/lenovo/haswell/hda_verb.c b/src/mainboard/lenovo/haswell/variants/t440p/hda_verb.c
index 60b21be1e4..60b21be1e4 100644
--- a/src/mainboard/lenovo/haswell/hda_verb.c
+++ b/src/mainboard/lenovo/haswell/variants/t440p/hda_verb.c
diff --git a/src/mainboard/lenovo/haswell/variants/t440p/romstage.c b/src/mainboard/lenovo/haswell/variants/t440p/romstage.c
new file mode 100644
index 0000000000..f158716ef2
--- /dev/null
+++ b/src/mainboard/lenovo/haswell/variants/t440p/romstage.c
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <stdint.h>
+#include <northbridge/intel/haswell/haswell.h>
+#include <northbridge/intel/haswell/raminit.h>
+#include <southbridge/intel/lynxpoint/pch.h>
+
+void mb_get_spd_map(struct spd_info *spdi)
+{
+ spdi->addresses[0] = 0x50;
+ spdi->addresses[2] = 0x51;
+}
+
+const struct usb2_port_config mainboard_usb2_ports[MAX_USB2_PORTS] = {
+ /* Length, Enable, OCn#, Location */
+ { 0x0040, 1, 0, USB_PORT_BACK_PANEL }, /* USB3 */
+ { 0x0040, 1, 0, USB_PORT_BACK_PANEL }, /* USB3 */
+ { 0x0110, 1, 1, USB_PORT_BACK_PANEL }, /* USB2 charge */
+ { 0x0040, 1, USB_OC_PIN_SKIP, USB_PORT_BACK_PANEL },
+ { 0x0080, 1, USB_OC_PIN_SKIP, USB_PORT_DOCK },
+ { 0x0080, 1, 2, USB_PORT_BACK_PANEL }, /* USB2 */
+ { 0x0040, 1, 3, USB_PORT_BACK_PANEL },
+ { 0x0040, 1, 3, USB_PORT_BACK_PANEL },
+ { 0x0040, 1, 4, USB_PORT_BACK_PANEL },
+ { 0x0110, 1, 4, USB_PORT_BACK_PANEL }, /* WWAN */
+ { 0x0040, 1, 5, USB_PORT_INTERNAL }, /* WLAN */
+ { 0x0040, 1, 5, USB_PORT_BACK_PANEL }, /* webcam */
+ { 0x0080, 1, 6, USB_PORT_BACK_PANEL },
+ { 0x0040, 1, 6, USB_PORT_BACK_PANEL },
+};
+
+const struct usb3_port_config mainboard_usb3_ports[MAX_USB3_PORTS] = {
+ { 1, 0 },
+ { 1, 0 },
+ { 1, USB_OC_PIN_SKIP },
+ { 1, USB_OC_PIN_SKIP },
+ { 1, 1 },
+ { 1, 1 }, /* WWAN */
+};