Skip to content

Commit

Permalink
Hwmon Apple SoC SMC driver using DT to get SMC keys for sensors
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Francois Bortolotti <jeff@borto.fr>
  • Loading branch information
Jean-Francois Bortolotti committed Feb 11, 2023
1 parent 04d5f6b commit dac5c2b
Show file tree
Hide file tree
Showing 6 changed files with 493 additions and 1 deletion.
38 changes: 38 additions & 0 deletions arch/arm64/boot/dts/apple/t8103-j313.dts
Expand Up @@ -166,6 +166,44 @@
default-state = "keep";
};
};

hwmon-sensors {
pwr_keys {
pwr_key01 {
key = "PHPC";
label = "Total CPU Core Power";
};
pwr_key02 {
key = "PSTR";
label = "Power of xxx";
};
pwr_key03 {
key = "PSTR";
};
pwr_key04 {
};
};
temp_keys {
temp_key01 {
key = "TSCD";
label = "Battery Hotspot Temp";
};
temp_key02 {
key = "TH0x";
label = "NAND Hotspot Temp";
};
temp_key03 {
key = "Th1a";
label = "GPU Temp";
};
temp_key04 {
key = "TW0P";
label = "WiFi/BT Module Temp";
};
};
current_keys {
};
};
};

&framebuffer0 {
Expand Down
12 changes: 12 additions & 0 deletions drivers/hwmon/Kconfig
Expand Up @@ -359,6 +359,18 @@ config SENSORS_APPLESMC
Say Y here if you have an applicable laptop and want to experience
the awesome power of applesmc.

config SENSORS_APPLE_SOC_SMC
tristate "Apple SoC SMC Sensors (Voltages, Power, Current and Temp)"
depends on ARCH_APPLE
help
This driver provides support for the Apple System Management
Controller.

Only Apple SoC based models are supported.

Say Y here if you have an applicable laptop and want to experience
the awesome power of applesmc on Apple SOC machines.

config SENSORS_ARM_SCMI
tristate "ARM SCMI Sensors"
depends on ARM_SCMI_PROTOCOL
Expand Down
1 change: 1 addition & 0 deletions drivers/hwmon/Makefile
Expand Up @@ -48,6 +48,7 @@ obj-$(CONFIG_SENSORS_ADT7470) += adt7470.o
obj-$(CONFIG_SENSORS_ADT7475) += adt7475.o
obj-$(CONFIG_SENSORS_AHT10) += aht10.o
obj-$(CONFIG_SENSORS_APPLESMC) += applesmc.o
obj-$(CONFIG_SENSORS_APPLE_SOC_SMC) += apple_soc_smc.o
obj-$(CONFIG_SENSORS_AQUACOMPUTER_D5NEXT) += aquacomputer_d5next.o
obj-$(CONFIG_SENSORS_ARM_SCMI) += scmi-hwmon.o
obj-$(CONFIG_SENSORS_ARM_SCPI) += scpi-hwmon.o
Expand Down

0 comments on commit dac5c2b

Please sign in to comment.