mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
Apple Silicon Macs (M1, etc.) have an RTC that is part of the PMU IC, but most of the PMU functionality is abstracted out by the SMC. An additional RTC offset stored inside NVMEM is required to compute the current date/time. Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Reviewed-by: Neal Gompa <neal@gompa.dev> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Sven Peter <sven@kernel.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Reviewd-by: Mark Kettenis <kettenis@openbsd.org> Link: https://patch.msgid.link/20251112-macsmc-subdevs-v5-1-728e4b91fe81@gmail.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
94 lines
2.0 KiB
YAML
94 lines
2.0 KiB
YAML
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/mfd/apple,smc.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Apple Mac System Management Controller
|
|
|
|
maintainers:
|
|
- Sven Peter <sven@kernel.org>
|
|
|
|
description:
|
|
Apple Mac System Management Controller implements various functions
|
|
such as GPIO, RTC, power, reboot.
|
|
|
|
properties:
|
|
compatible:
|
|
oneOf:
|
|
- items:
|
|
- const: apple,t6020-smc
|
|
- const: apple,t8103-smc
|
|
- items:
|
|
- enum:
|
|
# Do not add additional SoC to this list.
|
|
- apple,t6000-smc
|
|
- apple,t8103-smc
|
|
- apple,t8112-smc
|
|
- const: apple,smc
|
|
|
|
reg:
|
|
items:
|
|
- description: SMC area
|
|
- description: SRAM area
|
|
|
|
reg-names:
|
|
items:
|
|
- const: smc
|
|
- const: sram
|
|
|
|
mboxes:
|
|
maxItems: 1
|
|
|
|
gpio:
|
|
$ref: /schemas/gpio/apple,smc-gpio.yaml
|
|
|
|
reboot:
|
|
$ref: /schemas/power/reset/apple,smc-reboot.yaml
|
|
|
|
rtc:
|
|
$ref: /schemas/rtc/apple,smc-rtc.yaml
|
|
|
|
additionalProperties: false
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- reg-names
|
|
- mboxes
|
|
|
|
examples:
|
|
- |
|
|
soc {
|
|
#address-cells = <2>;
|
|
#size-cells = <2>;
|
|
|
|
smc@23e400000 {
|
|
compatible = "apple,t8103-smc", "apple,smc";
|
|
reg = <0x2 0x3e400000 0x0 0x4000>,
|
|
<0x2 0x3fe00000 0x0 0x100000>;
|
|
reg-names = "smc", "sram";
|
|
mboxes = <&smc_mbox>;
|
|
|
|
smc_gpio: gpio {
|
|
compatible = "apple,smc-gpio";
|
|
gpio-controller;
|
|
#gpio-cells = <2>;
|
|
};
|
|
|
|
reboot {
|
|
compatible = "apple,smc-reboot";
|
|
nvmem-cells = <&shutdown_flag>, <&boot_stage>,
|
|
<&boot_error_count>, <&panic_count>;
|
|
nvmem-cell-names = "shutdown_flag", "boot_stage",
|
|
"boot_error_count", "panic_count";
|
|
};
|
|
|
|
rtc {
|
|
compatible = "apple,smc-rtc";
|
|
nvmem-cells = <&rtc_offset>;
|
|
nvmem-cell-names = "rtc_offset";
|
|
};
|
|
};
|
|
};
|