[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250819-macsmc-subdevs-v1-0-57df6c3e5f19@gmail.com>
Date: Tue, 19 Aug 2025 21:47:52 +1000
From: James Calligeros <jcalligeros99@...il.com>
To: Sven Peter <sven@...nel.org>, Janne Grunau <j@...nau.net>,
Alyssa Rosenzweig <alyssa@...enzweig.io>, Neal Gompa <neal@...pa.dev>,
Lee Jones <lee@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
Jean Delvare <jdelvare@...e.com>, Guenter Roeck <linux@...ck-us.net>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: asahi@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rtc@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-input@...r.kernel.org, James Calligeros <jcalligeros99@...il.com>,
Mark Kettenis <kettenis@...nbsd.org>, Hector Martin <marcan@...can.st>
Subject: [PATCH 0/8] mfd: macsmc: add rtc, hwmon and hid subdevices
Hi all,
This series adds support for the remaining SMC subdevices. These are the
RTC, hwmon, and HID devices. They are being submitted together as the RTC
and hwmon drivers both require changes to the SMC DT schema.
The RTC driver is responsible for getting and setting the system clock,
and requires an NVMEM cell. This series replaces Sven's original RTC driver
submission [1].
The hwmon function is an interesting one. While each Apple Silicon device
exposes pretty similar sets of sensors, these all seem to be paired to
different SMC keys in the firmware interface. This is true even when the
sensors are on the SoC. For example, an M1 MacBook Pro will use different
keys to access the LITTLE core temperature sensors to an M1 Mac mini. This
necessitates describing which keys correspond to which sensors for each
device individually, and populating the hwmon structs at runtime. We do
this with a node in the device tree. This series includes only the keys
for sensors which we know to be common to all devices. The SMC is also
responsible for monitoring and controlling fan speeds on systems with fans,
which we expose via the hwmon driver.
The SMC also handles the hardware power button and lid switch. Power
button presses and lid opening/closing are emitted as HID events, so we
add a HID subdevice to handle them.
Note that this series is based on a branch with three additional commits
applied to add the parent SMC nodes to the relevant Devicetrees. This
was done to silence build errors. The series applies cleanly to 6.17-rc1.
Regards,
James
[1] https://lore.kernel.org/asahi/CAEg-Je84XxLWH7vznQmPRfjf6GxWOu75ZetwN7AdseAwfMLLrQ@mail.gmail.com/T/#t
Signed-off-by: James Calligeros <jcalligeros99@...il.com>
---
Hector Martin (2):
rtc: Add new rtc-macsmc driver for Apple Silicon Macs
input: macsmc-hid: New driver to handle the Apple Mac SMC buttons/lid
James Calligeros (4):
dt-bindings: hwmon: add Apple System Management Controller hwmon schema
hwmon: Add Apple Silicon SMC hwmon driver
arm64: dts: apple: add common hwmon sensors and fans
arm64: dts: apple: t8103, t600x, t8112: add common hwmon nodes to devices
Sven Peter (2):
dt-bindings: rtc: Add Apple SMC RTC
arm64: dts: apple: t8103,t600x,t8112: Add SMC RTC node
.../bindings/hwmon/apple,smc-hwmon.yaml | 148 +++++
.../bindings/mfd/apple,smc.yaml | 54 ++
.../bindings/rtc/apple,smc-rtc.yaml | 35 +
MAINTAINERS | 5 +
.../boot/dts/apple/hwmon-common.dtsi | 46 ++
.../boot/dts/apple/hwmon-fan-dual.dtsi | 27 +
arch/arm64/boot/dts/apple/hwmon-fan.dtsi | 21 +
.../boot/dts/apple/hwmon-laptop.dtsi | 43 ++
.../boot/dts/apple/hwmon-mac-mini.dtsi | 19 +
.../arm64/boot/dts/apple/t6001-j375c.dts | 2 +
.../arm64/boot/dts/apple/t6002-j375d.dts | 2 +
.../arm64/boot/dts/apple/t600x-die0.dtsi | 6 +
.../boot/dts/apple/t600x-j314-j316.dtsi | 4 +
.../arm64/boot/dts/apple/t600x-j375.dtsi | 2 +
arch/arm64/boot/dts/apple/t8103-j274.dts | 2 +
arch/arm64/boot/dts/apple/t8103-j293.dts | 3 +
arch/arm64/boot/dts/apple/t8103-j313.dts | 2 +
arch/arm64/boot/dts/apple/t8103-j456.dts | 2 +
arch/arm64/boot/dts/apple/t8103-j457.dts | 2 +
.../arm64/boot/dts/apple/t8103-jxxx.dtsi | 2 +
arch/arm64/boot/dts/apple/t8103.dtsi | 6 +
arch/arm64/boot/dts/apple/t8112-j413.dts | 2 +
arch/arm64/boot/dts/apple/t8112-j473.dts | 2 +
arch/arm64/boot/dts/apple/t8112-j493.dts | 3 +
.../arm64/boot/dts/apple/t8112-jxxx.dtsi | 2 +
arch/arm64/boot/dts/apple/t8112.dtsi | 6 +
drivers/hwmon/Kconfig | 12 +
drivers/hwmon/Makefile | 1 +
drivers/hwmon/macsmc_hwmon.c | 858 +++++++++++++++++++++++++
drivers/input/misc/Kconfig | 11 +
drivers/input/misc/Makefile | 1 +
drivers/input/misc/macsmc-hid.c | 210 ++++++
drivers/mfd/macsmc.c | 3 +
drivers/rtc/Kconfig | 11 +
drivers/rtc/Makefile | 1 +
drivers/rtc/rtc-macsmc.c | 141 ++++
36 files changed, 1697 insertions(+)
---
base-commit: 876d6a70b24869f96ebc8672caf86cb4bae72927
change-id: 20250816-macsmc-subdevs-87032c017d0c
Best regards,
--
James Calligeros <jcalligeros99@...il.com>
Powered by blists - more mailing lists