Michał Żygowski has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62210 )
Change subject: mb/dell/optiplex_9010/sch5545_ec.c: Fix HWM initialization bugs ......................................................................
mb/dell/optiplex_9010/sch5545_ec.c: Fix HWM initialization bugs
Fix the HWM sequence matching to the chassis. HWM sequence for SFF was incorrectly passed to MT chassis HWM initialization.
Vendor code also applies a fix-up for MT/DT chassis. This fixup was missing one register read compared to the vendor code. Add the missing read and guard the fixup depening on the returned value to match the vendor code behavior. Not doing so resulted in increased fan speeds on Dell Precision T1650 compared to Dell's firmware.
TEST=Boot Dell Precision T1650 and hear the fans are as silent as on Dell's firmware
Signed-off-by: Michał Żygowski michal.zygowski@3mdeb.com Change-Id: I5c0e1c00e69d66848a602ad91a3e83375a095f44 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62210 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Krystian Hebel krystian.hebel@3mdeb.com --- M src/mainboard/dell/optiplex_9010/sch5545_ec.c 1 file changed, 24 insertions(+), 20 deletions(-)
Approvals: build bot (Jenkins): Verified Krystian Hebel: Looks good to me, approved
diff --git a/src/mainboard/dell/optiplex_9010/sch5545_ec.c b/src/mainboard/dell/optiplex_9010/sch5545_ec.c index fa78a98..9aa0038 100644 --- a/src/mainboard/dell/optiplex_9010/sch5545_ec.c +++ b/src/mainboard/dell/optiplex_9010/sch5545_ec.c @@ -548,17 +548,17 @@ switch (chassis_id) { case 0x0: case 0x4: - return 5; + return 5; /* MT */ case 0x8: - return 4; + return 4; /* DT */ case 0x3: case 0xb: - return 3; + return 3; /* USFF */ case 0x1: case 0x9: case 0x5: case 0xd: - return 6; + return 6; /* SFF */ default: printk(BIOS_DEBUG, "Unknown chassis ID %x\n", chassis_id); break; @@ -640,7 +640,7 @@ ec_hwm_init_late(ec_hwm_chassis4, ARRAY_SIZE(ec_hwm_chassis4)); break; case 5: - ec_hwm_init_late(ec_hwm_chassis6, ARRAY_SIZE(ec_hwm_chassis5)); + ec_hwm_init_late(ec_hwm_chassis5, ARRAY_SIZE(ec_hwm_chassis5)); break; case 6: ec_hwm_init_late(ec_hwm_chassis6, ARRAY_SIZE(ec_hwm_chassis6)); @@ -673,21 +673,25 @@ ec_read_write_reg(EC_HWM_LDN, 0x00b8, &val, READ_OP);
if (chassis_type == 4 || chassis_type == 5) { - ec_read_write_reg(EC_HWM_LDN, 0x00a0, &val, READ_OP); - val &= 0xfb; - ec_read_write_reg(EC_HWM_LDN, 0x00a0, &val, WRITE_OP); - ec_read_write_reg(EC_HWM_LDN, 0x00a1, &val, READ_OP); - val &= 0xfb; - ec_read_write_reg(EC_HWM_LDN, 0x00a1, &val, WRITE_OP); - ec_read_write_reg(EC_HWM_LDN, 0x00a2, &val, READ_OP); - val &= 0xfb; - ec_read_write_reg(EC_HWM_LDN, 0x00a2, &val, WRITE_OP); - val = 0x99; - ec_read_write_reg(EC_HWM_LDN, 0x008a, &val, WRITE_OP); - val = 0x47; - ec_read_write_reg(EC_HWM_LDN, 0x008b, &val, WRITE_OP); - val = 0x91; - ec_read_write_reg(EC_HWM_LDN, 0x008c, &val, WRITE_OP); + ec_read_write_reg(EC_HWM_LDN, 0x0027, &val, READ_OP); + if (val == 0) { + printk(BIOS_INFO, "Applying HWM fix-up for MT/DT chassis\n"); + ec_read_write_reg(EC_HWM_LDN, 0x00a0, &val, READ_OP); + val &= 0xfb; + ec_read_write_reg(EC_HWM_LDN, 0x00a0, &val, WRITE_OP); + ec_read_write_reg(EC_HWM_LDN, 0x00a1, &val, READ_OP); + val &= 0xfb; + ec_read_write_reg(EC_HWM_LDN, 0x00a1, &val, WRITE_OP); + ec_read_write_reg(EC_HWM_LDN, 0x00a2, &val, READ_OP); + val &= 0xfb; + ec_read_write_reg(EC_HWM_LDN, 0x00a2, &val, WRITE_OP); + val = 0x99; + ec_read_write_reg(EC_HWM_LDN, 0x008a, &val, WRITE_OP); + val = 0x47; + ec_read_write_reg(EC_HWM_LDN, 0x008b, &val, WRITE_OP); + val = 0x91; + ec_read_write_reg(EC_HWM_LDN, 0x008c, &val, WRITE_OP); + } }
ec_read_write_reg(EC_HWM_LDN, 0x0049, &val, READ_OP);
2 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.