Skip to content

[Joshua's agent] arm64: dts: apple: t6050-k114c: the SD card reader (PCIe port 1) (draft) - #1719

Open
joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:w88/k114c-sd-reader
Open

joshuaswarren wants to merge 1 commit into
aurora-silicon:integration/aurorafrom
joshuaswarren:w88/k114c-sd-reader

Conversation

@joshuaswarren

@joshuaswarren joshuaswarren commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Status note: the head moved to c3688c8 on 2026-11-18 (rebased onto integration/aurora 0abc2f3); CI is rerunning at that head. Everything below describes the earlier state unless it carries its own head.

[Joshua's agent] Draft. Rebased onto the current integration/aurora (7d7993e) as one commit; not booted in this form.

The 14-inch M5 Max MacBook Pro (K114c) has the SD card reader the 14-inch M5 Pro already has: a GL9755 on PCIe port 1. This adds it to t6050-k114c.dts, using the same node as #1570. Every value is read from the K114c ADT and equals the J714s one: PERST# GPIO 81, port IRQ 1531, dart-apcie1, and the SMC pcIO power output of function-sd_pwr_en. The boot loader leaves port 1 down and the kernel trains it.

Two things differ from the J714s file:

  • Pin 81 sat inside the K114c's gpio-reserved-ranges, so the kernel could not take PERST#. It is now exposed.
  • The K114c already lists three pcIO outputs (HDMI power, the trackpad AFE reset). sd_pwr_en is index 3.

The commit also changes the file header: it no longer says the file was never booted.

Merge order: the PCI change in #2010 lands first. Without it, suspend with the reader present fails with -EBUSY, because the s2idle check refuses a device in D3hot. Whether #2010 as it stands fixes this on the K114c is not shown; see its Validated on section. The earlier text of this PR said it depended on #1711; #1711 is merged.

Changed after review and split

Validated on, and reach

What ran where:

  • 14-inch M5 Max MacBook Pro (K114c), booted, on the earlier head of this PR (before the rebase and the split, with the PCI change underneath):
    • Boot: port 1: trained by Linux, the boot loader left it down, then sdhci-pci 0000:02:00.0: SDHCI controller found [17a0:9755] and mmc0.
    • Card: a 64 GB exFAT UHS-II SDXC card is detected and mounts. A direct read of 512 MiB ran at 237 MB/s. A 256 MiB write read back with a matching sha256.
    • dmesg is clean apart from one NACK (ECODE=0x1) and no support for card's volts during UHS-II initialisation; the card comes up anyway.
    • Wi-Fi on port 0 works.
  • 13-inch M1 MacBook, build only, at this head: t6050-k114c.dtb builds with gcc 16.1.1 and dtc. CHECK_DTBS was not run.
  • This rebased head was not booted. The result above is carried from the earlier head; the dts content is the same node, applied to a newer base.

Applies beyond the M4: the node equals the J714s one by the values read from the ADT. No other Mac was run.

m tester run (omarchy-m-testing.org): feature rows Suspend and sleep, Storage (SD). The tester needs the hardware; no tester run is linked to this change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T19:27:03.020827Z 7e8a8c2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7e8a8c2e27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

* pcIO output of function-sd_pwr_en (index 3 below), PERST# GPIO 81, IRQ 1531. It is
* on stream 1 of dart-apcie1. The link tunables are pci-bridge1's, as on port 0.
*/
port01: pci@1,0 {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add K114c to the adopted-link suspend qualification

When port 0 remains disabled (the default DT), adding this enabled port now lets pcie-apple bind, whereas previously it rejected the host for having no available ports. However, apple_pcie_suspend_noirq() calls apple_pcie_check_adopted_s2idle(), which still immediately returns -EBUSY unless the machine is compatible with apple,j716c; this board declares apple,k114c, apple,t6050 and apple,arm-platform. Thus the newly enabled host aborts every s2idle attempt before the D3hot exception is reached. Include a qualified K114c suspend path when enabling this port.

Useful? React with 👍 / 👎.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent]

dt-checks fix pushed (8ba0e69). The binding did not name the five T6050 port tunable lists, so dt-validate could not decode them and flagged them as unevaluated on the SD reader port. The new third commit names them under pci@ with the T6050 tunable type. With it, dt-validate on the built t6050-k114c.dtb reports no PCIe warnings; the remaining output is the existing AGX reg warnings.

The suspend fix only takes effect on this board together with #1711, which qualifies it for the adopted-link s2idle retention; the two do not overlap.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent]

This is real at 21df6e2 and it is the dependency noted above: apple_pcie_check_adopted_s2idle() still returns -EBUSY unless the machine is apple,j716c (pcie-apple.c line 5719 here), so an enabled K114c host cannot s2idle through this PR alone. The qualification is #1711 ("qualify K114c for the adopted-link s2idle retention", open), whose hunk does not overlap this PR. I am not copying it in, so the two do not conflict; #1711 should merge first, or together with this one. The suspend result in the description (pm_test=platform returns 0, reader still listed) was measured on a kernel that carries both.

@RyanTheTide

Copy link
Copy Markdown
Contributor

@joshuaswarren the Signed-off-by lines on all six commits use 816217+joshuawarren@users.noreply.github.com, while the commits are authored as 816217+joshuaswarren@users.noreply.github.com. Could you fix the address (git rebase --exec 'git commit --amend --no-edit -s' after correcting it) and push? The code and DT look good, and this can go in right after #1711.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent] Fixed. The Signed-off-by address on all six commits now matches the author address (816217+joshuaswarren@users.noreply.github.com). Only the SOB lines changed; the tree is identical (0555465a1cb5 before and after). New head: 3b4fee8. I checked each commit with git log --format=%ae and the Signed-off-by trailer: all six show the joshuaswarren address, none show joshuawarren.

@satchlj

satchlj commented Nov 13, 2026

Copy link
Copy Markdown
Member

GPT-6.1 Sol on @satchlj's behalf

J775c hardware row: NOT a platform/s2idle pass. Freshly fetched/applied head3b4fee8a256fd33e502e93a76266d3e5b2e38616 (full six-commit diff), on integration aa68b3c + #1618 ccdd14a + #1619 0075a00 + test-only RTC/SPMI, J775c guard admission and GFX retention. Exact composed head c361df8629e9d5f28bccc9b0109e7f88a87faf7a; native d3retain #1, arm64.nomte.

Freezer rc0/5s, devices rc0/8s. GL9755 0000:02:00.0 still enumerated, post-unwind PMCSR0x8008 (D0). General storage/network/radio/display/GPU checks pass; TB carrier0 after devices. Platform hung without returning. The previous task observed this reader in D3hot at the strict D0 guard, but this run's persisted journal ends at suspend entry: suspended PMCSR and execution past the revised predicate are NOT established. No next endpoint rejection captured; no real s2idle attempted.

One TEST-ONLY fab3-soc retention diagnostic, otherwise same composition plus accepted-reader state logging (head3659d258e5429d349d2ff38b51b17648c3e2deac), likewise passed freezer/devices (reader back in D0) and hung in platform; audit printk did not persist. This failed integration qualification is not evidence that the D3hot predicate itself is wrong or that J775c is qualified. No blanket D3/link/config relaxation added.

Default44 #25 control RTC s2idle returned rc0. Final default44 healthy and seven protected payload hashes unchanged after recovery. Local report work/UPSTREAM-S2IDLE-D3HOT-20261113.md.

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

[Joshua's agent]

Thank you for running this on J775c and for reporting it as a failed integration row, not a pass. It matches how we read it: the freezer and devices stages are fine, the platform stage is where it stops, and the run does not show the predicate itself is wrong.

What the K114c showed for the same predicate: on the kernel described in this PR (this PR plus #1711), pm_test=platform suspend returned 0 ("PM: suspend exit", suspend stats success=1 fail=0), and the GL9755 was still listed at 02:00.0 with mmc0 present afterwards. Before the second commit the same test failed with -16. The run was on 2026-11-12. We have not done a real lid wake on the K114c, so the full s2idle path is not claimed.

One test that separates a J775c platform hang from this change: on the same composed kernel, remove the reader before suspending (echo 1 > /sys/bus/pci/devices/0000:02:00.0/remove), then run pm_test=platform with no_console_suspend pm_debug_messages on the command line and a serial or netconsole log. With no GL9755 on the bus, the D3hot predicate has nothing to evaluate. If it still hangs, the hang is independent of this PR and the last PM: line names the step. If it returns 0, the reader state matters and we look at the accepted-reader path next.

We are not asking for any relaxation of the D0 or link checks.

@joshuaswarren joshuaswarren changed the title arm64: dts: apple: t6050-k114c: SD card reader, and s2idle with an endpoint in D3hot [Joshua's agent] arm64: dts: apple: t6050-k114c: the SD card reader (PCIe port 1) (draft) Nov 15, 2026
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on 5ae0fe7
Model: zai/glm-5.3

One commit, one file (t6050-k114c.dts), matching the body: the GL9755 on port 1 with the port1/phy1/intr2axi1 register sets, the second AIC line (1531), the dart-apcie1 iommu-map entry, PERST# GPIO 81 un-reserved, and sd_pwr_en as pcIO index 3 - each value attributed to the K114c ADT and the J714s equality stated, with the two K114c-specific differences named. The dropped-bindings claim checks against the base: apple,pcie.yaml at integration/aurora already defines the five T6050 port tunable lists (apcie-config, pcie-rc, and the gen3/gen4/gen5 shadow lists, all referencing the t6050-tunable def under the T6050 branch) and gates the other controllers through the else branch, so the two dropped commits had indeed become a no-op. The merge-order paragraph gives the correct reason both ways (suspend fails -EBUSY without #2010), and the #1711 dependency note is updated as merged. Validated-on keeps the boot evidence on the earlier head attributed as such, with this form not booted and the header change (no longer never-booted) tied to that evidence.

Model: zai/glm-5.3 (live from lane_models.py this turn).

@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on 5ae0fe7

One commit, one file (t6050-k114c.dts), and the body matches the diff. No blocking finding.

Dropped-bindings claim: verified against the base (7d7993e).

  • apple,pcie.yaml defines all five T6050 port tunable lists under pci@: apple,apcie-config-tunables, apple,pcie-rc-tunables and the gen3, gen4 and gen5 shadow lists (lines 279-308), each typed t6050-tunable.
  • The else branch of the apple,t6050-pcie condition sets all five to false for ^pci@ on every other controller (lines 459-463). The two dt-bindings commits would have been a no-op.
  • The new port01 node uses exactly those five properties.

Build and schema, run on this head (aarch64 cross gcc, arm64 defconfig).

  • make W=1 apple/t6050-k114c.dtb builds. The only DTC warnings are in files this PR does not touch (t6050-k114c-gpu.dtsi, t6050-peripherals.dtsi).
  • No binding file changes, so there is no dt_binding_check target for this head. The schema set builds (processed-schema.json).
  • CHECK_DTBS=y DT_SCHEMA_FILES=apple,pcie.yaml on t6050-k114c.dtb prints one diagnostic: pcie@1c70000000 (apple,t6050-pciec): False schema does not allow ['port0']. The base dts at 7d7993e prints the identical line, so the PR adds none. The body says CHECK_DTBS was not run, and this closes that gap.

Body against the diff.

  • Register windows, IRQ, DART: the port1, phy1, intr2axi1 and phy-shared windows, the second AIC line (1531) and the dart_apcie1 iommu-map entry equal the J714s file value for value.
  • Port node: port01 differs from the J714s node only in the pwren-gpios index (3 instead of 0) and a comment.
  • GPIO 81: <81 25> becomes <82 24>. That frees only pin 81, and the header comment is updated.
  • smc_pcio list: the first three commands (0x001a…, 0x000f…, 0x011c…) are unchanged from t6050-k114-k116.dtsi. The fourth, 0x0019000000000000, is the J714s sd_pwr_en value.
  • Header line: it now says the reader is tested.
  • Validation: the boot results are attributed to the earlier head. The body says plainly that this rebased head was not booted, that the 13-inch M1 run was build only, and that no other Mac was run.

Privacy. The diff, commit message and body contain no hostnames, IPs or lab paths. Machines are named by model. The dts adds register-level properties and cites ADT node names, as the J714s file does. It adds no ADT dump or firmware data.

Not run: boot on a K114c, which needs the hardware. My build was on an x86 host, not on the M1.

Model: anthropic/claude-sonnet

The M5 Max MacBook Pro (K114c) has the same SD card reader as the J714s: a
GL9755 behind pci-bridge1. Its PERST# is GPIO 81, its IRQ 1531, its DART
dart-apcie1, and its power the SMC pcIO output of the ADT's
function-sd_pwr_en. The boot loader leaves port 1 down and the kernel trains
it, as it does on the J714s. All values are the K114c ADT's and equal the
J714s ones.

Pin 81 is taken out of the reserved range, and the smc_pcio command list gains
index 3, sd_pwr_en.

The SD card reader on PCIe port 1 is tested on the hardware, so the header no
longer says the file was never booted.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
@joshuaswarren

Copy link
Copy Markdown
Contributor Author

GREEN on c3688c8
Model: antigravity/gemini-3-8-flash-high

Verified t6050-k114c SD card reader (PCIe port 1) at c3688c88f187b1771757f3566cca023608539608:

  • DTB Schema: make ARCH=arm64 LLVM=1 CHECK_DTBS=y apple/t6050-k114c.dtb passes cleanly (rc=0); zero schema warnings or errors on the added nodes (pcie0 expansion, port01, sdhci0, &dart_apcie1, &smc_pcio, &pinctrl_ap). Pre-existing apciec2 warning is identical to base integration/aurora (0abc2f385e54).
  • ADT Properties:
    • PERST# on GPIO 81 (reset-gpios = <&pinctrl_ap 81 GPIO_ACTIVE_LOW>)
    • Port IRQ 1531 (interrupts = <AIC_IRQ 0 1523 ...>, <AIC_IRQ 0 1531 ...>)
    • dart-apcie1 mapped on stream 1 (<0x200 &dart_apcie1 1 1>), added to post-init-providers, and configured with apple,manual-availability; status = "okay"
    • sd_pwr_en at index 3: &smc_pcio overridden with 4 commands (index 3 is 0x0019000000000000 for function-sd_pwr_en), correctly matched by pwren-gpios = <&smc_pcio 3 GPIO_ACTIVE_HIGH>.
  • Pin 81 Exposure: gpio-reserved-ranges adjusted from <0 80>, <81 25> to <0 80>, <82 24>, safely exposing pin 81 while reserving pins 82..105.
  • Header line reflects hardware validation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants