git: b5b9c65a6894 - main - asmc: add support for MacBookPro13,1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 16 Apr 2026 06:06:23 UTC
The branch main has been updated by imp:
URL: https://cgit.FreeBSD.org/src/commit/?id=b5b9c65a689457e608cc31831ed690d303d63ffa
commit b5b9c65a689457e608cc31831ed690d303d63ffa
Author: Marcus Gartner <magartner@gmail.com>
AuthorDate: 2026-04-11 02:03:18 +0000
Commit: Warner Losh <imp@FreeBSD.org>
CommitDate: 2026-04-16 06:05:19 +0000
asmc: add support for MacBookPro13,1
This commit adds support for the MacBookPro13,1 (late 2016, 13-inch). The SMC
keys were collected from https://logi.wiki/index.php/SMC_Sensor_Codes. Two
temperature keys are omitted because they fail to be read: TI0P (IO Proximity)
and Ta0P (Ambient Air).
Note that the with this model the `dev.asmc.0.fan.0.minspeed` setting only
applies when the fans have been activated by the system. In my testing, the fans
did not spin up until CPU temperatures hit about 80C. At lower temperatures, the
fans will happily ignore the minimum speed and remain at 0 rpm.
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/2137
---
sys/dev/asmc/asmc.c | 6 ++++++
sys/dev/asmc/asmcvar.h | 18 ++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c
index 044fd7e85057..7cd5181605a8 100644
--- a/sys/dev/asmc/asmc.c
+++ b/sys/dev/asmc/asmc.c
@@ -343,6 +343,12 @@ static const struct asmc_model asmc_models[] = {
ASMC_MBP115_TEMPS, ASMC_MBP115_TEMPNAMES, ASMC_MBP115_TEMPDESCS
},
+ {
+ "MacBookPro13,1", "Apple SMC MacBook Pro Retina Core i5 (late 2016, 13-inch)",
+ ASMC_SMS_FUNCS_DISABLED, ASMC_FAN_FUNCS2, ASMC_LIGHT_FUNCS,
+ ASMC_MBP131_TEMPS, ASMC_MBP131_TEMPNAMES, ASMC_MBP131_TEMPDESCS
+ },
+
/* The Mac Mini has no SMS */
{
"Macmini1,1", "Apple SMC Mac Mini",
diff --git a/sys/dev/asmc/asmcvar.h b/sys/dev/asmc/asmcvar.h
index 0e8d4e9d4a36..2c60181704e5 100644
--- a/sys/dev/asmc/asmcvar.h
+++ b/sys/dev/asmc/asmcvar.h
@@ -564,6 +564,24 @@ struct asmc_softc {
"Pbus", "Ambient Light", "Leftside", "Rightside", "CPU Package Core", \
"CPU Package GPU", "CPU Package Total", "System Total", "DC In" }
+#define ASMC_MBP131_TEMPS { "TB0T", "TB1T", "TB2T", "TC0F", \
+ "TC0P", "TC1C", "TC2C", "TCGC", \
+ "TCSA", "TCXC", "Th1H", "TM0P", \
+ "TPCD", "Ts0P", "Ts0S", "TaLC", \
+ "Ts1P", NULL }
+
+#define ASMC_MBP131_TEMPNAMES { "battery", "battery_1", "battery_2", "cpu_die_peci", \
+ "cpu_proximity", "cpu_core_1", "cpu_core_2", "intel_gpu", \
+ "cpu_sys_agent", "cpu_core_peci", "right_fin_stack", "memory_proximity", \
+ "platform_ctrl_hub", "trackpad", "bottom_skin", "air_flow", \
+ "trackpad_act" }
+
+#define ASMC_MBP131_TEMPDESCS { "Battery", "Battery Sensor 1", "Battery Sensor 2", "CPU Die (PECI)", \
+ "CPU Proximity", "CPU Core 1", "CPU Core 2", "Intel GPU", \
+ "CPU System Agent Core (PECI)", "CPU Core (PECI)", "Right Fin Stack", "DDR3 Proximity", \
+ "Platform Controller Hub Die", "Trackpad", "Bottom Skin", "Air Flow", \
+ "Trackpad Actuator" }
+
#define ASMC_MM_TEMPS { "TN0P", "TN1P", NULL }
#define ASMC_MM_TEMPNAMES { "northbridge1", "northbridge2" }
#define ASMC_MM_TEMPDESCS { "Northbridge Point 1", \