coreboot/src/mainboard
Seunghwan Kim 5462e8e943 mb/google/brya/var/xol: Reduce power limits according to battery status
When battery level is below critical level or battery is not present,
cpus need to run with a power optimized configuration to avoid platform
instabilities such as system power down.

This will check the current battery status and configure cpu power
limits using current PD power value.

BUG=b:328729536
BRANCH=brya
TEST=built and verified MSR PL2/PL4 values.
     Intel doc #614179 introduces how to check current PL values.

[Original MSR PL1/PL2/PL4 register values for xol]
cd /sys/class/powercap/intel-rapl/intel-rapl\:0/
grep . *power_limit*
  constraint_0_power_limit_uw:15000000 <= MSR PL1 (15W)
  constraint_1_power_limit_uw:55000000 <= MSR PL2 (55W)
  constraint_2_power_limit_uw:114000000 <= MSR PL4 (114W)

[When connected 60W adapter without battery]
Before:
  constraint_0_power_limit_uw:15000000
  constraint_1_power_limit_uw:55000000
  constraint_2_power_limit_uw:114000000
After:
  constraint_0_power_limit_uw:15000000
  constraint_1_power_limit_uw:55000000
  constraint_2_power_limit_uw:60000000

[When connected 45W adapter without battery]
Before:
  constraint_0_power_limit_uw:15000000
  constraint_1_power_limit_uw:55000000
  constraint_2_power_limit_uw:114000000
After:
  constraint_0_power_limit_uw:15000000
  constraint_1_power_limit_uw:45000000
  constraint_2_power_limit_uw:45000000

Change-Id: I5d71e9edde0ecbd7aaf316cd754a6ebcff9da77d
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81614
Reviewed-by: Jamie Chen <jamie.chen@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-04-04 06:13:14 +00:00
..
51nb mb/51nb to mb/bytedance: Add SPDX license headers to Kconfig files 2024-02-18 02:00:56 +00:00
acer mb/acer: Remove blank lines before '}' and after '{' 2024-03-30 07:47:30 +00:00
adlink mb/51nb to mb/bytedance: Add SPDX license headers to Kconfig files 2024-02-18 02:00:56 +00:00
amd mb/amd: Remove blank lines before '}' and after '{' 2024-03-30 07:44:29 +00:00
aopen mb/51nb to mb/bytedance: Add SPDX license headers to Kconfig files 2024-02-18 02:00:56 +00:00
apple arch/x86/ioapic: use uintptr_t for IOAPIC base address 2024-02-23 15:13:37 +00:00
asrock mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
asus mb/asus/p8x7x-series: Revert to native max_mem_clock_mhz of 800 2024-03-05 16:57:01 +00:00
biostar mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
bostentech mb/51nb to mb/bytedance: Add SPDX license headers to Kconfig files 2024-02-18 02:00:56 +00:00
bytedance mb/{bd/bd_egs, iventec/transformers}: Fix building with x86_64 2024-04-03 12:47:04 +00:00
cavium mb/cavium to mb/foxcomm: Add SPDX license headers to Kconfig files 2024-02-18 02:01:17 +00:00
clevo mb/clevo/tgl-u: hda_verbs: correct vendor value comments 2024-02-29 03:13:44 +00:00
compulab mb/cavium to mb/foxcomm: Add SPDX license headers to Kconfig files 2024-02-18 02:01:17 +00:00
dell mb/dell: Add OptiPlex 7020/9020 port 2024-03-04 18:24:40 +00:00
emulation mb/emulation: Remove blank lines before '}' and after '{' 2024-03-30 07:45:04 +00:00
example mb/cavium to mb/foxcomm: Add SPDX license headers to Kconfig files 2024-02-18 02:01:17 +00:00
facebook mb/fb/fbg1701: Move VBOOT key location 2024-03-26 22:52:34 +00:00
foxconn mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
getac arch/x86/ioapic: use uintptr_t for IOAPIC base address 2024-02-23 15:13:37 +00:00
gigabyte mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
google mb/google/brya/var/xol: Reduce power limits according to battery status 2024-04-04 06:13:14 +00:00
hp mb/hp/snb_ivb_desktops: Make baseboard more generic 2024-02-26 13:12:30 +00:00
ibase arch/x86/ioapic: use uintptr_t for IOAPIC base address 2024-02-23 15:13:37 +00:00
ibm soc/intel/xeon_sp/spr: Enable 512 MMCONF buses by default 2024-03-19 10:18:21 +00:00
intel soc/intel/mtl: Enable RAMTOP caching at SoC level for MTL devices 2024-03-17 11:55:29 +00:00
inventec mb/{bd/bd_egs, iventec/transformers}: Fix building with x86_64 2024-04-03 12:47:04 +00:00
kontron arch/x86/ioapic: use uintptr_t for IOAPIC base address 2024-02-23 15:13:37 +00:00
lenovo mb/lenovo: Remove blank lines before '}' and after '{' 2024-03-26 23:09:28 +00:00
libretrend mb/inventec to mb/ocp: Add SPDX license headers to Kconfig files 2024-02-18 02:02:15 +00:00
msi mb/msi: Remove blank lines before '}' and after '{' 2024-03-26 23:12:00 +00:00
ocp soc/intel/xeon_sp: Drop code to locate the UBOX bus 2024-03-05 11:26:58 +00:00
opencellular mb/opencellular to mb/roda: Add SPDX license headers to Kconfig files 2024-02-18 02:02:44 +00:00
packardbell mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
pcengines mb/opencellular to mb/roda: Add SPDX license headers to Kconfig files 2024-02-18 02:02:44 +00:00
pine64 mb/opencellular to mb/roda: Add SPDX license headers to Kconfig files 2024-02-18 02:02:44 +00:00
portwell mb/opencellular to mb/roda: Add SPDX license headers to Kconfig files 2024-02-18 02:02:44 +00:00
prodrive mb/opencellular to mb/roda: Add SPDX license headers to Kconfig files 2024-02-18 02:02:44 +00:00
protectli mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
purism mb/purism: Remove blank lines before '}' and after '{' 2024-03-27 06:01:20 +00:00
razer mb/razer: Remove blank lines before '}' and after '{' 2024-03-26 23:10:13 +00:00
roda mb/roda: Remove blank lines before '}' and after '{' 2024-03-26 23:09:52 +00:00
samsung mb/samsung to mb/up: Add SPDX license headers to Kconfig files 2024-02-18 02:03:13 +00:00
sapphire mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
siemens include/device/azalia_device.h: Merge location1 and location2 2024-02-29 03:13:08 +00:00
sifive mb/sifive/sifive-unmatched: add support for spi1 x4 mode 2024-03-06 04:33:52 +00:00
starlabs mb/starlabs/starbook: Correct alphabetisation of Kconfig options 2024-03-22 16:22:21 +00:00
supermicro mb/*: Add SPDX headers for cmos.default files 2024-02-18 02:04:03 +00:00
system76 mb/system76/adl,rpl: Add 50ms timeout for PCIe 3.0 RPs 2024-03-04 14:54:09 +00:00
ti mb/samsung to mb/up: Add SPDX license headers to Kconfig files 2024-02-18 02:03:13 +00:00
up mb/samsung to mb/up: Add SPDX license headers to Kconfig files 2024-02-18 02:03:13 +00:00
Kconfig mb/51nb to mb/bytedance: Add SPDX license headers to Kconfig files 2024-02-18 02:00:56 +00:00