Repository navigation
soc: apple: t8140-sleep: wait for the PCIe block's domain before its AXI enables - #1278
Closed
DjDeveloperr wants to merge 6 commits into
Closed
DjDeveloperr wants to merge 6 commits into
DjDeveloperr wants to merge 6 commits into
Conversation
…AXI enables The commit clears the PCIe block's AXI enables, its link into the SoC fabric, between taking APCIE_SYS_GP off AUTO_ENABLE and lowering it. It cleared them only if the domain read on at once. After a sleep's wake the domain runs under AUTO_ENABLE, as on macOS, and once the radio's port and engine have stopped the hardware may have idled it. Clearing AUTO_ENABLE brings it back, but not by the next read, so the enables were skipped and the block went down with its link set up. SoC NI 1 then latched a PCIe receive link error (LINK_ERR PCIE_RXL) as the block's last domain, ANS, went off, on every sleep that kept DRAM up. The first sleep of a boot finds the enables clear as the loader left them. macOS's own sleep reads the word until it is on before it clears the enables and lowers it. Do the same. Signed-off-by: Diljit Singh <hey@djdev.me>
Keep the PCIe domain wait before the AXI enables; take the stack below, with #1304 and its EDAC merge, as is.
…pcie-slpddr Brings in #1208's aop-bootargs host test fix. No conflicts. Signed-off-by: Diljit Singh <hey@djdev.me>
Signed-off-by: Diljit Singh <hey@djdev.me>
Contributor
Author
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.
After every sleep that keeps DRAM up, the T8140 error handler reported SoC NI 1 LINK_ERR PCIE_RXL ("ni1 source 19"); #1266 made it clear and log the latch. This stops the latch.
Cause: at the commit, the sleep controller clears the PCIe block's AXI enables (its link into the SoC fabric) between taking APCIE_SYS_GP off AUTO_ENABLE and lowering it, but only if the domain reads on at once. After a wake, the domain runs under AUTO_ENABLE. By the commit the hardware had idled it (0x1000030f), and it reads on again only about 0.3 ms after AUTO_ENABLE is cleared. So the enables were skipped, the block went down with its link set up, and NI 1 latched the error as ANS, the block's last domain, went off. The first sleep of a boot finds the enables clear as the loader left them, so it never showed there. macOS's own DRAM-kept sleep polls the word until it reads on, then lowers it.
Fix: wait for the domain to read on (bounded at 5 ms) before clearing the enables.
Hardware (MacBook Neo, J700, stock DTB, production command line, SEP active):
🤖 Generated with Claude Code