xref: /linux/Documentation/devicetree/bindings/mfd/apple,smc.yaml (revision 3a2c4d55e32ad65efebdb6de44eef3bfa08bb49d)
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/mfd/apple,smc.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Apple Mac System Management Controller
8
9maintainers:
10  - Sven Peter <sven@kernel.org>
11
12description:
13  Apple Mac System Management Controller implements various functions
14  such as GPIO, RTC, power, reboot.
15
16properties:
17  compatible:
18    oneOf:
19      - items:
20          - const: apple,t6020-smc
21          - const: apple,t8103-smc
22      - items:
23          - enum:
24              # Do not add additional SoC to this list.
25              - apple,t6000-smc
26              - apple,t8103-smc
27              - apple,t8112-smc
28          - const: apple,smc
29
30  reg:
31    items:
32      - description: SMC area
33      - description: SRAM area
34
35  reg-names:
36    items:
37      - const: smc
38      - const: sram
39
40  mboxes:
41    maxItems: 1
42
43  gpio:
44    $ref: /schemas/gpio/apple,smc-gpio.yaml
45
46  reboot:
47    $ref: /schemas/power/reset/apple,smc-reboot.yaml
48
49  rtc:
50    $ref: /schemas/rtc/apple,smc-rtc.yaml
51
52  hwmon:
53    $ref: /schemas/hwmon/apple,smc-hwmon.yaml
54
55additionalProperties: false
56
57required:
58  - compatible
59  - reg
60  - reg-names
61  - mboxes
62
63examples:
64  - |
65    soc {
66      #address-cells = <2>;
67      #size-cells = <2>;
68
69      smc@23e400000 {
70        compatible = "apple,t8103-smc", "apple,smc";
71        reg = <0x2 0x3e400000 0x0 0x4000>,
72               <0x2 0x3fe00000 0x0 0x100000>;
73        reg-names = "smc", "sram";
74        mboxes = <&smc_mbox>;
75
76        smc_gpio: gpio {
77          compatible = "apple,smc-gpio";
78          gpio-controller;
79          #gpio-cells = <2>;
80        };
81
82        reboot {
83          compatible = "apple,smc-reboot";
84          nvmem-cells = <&shutdown_flag>, <&boot_stage>,
85                        <&boot_error_count>, <&panic_count>;
86          nvmem-cell-names = "shutdown_flag", "boot_stage",
87                             "boot_error_count", "panic_count";
88        };
89
90        rtc {
91          compatible = "apple,smc-rtc";
92          nvmem-cells = <&rtc_offset>;
93          nvmem-cell-names = "rtc_offset";
94       };
95
96        hwmon {
97          compatible = "apple,smc-hwmon";
98
99          current-ID0R {
100            apple,key-id = "ID0R";
101            label = "AC Input Current";
102          };
103
104          fan-F0Ac {
105            apple,key-id = "F0Ac";
106            apple,fan-minimum = "F0Mn";
107            apple,fan-maximum = "F0Mx";
108            apple,fan-target = "F0Tg";
109            apple,fan-mode = "F0Md";
110            label = "Fan 1";
111          };
112
113          power-PSTR {
114            apple,key-id = "PSTR";
115            label = "Total System Power";
116          };
117
118          temperature-TW0P {
119            apple,key-id = "TW0P";
120            label = "WiFi/BT Module Temperature";
121          };
122
123          voltage-VD0R {
124            apple,key-id = "VD0R";
125            label = "AC Input Voltage";
126          };
127        };
128      };
129    };
130