Skip to content

arm64: dts: apple: t8140/j700: keyboard, trackpad and USB-C topology (reworked, 5 patches) - #30

Merged
RyanTheTide merged 5 commits into
aurora-wipfrom
series/neo-j700-input-usb-board-20260926
Sep 25, 2026
Merged

RyanTheTide merged 5 commits into
aurora-wipfrom
series/neo-j700-input-usb-board-20260926

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

arm64: dts: apple: t8140/j700: keyboard, trackpad and USB-C ports

This replaces the two draft commits with five DTS patches rebuilt on the merged
tree and on the reworked #28. Compile- and schema-checked only; not run on
hardware in this form (boot checks below). Depends on #28 (bindings and driver
behaviour) and on the reworked #27 for the DockChannel HID compatibles.

Structure

Following the convention of the merged #23: SoC resources live in t8140.dtsi,
disabled, in unit-address order (the nub SPMI A0 bus, the MTP coprocessor with
its mailbox, DART and DockChannel HID transport, the DWC3 controller with its two
DARTs and the ATC PHY), their power domains in t8140-pmgr.dtsi (atc0_usb_aon ->
atc0_common -> atc0_usb; nub_spmi_a0, always-on like nub_spmi0 and like the T8122),
and the board enables plus the graph in t8140-j700.dts. The draft's two
board-level .dtsi files are gone.

Hardware described

  • Keyboard and trackpad on the MTP coprocessor over DockChannel, with the J700
    firmware's properties: no STM interface, the C1FE trackpad
    (apple,j700-multitouch) with power method 2, and the trackpad AFE reset on SMC
    pcIO output 19 described with its real polarity (GPIO_ACTIVE_HIGH: level 1
    asserts the reset). The keyboard country code and layout id are the <0>
    placeholders the M2 boards use, with the keyboard alias the bootloader needs
    to fill them in.
  • Two Type-C connectors with SN2012-series PD controllers on the nub SPMI A0 bus
    (front at USID 0xa, back at USID 0xc), in the M3 MacBook Air node shape.
  • The USB topology: the controller's USB 2.0 pairs go to a VIA Labs VL122 two-port
    hub on the board (USB ID 2109:2122 on Linux), described as a hub@1 child of
    the controller with port 1 linked to the front connector and port 2 to the back
    connector; only the back connector has SuperSpeed lanes, linked to the ATC PHY
    as on every other Apple machine. With this graph the PD controllers find no USB
    role switch on their high-speed path, the dwc3 glue keeps the controller in host
    mode and the PHY keeps USB 2.0 up for the hub (see usb: apple: T8140 Type-C PHY and DWC3 for the J700 fixed hub (reworked, 12 patches) #28).
  • apple,t8140-atcphy with its six register regions; the per-device tunables are
    filled in by the bootloader through the atcphy0 alias.

Patches

  1. arm64: dts: apple: t8140-pmgr: Add ATC0 and nub SPMI A0 power domains
  2. arm64: dts: apple: t8140: Add the MTP coprocessor and DockChannel HID nodes
  3. arm64: dts: apple: t8140: Add the USB-C controller, ATC PHY and SPMI A0 bus
  4. arm64: dts: apple: t8140-j700: Enable the keyboard and trackpad
  5. arm64: dts: apple: t8140-j700: Enable the USB-C ports

Checks

CHECK_DTBS=y apple/t8140-j700.dtb after every commit: with the reworked #27's
three schemas present it reports only the five inherited CS42L83 supply notes; on
a tree without them it reports exactly the compatibles and properties #27
documents (apple,t8140-mtp, apple,t8140-dockchannel, apple,dockchannel-hid,
apple,j700-multitouch and the HID node's vendor properties), which is why the
merge order #27, #28, #30 keeps the check clean at every step. checkpatch: the
same undocumented-compatible notes before #27, plus the usual usb2109 vendor
false positive for usbVID,PID compatibles. git diff --check: clean.

Boot checks owed

  • Keyboard input; trackpad click and two-finger scroll; the HID device's country
    code and layout id filled in by the bootloader.
  • Front connector: a device enumerates behind the hub (1-1.1) and transfers.
  • Back connector: 10 Gb/s in both orientations; an unplug during front-hub
    traffic; s2idle with a SuperSpeed device attached; DP alt mode.
  • Both PD controllers probe on the SPMI A0 bus.

🤖 Generated with Claude Code

@RyanTheTide
RyanTheTide force-pushed the series/neo-j700-ans-cpu-board-20260925 branch from 755111e to 118ffba Compare September 25, 2026 15:33
@RyanTheTide
RyanTheTide force-pushed the series/neo-j700-input-usb-board-20260926 branch from 1cea2c4 to 77d78ef Compare September 25, 2026 15:45
@RyanTheTide
RyanTheTide changed the base branch from series/neo-j700-ans-cpu-board-20260925 to aurora-wip September 25, 2026 15:45
RyanTheTide and others added 5 commits September 26, 2026 03:44
Add the power domains of the first Type-C port complex, chained as the
firmware's power tree chains them, atc0_usb_aon -> atc0_common ->
atc0_usb, and the domain of the nub SPMI A0 bus that hosts the USB PD
controllers. Like nub SPMI 0 and like the same domain on the T8122,
nub SPMI A0 is marked always-on.

The register offsets come from the J700 ADT: 0x3e0, 0x3e8 and 0x3f0 in
the main PMGR block and 0x68 in the mini PMGR block; none of them was
used yet.

Compile- and schema-checked (CHECK_DTBS=y apple/t8140-j700.dtb reports
only the five inherited CS42L83 supply notes); not run on hardware in
this form.

Assisted-by: LLM checkpatch dtbs_check
Co-authored-by: Claude Fable 5.1 <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
… nodes

The built-in keyboard and trackpad of the J700 hang off the MTP
coprocessor, like on the M2 and M3 laptops: an ASC4 RTKit helper with
its mailbox and DART, and a DockChannel FIFO pair over which the
coprocessor speaks HID.

Add the nodes to the SoC file, disabled, in unit-address order. The
values come from the J700 ADT: the ASC at 0x3_14600000 with its SRAM
window at 0x3_14050000, the mailbox at 0x3_14608000 with AIC lines
1152-1155, the DART at 0x3_14800000 (line 1135) and the DockChannel
FIFO at 0x3_14b14000 (line 1137) with its 128 KiB register window at
0x3_14b28000. Unlike the T8112, whose MTP HID transport uses DART
stream 1, the T8140 uses stream 0 for both the helper and the transport.

The HID transport keeps the register layout, FIFO size and interrupt
lines of the T8112 node. Its compatibles (apple,t8140-mtp,
apple,t8140-rtk-helper-asc4, apple,t8140-dockchannel,
apple,dockchannel-hid) are documented by the DockChannel HID series
that is merged separately; until it lands, dtbs_check reports them as
undocumented.

Compile- and schema-checked; not run on hardware in this form.

Assisted-by: LLM checkpatch dtbs_check
Co-authored-by: Claude Fable 5.1 <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
…A0 bus

Add the first Type-C port complex of the T8140 and the SPMI bus its PD
controllers sit on, disabled, in unit-address order.

The DWC3 controller at 0x4_0a280000 keeps the register split of the
other Apple SoCs (a core window and the Apple-specific window at +0xcd00)
on AIC line 1244, with its two DARTs at 0x4_0af00000 and 0x4_0af80000,
both on line 1248 as the ADT lists them. The ATC PHY at 0x4_0b000000 is
described as apple,t8140-atcphy with its sixth register region, the
secondary eUSB2 bank at 0x4_0a300000; its per-device tunables are
filled in by the bootloader, as on every other Apple machine. The
controller, the DARTs and the PHY share the atc0_usb power domain.

The nub SPMI A0 bus at 0x3_08908000 (AIC line 494) is the bus that
carries the Type-C PD controllers on the J700; the bus at 0x3_08714000
carries the PMIC.

The graph between the PHY, the controller and the connectors is board
specific and stays in the board file.

Compile- and schema-checked (CHECK_DTBS=y apple/t8140-j700.dtb reports
only the five inherited CS42L83 supply notes and the DockChannel
compatibles documented by the separately merged HID series); not run on
hardware in this form.

Assisted-by: LLM checkpatch dtbs_check
Co-authored-by: Claude Fable 5.1 <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
Enable the MTP coprocessor, its mailbox and DART and the DockChannel
HID transport, and describe the two interfaces the J700 firmware
announces.

The J700 firmware has no STM interface, so the transport is told not
to wait for one. The trackpad is the J700 C1FE variant and uses power
method 2: the host sends the firmware, announces each power transition
to the coprocessor and drives the reset line of the analog front end
itself. That line is SMC pcIO output 19; the SMC drives the reset when
the output is set to 1, so the line is described as active high.

The keyboard's country code and layout identifier are left at 0, as
on the M2 laptops: the bootloader fills them in from the machine's own
device tree through the keyboard alias, so one board file serves every
keyboard variant.

The properties follow the DockChannel HID binding of the separately
merged HID series, which also documents apple,j700-multitouch; until
that series lands, dtbs_check reports the compatible as undocumented.

Compile- and schema-checked; not run on hardware in this form. The
boot checks owed are keyboard input and trackpad clicks and scrolling.

Assisted-by: LLM checkpatch dtbs_check
Co-authored-by: Claude Fable 5.1 <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
The J700 has two Type-C connectors on its left side, each with an
SN2012 series PD controller on the nub SPMI A0 bus: the front connector
at USID 0xa and the back connector at USID 0xc, with the interrupt
lines the ADT gives them, in the node shape the M3 MacBook Air uses.

The USB topology differs from the earlier laptops. The controller's
USB 2.0 pairs do not go to a connector: they go to a VIA Labs VL122
two-port USB 2.0 hub on the board, which enumerates on Linux as USB ID
2109:2122 at the USB 2.0 root port. The hub's port 1 serves the front
connector, its port 2 the back connector. Only the back connector has
SuperSpeed lanes, and those go straight to the ATC PHY. Describe the
hub as a child of the controller with its downstream ports linked to
the connectors' high-speed endpoints, and link the back connector's
SuperSpeed endpoint and the controller's SuperSpeed port to the PHY as
on every other Apple machine.

With that graph the PD controllers find no USB role switch on their
high-speed path and only drive the PHY's Type-C mux for the back
connector's lanes; the dwc3 glue keeps a controller with a hub child in
host mode, and the PHY keeps its USB 2.0 path up for the hub. Both
connectors are described as host-only data ports for the same reason.
The atcphy0 alias lets the bootloader fill in the PHY's per-device
tunables.

The hub's port assignment comes from the enumeration order observed on
a J700: a device at the front connector appears at hub port 1 (bus
path 1-1.1). Port 2 for the back connector follows from the hub having
two ports.

Compile- and schema-checked (CHECK_DTBS=y apple/t8140-j700.dtb reports
only the five inherited CS42L83 supply notes); not run on hardware in
this form. The boot checks owed are: the front hub enumerating with a
device attached, the back connector training at 10 Gb/s in both
orientations, an unplug at the back connector during front-hub
traffic, and s2idle with a SuperSpeed device at the back connector.

Assisted-by: LLM checkpatch dtbs_check
Co-authored-by: Claude Fable 5.1 <[email protected]>
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide force-pushed the series/neo-j700-input-usb-board-20260926 branch from 77d78ef to b8f170b Compare September 25, 2026 17:46
@RyanTheTide RyanTheTide changed the title arm64: dts: apple: wire J700 input and USB topology arm64: dts: apple: t8140/j700: keyboard, trackpad and USB-C topology (reworked, 5 patches) Sep 25, 2026
@RyanTheTide
RyanTheTide marked this pull request as ready for review September 25, 2026 17:47
@RyanTheTide
RyanTheTide merged commit 9225703 into aurora-wip Sep 25, 2026
@RyanTheTide
RyanTheTide deleted the series/neo-j700-input-usb-board-20260926 branch September 26, 2026 12:45
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.

1 participant