diff --git a/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c b/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c index ae87d6a5db..88e8f3a25f 100644 --- a/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c +++ b/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c @@ -23,18 +23,24 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf_4core->tdp_pl4 = 36; + + /* Set PL1 to 50% of PL2 */ + soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; common_config->pch_thermal_trip = 30; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; common_config->pch_thermal_trip = 25; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ common_config->pch_thermal_trip = 20; break; } @@ -42,9 +48,6 @@ void devtree_update(void) soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl1_override * performance_scale) / 100; soc_conf_4core->tdp_pl2_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf_4core->tdp_pl4 = 36; - /* Enable/Disable Bluetooth based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) { cfg->usb2_ports[9].enable = 0; diff --git a/src/mainboard/starlabs/lite/devtree.c b/src/mainboard/starlabs/lite/devtree.c index 2e192e3548..f25628b4e5 100644 --- a/src/mainboard/starlabs/lite/devtree.c +++ b/src/mainboard/starlabs/lite/devtree.c @@ -27,7 +27,13 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf->tdp_pl4 = 31; + + /* Set PL1 to 50% of PL2 */ + soc_conf->tdp_pl1_override = (soc_conf->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: performance_scale -= 25; @@ -46,9 +52,6 @@ void devtree_update(void) soc_conf->tdp_pl1_override = (soc_conf->tdp_pl1_override * performance_scale) / 100; soc_conf->tdp_pl2_override = (soc_conf->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf->tdp_pl4 = 31; - /* Enable/Disable Wireless based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) nic_dev->enabled = 0; diff --git a/src/mainboard/starlabs/starbook/variants/adl/devtree.c b/src/mainboard/starlabs/starbook/variants/adl/devtree.c index e7fc786481..b83f6ad46e 100644 --- a/src/mainboard/starlabs/starbook/variants/adl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/adl/devtree.c @@ -24,32 +24,36 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf_10core->tdp_pl4 = 65; + soc_conf_12core->tdp_pl4 = 65; + + /* Set PL1 to 50% of PL2 */ + soc_conf_10core->tdp_pl1_override = (soc_conf_10core->tdp_pl2_override / 2) & ~1; + soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; common_config->pch_thermal_trip = 20; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; common_config->pch_thermal_trip = 15; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ common_config->pch_thermal_trip = 10; break; } soc_conf_10core->tdp_pl1_override = (soc_conf_10core->tdp_pl1_override * performance_scale) / 100; - soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl2_override * performance_scale) / 100; + soc_conf_10core->tdp_pl2_override = (soc_conf_10core->tdp_pl2_override * performance_scale) / 100; - soc_conf_10core->tdp_pl2_override = (soc_conf_10core->tdp_pl1_override * performance_scale) / 100; + soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl1_override * performance_scale) / 100; soc_conf_12core->tdp_pl2_override = (soc_conf_12core->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf_10core->tdp_pl4 = 65; - soc_conf_12core->tdp_pl4 = 65; - /* Enable/Disable Bluetooth based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) cfg->usb2_ports[9].enable = 0; diff --git a/src/mainboard/starlabs/starbook/variants/cml/devtree.c b/src/mainboard/starlabs/starbook/variants/cml/devtree.c index 1496754e8b..b28c9f6cdc 100644 --- a/src/mainboard/starlabs/starbook/variants/cml/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/cml/devtree.c @@ -19,18 +19,24 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf->tdp_pl4 = 45; + + /* Set PL1 to 50% of PL2 */ + soc_conf->tdp_pl1_override = (soc_conf->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; cfg->tcc_offset = 20; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; cfg->tcc_offset = 15; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ cfg->tcc_offset = 10; break; } @@ -38,9 +44,6 @@ void devtree_update(void) soc_conf->tdp_pl1_override = (soc_conf->tdp_pl1_override * performance_scale) / 100; soc_conf->tdp_pl2_override = (soc_conf->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf->tdp_pl4 = 45; - /* Enable/Disable Wireless based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) nic_dev->enabled = 0; diff --git a/src/mainboard/starlabs/starbook/variants/kbl/devtree.c b/src/mainboard/starlabs/starbook/variants/kbl/devtree.c index a5b13b8841..2599db86f8 100644 --- a/src/mainboard/starlabs/starbook/variants/kbl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/kbl/devtree.c @@ -19,18 +19,24 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf->tdp_pl4 = 45; + + /* Set PL1 to 50% of PL2 */ + soc_conf->tdp_pl1_override = (soc_conf->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; cfg->tcc_offset = 20; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; cfg->tcc_offset = 15; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ cfg->tcc_offset = 10; break; } @@ -38,9 +44,6 @@ void devtree_update(void) soc_conf->tdp_pl1_override = (soc_conf->tdp_pl1_override * performance_scale) / 100; soc_conf->tdp_pl2_override = (soc_conf->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf->tdp_pl4 = 45; - /* Enable/Disable Wireless based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) nic_dev->enabled = 0; diff --git a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c index 5eea89ffe9..279f4cfb34 100644 --- a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c @@ -27,18 +27,26 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf_6core->tdp_pl4 = 65; + soc_conf_12core->tdp_pl4 = 65; + + /* Set PL1 to 50% of PL2 */ + soc_conf_6core->tdp_pl1_override = (soc_conf_6core->tdp_pl2_override / 2) & ~1; + soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; common_config->pch_thermal_trip = 30; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; common_config->pch_thermal_trip = 25; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ common_config->pch_thermal_trip = 20; break; } @@ -49,10 +57,6 @@ void devtree_update(void) soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl1_override * performance_scale) / 100; soc_conf_12core->tdp_pl2_override = (soc_conf_12core->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf_6core->tdp_pl4 = 65; - soc_conf_12core->tdp_pl4 = 65; - /* Enable/Disable Bluetooth based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) cfg->usb2_ports[9].enable = 0; diff --git a/src/mainboard/starlabs/starbook/variants/tgl/devtree.c b/src/mainboard/starlabs/starbook/variants/tgl/devtree.c index b6422f53a8..6df690054b 100644 --- a/src/mainboard/starlabs/starbook/variants/tgl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/tgl/devtree.c @@ -25,32 +25,36 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf_2core->tdp_pl4 = 65; + soc_conf_4core->tdp_pl4 = 65; + + /* Set PL1 to 50% of PL2 */ + soc_conf_2core->tdp_pl1_override = (soc_conf_2core->tdp_pl2_override / 2) & ~1; + soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; cfg->tcc_offset = 30; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; cfg->tcc_offset = 25; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ cfg->tcc_offset = 20; break; } soc_conf_2core->tdp_pl1_override = (soc_conf_2core->tdp_pl1_override * performance_scale) / 100; - soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100; + soc_conf_2core->tdp_pl2_override = (soc_conf_2core->tdp_pl2_override * performance_scale) / 100; - soc_conf_2core->tdp_pl2_override = (soc_conf_2core->tdp_pl1_override * performance_scale) / 100; + soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl1_override * performance_scale) / 100; soc_conf_4core->tdp_pl2_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf_2core->tdp_pl4 = 65; - soc_conf_4core->tdp_pl4 = 65; - /* Enable/Disable Wireless based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) nic_dev->enabled = 0; diff --git a/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c b/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c index 9d4bb69245..d4abe940cd 100644 --- a/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c +++ b/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c @@ -28,18 +28,26 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf_6core->tdp_pl4 = 65; + soc_conf_14core->tdp_pl4 = 65; + + /* Set PL1 to 50% of PL2 */ + soc_conf_6core->tdp_pl1_override = (soc_conf_6core->tdp_pl2_override / 2) & ~1; + soc_conf_14core->tdp_pl1_override = (soc_conf_14core->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; common_config->pch_thermal_trip = 30; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; common_config->pch_thermal_trip = 25; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ common_config->pch_thermal_trip = 20; break; } @@ -50,10 +58,6 @@ void devtree_update(void) soc_conf_14core->tdp_pl1_override = (soc_conf_14core->tdp_pl1_override * performance_scale) / 100; soc_conf_14core->tdp_pl2_override = (soc_conf_14core->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf_6core->tdp_pl4 = 65; - soc_conf_14core->tdp_pl4 = 65; - /* Enable/Disable Bluetooth based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) cfg->usb2_ports[9].enable = 0; diff --git a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c index 6067a46929..dca182cd22 100644 --- a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c +++ b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c @@ -25,18 +25,24 @@ void devtree_update(void) uint8_t performance_scale = 100; - /* Update PL1 & PL2 based on CMOS settings */ + /* Set PL4 to 1.0C */ + soc_conf_4core->tdp_pl4 = 37; + + /* Set PL1 to 50% of PL2 */ + soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override / 2) & ~1; + + /* Scale PL1 & PL2 based on CMOS settings */ switch (get_power_profile(PP_POWER_SAVER)) { case PP_POWER_SAVER: - performance_scale -= 25; + performance_scale -= 50; common_config->pch_thermal_trip = 30; break; case PP_BALANCED: - /* Use the Intel defaults */ + performance_scale -= 25; common_config->pch_thermal_trip = 25; break; case PP_PERFORMANCE: - performance_scale += 25; + /* Use the Intel defaults */ common_config->pch_thermal_trip = 20; break; } @@ -44,9 +50,6 @@ void devtree_update(void) soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl1_override * performance_scale) / 100; soc_conf_4core->tdp_pl2_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100; - /* Set PL4 to 1.0C */ - soc_conf_4core->tdp_pl4 = 37; - /* Enable/Disable Bluetooth based on CMOS settings */ if (get_uint_option("wireless", 1) == 0) { cfg->usb2_ports[9].enable = 0;