Subrata Banik has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85175?usp=email )
Change subject: mb/google/brya/var/redrix: Add ACPI fan definitions ......................................................................
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 skardach@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/85175 Reviewed-by: Subrata Banik subratabanik@google.com Reviewed-by: Kapil Porwal kapilporwal@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Eric Lai ericllai@google.com --- M src/mainboard/google/brya/variants/redrix/overridetree.cb 1 file changed, 56 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Kapil Porwal: Looks good to me, approved Eric Lai: Looks good to me, but someone else must approve Subrata Banik: Looks good to me, approved
diff --git a/src/mainboard/google/brya/variants/redrix/overridetree.cb b/src/mainboard/google/brya/variants/redrix/overridetree.cb index 1843670..7acb3ff 100644 --- a/src/mainboard/google/brya/variants/redrix/overridetree.cb +++ b/src/mainboard/google/brya/variants/redrix/overridetree.cb @@ -162,6 +162,41 @@ 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 @@ [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