Skip to content

mfd: macsmc: T6050: register the gP GPIO bank where the tree describes it - #2939

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
ja-818:macsmc-t6050-gp-gpio
Nov 25, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
ja-818:macsmc-t6050-gp-gpio

Conversation

@ja-818

@ja-818 ja-818 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

What: On T6050 macsmc registers the SMC's gP GPIO bank only for the other SoCs, so the J716s's N1 port (pwren-gpios on gP13) defers pcie-apple's probe forever: no PCIe, Wi-Fi or Bluetooth. This registers the bank with the T6050 described cells, under its own cell name ("macsmc-gpio" is the PCIO bank's).
Tested: J716s (M5 Pro 16") at 0a57322: gP bank registered (First GPIO key: gP01), pcie-apple adopts the N1 port with no deferral, Wi-Fi and Bluetooth up; no new macsmc or pcie-apple errors.
Risk: two-way door · T6050 boards whose tree describes apple,smc-gpio (today only the J716s); other SoCs don't read this list
Not yet: a boot on another generation.

Details

Only the J716s's tree describes the bank today, so no other board changes. It doesn't depend on #2922: t6050-j716s.dts on main already describes the bank and pwren-gpios.

Evidence

J716s, test boot 2026-11-25, kernel main efed1ae merged with 0a57322 (and #2872, #2921, #2922):

macsmc-gpio macsmc-low-gpio: First GPIO key: gp01 (0x67703031)
macsmc-gpio macsmc-gp-gpio: First GPIO key: gP01 (0x67503031)
pcie-apple 1cb0000000.pcie: adopted port 0, endpoint 01:00

No probe fail for /pcie@1cb0000000/pci@0,0; the N1's Wi-Fi joined and Bluetooth was powered. Without a gP bank, a J716s tree with pwren-gpios logs Port /pcie@1cb0000000/pci@0,0 probe fail and the port defers forever (the first J716s boot, on omarchy-m5's v272-17 kernel, betizzel/omarchy-m5#28).

@RyanTheTide

Copy link
Copy Markdown
Contributor

Review at 2e607bf.

Changes requested, for the commit trailer only. The change itself is right.

  1. Code: adding apple,smc-gpio to apple_smc_t6050_described_devs registers the gP bank only where a child node describes it, so a T6050 tree without that node behaves exactly as before. The separate cell name avoids clashing with the PCIO bank's macsmc-gpio, and binding goes by compatible, so gpio-macsmc picks up both. No new gate is added; the T6050 described-cells list already exists.
  2. Trailers: the commit carries Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>, and the PR body ends with "Generated with Claude Code". This tree keeps commit trailers human-only, so please drop the Co-Authored-By and re-push. An Assisted-by: LLM (Claude:Opus 5.5) line in the PR body is the place for it. Same request as on ASoC: apple: macaudio: add the J716 (16-inch M5 Pro), jack only #2921 and arm64: dts: apple: t6050-j716s: describe the GPU and the internal panel #2922.
  3. Ordering: today only the J716s tree in arm64: dts: apple: t6050-j716s: describe the GPU and the internal panel #2922 describes the bank, so this lands as a no-op until arm64: dts: apple: t6050-j716s: describe the GPU and the internal panel #2922 does. Please note the dependency in the body.

Row owed: once #2922 is in, a J716s boot on this tree at its head, showing the gP bank registering, pcie-apple probing N1 without deferral, and Wi-Fi plus Bluetooth up. The row in the body is from a different kernel tree.

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formal §1–§6 pre-PR checklist review at 2e607bfb94239d634a4787ce64503f1cf79e977b.

Code & Fork CI Safety Audit

  • Code (drivers/mfd/macsmc.c, +5/-2) — Clean: Adding MFD_CELL_OF("macsmc-gp-gpio", NULL, NULL, 0, 0, "apple,smc-gpio") to apple_smc_t6050_described_devs[] is sound and safe. apple_smc_add_described_devices() checks of_get_compatible_child(smc->dev->of_node, cells[i].of_compatible) (and balances of_node_put(np)) before calling devm_mfd_add_devices(), so T6050 devicetrees without an apple,smc-gpio child node are completely unchanged. Using "macsmc-gp-gpio" avoids a PLATFORM_DEVID_NONE name collision with apple_smc_described_devs's "macsmc-gpio" (apple,smc-pcio-gpio), and drivers/gpio/gpio-macsmc.c binds both by compatible and already handles apple,j716s gP13.
  • Fork CI Safety: Workflow run 45109476074 (Host tests, fork ja-818/linux) is action_required. The diff touches only drivers/mfd/macsmc.c (no workflow, script, Makefile, or Kconfig edits) and is safe for maintainer CI approval once re-pushed.

Blockers

  1. §4 Commit attribution (Hard Blocker):
    Commit 2e607bfb94239d634a4787ce64503f1cf79e977b contains Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> in its commit message. Per §4 of the pre-PR checklist, commits must carry human identity and a human Signed-off-by: only, with zero AI co-author, sign-off, or Assisted-by: trailers inside commits. Please drop the Co-Authored-By: line from the commit and re-push.
  2. §5 Evidence & CI:
    • Fork CI (Host tests) has not run yet (action_required).
    • The J716s test result in the commit/PR was collected on a different kernel tree (omarchy-m5 v272-17), and this change is a no-op on aurora-silicon/linux until the J716s DT dependency (#2922) adds the apple,smc-gpio node. Once re-pushed (and paired with #2922), please post a J716s boot row on aurora-silicon/linux confirming the gP bank registration (First GPIO key: gP01), pcie-apple N1 probe without deferral, Wi-Fi/Bluetooth up, and regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors).

Checklist Summary

  • §1 No model gating: Pass (uses existing apple_smc_t6050_described_devs DT-described cell mechanism; no board gate added).
  • §2 Production-ready, no hacks: Pass.
  • §3 Safety: Pass.
  • §4 Clean-room & attribution: Blocked on Co-Authored-By: AI trailer in commit 2e607bfb94.
  • §5 Evidence: Blocked on fork CI (action_required) and owed J716s hardware row on this tree.
  • §6 Naming: Pass.

@github-actions github-actions Bot added area:power Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) needs-hw-row No hardware row at the PR head (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH, then merge at 2e607bfb9423

Blockers:

  1. Commit 2e607bfb carries a Co-Authored-By: trailer naming an AI tool. Fix: git commit --amend -s, remove the trailer, force-push.
  2. Missing row: one T6050 at this head with the gP GPIO bank registered from the tree and its consumers working. I've approved the waiting CI run.

Rows before merging: macsmc.c runs on every Mac, so besides the T6050 row it also needs one boot at this head on another generation with the SMC and its children bound as before.

Checked: thank you. No Apple material, no gates: the bank is registered where the tree describes it.

@DjDeveloperr
DjDeveloperr dismissed their stale review November 25, 2026 01:41

Superseded by the review at 2e607bf

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merge readiness at 0a57322c: not ready yet

Check Detail
CI at head running running: host-tests, KUnit ane-boot, KUnit asahi, KUnit spi-hid-apple, KUnit avd, KUnit ave
Review ok approved by DjDeveloperr
Requested changes ok none
Hardware row at head ok in the PR body at 0a57322c
Conflicts ok none
PR text ok Risk: two-way · T6050 boards whose tree describes apple,smc-gpio (today only the J716s); other SoCs don't read this list

Areas: area:power

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

…s it

On T6050 the SMC registers its input, power and hwmon cells, the PCIO
and low GPIO banks and the described reboot and RTC cells. The gP bank
(apple,smc-gpio) is only in the list for the other SoCs. The J716s's N1
port names its power line on that bank (pwren-gpios = <&smc_gpio 0x13
...>), so pcie-apple's port probe waits for a GPIO provider that never
appears: "Port /pcie@1cb0000000/pci@0,0 probe fail", deferred forever,
and no PCIe device, Wi-Fi or Bluetooth.

Register the gP bank with the T6050 described cells, under a cell name
of its own ("macsmc-gpio" is the PCIO bank's; gpio-macsmc binds both by
compatible). Only the J716s's tree describes the bank today, so no other
T6050 board changes.

Tested on one J716s (27.2 stub 26B123, omarchy-m5's v272-17 kernel with
this change) with pwren-gpios kept in its tree: the gP bank registers
("First GPIO key: gP01"), pcie-apple probes the N1 port with no
deferral, and Wi-Fi and Bluetooth come up.

Signed-off-by: Julian Arango <julianarango1818@gmail.com>
@ja-818
ja-818 force-pushed the macsmc-t6050-gp-gpio branch from 2e607bf to 0a57322 Compare November 25, 2026 06:03
@ja-818
ja-818 requested review from a team as code owners November 25, 2026 06:03
@ja-818
ja-818 requested review from LiamRay11 and maralcbr November 25, 2026 06:03
@ja-818

ja-818 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. v2 is pushed, rebased on main: no Co-Authored-By.

On ordering (Ryan's 3): this doesn't wait for #2922. t6050-j716s.dts on main already has the gP bank (smc_gpio: gpio { compatible = "apple,smc-gpio"; }) and the N1 port's pwren-gpios = <&smc_gpio 0x13 GPIO_ACTIVE_HIGH>, so on main, without this change, nothing provides gP13 and pcie-apple defers the N1 port, as on the first J716s boot: no PCIe, Wi-Fi or Bluetooth.

J716s (16" M5 Pro, 27.2 stub) at 0a57322, merged with #2872, #2921 and #2922 on main efed1ae: macsmc-gpio macsmc-gp-gpio: First GPIO key: gP01 (0x67503031); pcie-apple 1cb0000000.pcie: adopted port 0, endpoint 01:00, no deferral; Wi-Fi joined, Bluetooth powered. No SELinux or AppArmor on this system (LSMs capability,landlock); 1 failed unit, a local service unrelated to this; 4 kernel errors, none from macsmc or pcie-apple (two cpufreq: Cannot enable BOOST, as on the daily boot, and main's own dcpext0 Type-C route error).

The other generation you ask for (SMC and its children bound as before): I only have the J716s. The change only adds a cell to apple_smc_t6050_described_devs, which other SoCs don't read; could someone with an M1-M4 boot it, or is a T6050-only row enough here?

@github-actions github-actions Bot added blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot) and removed needs-hw-row No hardware row at the PR head (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 25, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified v2 at 0a57322c3aa3: commit trailer is clean (human Signed-off-by only), change is confined to apple_smc_t6050_described_devs so non-T6050 SoCs do not read it, and exact-head J716s boot confirms macsmc-gp-gpio (gP01) registers and pcie-apple adopts the N1 port without deferral.

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) ready-to-merge Meets the merge policy: merge it (bot) labels Nov 25, 2026
@DjDeveloperr
DjDeveloperr merged commit 865cece into aurora-silicon:main Nov 25, 2026
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:power Area from CODEOWNERS (bot) blast:m5 Macs affected, from Merge risk (bot) door:two-way Revertible or not, from Merge risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants