From dcda600ec3f3f17c71f8a10a34789d1c843392c0 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Fri, 4 Oct 2024 12:07:24 +0100 Subject: mb/starlabs/*: Set PL4 to 1.0C of the battery Override the PL4 to the maximum power the battery can provide without a charger connected to prevent drawing too much power. Change-Id: I2945e1ed0f33ab6692631e327c1457980b353c06 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/84660 Reviewed-by: Maxim Polyakov Tested-by: build bot (Jenkins) --- src/mainboard/starlabs/starbook/variants/adl/devtree.c | 4 ++++ src/mainboard/starlabs/starbook/variants/cml/devtree.c | 3 +++ src/mainboard/starlabs/starbook/variants/kbl/devtree.c | 3 +++ src/mainboard/starlabs/starbook/variants/rpl/devtree.c | 4 ++++ src/mainboard/starlabs/starbook/variants/tgl/devtree.c | 4 ++++ 5 files changed, 18 insertions(+) (limited to 'src/mainboard/starlabs/starbook/variants') diff --git a/src/mainboard/starlabs/starbook/variants/adl/devtree.c b/src/mainboard/starlabs/starbook/variants/adl/devtree.c index 1c9a8ffc11..b99e432dd6 100644 --- a/src/mainboard/starlabs/starbook/variants/adl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/adl/devtree.c @@ -47,6 +47,10 @@ void devtree_update(void) break; } + /* 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 b73d6c7589..a38fcd47a5 100644 --- a/src/mainboard/starlabs/starbook/variants/cml/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/cml/devtree.c @@ -36,6 +36,9 @@ void devtree_update(void) break; } + /* 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 6a98283e8e..26adaf2adb 100644 --- a/src/mainboard/starlabs/starbook/variants/kbl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/kbl/devtree.c @@ -36,6 +36,9 @@ void devtree_update(void) break; } + /* 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 f645f7cc35..3b47058a27 100644 --- a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c @@ -50,6 +50,10 @@ void devtree_update(void) break; } + /* 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 4195e09ff5..4013d7758f 100644 --- a/src/mainboard/starlabs/starbook/variants/tgl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/tgl/devtree.c @@ -49,6 +49,10 @@ void devtree_update(void) break; } + /* 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; -- cgit v1.2.3