From 05f841cb312207e8cc0d5bd0567a7a927e792ddc Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Thu, 15 Oct 2020 13:43:43 +0000 Subject: [PATCH] Provide a slightly more-tolerant set of thermal parameters for PowerMac motherboard temperatures. In particular, the U4 northbridge die is very hard to cool or heat effectively with fans and is not responsive to load. It generally sits around 64C, where it seems happy, so (like Linux) just declare that to be its target temperature. This makes the PowerMac G5 much less loud, with no change in the temperatures of any system components. MFC after: 2 weeks --- sys/dev/iicbus/max6690.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/sys/dev/iicbus/max6690.c b/sys/dev/iicbus/max6690.c index 7847c7e237e6..c6c6666c3d41 100644 --- a/sys/dev/iicbus/max6690.c +++ b/sys/dev/iicbus/max6690.c @@ -213,8 +213,17 @@ max6690_fill_sensor_prop(device_t dev) for (j = 0; j < i; j++) { sc->sc_sensors[j].dev = dev; - sc->sc_sensors[j].therm.target_temp = 400 + ZERO_C_TO_K; - sc->sc_sensors[j].therm.max_temp = 800 + ZERO_C_TO_K; + /* + * Target value for "KODIAK DIODE" (= northbridge die) should + * be 64C (value from Linux). It operates fine at that + * temperature and has limited responsivity to the fan aimed at + * it, so no point in trying to cool it to 40C. + */ + if (strcmp(sc->sc_sensors[j].therm.name, "KODIAK DIODE") == 0) + sc->sc_sensors[j].therm.target_temp = 640 + ZERO_C_TO_K; + else + sc->sc_sensors[j].therm.target_temp = 400 + ZERO_C_TO_K; + sc->sc_sensors[j].therm.max_temp = 850 + ZERO_C_TO_K; sc->sc_sensors[j].therm.read = (int (*)(struct pmac_therm *))(max6690_sensor_read);