1 /* SPDX-License-Identifier: GPL-2.0-only */
4 #include <cpu/intel/turbo.h>
5 #include <device/device.h>
6 #include <device/pci_def.h>
11 void devtree_update(void)
13 config_t
*cfg
= config_of_soc();
15 struct soc_power_limits_config
*soc_conf_2core
=
16 &cfg
->power_limits_config
[POWER_LIMITS_U_2_CORE
];
18 struct soc_power_limits_config
*soc_conf_4core
=
19 &cfg
->power_limits_config
[POWER_LIMITS_U_4_CORE
];
21 struct device
*nic_dev
= pcidev_on_root(0x14, 3);
22 struct device
*tbt_pci_dev
= pcidev_on_root(0x07, 0);
23 struct device
*tbt_dma_dev
= pcidev_on_root(0x0d, 2);
26 /* Update PL1 & PL2 based on CMOS settings */
27 switch (get_power_profile(PP_POWER_SAVER
)) {
30 soc_conf_2core
->tdp_pl1_override
= 15;
31 soc_conf_4core
->tdp_pl1_override
= 15;
32 soc_conf_2core
->tdp_pl2_override
= 15;
33 soc_conf_4core
->tdp_pl2_override
= 15;
37 soc_conf_2core
->tdp_pl1_override
= 15;
38 soc_conf_4core
->tdp_pl1_override
= 15;
39 soc_conf_2core
->tdp_pl2_override
= 25;
40 soc_conf_4core
->tdp_pl2_override
= 25;
44 soc_conf_2core
->tdp_pl1_override
= 28;
45 soc_conf_4core
->tdp_pl1_override
= 28;
46 soc_conf_2core
->tdp_pl2_override
= 40;
47 soc_conf_4core
->tdp_pl2_override
= 40;
52 /* Enable/Disable Wireless based on CMOS settings */
53 if (get_uint_option("wireless", 1) == 0)
56 /* Enable/Disable Webcam based on CMOS settings */
57 cfg
->usb2_ports
[CONFIG_CCD_PORT
].enable
= get_uint_option("webcam", 1);
59 /* Enable/Disable Thunderbolt based on CMOS settings */
60 if (get_uint_option("thunderbolt", 1) == 0) {
63 tbt_pci_dev
->enabled
= 0;
64 tbt_dma_dev
->enabled
= 0;