Repository navigation
kboot: Pass the AOP motion sensor calibration to the OS - #61
Merged
Merged
Conversation
The AOP accelerometer and gyroscope report only once the OS has sent them the machine's calibration, which iBoot leaves in the ADT services /arm-io/aop/iop-aop-nub/accel and gyro. Copy their range intrinsic, nominal extrinsic and range extrinsic properties into the accel and gyro children of the OS AOP node, as apple,range-intrinsic-cal, apple,nominal-extrinsic-cal and apple,range-extrinsic-cal, on T6040, T6041 and T8132. A missing service or property is skipped. Based on Eryk Wieliczko's J713 work (dirtyroom-linux 63e6467a). Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
dmitzsaz
pushed a commit
to dmitzsaz/aura
that referenced
this pull request
Nov 6, 2026
The AOP accelerometer and gyroscope take the machine's calibration from the OS, as three per-sensor packets. Copy the accel and gyro calibration properties from the ADT AOP services into the matching children of the OS AOP node, where the OS driver reads them. A missing service or property is skipped. Ported from aurora-silicon/m1n1#61. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
rolotrealanis98
added a commit
to rolotrealanis98/m1n1
that referenced
this pull request
Nov 7, 2026
Port Aura's measured T6050 GP-port bring-up (aurora-silicon/aura PR aurora-silicon#60/aurora-silicon#61, src/pcie_t6050.c, Jeff Queisser) to the J716s N1 on apcie0 port 0: the GP power closure and the shared GP PHY (stages A and S, only while no GP port has a link), then the port's reset table, config tunables, reset handshake, Gen3 x1 DBI policy, lane PHY, PERST# and LTSSM (B-E), the bus numbers and the endpoint's ID (F, 106b:1900 or 1901) and Linux's adoption preconditions (G). Every address comes from the ADT (apcie0 reg[16..21], pci-bridge0, gpio0, dart-apcie0). Storage (ANS, NVMe, its SART and power) is compared with a reference before and after each stage that touches shared state. A failed check before the training only refuses it; a change after a stage returns N1_STORAGE_LOST, and kboot_setup_n1() then resets the SoC through the watchdog after 15 s instead of booting a kernel that may not mount its root. Any other stop leaves port 0 and its DART disabled, even if the link came up (a stage G failure). It only runs when the payload sets chosen.asahi,t6050-n1=1; =2 also writes the N1's reset release through the SMC first (pci-bridge0 function-reset: pKW4 "gP13", template 0x00800000, written as template | 1). adt_getprop_copy() returns the copied length, so the function-reset descriptor is taken only when the whole descriptor was copied. Adds pmgr_psreg_by_name(), and makes pmgr_power_is_on() skip virtual devices: T6050 has a no_ps APCIE_PHY_SW beside the real one. Adds tunables_check_local_addr() (Aura's read-back with per-record strobe bits excused) and kboot_get_chosen(). Signed-off-by: Rolando Trevino <rolotrealanis@gmail.com> Assisted-by: LLM Claude
rolotrealanis98
added a commit
to rolotrealanis98/m1n1
that referenced
this pull request
Nov 8, 2026
Port Aura's measured T6050 GP-port bring-up (aurora-silicon/aura PR aurora-silicon#60/aurora-silicon#61, src/pcie_t6050.c, Jeff Queisser) to the J716s N1 on apcie0 port 0: the GP power closure and the shared GP PHY (stages A and S, only while no GP port has a link), then the port's reset table, config tunables, reset handshake, Gen3 x1 DBI policy, lane PHY, PERST# and LTSSM (B-E), the bus numbers and the endpoint's ID (F, 106b:1900 or 1901) and Linux's adoption preconditions (G). Every address comes from the ADT (apcie0 reg[16..21], pci-bridge0, gpio0, dart-apcie0). Storage (ANS, NVMe, its SART and power) is compared with a reference before and after each stage that touches shared state. A failed check before the training only refuses it; a change after a stage, or after a stage that stopped partway (checked again on every stop once the reference is taken), returns N1_STORAGE_LOST, and kboot_setup_n1() then resets the SoC through the watchdog after 15 s instead of booting a kernel that may not mount its root. Any other stop leaves port 0 and its DART disabled, even if the link came up (a stage G failure). It only runs when the payload sets chosen.asahi,t6050-n1=1; =2 also writes the N1's reset release through the SMC first (pci-bridge0 function-reset: pKW4 "gP13", template 0x00800000, written as template | 1). adt_getprop_copy() returns the copied length, so the function-reset descriptor is taken only when the whole descriptor was copied. Adds pmgr_psreg_by_name(), and makes pmgr_power_is_on() skip virtual devices: T6050 has a no_ps APCIE_PHY_SW beside the real one. Adds tunables_check_local_addr() (Aura's read-back with per-record strobe bits excused), and kboot_get_chosen(), kboot_chosen_param() for the other kboot files. Signed-off-by: Rolando Trevino <rolotrealanis@gmail.com>
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.
Companion to aurora-silicon/linux#680 (AOP accelerometer and gyroscope). The accelerometer and gyroscope report only once the OS has sent them the machine's calibration. iBoot leaves it in the ADT under
/arm-io/aop/iop-aop-nub/accelandgyro.This copies
{accel,gyro}-range-intr-cal,-nominal-extr-caland-range-extr-calinto the OS AOP node'saccelandgyrochildren, asapple,range-intrinsic-cal,apple,nominal-extrinsic-calandapple,range-extrinsic-cal. It's the same pattern as the Wi-Fi and multitouch calibration. It runs for T6040, T6041 and T8132, and skips any missing service or property.Based on Eryk Wieliczko's J713 work (dirtyroom-linux 63e6467a). @erykwieliczko, please review.
Testing
make RELEASE=1builds clean, with no new warnings inkboot.c.git clang-formatreports no changes.make RELEASE=1 CHAINLOADING=1fails at them1n1-raw.elflink ("File part reaches the DCP log buffer after stage 1!"). That happens on the aurora-wip base without this change too.FDT: /aop@510600000/accel: 3 of 3 calibration properties, and the same forgyro.Notes
On J713 the kernel gets its tree through U-Boot's importer, so the properties will also need importing there once the J713 nodes exist.
🤖 Generated with Claude Code