Repository navigation
arm64: dts: apple: t6050: share the SD card reader, add it to J714c, J716c, J716s and J775d - #2291
Draft
RyanTheTide wants to merge 1 commit into
Draft
RyanTheTide wants to merge 1 commit into
RyanTheTide wants to merge 1 commit into
Conversation
…J716c, J716s and J775d The SD card reader, a Genesys GL9755 on PCIe port 1 of apcie0 (ADT pci-bridge1/pcie-sdreader), was described only on the J714s and the K116s, each with its own copy of the port node. The 14- and 16-inch MacBook Pros and the Mac Studio all have an SDXC slot, and every T6050 board's ADT has the same reader: port 1, PERST# on GPIO 81, CLKREQ# on GPIO 77, card detect and write protect active high, power from the SMC pcIO template of function-sd_pwr_en (0x0, 0x190000), behind dart-apcie1. Only the GL9755's own settings differ between the laptops and the Studios, and no driver takes them. The port node and dart-apcie1's manual availability move to a new t6050-sdreader.dtsi. Each board gives what differs: - pcie0's port1, phy1 and intr2axi1 windows (apcie0 reg[22], reg[24], reg[25]), phy-shared (reg[3]) where the kernel trains the port, interrupt 1531 (apcie0 interrupts[1]) and the iommu-map entry for the port's bus on dart-apcie1, stream 1; - pin 81 opened in pinctrl_ap's gpio-reserved-ranges; - the reader's power, pwren-gpios on the board's SMC pcIO output for sd_pwr_en: output 0 on J714c (new list) and the J714s/K116s as before; output 3 on J716c, after its three outputs; - the J714s and K116s keep their pci-bridge1 link tunables. No other board has a booted ADT with those lists, so none is copied; the driver skips a list the tree does not have. On the J714c and J716c the boot loader leaves port 1 down and pcie-apple trains it, as on the J714s. The J716s cannot power the reader from the kernel: its SMC gpio node is the gP bank that carries the N1's power, so the pcIO node stays deleted, and port 1 and its DART are described disabled until a boot loader that powers and trains the port enables them. On the J775d the bus the kernel would number port 1 (2) is already port 3's, so the port and its DART are described disabled with the tree's bus 4 (bus-range now 0-4), as the J775c tree does: a boot loader that powers and trains port 1 enables both and renumbers the buses. J714s: the DTB is unchanged apart from phandle numbers. K116s: it now uses the die's dart-apcie1 node, as the J714s does, instead of the copy at the same address in t6050-peripherals.dtsi. J775c, J873s, K114c, K114s and K116c are unchanged. J775c and K114c have their own open changes for the reader. The port node is the one Diljit Singh wrote for the J714s and Jens Axboe carried to the K116s. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This was referenced Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The SD card reader (Genesys GL9755,
pci17a0,9755, on PCIe port 1) is described only on the J714s and the K116s, each with its own copy of the port node. The J714c, J716c, J716s and J775d have the same slot (Apple lists SDXC on every 14- and 16-inch MacBook Pro and on the Mac Studio) and the same reader in their ADT, but no node. The K114c is in #1719 and the J775c in #2102; this PR leaves both alone.Change
t6050-sdreader.dtsi: the port 1 root port node (PERST# GPIO 81, interrupt map), the GL9755 child with card detect and write protect active high, anddart_apcie1withapple,manual-availability. Its bus comes fromT6050_SDREADER_BUS(default 2).port1/phy1/intr2axi1windows (apcie0 reg[22], reg[24], reg[25]),phy-shared(reg[3]) where the kernel trains the port, interrupt 1531, the iommu-map entry ondart_apcie1stream 1, and pin 81 opened ingpio-reserved-ranges. How the port comes up:pwren-gpiosis SMC pcIO output 0, a new list holdingsd_pwr_en(0x0, 0x190000).sd_pwr_enis added as pcIO output 3, after the board's three existing outputs. The include sits aftert6050-peripherals.dtsi, which describes the same DART node.gpionode is the gP bank, which carries the N1's power, so the pcIO node cannot be described next to it (same node name). The kernel therefore has no way to power the reader.pci-bridge1link tunables. No other board has a booted ADT with those lists, so none is copied. The driver skips a list that is not in the tree.dart_apcie1node, as J714s does, not the copy at the same address int6050-peripherals.dtsi.CLKREQ# (GPIO 77) and the ADT's GL9755 settings are not described: no driver takes them.
Loader and driver notes
pcie-appletrains port 1 itself when the port haspwren-gpios(apple_pcie_t6050_cold_train), as on the J714s and K114c. No loader change is needed.start + 1 + idx= 2, which is port 3's (USB-A) bus after aura's bring-up. So the port has to wait for the loader.sd_pwr_enagainst (0x0, 0x190000), which is the value on every board here.pci@1,0and its DART in the handed-over tree.pcie-apple.cboard gates (not changed here):apple_pcie_check_adopted_s2idle()(drivers/pci/controller/pcie-apple.c:6777-6780) qualifies s2idle only on j716c, k114c, k116s and j714s. On the J714c, J716s and J775d it returns -EBUSY for the whole adopted host, with or without the reader.apple_pcie_t6050_sleep_probe()(pcie-apple.c:5429-5430) sets up the firmware-sleep park/unpark of the kernel-trained port only on j714s and j716c.drivers/mfd/macsmc.c(68-82) registersapple,smc-pcio-gpioandapple,smc-low-gpiobut notapple,smc-gpio. The J716s gP-bank node therefore gets no device.Testing
make dtbs CHECK_DTBS=y(dtschema) for every T6050 DTB on this branch: builds clean, no dtc warnings, and no schema message that integration/aurora does not already have.pci17a0,9755has no binding of its own, the same as before.Still to run (owner hardware rows)
port 1: trained by Linux, the boot loader left it downandsdhci-pci 0000:02:00.0: SDHCI controller found [17a0:9755].mmcblk0appears.dd if=/dev/mmcblk0 of=/dev/null bs=4M count=64 iflag=direct(256 MB) reads at a sane speed: tens of MB/s or more for a UHS-I card. The K114c read 237 MB/s with a UHS-II card.sdhci-pci. Then run the same card insert andddrow. Without aura#163, check that the boot is unchanged: port 1 stays disabled, and the N1 still works (J716s) and Ethernet and USB-A are still up (J775d).mmcblk0, the samedd).Per-board values and DTB diffs
All values below come from each board's ADT (26C5035r templates). The reader node is the same on every board.
port1 0x211028000 +0x8000, phy1 0x217014000 +0x4000, intr2axi1 0x211024000 +0x4000, phy-shared 0x217020000 +0x4000; dart-apcie1 0x211000000, IRQ 1532, manual-availability. These are the same on every board.
DTB diffs (phandles resolved to node paths):
0x200 -> dart_apcie1 1 1, andpost-init-providerson dart_apcie1.pci@1,0node: bus 2,pwren-gpios,reset-gpios81, withmmc@0,0(pci17a0,9755, reg 0x20000, cd/wp-inverted).output-commandsgains 0x0019000000000000.post-init-providersnow on dart_apcie0 and dart_apcie1.pci@1,0(bus 2) and dart_apcie1 are disabled. Pin 81 is no longer reserved.0x400 -> dart_apcie1 1 1, and bus-range 0-4.pci@1,0is added disabled (bus 4, mmc reg 0x40000). dart_apcie1 stays disabled and gains manual-availability. Pin 81 is no longer reserved./soc@200000000/iommu@411000000is okay with manual-availability, and/soc/iommu@411000000is back to disabled.dt-validate, line counts before -> after and new messages: J714c 2 -> 2, J714s 12 -> 12, J716c 14 -> 14, J716s 0 -> 0, J775d 0 -> 0, K116s 0 -> 0; 0 new on each. The existing messages are on the PCIe-C tunnel hosts, not on apcie0 or the reader.
Merge note: #2162 also changes the J716c
gpio-reserved-rangesline (pin 138), so whichever lands second needs a one-line rebase.Assisted-by: LLM (Claude:Opus 5.5)