summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/starlabs/labtop/cmos.default1
-rw-r--r--src/mainboard/starlabs/labtop/cmos.layout1
-rw-r--r--src/mainboard/starlabs/labtop/variants/tgl/devtree.c12
-rw-r--r--src/mainboard/starlabs/labtop/variants/tgl/romstage.c8
4 files changed, 22 insertions, 0 deletions
diff --git a/src/mainboard/starlabs/labtop/cmos.default b/src/mainboard/starlabs/labtop/cmos.default
index b4b2d2600b..589189f9dd 100644
--- a/src/mainboard/starlabs/labtop/cmos.default
+++ b/src/mainboard/starlabs/labtop/cmos.default
@@ -14,6 +14,7 @@ webcam=Enable
microphone=Enable
legacy_8254_timer=Enable
usb_always_on=Disable
+thunderbolt=Disable
# EC
kbl_timeout=30 seconds
fn_ctrl_swap=Disable
diff --git a/src/mainboard/starlabs/labtop/cmos.layout b/src/mainboard/starlabs/labtop/cmos.layout
index 2601e9818a..85ec47772c 100644
--- a/src/mainboard/starlabs/labtop/cmos.layout
+++ b/src/mainboard/starlabs/labtop/cmos.layout
@@ -30,6 +30,7 @@ entries
520 1 e 1 microphone
528 1 e 1 legacy_8254_timer
536 1 e 1 usb_always_on
+544 1 e 1 thunderbolt
# coreboot config options: EC
600 3 e 4 kbl_timeout
diff --git a/src/mainboard/starlabs/labtop/variants/tgl/devtree.c b/src/mainboard/starlabs/labtop/variants/tgl/devtree.c
index 034877c66e..42a5aff366 100644
--- a/src/mainboard/starlabs/labtop/variants/tgl/devtree.c
+++ b/src/mainboard/starlabs/labtop/variants/tgl/devtree.c
@@ -19,6 +19,9 @@ void devtree_update(void)
&cfg->power_limits_config[POWER_LIMITS_U_4_CORE];
struct device *nic_dev = pcidev_on_root(0x14, 3);
+ struct device *tbt_pci_dev = pcidev_on_root(0x07, 0);
+ struct device *tbt_dma_dev = pcidev_on_root(0x0d, 2);
+
/* Update PL1 & PL2 based on CMOS settings */
switch (get_uint_option("power_profile", 0)) {
@@ -50,4 +53,13 @@ void devtree_update(void)
/* Enable/Disable Webcam based on CMOS settings */
if (get_uint_option("webcam", 1) == 0)
cfg->usb2_ports[3].enable = 0;
+
+ /* Enable/Disable Thunderbolt based on CMOS settings */
+ if (get_uint_option("thunderbolt", 1) == 0) {
+ cfg->UsbTcPortEn = 0;
+ cfg->TcssXhciEn = 0;
+ cfg->TcssD3ColdDisable = 0;
+ tbt_pci_dev->enabled = 0;
+ tbt_dma_dev->enabled = 0;
+ }
}
diff --git a/src/mainboard/starlabs/labtop/variants/tgl/romstage.c b/src/mainboard/starlabs/labtop/variants/tgl/romstage.c
index dae2142a91..1d65c61ba5 100644
--- a/src/mainboard/starlabs/labtop/variants/tgl/romstage.c
+++ b/src/mainboard/starlabs/labtop/variants/tgl/romstage.c
@@ -33,4 +33,12 @@ void mainboard_memory_init_params(FSPM_UPD *mupd)
const uint8_t ht = get_uint_option("hyper_threading",
mupd->FspmConfig.HyperThreading);
mupd->FspmConfig.HyperThreading = ht;
+
+ /* Enable/Disable Thunderbolt based on CMOS settings */
+ if (get_uint_option("thunderbolt", 1) == 0) {
+ mupd->FspmConfig.VtdItbtEnable = 0;
+ mupd->FspmConfig.VtdBaseAddress[3] = 0;
+ mupd->FspmConfig.TcssDma0En = 0;
+ mupd->FspmConfig.TcssItbtPcie0En = 0;
+ }
};