From 2cc9eb16e2eec4a5e2a49ebef15196b635eb6e6e Mon Sep 17 00:00:00 2001 From: Stanislaw Kardach Date: Tue, 22 Oct 2024 08:56:25 +0000 Subject: mb/google/brya/var/redrix: Add ACPI fan definitions Add entries in overridetree.cb required for exposing fan control via ACPI, which is used then by acpi-fan driver in Linux kernel. This includes: 1. Fan duty-cycle/rpm table. The RPM numbers were adjusted to the values reported by ACPI on different duty cycle levels. 2. Dummy Active DPTF policy. This is required to mark the TFNx devices as active and therefore let the acpi-fan driver probe. BUG=b:358089775 TEST=Build and flash on redrix and check /sys/class/thermal for TFN1 Change-Id: Iaeffe8bc48cd8cd800efa7be29ec81447ecf2935 Signed-off-by: Stanislaw Kardach Reviewed-on: https://review.coreboot.org/c/coreboot/+/85175 Reviewed-by: Subrata Banik Reviewed-by: Kapil Porwal Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai --- .../google/brya/variants/redrix/overridetree.cb | 56 ++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'src/mainboard/google/brya/variants') diff --git a/src/mainboard/google/brya/variants/redrix/overridetree.cb b/src/mainboard/google/brya/variants/redrix/overridetree.cb index 18436706d8..7acb3ffe02 100644 --- a/src/mainboard/google/brya/variants/redrix/overridetree.cb +++ b/src/mainboard/google/brya/variants/redrix/overridetree.cb @@ -162,6 +162,41 @@ chip soc/intel/alderlake register "options.tsr[2].desc" = ""Charger"" register "options.tsr[3].desc" = ""5V regulator"" + ## Active Policy + # NOTE: Copy from EC. Only to enable acpi-fan. + register "policies.active" = "{ + [0] = { + .target = DPTF_TEMP_SENSOR_0, + .thresholds = { + TEMP_PCT(100, 85), + TEMP_PCT( 58, 78), + TEMP_PCT( 57, 71), + TEMP_PCT( 56, 68), + TEMP_PCT( 55, 66), + TEMP_PCT( 54, 53), + } + }, + [1] = { + .target = DPTF_CPU, + .thresholds = { + TEMP_PCT(100, 85), + TEMP_PCT( 58, 78), + TEMP_PCT( 57, 71), + TEMP_PCT( 56, 68), + TEMP_PCT( 55, 66), + TEMP_PCT( 54, 53), + } + }, + [2] = { + .target = DPTF_TEMP_SENSOR_2, + .thresholds = { + TEMP_PCT(100, 100), + TEMP_PCT( 58, 63), + TEMP_PCT( 57, 61), + } + } + }" + # TODO: below values are initial reference values only ## Passive Policy register "policies.passive" = "{ @@ -194,6 +229,27 @@ chip soc/intel/alderlake [2] = { 16, 1000 }, [3] = { 8, 500 } }" + + ## Fan Performance Control (Percent, Speed, Noise, Power) + # NOTE: Noise and Power numbers are placeholders. + register "controls.fan_perf" = "{ + [ 0] = { 100, 9500, 200, 2000, }, + [ 1] = { 90, 8700, 180, 1800, }, + [ 2] = { 80, 8000, 160, 1600, }, + [ 3] = { 70, 7200, 140, 1400, }, + [ 4] = { 60, 6300, 120, 1200, }, + [ 5] = { 50, 5400, 100, 1000, }, + [ 6] = { 40, 4400, 80, 800, }, + [ 7] = { 30, 3300, 60, 600, }, + [ 8] = { 20, 2100, 40, 400, }, + [ 9] = { 10, 800, 20, 200, }, + [10] = { 0, 0, 0, 0, }, + }" + + ## Fan options + register "options.fan.fine_grained_control" = "1" + register "options.fan.step_size" = "2" + device generic 0 alias dptf_policy on end end end -- cgit v1.2.3