mb/lenovo/t420s: Reorder selects alphabetically
[coreboot.git] / src / mainboard / starlabs / labtop / variants / cml / devtree.c
blob95a5d44ea3c7a254aa7b6cda1193a10106084484
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <chip.h>
4 #include <cpu/intel/turbo.h>
5 #include <device/device.h>
6 #include <device/pci_def.h>
7 #include <option.h>
8 #include <types.h>
9 #include <variants.h>
11 void devtree_update(void)
13 config_t *cfg = config_of_soc();
15 struct soc_power_limits_config *soc_conf = &cfg->power_limits_config;
17 struct device *nic_dev = pcidev_on_root(0x14, 3);
19 /* Update PL1 & PL2 based on CMOS settings */
20 switch (get_power_profile(PP_POWER_SAVER)) {
21 case PP_POWER_SAVER:
22 disable_turbo();
23 soc_conf->tdp_pl1_override = 15;
24 soc_conf->tdp_pl2_override = 15;
25 cfg->tcc_offset = 20;
26 break;
27 case PP_BALANCED:
28 soc_conf->tdp_pl1_override = 17;
29 soc_conf->tdp_pl2_override = 20;
30 cfg->tcc_offset = 15;
31 break;
32 case PP_PERFORMANCE:
33 soc_conf->tdp_pl1_override = 20;
34 soc_conf->tdp_pl2_override = 25;
35 cfg->tcc_offset = 10;
36 break;
39 /* Enable/Disable Wireless based on CMOS settings */
40 if (get_uint_option("wireless", 1) == 0)
41 nic_dev->enabled = 0;
43 /* Enable/Disable Webcam based on CMOS settings */
44 cfg->usb2_ports[CONFIG_CCD_PORT].enable = get_uint_option("webcam", 1);