Skip to content

J514S (MacBook Pro M3 Pro): bring-up, DCP displays and G15 GPU - #358

Closed
erykwieliczko wants to merge 35 commits into
aurora-wipfrom
j514s/m3-pro-20261017
Closed

erykwieliczko wants to merge 35 commits into
aurora-wipfrom
j514s/m3-pro-20261017

Conversation

@erykwieliczko

Copy link
Copy Markdown
Member

Adds MacBook Pro M3 Pro (J514S, T6030) support on aurora-wip.

Bring-up: PMP display hold, AGX vote and memory floor; PMP device-state power domains; PMP/GPU device-tree handoff; pmgr-pwrstate (apple,inherited-on, apple,no-auto-pm); iommu-addresses; dcache_clean_poc export; bindings, DT, J514S config.

Display (appledrm, DCP firmware 14.7):

  • internal panel;
  • USB-C DisplayPort on all three ports (pin C/D, HBR3);
  • built-in HDMI (DCPEXT0, DSC, 4K120);
  • HDMI audio (apple-sio T6030).

Adds the T6030 ATC DisplayPort PHY and the display crossbar.

GPU: G15 generation in the Rust asahi driver (firmware 2419), Aurora UAPI. Requires Mesa with G15S support: aurora-silicon/mesa#23 (aurora-silicon/mesa#23).

Depends on: m1n1 handing off DCPEXT0/1 (separate PR) for external displays and audio. The panel and GPU work without it.

Tested on J514S:

  • panel, USB-C, HDMI 4K120, HDMI audio;
  • Minecraft/0 A.D./Factorio replays and Vulkan CTS subsets;
  • suspend.

J700/M1/M2 objects are unchanged except for inert shared code.

🤖 Generated with Claude Code

The G15 generation of the asahi GPU driver, added later in this series,
links page tables into the UAT of the GPU's firmware coprocessor, whose
table walker does not snoop the CPU caches. The tables are ordinary RAM
pages that the shared page-table code allocates and writes through the
cacheable linear map; they are not DMA-mapped, so the DMA API has nothing
to sync them with. Each table, and each changed entry, has to be cleaned
to the point of coherency before the firmware can walk it.

Export the existing dcache_clean_poc() to GPL modules for that, instead
of adding a new cache maintenance helper.

Signed-off-by: Eryk Wieliczko <[email protected]>
of_iommu_get_resv_regions() only consumed the address and size cells of
the tuples owned by the device being probed. In a reserved-memory node
shared by several devices, the cells of another owner's tuple were then
read as the next phandle. The node reference taken by the phandle lookup
was also leaked.

The MacBook Pro M3 Pro (J514S) boot loader publishes such shared
reservations: its DCP firmware regions are listed for both the DCP and
its PIODMA stream.

Translate each tuple with its own owner's cell counts, add a region only
for the device's own tuples, stop at an unknown owner, whose tuple
length cannot be known, and drop the node reference. Regions with a
single owner resolve exactly as before.

Signed-off-by: Eryk Wieliczko <[email protected]>
…le,inherited-on

apple,no-auto-pm keeps the PMGR from gating a domain automatically once
it is powered up. A coprocessor whose firmware Linux starts cold, such
as the T6030 external display coprocessors, must not be clock or power
gated behind its back.

apple,inherited-on is the name J514S (MacBook Pro M3 Pro) boot loaders
built from earlier trees use for what is now apple,firmware-owned. Their
device trees come from the boot loader, so document it as a deprecated
synonym.

Signed-off-by: Eryk Wieliczko <[email protected]>
…rmware-owned

The J514S (MacBook Pro M3 Pro) boot loaders in use today hand the DCP
over running, like the J700 one, and mark its three display power
domains (DISP_SYS, DISP_FE and DISP_CPU) with apple,inherited-on, the
older name of what this driver calls apple,firmware-owned. Their device
tree comes from the boot loader, not from this kernel, so without the
older name those domains are handled as ordinary domains: DISP_CPU gets
its apple,min-state written, and an unused domain can be powered off
under the running DCP.

Treat apple,inherited-on exactly like apple,firmware-owned. The J514S
device tree added later in this series uses apple,firmware-owned.

Signed-off-by: Eryk Wieliczko <[email protected]>
The driver turns on a domain's automatic power management (auto-enable)
whenever it powers it up or finds it on at probe. That is wrong for the
CPU domain of a coprocessor whose firmware Linux starts cold, like the
J514S external display coprocessors: the PMGR then gates the coprocessor
behind its firmware's back.

Honour apple,no-auto-pm: power-up requests the active state with
auto-enable clear, and a domain found on at probe has auto-enable
cleared instead of set. Domains without the property behave exactly as
before.

Signed-off-by: Eryk Wieliczko <[email protected]>
genpd only adds a domain that is on below parents that are on. The PMGR
parents of a domain found on at probe are on, but a parent from another
provider need not be. On the J514S the boot loader leaves the DISPEXT1
power chain on when it showed its picture on an external display, while
the PMP device-state request that dispext1_sys hangs from is off until it
is taken, so dispext1_sys failed to join it (-EINVAL).

When a domain is found on, take each of its parents that is not a PMGR
domain through genpd (a virtual device attached to that parent, resumed)
before joining them, and release them once joined: the parent is then
held by its subdomain, which is on. For the PMP request this issues the
vote at the earliest point, before anything uses the chain Linux
inherited. Domains whose parents are all PMGR domains, which is every
domain on the other SoCs, are not affected.

Signed-off-by: Eryk Wieliczko <[email protected]>
A platform driver for hardware that cannot be torn down safely has to
set driver.suppress_bind_attrs, so that userspace cannot unbind it
through sysfs. The Rust platform driver registration offers no way to
set it.

Add a Driver::suppress_bind_attrs() method, false by default, that the
registration copies into the driver structure. It is a function rather
than a constant so that a driver can decide at registration time, for
example from the machine it runs on; it is evaluated once, before the
driver registers and so before any (deferred) probe.

The PMP driver uses it on the T6030 in the next patch.

Signed-off-by: Eryk Wieliczko <[email protected]>
On the T6030 MacBook Pros (J514S, J516S) the boot loader hands the
display over running, the GPU needs the PMP's AGX power vote before its
firmware can start, and nothing raises the memory and fabric performance
floor. All three go through the PMP:

- Before the PMP CPU runs, hold the inherited display power chain
  (DISP_SYS, DISP_FE, DISP_CPU at minimum state 15) and seed the PMP's
  device-state (PTD) request with DISP|ANS. Otherwise the PMP powers the
  display down when it starts and the DCP CPU stops. Only a cold PMP is
  accepted.
- The display driver links to the bound PMP and waits for the PMP to
  acknowledge the DISP request before it adopts the DCP. Only the
  acknowledgement entry is read: a read of the request entry may consume
  the PMP's change notification.
- The GPU's AGX vote is an untagged request on the PMP endpoint. A C
  bridge sends it through the Rust driver's RTKit session, one request at
  a time with a one-second deadline, and consumes the reply. Votes and
  supplier links are retained until reboot; malformed, unsolicited, late
  or duplicate replies and firmware crashes latch a sticky error.
- Once the display is acknowledged, request DCS4/FAB2 for the CPU
  clients (EACC0/PACC0, PTD indices 288 and 289). Without it the PMP
  keeps DRAM and the fabric at their lowest states: an 8-thread CPU copy
  measures 28 GB/s and the GPU is starved. Since reading the request
  entry may consume the change notification, a floor written and echoed
  at once stays latched without effect; the floor is applied from a
  delayed work instead (clear both requests, write both floors back to
  back, confirm on the DVFS state entries without reading the requests,
  up to ten tries). With it the DVFS state entries go from 0x100 to
  0x2104 and the CPU copy bandwidth from 28 to 123 GB/s; a Minecraft
  Vulkan replay went from 36.5 to 55 FPS. j514s_memory_floor=0 turns it
  off.

Split the Rust PMP driver into pmp-core.rs and the C pmp-display.c,
linked into the same pmp module, so that there is still a single mailbox
owner. pmp-core.rs gains the hooks the bridge needs: lazy publication of
the bridge once the provider is bound, routing of power replies, a
pre-run hook, failure propagation on crash and unbind, and, on T6030
only, the confirmation the firmware expects for registry updates. The
driver suppresses its bind attributes on T6030, where the votes and the
display hold cannot be undone.

Everything is gated on the apple,t6030 machine with apple,j514s or
apple,j516s and on the apple,t6030-pmp-v2 node. Other boards, including
T8140 (J700), keep their behaviour: no bridge is registered, the pre-run
hook returns at once and every message still reaches the registry
handler.

Signed-off-by: Eryk Wieliczko <[email protected]>
The device tree the T6030 MacBook Pro boot loaders pass (J514S, J516S)
carries no PMP, PMP DART or PMP mailbox node, and nothing holds the PMP
and PMS-SRAM power domains, so Linux powers the PMP off as unused. It
also has no GPU node.

Add them before devices are populated (arch_initcall), from one
changeset: the PMP DART (iommu@350300000), mailbox (mailbox@350c08000)
and apple,t6030-pmp-v2 node (pmp@350500000), with apple,always-on on the
pmp and pms_sram domains. The PMP's tunables, board-id and DRAM vendor
are the running machine's own: a fixed set of 59 tunable names is copied
byte for byte from /arm-io/pmp/iop-pmp-nub of the boot loader's ADT
export (phram "adt") as apple,tunable-<name>, and board-id and
dram-vendor-id from /chosen. These are per machine and per firmware
(binned GPU voltages, board thermal data), so they cannot be part of the
device tree source. A name the nub lacks stays absent, so the PMP
firmware keeps its default. Without a readable ADT, /chosen or PMP nub
nothing is added and the PMP stays off, as before.

Then, in a separate changeset so that a GPU failure can never cost the
display, add the G15S GPU node (gpu@290000000, apple,agx-t6030, linked
to the PMP with apple,pmp) and its ASC mailbox. The GPU firmware and its
regions come from the ADT at runtime.

The handoff does nothing when the tree already describes the PMP, on any
machine other than apple,t6030 with apple,j514s or apple,j516s, and with
j514s_pmp_handoff=0. It is built in whenever the PMP driver is enabled,
since it must run before the PMP module could load, and it needs
OF_DYNAMIC.

Signed-off-by: Eryk Wieliczko <[email protected]>
On the T6030 the power management coprocessor (PMP) keeps a
device-state table (PTD) in which the application processor requests
SoC devices and the PMP acknowledges them. The PMGR power chains of the
external display coprocessors may only be powered once the PMP has
acknowledged their request. Describe that request as a power domain
provider, with one cell: the device's bit in the display request word.

Signed-off-by: Eryk Wieliczko <[email protected]>
On the T6030 the PMP serves a device-state table (PTD) in which the
application processor requests SoC devices and the PMP acknowledges
them. The external display controllers DISPEXT0/1 share the display
request entry with the internal display (DISP) and the ANS, and their
PMGR power chains may only be powered once the PMP has acknowledged
them.

Provide that request as a power domain per controller (cell 8 DISPEXT0,
9 DISPEXT1), the parent of the first domain of the controller's PMGR
chain, so whatever powers the chain first obtains the acknowledgement
first. Power-on adds the controller, DISP and ANS to the existing
request with one 64-bit write to the request-set aperture and polls only
the acknowledgement entry for DISP and the controller; the request entry
is read again only once acknowledged, because a read of it may consume
the PMP's change notification. A request/acknowledgement disagreement in
these bits is refused. The request is retained once acknowledged: the
PMP has no release for it. The domains are IRQ safe like the PMGR
domains below them.

The provider probes once the PMP driver is bound and the table is ready.
It can be a module like the PMP itself, loaded through its OF alias; it
registers power domains that stay in use, so it cannot be unloaded.

Signed-off-by: Eryk Wieliczko <[email protected]>
Describe the PMP's device-state request table, the parent power domain
of the external display controllers' power chains (cell 8 DISPEXT0,
9 DISPEXT1).

Signed-off-by: Eryk Wieliczko <[email protected]>
A config fragment for the MacBook Pro (14-inch, M3 Pro), merged after
defconfig and asahi.config: the PMP (display hold, AGX vote, memory
floor) and the dynamic device tree support its device tree handoff
needs. Later patches add the display and GPU options.

Signed-off-by: Eryk Wieliczko <[email protected]>
…smitter

The MacBook Pro (14-inch, M3 Pro) wires one of its T6030's Type-C PHYs
(ATC3) as a fixed four-lane DisplayPort transmitter into the DP-to-HDMI
converter of its HDMI port. Without a Type-C, USB or USB4 side it only
provides a DisplayPort PHY, and its power-up needs the calibration the
boot loader copies from Apple's device tree.

Signed-off-by: Eryk Wieliczko <[email protected]>
The USB-C ports of the T6030 (M3 Pro) carry DisplayPort alternate mode
links from its external display controllers, and the J514S wires one
ATC (ATC3) as a fixed DisplayPort transmitter into the converter of its
HDMI port. The Type-C mux already installs the negotiated mode (pin C/E:
DisplayPort on all four lanes; pin D: two DisplayPort lanes next to
USB3), but the T8122-generation paths have no AUX, link or drive
programming and the T8103 PLL sequence does not apply.

Add a T6030 profile behind PHY_APPLE_ATC_T6030_DP, matched by
"apple,t6030-atcphy" ahead of the T8122 fallback, with its own DP PHY
operations:

- power_on takes a display hold on the installed DP mode and orientation
  (pin C: four lanes on both pairs; pin D: two lanes on the pair USB3
  does not use), only with no transition pending and the PHY powered and
  calibrated; -ENOLINK/-EBUSY before anything is written, so the caller
  can retry. While held, Type-C mode and orientation changes and the
  USB3 power-off are recorded instead of applied, so that the display can
  park its route on a still powered PHY. A held route is never a mux
  no-op: every request replaces the recorded one.
- power_off, with the link stopped and AUX off, drops the hold and
  applies what Type-C asked for meanwhile, rebuilding the lanes for a
  new orientation even in the same mode.
- set_mode(PHY_MODE_DP) turns AUX on; set_mode(PHY_MODE_INVALID) stops
  the main link if it runs, then turns AUX off.
- configure: link rate RBR/HBR/HBR2/HBR3 or 0 (shared PLL, then TX and
  RX of each DP pair, stopping a running rate first), the lane count
  (the mode's width or 0, no SSC) and the per-lane voltage swing and
  pre-emphasis presets. Pin D drives lane 0 on the pair's RX side and
  lane 1 on its TX side; on pin C the lane to pair mapping is not known,
  so both pairs get the stronger of the two requests per side, and the
  programmed levels are written back into the configuration for the
  caller to report.
- validate reports the lanes of the installed mode and HBR3. The PHY's
  DP calibration is per ATC, not per rate, and the boot loader puts it
  into the common tunables the Type-C side applies on every mode change;
  the firmware picks the rate per sink.

"apple,t6030-atcphy-dp" binds the fixed transmitter: probe maps the core
registers, takes the boot loader's calibration
(apple,tunable-dp-calibration) and registers only the DP PHY, touching
no register. power_on brings the PHY up cold from its idle image (power
and reset with the PHY reset held, the calibration with each value read
back, DP on both lane pairs in the fixed lane mode, PHY reset release,
common block) and then offers the same link interface as a pin C hold;
power_off powers it down to its idle image again.

Every failed step stops and keeps the hold. Without the option nothing
changes.

Signed-off-by: Eryk Wieliczko <[email protected]>
Each USB-C ATC of the T6030 (M3 Pro) has a display crossbar that
connects a display controller's stream to the port's DisplayPort output.
It is powered through its ATC's common power domain, so allow a
power-domains property.

Signed-off-by: Eryk Wieliczko <[email protected]>
Each USB-C ATC of the T6030 (M3 Pro) has a display crossbar at its core
+ 0x4c000 that connects a display controller's stream to the port's
DisplayPort output. The register interface is the T602x one, but the
sequences differ from the J700 physical-port sequence (teardown through
+0x24, no +0x50/+0x70 enables) and every transition ends in a complete,
exactly checked register image, since the crossbar has no other user.

Add the "apple,t6030-display-crossbar" variant behind
MUX_APPLE_DPXBAR_T6030, for the DP output (mux index 0) only:

- select connects source S (bit B = 1 << S, field Q = 2 * S) from the
  idle image (a parked +0x34 = 0x100 is allowed): selector S in both
  fields of +0x30, the gates at +0x04/+0x14/+0x24 released and their
  status bits at +0x804/+0x810/+0x81c checked, then the enables, ending
  in the exact connection-up image;
- deselect parks the connection (enables off, gates back, selector
  cleared) and requires the complete idle image; after a park it only
  verifies the idle image;
- apple_dpxbar_link_down/up() park and reconnect the selected source
  while the selection is kept, around link reconfiguration;
- the two other outputs can never be selected, so setting them idle,
  which the mux core does at registration, is a no-op.

Probe writes nothing. The crossbar's power (its ATC's common domain) is
held through runtime PM from the first select until a deselect has
verified the idle image; a failed transition keeps the selection and the
power, as the hardware may have been written.

Signed-off-by: Eryk Wieliczko <[email protected]>
The M3 Pro (T6030) has the SIO coprocessor too; on the J514S it carries
the built-in HDMI port's audio (DPA1, channel 0x66), as the M1 Pro/Max
SIO does for their HDMI port.

Signed-off-by: Eryk Wieliczko <[email protected]>
…pects

The ADT records each SIO client's channel configuration with the client
(dp-audioN dma-channels: channel, data shape, timeout, FIFO size,
threshold). On the M3 Pro (T6030) the DisplayPort audio channels refill
their FIFO at 0x600 bytes: [0x66, 2, 0, 0x800, 0x600, 0, 0, 0] for DPA1,
the J514S HDMI port's, and the same for DPA0/DPA2. Configure that
threshold for an apple,t6030-sio controller, and publish every period
descriptor whole (its other fields zero), since a descriptor slot may
come back from an earlier transfer.

The boot tables stay the boot loader's (apple,sio-firmware-params), as
the binding has it. Behind APPLE_SIO_T6030, so that other configurations
build the driver unchanged.

Signed-off-by: Eryk Wieliczko <[email protected]>
…l panel

The MacBook Pro (14-inch, M3 Pro; J514S, T6030) internal panel runs DCP
firmware 14.7.0, which the boot loader leaves running. Drive it with the
common driver as a new firmware interface, iomfb_v14_7, next to v12_3,
v13_3 and h17p, in the adopted-session lifecycle the J700 brought to
appledrm.

Interface (always built, selected by hardware data):
- DCP_FIRMWARE_V_14_7 and its cases in every fw_compat dispatch. 14.7 is
  the 13.x wire family (0x22c surfaces, surf2 block, D589 completion)
  with H17-style pieces: a 0x508-byte swap prefix (0x48-byte gap before
  the swap ID, nits at +0x354/+0x35c, opaque state where 13.x had the DAC
  words), six surf2 entries and no trailing pad (A407 is 0x1b58 bytes),
  the 16/8 swap_start, the 0x6f0-byte D589. The layouts are template
  blocks checked by static asserts; the swap request is a new member at
  the end of struct apple_dcp, so no existing member moves.
- iomfb_v14_7.c: method numbers, callback numbering and the exact
  callback shapes, checked strictly: an unknown callback or a shape
  mismatch latches the session, with no invented ACK.

J514S session (DRM_APPLE_DCP_T6030, "apple,t6030-dcp" and the display
subsystem "apple,t6030-display-diagnostics"):
- Admission: board, firmware-compat 14.7.0 and UUID, coprocessor window,
  DCP DMA domain, the boot loader's scanout/PIODMA handoff markers and
  inherited mappings, the chosen handoff note and the single boot
  framebuffer. The PMP display supplier at probe, its DISP
  acknowledgement (and with it the memory floor) before the RTKit wake,
  the PMP check again before KMS. A session that did not start fails the
  bind, so the boot framebuffer stays.
- Hardware data in the tail padding of apple_dcp_hw_data: primary plane
  only, optional clock, no real-time bandwidth registers, a 500-nit
  mini-LED panel (140 default); the panel size comes from the DCP node
  and the notch is not cropped.
- RTKit buffers: a DVA must translate contiguously into the DCP's
  reserved regions, the OS log names its carveout by PA, new buffers come
  from the DMA window; all are retained.
- IOMFB: READY must be 0x400101-shaped, A401 (must return 1) then A455,
  nothing else at the top level; D121 continues A444, A029, A466(1),
  A000(1), A463 with each result checked. The session is active once A455
  replied and PreferredTimingElements produced the full-panel preferred
  mode (VRR off, zero timestamps). No power, mode, adaptive-sync, matrix
  or teardown call is sent.
- A host-side property store (dcp-property-store.c) answers the
  firmware's setters and getters (D400/D401) with what it set; D451
  contiguous allocations with their PA, D201 PIODMA mappings, D454
  retention; D003 declined, D408 answered without a clock.
- Fail-stop: any protocol surprise latches the session; it is pinned and
  never torn down until reboot.

Presentation, through the serialized IOMFB queue the H17P panel uses:
- The panel is qualified with one present profile: a single linear
  XRGB8888 or ARGB8888 surface in slot 0, full panel and unscaled,
  tagged transfer 13 / primaries 12 with per-layer word 0, update masks
  0x80000007 over a black background, and the level in nits only when it
  changes. A second DCP surface sends the whole frame through the
  firmware's blend and colour processing and casts this panel warm, so
  the CRTC has a primary plane only and no CTM (the read-only j514s_ctm
  parameter restores the CTM, sending set_matrix A421, for qualification
  only). GEM DMA buffers and imports are scanned directly at their
  display-subsystem DVA.
- A406 then A407; the accepted reply together with the matching D589
  retires the displaced framebuffers and completes the DRM event. The
  completed request is kept as a snapshot: a brightness-only present
  repeats it with a fresh swap ID and the new level, soft DPMS off turns
  it into the blank background at 0 nits.
- System sleep takes the adopted H17P path: the queued blank is drained
  and the mailbox held until resume.
- The aperture of the boot framebuffer comes from its simple-framebuffer
  node; a j514s file in the CRTC's debugfs directory reports the
  session, present and backlight state.

The shared files change only by 14.7 branches: dcp_presents_nits() and
dcp_fail_stop() equal the H17P expressions they replace for every other
firmware, and every 14.7 template block is an "== 14.7.0" block, so the
v12_3, v13_3 and h17p objects are unchanged.

A KUnit suite checks the present encoding byte for byte (CRC32 of
representative requests: a primary frame, the first present at 140 nits,
the soft-DPMS blank, a brightness-only re-present, ARGB8888 at the 500-nit
maximum, the background swap), the binary64 levels, the scanout
admission and the brightness policy through the driver's own path.

Tested on the J514S: the panel is adopted at 3024x1964@120, the desktop
runs on it with GPU rendering, and brightness, soft DPMS and the
suspend-to-idle device path work.

Signed-off-by: Eryk Wieliczko <[email protected]>
Add the J514S internal display coprocessor nodes: mailbox@28ec08000,
dcp@28ec00000 (with its piodma child and the panel size, 302 x 196 mm for
the full 3024x1964 panel), display-subsystem
(apple,t6030-display-diagnostics), the DCP firmware DART iommu@28d30c000
(SID5) and the display frontend DART iommu@28d304000 (SID0 scanout, SID4
PIODMA), plus the dcp, disp0 and disp0_piodma aliases. Mark DISP_SYS,
DISP_FE and DISP_CPU apple,firmware-owned: the DCP runs from the boot
loader and its firmware owns their state.

What the boot loader adds is left to it: the DCP firmware UUID, version
and compatible, its memory-region reservations, the frontend
reservations and apple,j514s-inherited-mappings markers, and enabling
piodma, display-subsystem and both DARTs. apple,j514s-native-piodma and
apple,j514s-native-scanout opt in to that handoff. The DARTs stay
disabled until the boot loader enables them, so a boot loader without
the J514S handoff cannot have Linux reset the DART of the running DCP;
the DCP is then refused and the firmware framebuffer stays.

Only t6030-j514s.dts includes the new file.

Signed-off-by: Eryk Wieliczko <[email protected]>
…oller

The J514S (MacBook Pro M3 Pro) external display controllers DCPEXT0/1
run DCP firmware 14.7 in its external role. The boot loader publishes
one with apple,firmware-compat, apple,firmware-uuid and the
memory-region of its firmware segments once reserved; there is no
generic fallback, as the controller is driven only in that role. Its
outputs are Type-C routes or the HDMI port (DCPEXT0): a fixed dp-phy and
dp-xbar with mux-index, apple,dptx-phy and the HDMI converter's GPIOs.
The controller has six display register ranges, so allow an eighth
register (disp-5).

Signed-off-by: Eryk Wieliczko <[email protected]>
The J514S (MacBook Pro 14-inch, M3 Pro) drives the DisplayPort alternate
mode of its USB-C ports through the external display coprocessor
DCPEXT1, which runs the internal panel's DCP firmware 14.7.0 image in its
external role. It becomes an ordinary instance of the common driver,
like the M1/M2 dcpext and the J700 external controller: an
"apple,t6030-dcpext" node the boot loader publishes once it has reserved
the controller's firmware, routed to the USB-C connectors through the
existing Type-C display routes. Everything is behind the new
DRM_APPLE_DCP_T6030_EXT option; without it every hook folds away.

Admission is from the device tree alone: the board, the 14.7.0 image,
the coprocessor window, the firmware reservations and the Type-C routes.
The controller only uses the generic PHY and mux APIs for the port's ATC
PHY and display crossbar:

- Route activation takes the PHY's DP hold, then selects the crossbar at
  rate 0; deactivation releases the sink and stops the link (retryable),
  then deselects the crossbar and drops the hold. Routes are named by
  their ATC.
- HPD high starts the controller on first use, in process context: RUN
  with the DMA domain pinned until reboot, RTKit, IOMFB READY with the
  external-role check A410 = 0, the DPTX and AV services. With a display
  attached at power-on the boot loader starts the controller and hands it
  over running: then only its RTKit communication restarts, and firmware
  buffers it announces are borrowed from the reserved segments.
- The sink is connected with CONNECT, REQUEST_DISPLAY and HPD high, each
  reply-checked, and the client opens (A401/A455) after the first HPD
  reply. The DPTX link callbacks of the external profile drive the PHY
  and crossbar and report what was programmed; refused requests get no
  reply and a failed hardware step latches the controller. A rate-0
  request on a link already stopped is acknowledged without a PHY call.
  IRQ_HPD is forwarded as InterruptRequestOccurred, once per fresh IRQ of
  the current HPD generation.
- This firmware answers AP commands in AFK records of kind 0 (notify),
  identified as replies by their category only, and its callback replies
  carry 8 in byte 35: the AFK layer handles both for this role. An AV
  service the firmware announces again on its channel after a replug is
  a new instance, which replaces the old one.
- Modes come from the sink's TimingElements through a fw14 RGB8 parser
  profile: DMT timings carry a horizontal PreciseSyncRate of 0, which is
  accepted; only an 8-bit SDR RGB colour (sRGB or default RGB) is
  eligible, ties on score go to the lower colour ID, and interlaced,
  split, multi-pipe and pixel-repeated timings are refused. The catalog
  is filtered by the routed lanes' HBR2 budget and the pipe's limits
  (at most 3840x2160, 24 to 120 Hz); the connector reports the sink once
  its catalog for the current HPD generation is in. EDID is read through
  the opened AV service.
- Modeset is A411 then A472 on; DPMS is A472. After every A472 on, the
  firmware enables its timings asynchronously and drops a swap that
  arrives before that, so the display status (A437, block 0x6e) is
  polled, bounded at 2 s, until the pipe, link and timings are up. A
  swap the firmware reports dropped in its A407 reply ends at once
  instead of waiting for a D589 that never comes.
- Presents reuse the panel's single-surface encoder and IOMFB queue, and
  are held while the firmware reports an inactive sink. A dcpext file in
  the CRTC's debugfs directory reports the role's state.

The panel is unchanged. KUnit suites cover the external profile's DPTX
callback replies byte for byte (pin C training, pin D, DPMS to rate 0,
the inactive sink, refused requests), IRQ_HPD and HPD generations, the
catalog selection on timings of captured sinks, the first external swaps
and the A472/A411 layouts, and the AV service's EDID object checks.

Tested on the J514S with a USB-C display (pin C, four lanes), attached at
boot and hot-plugged in both orientations.

Signed-off-by: Eryk Wieliczko <[email protected]>
…y routes

The J514S drives the DisplayPort alternate mode of its three USB-C ports
through the external display controller DCPEXT1. Describe it the way the
M2 Pro/Max and J700 device trees describe their external controllers:

- the controller (coprocessor, the six dispext1 display ranges and the
  IOP VBAR from the ADT, its mailbox, DCP DART SID5, display DART
  SID0/SID4 for scanout and PIODMA, the 935 MHz DISPEXT1 clock);
- one Type-C route per USB-C connector (port@3), each naming the port's
  DP PHY, its display crossbar (ATC core + 0x4c000), DCPEXT1's crossbar
  source selector 2 and the DPTX target index of the port's ATC;
- the three display crossbars, held through their ATC common domains.

The DISPEXT1 power chain hangs from its PMP device-state request, and
its CPU domain is apple,no-auto-pm: Linux starts that coprocessor cold.
Like the M1/M2 and J700 device trees, the display subsystem lists the
external controller's frontend DART (stream 0, the scanout stream) after
the panel's, so every GEM object and import gets one address valid in
both.

The DARTs and the mailbox are enabled: their probe powers the chain,
behind the PMP's acknowledgement. The boot loader enables the controller
and its routes together once it has reserved the controller's firmware.

Signed-off-by: Eryk Wieliczko <[email protected]>
DCPEXT0 drives the J514S HDMI port: a fixed DisplayPort PHY (ATC3, four
lanes up to HBR3) behind its crossbar's selector 0, DPTX target 0x8030,
into a DP-to-HDMI converter whose port and converter power are GPIOs and
whose HPD is a GPIO line. The device tree describes it with the common
driver's fixed-output bindings (dp-phy, dp-xbar, mux-index,
apple,dptx-phy, hdmi-hpd/hdmi-pwren/dp2hdmi-pwren-gpios); the external
role admits a controller with these instead of Type-C routes. The fixed
output is the role's route, with the lifecycle of the USB-C routes:

- The converter's HPD line, both edges, restarts a debounce (high
  400 ms; low 2 s, so that the converter's short pulses are not taken for
  removal). Debounced high brings the route up (PHY power-up, AUX and HBR
  on all four lanes, then the crossbar) and connects the sink as on
  USB-C; debounced low releases the sink and takes the route down. The
  probe leaves the fixed crossbar unselected for this role, and the line
  is enabled once the DRM device has bound.
- From REQUEST_DISPLAY to the release, the converter service (DPTX group
  8 command 9, InterruptRequestOccurred) runs every 100 ms, one
  outstanding with a 1 s bound: without it the firmware never learns of
  converter events (sink metadata, FRL readiness).
- A link's highest rate is its PHY's: HBR3 on every T6030 route now.
  Callback 7 reports it, callback 9 takes it, and the catalog is budgeted
  with it.

What the HDMI sinks need on the external role, on either port:

- An HDMI 2.1 (FRL) sink's TimingElements arrive as one chunked transfer
  of more than 1 MiB (1.38 MB for a 4K120 TV), so the property store
  takes up to 8 MiB per property and 24 MiB per store, and a timing may
  list up to 68 colour element IDs, so the parser keeps 128.
- Such a sink lists its fastest timings (a 4K TV's 3840x2160 at 100 and
  120 Hz) with only DSC-required colours. The firmware compresses such a
  colour itself: the host sets the catalog's colour and timing with A411,
  nothing else. The parser takes a DSC-required 8-bit RGB colour only if
  the sink takes it compressed (SupportsDSC), never an unsafe one, and
  only for a timing without an uncompressed colour; the catalog filter
  admits it if it fits the lanes' payload at the link's highest rate at
  8 bpp less FEC: four lanes of HBR2 (pin C) or HBR3 (HDMI) carry 4K120,
  two of HBR2 (pin D) do not.
- The AV service is opened with DCPAV Open (command 4, opened only on a
  zero status and a nonzero opened Boolean); command 6 is
  SetVirtualEDIDMode and opened nothing. The host is then a client the
  firmware waits for, up to 10 s, before it removes the instance, and the
  HPD low's reply waits with it, which left the controller stuck on
  unplug. The release closes the client (DCPAV Close) before HPD low; a
  Terminate report closes it from a work item; Close goes only to the
  instance that was opened. A release that failed earlier is completed
  at the next HPD edge.
- The sink's EDID is read once per HPD generation and service instance:
  a re-plug inside the firmware keeps it.
- The firmware can unplug and replug the sink by itself, with HPD high
  throughout: it withdraws the catalog and turns the display off. A
  withdrawn catalog now marks the mode lost, so the next modeset is a
  full A411 instead of a bare A472 the firmware swallows.
- A sink the firmware reports inactive (a TV in standby or on another
  input) is reported disconnected, and connected again on its next
  link-up or catalog. The firmware keeps such a display powered: it
  retrains only a powered display's link, and that link-up is how the
  sink comes back.
- The connector keeps a copy of the sink's dictionaries for debugfs, as
  the common path does.

KUnit covers the HBR3 profile and budgets, and the DSC admission on
pin C, pin D, HBR3, a sink without DSC and an unsafe DSC colour.
Everything is compiled out without DRM_APPLE_DCP_T6030_EXT.

Tested on the J514S HDMI port with a 1080p monitor and a 4K TV
(3840x2160 at 120 Hz with DSC), and with the TV at 4K120 behind a USB-C
to HDMI 2.1 adapter.

Signed-off-by: Eryk Wieliczko <[email protected]>
DCPEXT0 drives the built-in HDMI port. Describe it like DCPEXT1: its
coprocessor DART (SID5), display frontend DART (SID0 scanout, SID4
PIODMA), mailbox, 935 MHz clock and the controller node with coproc,
dispext0's six display ranges and iop-vbar, enabled by the boot loader
with its firmware reservations. Its output is fixed: ATC3 as a fixed
four-lane DisplayPort PHY (apple,t6030-atcphy-dp, under atc3_common),
the ATC3 crossbar with selector 0, DPTX target 3, and the HDMI
converter's GPIOs: HPD on AOP pin 47, port power on SMC GPIO 15,
converter power on SMC GPIO 26.

The PMP device-state request of DISPEXT0 (cell 8) becomes a parent of
dispext0_sys, and dispext0_cpu gets apple,no-auto-pm, as for DISPEXT1.
The display subsystem scans out through DCPEXT0's frontend DART too.
Aliases atcphy3 (the boot loader copies the PHY's calibration) and
dcpext0.

Signed-off-by: Eryk Wieliczko <[email protected]>
The J514S HDMI port's audio is DCPEXT0's DP/HDMI audio service (EP 0x29,
DCPAVAudioInterface) with DPA1, whose samples the SIO coprocessor
carries. On DCP firmware 14.7's external role the service numbers its
methods as 13.5 does, but differs from what the driver does for M1/M2:

- An element's ElementData, the link data every link method takes, is
  32 bytes, not 24; the last eight are opaque and must be kept.
- StopLink (0/10) and CompleteLink (0/11) carry the link data as
  PrepareLink and StartLink do, and every link method answers an IOReturn
  at body+48.
- One link per stream start: the SIO channel is configured, PrepareLink
  sent; the cyclic DMA is issued before StartLink; on stop the DMA is
  terminated and drained before StopLink and CompleteLink. A link that
  was only prepared (a format probe) is completed at hw_free, the link of
  a connection that has gone is dropped unsent. No DPA reset follows
  CompleteLink: it silenced every later stream on this machine.
- The catalog of a sink's audio elements can be large (114 elements on a
  TV): it is queried with a 256 KiB capacity.
- An open DCPAV interface is a client the firmware waits for, up to 10 s,
  before it removes a terminated interface, and the sink's link with it.
  So the card follows the connection but the service is not opened with
  it: the PCM opens it (Open, command 4, status and opened Boolean
  checked) and its close closes it (Close, command 5). A Terminate
  report on an open service disconnects the card and closes the instance
  from a work item; an instance that goes away takes its open with it,
  and its successor is never closed for it.
- The open, close and link calls wait for their replies without
  srv_rwsem and plug_lock, which the endpoint's receive path takes when
  an instance is published or removed: the instance the PCM opened is
  kept under a mutex of its own. When the card is disconnected for the
  display or the sink, an open PCM's link is completed on the still open
  service first; otherwise the firmware keeps it prepared and refuses
  every later PrepareLink.
- The role's CEC interface (DCPDPCECInterface) broadcasts the same
  reports on the endpoint; it is matched and its reports dropped.

The external role starts the audio endpoint on the driver's opt-in
(appledrm.hdmi_audio), as the other DCPs do, for a controller whose
port@0 links an audio device, once per session and after the sink's
first EDID: with the endpoint's interfaces published, every CopyEDID made
the firmware rebuild them and re-plug the sink. The audio service is
connected when the display is powered on (A472 on) and disconnected when
it is powered off and before the sink is released.

Everything is behind DRM_APPLE_DCP_T6030_EXT and the 14.7 external role:
other configurations build these files unchanged, and an M1/M2 DCP's
24-byte link data still goes out as the same 64 bytes.

Tested on the J514S HDMI port: PCM streams through the card, DPMS cycles
and firmware re-plugs with a PCM open.

Signed-off-by: Eryk Wieliczko <[email protected]>
The SIO coprocessor (ASC at 0x289c00000, mailbox at +0x8000, interrupts
907..910, stream 0 of the SIO DART) is the DMA controller of the
DisplayPort audio interfaces. As on the other SoCs it stays disabled:
the boot loader reserves its firmware, describes its parameters and
enables it. Its firmware sets up the SPI, UART and audio DMA shims
whichever of them its clients use, so SPI_P, UART_P and AUDIO_P join SIO
as parents of the SIO CPU domain, as t8103, t8112, t600x and t602x
describe them.

The J514S built-in HDMI port's audio is DCPEXT0's audio service with
DPA1, the DisplayPort audio interface linked from DCPEXT0's port@0, whose
samples SIO channel 0x66 carries; DPA1 is in its own power domain. This
is the M1 Pro/Max HDMI port's arrangement (dcpext0, dpaudio1, SIO 0x66).
Enable the SIO mailbox, the alias the boot loader looks the SIO up by,
and DPA1's audio controller.

Signed-off-by: Eryk Wieliczko <[email protected]>
Build the J514S displays: the internal panel on the common Apple display
driver (DCP firmware 14.7), the external display controllers for the
USB-C ports and the HDMI port with their PMP device-state power domains,
the T6030 display crossbars and the DisplayPort modes of the ATC PHYs,
and the T6030 SIO channel configuration for the HDMI port's audio.
Userspace loads appledrm explicitly, and opts in to DP/HDMI audio with
appledrm.hdmi_audio=1 as on the other Apple machines.

Signed-off-by: Eryk Wieliczko <[email protected]>
Prepare the shared layers for a generation whose firmware the boot
loader leaves loaded, whose UAT regions are not System RAM and whose UAT
walker does not snoop the CPU caches (G15, the M3 Pro). Nothing changes
for G13, G14 or G17:

- gpu::Gpu gains default methods, each returning the current behaviour:
  user_range() (the GET_PARAMS VM range, by default the geometry's usable
  range), tracked_submission() (use the VM_BIND batch and SUBMIT
  output-fence paths that file.rs selects for G17 by type),
  soft_faults() (whether SOFT_FAULTS may follow fault_control),
  prepare_new_objects() (populate, clean and pin new user objects before
  any CPU view exists) and bind_batch_limit() (a bound on VM_BIND
  batches, None by default).
- file.rs consults them; gem.rs adds prepare_new_object(), which pins an
  object through its DMA mapping: on a device that is not DMA-coherent
  that cleans the freshly zeroed cacheable alias to the point of
  coherency.
- mmu.rs adds Uat::new_adopted() for a handoff the generation establishes
  itself. It maps the handoff and the TTBAT write-combined from physical
  ranges, names the firmware's kernel root as the upper half of user
  contexts, and keeps the kernel VM below a driver-owned shadow root whose
  window entries the generation links into the firmware's own table.
  Vm::with_tracked_status() attaches status and job lifetime tracking
  without the G17 context views, footprints and residency reclaim, and a
  few accessors serve the generation's VM handling and stream checks.
- Page tables of an adopted UAT clean every new table page before its
  parent names it, every changed table or leaf descriptor after the
  store, and the zeroed root at creation, and end each mutating walk with
  a DSB.
- regs.rs adds SGX accessors at runtime offsets.

The generation-only items are built only with CONFIG_DRM_ASAHI_G15,
which a later patch adds; without it the page-table cleaning is a
constant false, so G13/G14/G17 page-table writes are unchanged.

Signed-off-by: Eryk Wieliczko <[email protected]>
First part of the G15 generation (T6030, M3 Pro: J514S, J516S) of the
asahi driver: bringing the firmware the boot loader left loaded (RTKit
2419, the macOS 14.7-14.8 stub) to READY. The generation is built from
the patch that adds its UAPI glue and Kconfig option.

- adt: the boot loader's ADT copy (phram "adt"): the GPU regions and
  firmware segments, performance states, admission of their layout.
- identity: the exact firmware build, by the SHA-256 of its loaded TEXT
  with the GKTS entropy bytes zeroed.
- board: the three board templates (HardwareData, Globals, Power) of
  that build, verified by hash at boot, and the DVFS tables rebuilt from
  this machine's ADT.
- uat: the PPL handoff: the window mappings, the PPL lock exchange, the
  startup epoch, and the host window under a RAM shadow root whose L2
  entries are mirrored into the firmware's shared L2 page, with every
  table the firmware can walk cleaned to the point of coherency first.
- object: firmware objects on GEM kernel objects (populated and DMA-mapped
  before any write-combined access), the firmware cache classes, a bump
  allocator with guard pages, and the lower and client aliases.
- initdata: the 49-object initdata graph at its canonical VAs and its
  live words (root, runtime, control).
- channel, event: posting to the submit channels (also behind unconsumed
  records), the device-control ring, draining the receive rings and
  decoding the event ring.
- boot: probe-time admission (board, PMP supplier, DMA mask, ADT, firmware
  identity, MMIO, runtime-PM hold; a DMA-coherent GPU device is refused,
  as its firmware objects would not be cleaned), the RTKit operations on
  the C RTKit API (the only buffer accepted is the inherited one inside
  firmware DATA), the start to READY (PMP AGX vote, hardware identity and
  core masks, cold-only check, RTKit, UAT adoption, initdata, DEVCTL
  0x13 and 9), and an orphan state that retains and drains a session
  whose start failed.
- glue.c: C helpers without Rust bindings (SHA-256, the board check, the
  runtime-PM hold, the module reference, the phram lookup, ioremap_wc).

A firmware session cannot be stopped once started: everything it can
reach is retained until reboot.

Signed-off-by: Eryk Wieliczko <[email protected]>
The G15 firmware is classic: one ring per engine (TA, FS, compute) and
ordering expressed by in-ring barrier records that wait on another
queue's stamp. All logical queues and VMs share one persistent compute
graph and one render graph:

- graph: the compute graph, the TA/FS render queues, notifiers and InitBM,
  class-2 queue-info rows, and the waited Globals +0x9b0 = 0 import before
  the queues are first exposed.
- slots: compute slots, render pass slots and clustering buffers, with
  their CLEAN/USED/DIRTY/CLEARING/STALE states scrubbed on a dedicated
  unbound, memory-reclaim workqueue.
- encode, fw/work: the compute, TA and FS work images and microsequence
  records of this firmware build.
- engine: commands of a job are published as prefixes (consecutive
  commands of one engine, or of both in API order), each member in a
  claimed slot, with per-edge barrier types, priming prefixes after a
  recovered abort, submit-ahead behind unconsumed records, compute
  horizons ahead, and at most two flights in flight (the second of the
  same VM). The order is total, which satisfies every valid header
  barrier and EXACT_PRIOR ordinal. Firmware-visible writes keep a fixed
  order: images, thresholds and counters, a barrier, the queue WRITEs, a
  barrier, then the compute/FS/TA records and doorbells.
- poll: the poll pass, under the device lock: drain the receive rings,
  retire flights on their stamps with trailing polls, answer
  parameter-buffer growth, check hangs, publish; a completion hrtimer
  with a one-jiffy backup; the asahi-g15/stats debugfs file and opt-in
  phase timers (debug_flags bit 49).

Fences are signalled after the device lock is dropped. Built with the
generation from the patch that adds its UAPI glue.

Signed-off-by: Eryk Wieliczko <[email protected]>
…licy

- recovery: deadlines for a published prefix without progress
  (g15_deadline_ms) and for a started compute (g15_compute_deadline_ms),
  the compute hang kill through Globals +0x1c/+0x24 and a posted DEVCTL
  0x13 with publication frozen, its waited disarm, the retirement verdict
  of a killed prefix, and the halt/resume handshake answering up to four
  further halts while draining (g15_recovery; 0 makes every halt
  fail-stop). Whatever cannot be recovered latches fail-stop: every VM
  reports EIO, and everything firmware-visible a failed command may still
  reference is retained until reboot.
- pools: the render UMA and parameter-buffer allocators with an uncached
  spare set, their initialisation and the takeover of the spares after an
  abort, and parameter-buffer growth answered from the poll pass with an
  epoch gate (K = 4096).
- power: the firmware idle policy initdata writes into Globals: standby
  2500 us instead of the template's 700 (with 700 us the GPU powers down
  between works about 100 us apart and pays about 300 us at the next
  pickup), minimum confidence 0.5, and the finite-delay branch instead of
  the predictive one, which makes 2-3 % of works under sustained low-duty
  submission pay a power-up.

The pure decisions (receipt comparisons, the compute hang test, the
growth ledger, the idle words) live in core-only submodules. Built with
the generation from the next patch.

Signed-off-by: Eryk Wieliczko <[email protected]>
Complete the G15 generation (T6030, M3 Pro) with what userspace sees,
and build it behind the new DRM_ASAHI_G15 option (default n):

- vm: user VMs, each holding an exclusive TTBAT slot (ASIDs 1..63) for its
  lifetime, with the shared graph's client aliases mapped into every one,
  in VA ranges that belong to the kernel in every VM.
- queue, job, fence: logical queues own no firmware state. Each has one
  DRM scheduler with 16 credits; a SUBMIT is one job with one hardware
  fence, handed to the device-global engine, and fences signal in queue
  order with the VM status latched first. QUEUE_DESTROY drains the queue.
- command, gate: SUBMIT parsing and validation, in order: the stream's
  structure, the timestamp handles, the header barriers and EXACT_PRIOR
  ordinals (the semantics of the G17 rules; the engine's total order
  satisfies every valid one), every command's mapped spans with the right
  access, and the CDM/VDM stream gates that admit only known records
  (g15_stream_gate).
- timestamp: timestamp buffers mapped into the firmware's 64 MiB arena in
  the host window, where the firmware writes nanoseconds directly.
- params: GET_PARAMS (feature word 0x3e, QUEUE_LIMITS, identity), VM_BIND
  batches of at most 1 << 20 operations. SOFT_FAULTS, FEW_PRIMITIVES and
  RENDER_RAY_QUERY are never advertised; FRAGMENT_BARRIERS only with
  g15_early_tiling.
- mod: the generation's GPU, its shared state and device lock, and its
  platform driver for apple,agx-t6030. The driver is registered
  separately from the other generations and has no module alias: the M3
  must start its GPU only after the native display is up, so the firmware
  boots when userspace loads the module afterwards. It suppresses its
  bind attributes, and a started session keeps the module and everything
  the firmware can reach until reboot.

The module parameters g15_* carry the few tunables that stay tunable
(load time only): deadlines, the repoll and completion intervals, the
firmware idle standby time and confidence, recovery, the stream gates
and early tiling.

Tested on the J514S with Mesa's asahi Vulkan and Gallium drivers: a
Minecraft Vulkan replay runs at about 161 FPS with identical frames,
the deqp-vk memory model, compute, render and submit subsets show no
failures, and induced compute and render hangs are ended and recovered
without a firmware crash.

Signed-off-by: Eryk Wieliczko <[email protected]>
The G15 generation of the asahi driver drives the J514S GPU. Enable it in
j514s-rust.config, merged on top of j514s.config, and note in the latter
that userspace loads the GPU driver after the native display is up, as
its platform driver has no module alias.

Signed-off-by: Eryk Wieliczko <[email protected]>
@erykwieliczko erykwieliczko mentioned this pull request Oct 21, 2026
DjDeveloperr pushed a commit that referenced this pull request Oct 23, 2026
The G15 generation of the asahi GPU driver, added later in this series,
links page tables into the UAT of the GPU's firmware coprocessor, whose
table walker does not snoop the CPU caches. The tables are ordinary RAM
pages that the shared page-table code allocates and writes through the
cacheable linear map; they are not DMA-mapped, so the DMA API has nothing
to sync them with. Each table, and each changed entry, has to be cleaned
to the point of coherency before the firmware can walk it.

Export the existing dcache_clean_poc() to GPL modules for that, instead
of adding a new cache maintenance helper.

Signed-off-by: Eryk Wieliczko <[email protected]>
[port to integration/aurora: applied unchanged from aurora-silicon/linux PR #358]
Assisted-by: LLM
Signed-off-by: Diljit Singh <[email protected]>
(cherry picked from commit 019af52)
(cherry picked from commit 4a834d3)
@Jvaxx

Jvaxx commented Oct 24, 2026

Copy link
Copy Markdown

On my J514S (Mac15,6), this branch has the headphone jack IRQ on the wrong pin. t6030-j514s.dts uses pinctrl_ap 100, and that line never goes quiet: cs42l84 gets about 1000 interrupts a second, all the time.

Pin 196 is the right one. integration/aurora already uses it (e904231). With only that number changed, the storm stops, plugging and unplugging the headphones is detected, and idle power drops by several watts.

 &jack_codec {
 	reset-gpios = <&pinctrl_nub 21 GPIO_ACTIVE_HIGH>;
-	interrupts-extended = <&pinctrl_ap 100 IRQ_TYPE_LEVEL_LOW>;
+	interrupts-extended = <&pinctrl_ap 196 IRQ_TYPE_LEVEL_LOW>;
 };

t6030-j516s.dts has the same pin 100; I can't test a J516S.

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.

2 participants