Skip to content

soc: apple: report DRAM type, maximum rate and bandwidth class from the device tree - #656

Merged
RyanTheTide merged 7 commits into
aurora-wipfrom
soc/apple-dram-speed-20261031
Oct 30, 2026
Merged

RyanTheTide merged 7 commits into
aurora-wipfrom
soc/apple-dram-speed-20261031

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Linux diagnostics have no DRAM interface class to report on T6000, T8112,
T6040/T6041 and T8140. Add DT descriptions and a read-only dram/ group on
the existing PMP report provider. T6000, for example, reports the observed
lpddr5 family, an inferred maximum of 6400 MT/s, a calculated physical peak
of 204.8 GB/s, and the separately published 200 GB/s bandwidth class.

Firmware owns memory transitions. The existing PMP report device provides a
place for static attributes without introducing devfreq governor/control
semantics or apparent current-frequency and transition-history data. The new
attributes read cached DT metadata and add no MMIO, mailbox request, firmware
vote, module parameter, or runtime board table. Old DTs retain their existing
interface.

The binding describes every firmware DCS state using an explicit OPP level;
only the maximum state has a rate. Widths, maximum rates and calculated peaks
are labelled inferred. Published bandwidth class remains separate, and the
observed LPDDR5 family does not assert an LPDDR5X suffix. The uint64
apple,data-rate property counts transfers per second per pin; this avoids
the standard -hz suffix's 32-bit default. opp-hz is rounded-up
CK-equivalent Hz, not a measured CK or WCK. Parsing rejects incomplete state
coverage, duplicate/unknown IDs, bad widths/rates and inconsistent or
overflowing peak arithmetic.

The reviewed scope is static reporting on these four SoCs. Current-state
reporting is excluded because the older PMP residency transport is not
specified and the newer PMGR achieved-state mapping is not accepted.
Unqualified lower-state rates remain absent.

Validation against public aurora-wip snapshot
a47dffd4cd45efc8fafacf48bf908a51f90eba34:

  • Three binding documents pass lint, schema checks and their generated examples.
  • All four requested DTBs pass the comparison with CHECK_DTBS=y W=1: only the
    intended metadata/OPP additions and verified phandle renumbering differ.
    Diagnostics change from 209 to 196 because the new binding covers 13
    previously unmatched nodes; there are no other diagnostic changes.
  • W=1 compilation of both touched C translation units has zero warnings/errors.
  • The parser KUnit suite passes all 27 cases under UML.
  • Image and all 5,857 modules build with the fleet11 config, with zero
    full-build warnings or errors. The build outputs and buildbox source
    checkout were removed after the logs and checksums were collected.

The UML build emits warnings in unchanged generic I/O code and RWX linker
segments; these are retained in the logs. No hardware has been accessed.
Owner commands and expected static values are delivered separately. This
patch does not change the diagnostic userspace consumer.

The interface classes follow the clean specification and public Apple
specifications for M1 Pro,
M2,
M4 Pro, and
MacBook Neo.

🤖 Generated with Claude Code

Describe explicit DCS state IDs, inferred interface classes and the distinction between physical peak bandwidth and the published rounded class. Leave unaccepted lower-state rates unspecified and do not describe a PMGR achieved-state register.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Expose read-only metadata on the existing PMP report device without introducing devfreq control or claiming a current clock. Validate explicit state coverage, rate units and peak-bandwidth arithmetic before publishing attributes. Exercise the property parser with software-node KUnit fixtures.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Add the observed LPDDR5 family and DCS state counts for T6000, T8112, T6040/T6041 and T8140. Encode the inferred widths and maximum interface rates separately from the published bandwidth classes. Lower-state rates and unaccepted achieved-state registers remain absent.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Keep the new DRAM ABI and OPP binding under the existing Apple machine support entry alongside the PMP report driver.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Use YAML block lists so commas inside vendor property names remain part of each dependency. The binding example and DT gates exposed these incorrect flow lists.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Initialize references with SOFTWARE_NODE_REFERENCE and provide a module description. This fixes W=1 compilation and the missing-description warning from the full modules build.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The report probe now parses DRAM metadata and registers a sysfs group, so
the graph harness needs typed boundaries for those operations. Extract the
production DRAM structure, readers and group, and exercise the unchanged
probe with absent metadata, valid metadata, parser failures and group
registration failure. Check all six cached read-only attributes and retain
the original startup, child-seeding and supplier checks.

Add seven DRAM mutation controls alongside the existing fourteen controls.
Keep --ref usable against older report sources while requiring the DRAM
hook in the current source. The firmware-property parser remains covered
by its KUnit suite; the host parser boundary checks the device and output
arguments and injects success and error results for probe integration.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide merged commit 8348f82 into aurora-wip Oct 30, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the soc/apple-dram-speed-20261031 branch October 30, 2026 20:23
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