| ← Previous: Overview | Index | Next: Addressing & Access Rules → |
This document describes the K3 LPDDR5 initialization path implemented by the first-stage loader. It reconciles the software interface, the PMU firmware interface, and board observations; it is not a complete Synopsys controller or PHY hardware manual.
Evidence labels used throughout these documents:
Interface. The reference board declares two 4 MiB DDRC regions. Two independent DTBs agree on both addresses:
| Instance | DDRC base | Clock/CFG base | DPHY base |
|---|---|---|---|
| 0 | 0xcb000000 |
0xcb600000 |
0xcb800000 |
| 1 | 0xcc000000 |
0xcc600000 |
0xcc800000 |
For each instance, CFG = DDRC + 0x600000 and DPHY = DDRC + 0x800000. The CFG and DPHY areas are derived windows, not part of the 4 MiB DDRC reg extent. The generic SoC address 0xc0000000 and the older DPHY address 0xc0800000 do not describe this board’s instance 0 and must not be used.
Interface. The loader initializes instance 0 and instance 1 sequentially. Each receives its own PHY setup, PMU execution, and training result. This sequencing does not by itself prove that both instances are electrically identical or that their trained values may be interchanged.
| Block | Responsibility | Programming view |
|---|---|---|
| Host loader | Selects the memory part and rate, programs clocks and DDRC, loads and supervises the PMU, saves results, and enables traffic | Host MMIO |
| CFG/DPLL | Produces and selects DDR clocks, reports PLL lock, and gates DCLK | Byte offsets from CFG base; host 32-bit accesses |
| DDRC | Owns DRAM timings, DFI, refresh, ZQ, rank/address mapping, power state, and host ports | Byte offsets from DDRC base; host 32-bit accesses |
| DPHY | Provides lanes, delay and drive controls, training engines, PMU memories, and host/PMU register windows | Host word indices, normally carrying 16-bit CSR values |
| PMU | Embedded little-endian ARCv2/EM processor that executes training and exchanges messages with the loader | ARC DMEM and CSR addresses |
| LPDDR5 array | Stores data and receives mode, calibration, and training traffic through the PHY | One or two ranks; x16 or x8 device organization in the supported table |
Interface + hardware. Training runs on the PMU, not on the main RISC-V processor. The host configures the environment and starts the PMU; the PMU performs the PHY training algorithms. The later host memory-pattern test is a separate check against an already operational DRAM interface.
Hardware / ABI. The K3 PMU implements the reduced ARC register file (RF16): general registers r16–r25 are physically absent. Its local bus interface requires 16-bit accesses for DMEM words and PMU/PHY peripherals (0x90xxxxxx), and 8-bit accesses for byte fields or packed tables whose stride is not naturally 32-bit aligned. These are ARC-side hardware rules and differ from the host’s 32-bit DPHY bus transactions.
The following is the reconciled functional order. Individual register writes within a stage can be more numerous and phase-dependent.
MICRO_RESET sequence 9 -> 1 -> 0. Consume major and streaming mailbox messages until completion or an error indication.0x4000-byte blocks with address-based and complemented patterns. Passing this test is useful evidence, not a exhaustive DRAM validation.The PMU owns the PHY while the control mux selects it. The host must not concurrently manipulate the same PHY window.
Interface. Quickboot reuses a previous result when the persisted envelope passes magic, DDR generation, rank-count, data-rate, and CRC checks. Otherwise the loader performs full training. Each controller has a separate 0x49a4-byte result; the reserved two-controller envelope is 0x9800 bytes.
Quickboot loads a different PMU program, restores the saved message and serialized PHY state, restores ACSM state, and follows its own PMU and clock sequence. It does not run the ordinary pre-training and training tables. P-state SRAM restoration is not active in the documented path.
Observation. One reference-board comparison measured approximately 5.6 seconds for full training and 9 ms for quickboot. These figures characterize that boot only; they are not architectural timing limits.
The saved result contains:
0x140-byte used message block, within a 0x200-halfword DMEM reservation;Interface. Serialization order is part of the quickboot ABI. Sorting the PHY indices or compacting the segments would produce a different, incompatible image.
Observation. Identical PHY/ACSM snapshots were captured for both controllers in one same-part reference-board envelope. Unknown. This single observation does not establish that controller results are always identical or safely portable between boards, parts, rates, or firmware versions.
The available material does not provide a complete bit-level DDRC/DPHY specification, authoritative meanings for all PMU streaming opcodes, or proof of interoperability for every listed part/rate/topology combination. Those limits must remain visible rather than being filled with inferred register names or universal timing claims.