Skip to content

kboot: T8142: publish ANS's APCIe and the radio port's tables for the sleep controller - #272

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
sithglan:thomas/t8142-sleep-apcie-tables
Nov 17, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
sithglan:thomas/t8142-sleep-apcie-tables

Conversation

@sithglan

Copy link
Copy Markdown
Contributor

The T8142 sleep controller in aurora-silicon/linux#2043 brings ANS's half of the shared APCIe block back after a real sleep. It also retrains the radio's port 0. Both go through the controller's pcie-shared node, which needs iBoot's tables. Nothing publishes them on T8142. Without them the driver says "no PCIe tunables for ANS: suspend-to-RAM with it stopped will be refused" and "the radio's port can't be trained after a sleep". It then refuses every real sleep.

This copies the tables onto the node the sleep controller's apple,apcie points at. They are the same tables j813_n1.c applies at boot:

  • from /arm-io/apcie: apcie-axi2af, apcie-phy, apcie-phy-ip-pll and apcie-phy-ip-auspma (apple,tunable-axi2af, -phy, -phy-ip-pll, -phy-ip-auspma);
  • from its pci-bridge0: apcie-config, pcie-rc, pcie-rc-gen3-shadow and pcie-rc-gen4-shadow (apple,tunable-radio-port, -radio-rc, -radio-rc-gen3, -radio-rc-gen4).

Each table is bounded by its window in #2043's DT. All eight are checked before anything is written. If one is missing or malformed, nothing is published, and the driver keeps refusing as before. The step only runs when the DT has an apple,t8142-sleep node with apple,apcie. It does nothing if the tables are already there.

Tested

  • J813, macOS 27.2 stub. This commit on top of the enrolled el2dp object, chainloaded from the tether, with #2043's DT.
    • The node gets all eight properties.
    • Neither driver message appears.
    • Its dry runs pass the ANS and radio checks.
  • The offsets were checked against the windows using the J813 ADT. The largest are 0x20058, 0x20000, 0x62e8 and 0x1e404 for the APCIe tables, and 0x8ac, 0xb80, 0x8a8 and 0x8a8 for the bridge tables.
  • Builds on main with CHAINLOADING=1 ESP_STAGE2=1 DEBUGUSB_PROXY=1. Clean under clang-format.

The J813 sleep itself doesn't work yet; the details are in the J813 PR on #2043.

cc @Acelogic @DjDeveloperr @RyanTheTide @LiamRay10

… sleep controller

The T8142 sleep controller (aurora-silicon/linux#2043) brings ANS's half of the shared APCIe
block back after a real sleep and trains the radio's port 0 again through its pcie-shared node.
Copy iBoot's tables from /arm-io/apcie (axi2af, phy, phy-ip-pll, phy-ip-auspma) and its
pci-bridge0 (apcie-config, pcie-rc, -gen3-shadow, -gen4-shadow) onto that node, bounded by its
windows, as j813_n1.c applies them at boot. Nothing is published unless all eight are valid.

Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks

@DjDeveloperr
DjDeveloperr merged commit 03d120d into aurora-silicon:main Nov 17, 2026
15 checks passed
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