mirror of
https://github.com/torvalds/linux.git
synced 2026-09-26 18:12:03 +02:00
arm64: dts: apple: Add common SMC hwmon infrastructure
Apple's System Management Controller exposes the readings from numerous sensors scattered around the SoC and elsewhere in the machine. Some of these sensors are reliably common on all devices, whereas others are exposed at SMC keys specific to either the SoC or even the particular device. To account for this and expose the right sensors for the right device without tedious Devicetree duplication, we can include fragments of increasing specificity in the per-device .dts files such that the individual keys (of which there are potentially hundreds) do not need to be copied in for every device. Add the initial set of SMC hwmon sensors that are common to multiple devices so that they can be included in the per-device Devicetrees. Co-developed-by: Janne Grunau <j@jannau.net> Signed-off-by: Janne Grunau <j@jannau.net> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20260714-smc-subdev-dt-v2-5-13fa78873121@gmail.com Signed-off-by: Sven Peter <sven@kernel.org>
This commit is contained in:
parent
f424abc307
commit
56c65dc95f
38
arch/arm64/boot/dts/apple/hwmon-common.dtsi
Normal file
38
arch/arm64/boot/dts/apple/hwmon-common.dtsi
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+ OR MIT
|
||||
/*
|
||||
* hwmon sensors expected on all systems
|
||||
*
|
||||
* Copyright The Asahi Linux Contributors
|
||||
*/
|
||||
|
||||
&smc_hwmon {
|
||||
power-PSTR {
|
||||
apple,key-id = "PSTR";
|
||||
label = "Total System Power";
|
||||
};
|
||||
|
||||
power-PDTR {
|
||||
apple,key-id = "PDTR";
|
||||
label = "AC Input Power";
|
||||
};
|
||||
|
||||
power-PMVR {
|
||||
apple,key-id = "PMVR";
|
||||
label = "3.8 V Rail Power";
|
||||
};
|
||||
|
||||
temperature-TH0x {
|
||||
apple,key-id = "TH0x";
|
||||
label = "NAND Flash Temperature";
|
||||
};
|
||||
|
||||
voltage-VD0R {
|
||||
apple,key-id = "VD0R";
|
||||
label = "AC Input Voltage";
|
||||
};
|
||||
|
||||
current-ID0R {
|
||||
apple,key-id = "ID0R";
|
||||
label = "AC Input Current";
|
||||
};
|
||||
};
|
||||
23
arch/arm64/boot/dts/apple/hwmon-fan-dual.dtsi
Normal file
23
arch/arm64/boot/dts/apple/hwmon-fan-dual.dtsi
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+ OR MIT
|
||||
/*
|
||||
* Copyright The Asahi Linux Contributors
|
||||
*
|
||||
* Fan hwmon sensors for machines with 2 fan.
|
||||
*/
|
||||
|
||||
#include "hwmon-fan.dtsi"
|
||||
|
||||
&smc_hwmon {
|
||||
fan-F0Ac {
|
||||
label = "Fan 1";
|
||||
};
|
||||
|
||||
fan-F1Ac {
|
||||
apple,key-id = "F1Ac";
|
||||
label = "Fan 2";
|
||||
apple,fan-minimum = "F1Mn";
|
||||
apple,fan-maximum = "F1Mx";
|
||||
apple,fan-target = "F1Tg";
|
||||
apple,fan-mode = "F1Md";
|
||||
};
|
||||
};
|
||||
17
arch/arm64/boot/dts/apple/hwmon-fan.dtsi
Normal file
17
arch/arm64/boot/dts/apple/hwmon-fan.dtsi
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+ OR MIT
|
||||
/*
|
||||
* Copyright The Asahi Linux Contributors
|
||||
*
|
||||
* Fan hwmon sensors for machines with a single fan.
|
||||
*/
|
||||
|
||||
&smc_hwmon {
|
||||
fan-F0Ac {
|
||||
apple,key-id = "F0Ac";
|
||||
label = "Fan";
|
||||
apple,fan-minimum = "F0Mn";
|
||||
apple,fan-maximum = "F0Mx";
|
||||
apple,fan-target = "F0Tg";
|
||||
apple,fan-mode = "F0Md";
|
||||
};
|
||||
};
|
||||
38
arch/arm64/boot/dts/apple/hwmon-laptop.dtsi
Normal file
38
arch/arm64/boot/dts/apple/hwmon-laptop.dtsi
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+ OR MIT
|
||||
/*
|
||||
* hwmon sensors expected on all laptops
|
||||
*
|
||||
* Copyright The Asahi Linux Contributors
|
||||
*/
|
||||
|
||||
&smc_hwmon {
|
||||
power-PHPC {
|
||||
apple,key-id = "PHPC";
|
||||
label = "Heatpipe Power";
|
||||
};
|
||||
|
||||
temperature-TB0T {
|
||||
apple,key-id = "TB0T";
|
||||
label = "Battery Hotspot";
|
||||
};
|
||||
|
||||
temperature-TCHP {
|
||||
apple,key-id = "TCHP";
|
||||
label = "Charge Regulator Temp";
|
||||
};
|
||||
|
||||
temperature-TW0P {
|
||||
apple,key-id = "TW0P";
|
||||
label = "WiFi/BT Module Temp";
|
||||
};
|
||||
|
||||
voltage-SBAV {
|
||||
apple,key-id = "SBAV";
|
||||
label = "Battery Voltage";
|
||||
};
|
||||
|
||||
voltage-VD0R {
|
||||
apple,key-id = "VD0R";
|
||||
label = "Charger Input Voltage";
|
||||
};
|
||||
};
|
||||
16
arch/arm64/boot/dts/apple/hwmon-mini.dtsi
Normal file
16
arch/arm64/boot/dts/apple/hwmon-mini.dtsi
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
// SPDX-License-Identifier: GPL-2.0+ OR MIT
|
||||
/*
|
||||
* hwmon sensors common to the Mac mini desktop
|
||||
* models, but not the Studio or Pro.
|
||||
*
|
||||
* Copyright The Asahi Linux Contributors
|
||||
*/
|
||||
|
||||
#include "hwmon-fan.dtsi"
|
||||
|
||||
&smc_hwmon {
|
||||
temperature-TW0P {
|
||||
apple,key-id = "TW0P";
|
||||
label = "WiFi/BT Module Temp";
|
||||
};
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user