Repository navigation
Conversation
The apple,t8152-smc description says the SMC offers read-only hardware monitoring. On the MacBook Pro (M6, J804) the driver also enables notifications, power and input, and the device tree may describe pcIO outputs. Say so in the description. The schema is unchanged. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The T8152 SMC registers only its hwmon cell, as notifications, GPIO and power management are not qualified there. On the MacBook Pro (M6, J804) the SMC answers the same battery, adapter, lid and power button keys as on earlier Apple silicon laptops, so on that board enable notifications (NTAP) and register the input, power and hwmon cells. The J804 uses the T6050 cell profile rather than the regular one. Its GPIOs are pcIO outputs, described in the device tree and registered as "macsmc-gpio" from apple_smc_described_devs. The regular profile always adds a 'gP' "macsmc-gpio" cell as well, and the second device with that name fails to register (-EEXIST), which fails the whole SMC probe. Reboot and RTC are registered only if the device tree describes them; the J804 tree does not yet. The SMC compatible is the same on every T8152 board, so the J804 is told apart by its machine compatible, as gpio-macsmc does for the J700's pcIO path. Other T8152 machines keep the telemetry-only profile. Tested with an earlier version of this change on an earlier base (integration/aurora f5fa539), which used the regular cell profile and a 'gP' GPIO cell instead of the pcIO outputs: macsmc-power reports the AC adapter and the battery (status, health, cycle count, voltage, design energy), a lid close suspends the machine through logind's lid switch, and the lid and the power button wake it from suspend-to-idle. This version, with the pcIO outputs, has not run on the J804. The T8152 wake-reason names are not verified. Signed-off-by: LiamRay11 <228416644+LiamRay11@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sithglan
left a comment
There was a problem hiding this comment.
Test report, 2026-11-17: Apple Mac mini M6 (J873g/T8152, board 0x24). PR revision tested: 0664ebfdbf2715113295a4350a4d05dfc25f6e6d.
Host validation used the combined #2105–2108/#2110–2112 series (54742c617db4 on 677be395b9d2) with Clang 22. All changed driver objects built with W=1 and no new warnings; two pre-existing DART unused-helper warnings were unchanged.
macsmc.o built with Clang 22 and W=1 with no new warnings. The extended notification/power/input profile is J804-specific. It was not exercised on this J873g mini, so these results provide build coverage only for the new board-specific behavior.
|
Thanks, LiamRay11. Moving J804's pcIO output to The one code ask is the machine check at
That turns on notifications and the power button on the J873g and J833ct too, so the rows are:
After that we will run the macsmc no-regression rows on our A18 Pro (Neo) and M4 Pro. |
Summary
The T8152 SMC registers only its hwmon cell, because notifications, GPIO and power management are not qualified on T8152. On the MacBook Pro (M6, J804), the SMC answers the same battery, adapter, lid and power-button keys as earlier Apple silicon laptops. This PR enables them on
apple,j804only. Other T8152 machines (J873g, J833ct) keep the telemetry-only profile.Changes
dt-bindings: mfd: apple,smc: theapple,t8152-smcdescription no longer says read-only telemetry only. The schema is unchanged.mfd: macsmc: the telemetry-only early return now also requires!of_machine_is_compatible("apple,j804"). On J804 the probe:apple,smc-pcio-gpio, as "macsmc-gpio"), the low GPIO bank, and reboot and RTC only if the DT has nodes for them (J804 has none yet)Why the T6050 profile and not the regular one
The regular
apple_smc_devslist always adds agP"macsmc-gpio" cell (apple,smc-gpio), even without a node. With the J804 pcIO node,apple_smc_add_described_devices()then registers a second "macsmc-gpio" device. The duplicate name fails with -EEXIST and takes the whole SMC probe down with it. The T6050 profile has nogPcell and leaves GPIO, reboot and RTC to the described cells, which is what J804 needs.Why a machine check
The SMC compatible is the same on every T8152 board, so the J804 is selected by its machine compatible.
gpio-macsmcdoes the same for the J700 pcIO path (of_machine_is_compatible("apple,j700")). If reviewers prefer a DT-driven switch, two options are a board-level SMC compatible withapple,t8152-smcas fallback, or a boolean property on the SMC node. Either needs a binding change, so this PR keeps the existing pattern.Deviation from the bring-up patch
The bring-up tree gated all of T8152 off the telemetry path, registered the regular cell list with a single
apple,smc-gpiocell, and addedapple,j804to the J700 pcIO path ofgpio-macsmc. That path hardcodes the J700 lines 8 and 19, which are wrong for J804. Upstream now has the genericapple,smc-pcio-gpioprovider withapple,output-commands, so J804 describes its output in DT (see the dt-board PR) andgpio-macsmcis not changed.Testing
On hardware: MacBook Pro 14-inch (M6, J804), 2026-11-16, tested by LiamRay11.
bf423bf0ewith all nine J804 linux PRs merged (t8152-mailboxes, dart-gen3, dt-board, centauri, g18-fast-retire, cfg80211-stale-scan, smc, cs42l84-jack, and an NVMe PR that is not sent yet), plus retest-only device-tree changes that are not part of these PRs: SSD nodes (ANS mailbox, SART, NVMe), PCIe port 0 with the N1 Wi-Fi, the USB0 gadget console, and aread-onlyNVRAM partition. Those nodes were needed to reach the root filesystem and SSH.systemctl rebootfrom this kernel (watchdog restart) returned to the installed system.Results for this PR (draft):
Earlier, on an older base (integration/aurora f5fa539) with the bring-up variant (regular cell list,
gPGPIO cell, J700 pcIO path): a lid close suspended through logind's lid switch, and the lid and the power button woke the machine from s2idle.Checks on this base:
drivers/mfd/macsmc.obuilds withW=1without warnings.apple,smc.yamlpassesdt_binding_check. The macsmc KUnit test was not run.integration/aurora has since moved to
677be395b; this branch still merges into it without conflicts.Known limitations
Dependencies
j804/dt-boarddescribes the SMC node and its pcIO/hwmon children. The driver change itself has no dependency.🤖 Generated with Claude Code