Repository navigation
Conversation
When the T6050 driver brings a root port up itself (pwren-gpios), or restarts an adopted one, it applies five tunable lists from the port's node. The first, apple,apcie-config-tunables, goes to the port registers. Then apple,pcie-rc-tunables and the Gen3, Gen4 and Gen5 rate shadow lists go to the root complex configuration space. The J714s and K116s SD card ports carry all five, but the binding described none of them, so their pci@1,0 nodes fail validation. Describe them in the T6050 tunable format and keep them off the other SoCs. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Two allOf entries match every node with apple,agx-g17s: - The M5 Pro hand-off entry wants one "sgx" reg and no board operating points. - The J716c entry wants "asc" and "sgx" plus the operating-point tables. No node satisfies both. The J714s, K114c and K116s GPU nodes fail the J716c entry, and the J716c node fails the hand-off entry. Apply the hand-off entry to a node whose only compatible is apple,agx-g17s, and the J716c entry to apple,agx-g17c. Also drop the second apple,agx-g17s in the enum of the non-coprocessor entry, which dt_binding_check reports as non-unique. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…s N1 aura's T6050 hand-off reads the PCIe host's iommu-map and refuses the boot when it is absent, which the bare disabled pcie0 of these boards hit. Give the host its iommu-map and bus-range, and on the K116s describe port 0 with the N1's three functions as on J714s, with this board's platform ID (ADT /chosen board-id 0x16 << 16 | 0x6050), the PERST# pin 80 exposed and the wifi0/bluetooth0 aliases for the loader's factory addresses. The K114s keeps the host disabled until its board ID is known. Signed-off-by: Jens Axboe <axboe@kernel.dk>
Port 0 carries the N1 (ADT /arm-io/apcie0/pci-bridge0 with centauri-control, -alpha and -beta). Describe the port and the N1's three functions as on J714s, with this board's platform ID (ADT /chosen board-id 0x16 << 16 | 0x6050), the firmware table name, the PERST# pin 80 exposed and the wifi0 and bluetooth0 aliases through which the loader fills the factory addresses. The shared K114/K116 file keeps the host disabled with its iommu-map, which aura's T6050 hand-off requires, until the K114s board ID is known. Booted on a K116s: the loader trains the link, the N1 enumerates at 01:00.0-2, apple_centauri_t6050 boots the ticketed firmware table from the 27.2 IPSW and wlp1s0f0 associates and gets DHCP. Signed-off-by: Jens Axboe <axboe@kernel.dk>
The PROLED MacBook Pros are K boards (K114s/c, K116s/c). Like the J boards, their panel node can name the board before the generic compatible: the K116s uses "apple,panel-k116", "apple,panel". Accept apple,panel-k<n> where apple,panel-j<n> is accepted. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…set, DCP Bring the K116s board file up to what the J714s describes and what the display hand-off needs: - The two non-debug USB-C ports as on the J714s: the SN201202x port controllers hpm1/hpm2 on nub-spmi-a0/a1 (the a1 controller needs its own reg), ATC1 and ATC2 PHYs, mailboxes, dwc3 controllers and DARTs enabled, with atcphy1/atcphy2 aliases so the loader copies the combo PHY tunables from the ADT. - SMC hwmon with the fan, power, voltage and current keys, without the die temperature keys this SMC lacks. - The trackpad's AFE reset as SMC GPIO gp1c (active low) and a keyboard alias for the loader's layout, as the J714s does; the pcIO node goes. - The dcp hand-off nodes the loader edits: dcp with its bandwidth scratch and firmware clock ids, fixed clocks for them, the DARTs' DMA range, the display subsystem and a panel of 345x223 mm, all disabled until chosen.aurora,t6050-display arms them. dcp and disp0 aliases. - gpio-reserved-ranges split around the N1 PERST# pin. Signed-off-by: Jens Axboe <axboe@kernel.dk>
The K116s (16-inch M5 Pro OLED) has the J714s's audio: six SN012776 amps in two woofer pairs and two tweeters, the same slots, frame and V/I sense layout, and the CS42L84 jack codec, so it shares macaudio_j714_cfg under its own chassis compatible. Signed-off-by: Jens Axboe <axboe@kernel.dk> [thomas: keep apple,k116-macaudio sorted in the binding] Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
The J714s's sound description, every value checked against the K116s ADT, which matches the J714s in each audio property: six SN012776 amps on i2c1 and i2c3 with the shared shutdown line on AP pin 107, the fault interrupt on pin 106 and the V/I sense slots of the ADT speaker-config rows; the CS42L84 jack codec on i2c2 with reset on pin 139 and its interrupt on 134; the AOP with its setup mailbox, DART and the base-ns ADMAC; and the card as apple,k116-macaudio with the speaker-id pins 136 and 137. The reserved GPIO ranges now expose only the pins named here plus the N1's PERST#, since pin 112 takes an SError when read. The amps carry their ADT speaker-config rows until the boot loader fills them in; it overwrites them with the same bytes. Signed-off-by: Jens Axboe <axboe@kernel.dk>
…714s does The PMP with its DART, mailbox, report and the PMC's static voters, and a tunables file generated from the K116s ADT's /arm-io/pmp0/iop-pmp0-nub (every name the J714s file has; only the DVFS voltage table, the segment ranges and the UUID differ). The SEP through its alias, which the boot loader uses to reserve its firmware and publish its manifests, with its mailbox and power domain and the two fabric parents left to the firmware. Signed-off-by: Jens Axboe <axboe@kernel.dk>
…d-off The GPU half of the J714s description, every value checked against the K116s ADT: the G17S GPU on the PMP's gfx domain, its two ASC mailboxes, the GPX/AFR/GFX power states and the six reservations the boot loader fills from the ADT. All of it stays disabled until a loader with the G17S hand-off enables it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
The MacBook Pro 16-inch (M5 Pro, OLED) SD card reader, a GL9755 on PCIe
port 1 (ADT apcie0/pci-bridge1/pcie-sdreader), was not described. The
boot loader trains only port 0 (the N1) and leaves port 1 down, so the
kernel trains it, as on the J714s. Every value is from the K116s ADT:
- port 1's registers: apcie0 reg[22] (port1, 0x211028000 +0x8000),
reg[24] (phy1, 0x217014000 +0x4000) and reg[25] (intr2axi1,
0x211024000 +0x4000), the entries six after port 0's reg[16], reg[18]
and reg[19], behind /arm-io's ranges (+0x200000000);
- the shared PHY's window, apcie0 reg[3] (0x217020000 +0x4000), which
the kernel's train reads to see that the boot loader left the PHY
running;
- port 1's interrupt, apcie0 interrupts[1] = 1531;
- PERST#: pci-bridge1 function-perst = gpio0 GPIO(0x51, 0), pin 81,
which the pin controller now exposes (82-105 stay reserved, as does
pin 112, which takes an SError when read);
- the reader's power: pcie-sdreader (and /pcie-sdreader-helper)
function-sd_pwr_en = smc-pmu pKW8('pcIO', 0x0, 0x190000), described as
SMC pcIO output 0, command 0x0019000000000000. The board deleted the
pcIO node as it drove none of its outputs (the trackpad's AFE reset
uses SMC GPIO gp1c); the node is back with this one output, which
replaces the three of t6050-k114-k116.dtsi;
- the link tunables: pci-bridge1's apcie-config-tunables,
pcie-rc-tunables and pcie-rc-gen{3,4,5}-shadow-tunables, decoded as
(offset, size, mask, value). They are the same as the J714s's;
- dart-apcie1 (0x211000000, interrupt 1532), which the ADT marks
manual-availability: it answers only once the root complex is up, so
the host does not wait for it (post-init-providers) and pcie-apple
enables it once the port is up. The node is apcie1_dart of
t6050-peripherals.dtsi;
- the reader's card detect and write protect, active high: the ADT's
card-detect-polarity and write-protect-polarity are 1.
One value is not the ADT's: the DART stream. mapper-apcie1 has no reg
(macOS has the bridge request a stream at run time, function-
dart_request_sid), so the reader gets stream 1, below the DART's first
bypass stream (16), as on the J714s. The driver routes the reader's
requester ID to it.
pci-bridge1's function-clkreq (gpio0 pin 0x4d) and the ADT's GL9755
settings (gl9755-sdr104-delay*, gl9755-ssc_*, ...) are not described:
no driver takes them.
Not tested on the hardware: the DTB builds, and the same description
works on the J714s.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
ADT audio-hp-mic: three microphones on leap-s RX0, through the proxy ADMAC (Linux channel 1, as on J714s and J813). The AOP audio service captures them on a card of its own, AppleK116HPAI. The board file carried this as an "#if 0" block until the proxy ADMAC was described at its real address. Enable it. Checked against the K116s ADT: admac-hp-mic-ec-proxy reg 0x2d3200000 size 0x34000, dma-channel 0; admac-leap-s interrupt 638, nine RX channels; dart-aop mapper-admac-leap-s stream 11 with vm-base-11 0x10040000000 and vm-size-11 0xffff0000; leap-s-adma-rx-0 three channels, 32 bits, 48 kHz. These are the J714s values. Not tested on the hardware yet. Signed-off-by: Jens Axboe <axboe@kernel.dk>
The 16-inch M5 Pro OLED MacBook Pro (K116s) has the T6050 ISP that J716c and J714s describe, so take their description. Checked against the K116sAP ADT of macOS 27.2 (26B8125): - isp0: reg[0] 0x380000000 + 0x3ff0000 (0x580000000 through the arm-io range) holds the coproc, mailbox and GPIO windows; reg[1] is the pmgr window 0x280900000 + 0x3f4; interrupts 513..516 and 526; the EIC's mmio-wd-isp is 0x5c3b50000 + 0x8000; clock-ids 350 and 352. - dart-isp0: instances at 0x5828c0000, 0x5828e0000 and 0x582900000 (0xc000 each), the address filter at 0x5828d0000, interrupt 531, host streams 0 and 12, exclave streams 4/5 and 8/9, remap 1, 6, 7, 10, 11, DAPF stream mask 0xcc3. - pmgr: FAB9_SOC at 0x398, ISP_SYS at 0x3a0 (parent FAB9_SOC) and ISPSENS0 at 0x100 in the second register block. ISP_CPU, ISP_FE, DPRX, ISP_SECURE, ISP_BE and ISP_CLR are devices 0xdc, 0xdd and 0xe1..0xe4; the table gives them no register, the include's offsets 0x3b0, 0x3b8 and 0x3d8..0x3f0 are eight bytes per device from ISP_SYS (0xda) and are the range the DAPF opens to the ISP (0x2809003b0 to 0x2809003f3). - the two firmware segments are 0xc1c000 and 0x13d0000 bytes at DART address 0x10000000000, as on J716c and J714s. Two things differ from J716c and need nothing here. The ADT's address filter lists four DSID windows (0x2220004000, 0x2222004000, 0x2224004000 and 0x2226004000; active-mcc-bit-vector 0xf) where the driver's T6050 table has eight; J714s, the same M5 Pro, streams with that table. The sensor type is 0xbc and cam-connections-scheme 0x10, which the loader passes as apple,platform-id and apple,cam-connections-scheme. The ISP firmware of this build (uuid 980F533B-34EA-3FBA-878C-809F6AF57345, the IPSW's isp_bni/adc-nyx-sck11pm) has one connection table for platforms 0xb9..0xbc, with a single "FrontRGB" channel on its IMX958 sensor driver: the sensor J714s reports (0x958), which the driver runs with the 2224_01 setfile. As on the other two boards the ISP and its DARTs stay disabled until the boot loader has reserved the firmware. The include does change what the power-domain driver does without that: it turns ISP_SYS on and keeps it on, registers the six ISP power states and ISPSENS0, and marks FAB9_SOC as firmware owned. Not booted on the hardware. t6050-k116s.dtb builds without DTC warnings. Signed-off-by: Jens Axboe <axboe@kernel.dk>
The boot loader copies each amp's row from the ADT (aura kboot_audio); the rows carried here were a stop-gap for a loader without it. Signed-off-by: Jens Axboe <axboe@kernel.dk>
…SMC link The shared T6050 files gained a CPU PMU node (t6050-base.dtsi) and an apple,smc phandle on the CLPC (t6050-die0.dtsi), so both became active on every T6050 board, the K116s included. Neither has been tested on the K116s. It ran at EL1 under the boot loader's monitor when they appeared, and now runs Linux at EL2 (27.2, KVM working) with this change in place, so the PMU and the SMC link are still to be tested there. Until then keep its device tree as it was: disable the PMU node and drop the SMC link, without which the CLPC's low-power platform profile has only its frequency ceiling. With this the K116s DTB differs from the one built before the rebase only in nodes that are disabled. Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…he loader
aura's T6050 panel hand-off adds the DCP firmware's clock nodes, the
"clocks" property and the bandwidth request scratch
("apple,bw-scratch") to the dcp node from the ADT, as it does for the
J714s, and refuses a device tree that already carries them ("the device
tree already has a memory-region, clocks or apple,bw-scratch"). The
K116s tree had them written in for an earlier loader, so with aura main
the internal panel was not handed over.
Drop the two fixed-clock nodes, "clocks" and "apple,bw-scratch".
"apple,clock-ids", the DART ranges and the panel node stay. The values
aura fills in are the ones removed here: the dcpext0 PMC block at
0x20000 and clock ids 361 and 458.
Needs aura with the 27.2 K116s panel hand-off (aurora-silicon/aura#226).
Signed-off-by: Jens Axboe <axboe@kernel.dk>
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.
Follow-up to the note on #1648, now that aurora-silicon/aura#226 is merged. Stacked on #1648 (head cd2c9f5); only the last commit is new.
aura's T6050 panel hand-off adds the DCP clock nodes,
clocksandapple,bw-scratchitself and refuses a tree that already has them. This drops the two fixed-clock nodes and those two properties from the K116s dcp node;apple,clock-ids, the DART ranges and the panel node stay.Tested on the K116s (27.2 stub): aura main 6ba9efc90858 as Stage 2, integration adb5a7e plus the K116s commits with this change. Linux at EL2, 18 CPUs; the panel is handed over, apple-drm initialises at 2.1 s, desktop at 3472x2170; GPU, Wi-Fi, sound and KVM come up.
Dependency: needs aura with #226. With an older loader that expects the properties in the tree, the panel is not handed over.