xref: /linux/Documentation/devicetree/bindings/hwmon/apple,smc-hwmon.yaml (revision 9611c0ce215a66770ccbe5c126bf57ba8c31bcad)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/hwmon/apple,smc-hwmon.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Apple SMC Hardware Monitoring
8
9description:
10  Apple's System Management Controller (SMC) exposes a vast array of
11  hardware monitoring sensors, including temperature probes, current and
12  voltage sense, power meters, and fan speeds. It also provides endpoints
13  to manually control the speed of each fan individually. Each Apple
14  Silicon device exposes a different set of endpoints via SMC keys. This
15  is true even when two machines share an SoC. The CPU core temperature
16  sensor keys on an M1 Mac mini are different to those on an M1 MacBook
17  Pro, for example.
18
19maintainers:
20  - James Calligeros <jcalligeros99@gmail.com>
21
22$defs:
23  sensor:
24    type: object
25
26    properties:
27      apple,key-id:
28        $ref: /schemas/types.yaml#/definitions/string
29        pattern: "^[A-Za-z0-9]{4}$"
30        description: The SMC FourCC key of the desired sensor.
31          Must match the node's suffix.
32
33      label:
34        description: Human-readable name for the sensor
35
36    required:
37      - apple,key-id
38
39properties:
40  compatible:
41    const: apple,smc-hwmon
42
43patternProperties:
44  "^current-[A-Za-z0-9]{4}$":
45    $ref: "#/$defs/sensor"
46    unevaluatedProperties: false
47
48  "^fan-[A-Za-z0-9]{4}$":
49    $ref: "#/$defs/sensor"
50    unevaluatedProperties: false
51
52    properties:
53      apple,fan-minimum:
54        $ref: /schemas/types.yaml#/definitions/string
55        pattern: "^[A-Za-z0-9]{4}$"
56        description: SMC key containing the fan's minimum speed
57
58      apple,fan-maximum:
59        $ref: /schemas/types.yaml#/definitions/string
60        pattern: "^[A-Za-z0-9]{4}$"
61        description: SMC key containing the fan's maximum speed
62
63      apple,fan-target:
64        $ref: /schemas/types.yaml#/definitions/string
65        pattern: "^[A-Za-z0-9]{4}$"
66        description: Writeable endpoint for setting desired fan speed
67
68      apple,fan-mode:
69        $ref: /schemas/types.yaml#/definitions/string
70        pattern: "^[A-Za-z0-9]{4}$"
71        description: Writeable key to enable/disable manual fan control
72
73  "^power-[A-Za-z0-9]{4}$":
74    $ref: "#/$defs/sensor"
75    unevaluatedProperties: false
76
77  "^temperature-[A-Za-z0-9]{4}$":
78    $ref: "#/$defs/sensor"
79    unevaluatedProperties: false
80
81  "^voltage-[A-Za-z0-9]{4}$":
82    $ref: "#/$defs/sensor"
83    unevaluatedProperties: false
84
85additionalProperties: false
86