diff options
author | Sean Rhodes <sean@starlabs.systems> | 2023-04-14 21:25:19 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-08-11 22:50:37 +0000 |
commit | 11deb82115dfb8958cbc9f306bc74f03c15bd816 (patch) | |
tree | 2145dc742a9006cf4b8ee039579a66feeeb907c1 /src/mainboard/starlabs/starbook/variants/rpl/devtree.c | |
parent | 9693d00f9954187fdd07edcf764c787e2825575f (diff) |
mb/starlabs/starbook: Add Raptor Lake StarBook Mk VI variant
Tested using `edk2` from
`github.com/starlabsltd/edk2/tree/uefipayload_vs`:
* Windows 11
* Ubuntu 22.04
* Manjaro 22
No known issues.
https://starlabs.systems/pages/starbook-specification
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I7c92bf92ab4de546c3633fae7e19a302409508ce
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Diffstat (limited to 'src/mainboard/starlabs/starbook/variants/rpl/devtree.c')
-rw-r--r-- | src/mainboard/starlabs/starbook/variants/rpl/devtree.c | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c new file mode 100644 index 0000000000..b190865975 --- /dev/null +++ b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c @@ -0,0 +1,66 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include <chip.h> +#include <cpu/intel/turbo.h> +#include <device/device.h> +#include <device/pci_def.h> +#include <option.h> +#include <types.h> +#include <variants.h> + +void devtree_update(void) +{ + config_t *cfg = config_of_soc(); + + struct soc_intel_common_config *common_config; + common_config = chip_get_common_soc_structure(); + + struct soc_power_limits_config *soc_conf_6core = + &cfg->power_limits_config[RPL_P_282_242_142_15W_CORE]; + + struct soc_power_limits_config *soc_conf_12core = + &cfg->power_limits_config[RPL_P_682_482_282_28W_CORE]; + + 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_power_profile(PP_POWER_SAVER)) { + case PP_POWER_SAVER: + disable_turbo(); + soc_conf_6core->tdp_pl1_override = 15; + soc_conf_12core->tdp_pl1_override = 15; + soc_conf_6core->tdp_pl2_override = 15; + soc_conf_12core->tdp_pl2_override = 15; + common_config->pch_thermal_trip = 30; + break; + case PP_BALANCED: + soc_conf_6core->tdp_pl1_override = 15; + soc_conf_12core->tdp_pl1_override = 15; + soc_conf_6core->tdp_pl2_override = 20; + soc_conf_12core->tdp_pl2_override = 25; + common_config->pch_thermal_trip = 25; + break; + case PP_PERFORMANCE: + soc_conf_6core->tdp_pl1_override = 15; + soc_conf_12core->tdp_pl1_override = 28; + soc_conf_6core->tdp_pl2_override = 25; + soc_conf_12core->tdp_pl2_override = 40; + common_config->pch_thermal_trip = 20; + break; + } + + /* Enable/Disable Bluetooth based on CMOS settings */ + if (get_uint_option("wireless", 1) == 0) + cfg->usb2_ports[9].enable = 0; + + /* Enable/Disable Webcam based on CMOS settings */ + if (get_uint_option("webcam", 1) == 0) + cfg->usb2_ports[CONFIG_CCD_PORT].enable = 0; + + /* Enable/Disable Thunderbolt based on CMOS settings */ + if (get_uint_option("thunderbolt", 1) == 0) { + tbt_pci_dev->enabled = 0; + tbt_dma_dev->enabled = 0; + } +} |