SpacemiT K1 — free LPDDR4/4X DDR init: documentation

This is the project documentation. It is written directly from the firmware in src/ and from hardware experiments in logsRefs/. Every hardware claim cites the experiment log that observed it on silicon; unmeasured hardware details and open configurations are marked [open]:

  • firmware behaviour and programmed constants cite src/;

  • measured silicon behaviour cites logsRefs/NNN-…/readme.md;

  • claims not yet isolated on hardware are marked [open] (or [inferred] / [required] / [design]).

The firmware is a drop-in ddr_fw.bin loaded and called by mainline U-Boot’s K1 SPL; it brings up the LPDDR4X memory from a cold controller (PLLs, controller and PHY programming, JEDEC power-up, training of every frequency point and the final frequency change) with no vendor blob.

Current status

Part

State

Reference board (BPI-F3, 8 GiB,

[measured] full bring-up from power-on

Samsung K4UCE3Q4AA-MGCL,

with independent data-eye at 1066, 1200,

2 ranks, x8, LPDDR4X)

1333, 2400 and 2666 MT/s; DRAM: 8 GiB clean (logsRefs/000, 021–026, 033–037)

BPI-F3, 16 GiB Micron

[measured] full bring-up, independent

MT53E4G32D8, 2 ranks, x8,

WL+Vref+delay on both ranks at 1066, 1200,

LPDDR4X

1333, 2400 and 2666 MT/s; Linux boot and soak at stock 2666 (logsRefs/001–020, 027–032, 038–043)

1 rank / x16 (4 GiB) SKUs

[open] enabled, untested on native hardware; geometry/commands encoded in src/lib/k1_ddr_init.c (docsClean/address-map, docsClean/configurations); cs_num=1 full bring-up at 2666 MT/s (4096 MB mapped, CS0 verified) is [measured] on the 2-rank 8 GiB package (logsRefs/045-close-open-points-8gib/readme.md)

LPDDR4 (non-X)

[open] enabled, untested on silicon; IO table, WDQS words, PHY LDO and fp3 plan are enabled in k1_ddr_boot() (buildable via -DK1_DDR_TYPE_LPDDR4, docsClean/configurations); MR14 sweep range and silicon bring-up remain unmeasured

PI training sequencer

[design] treated as a black box (docsClean/pi-training-engine); its internal edge-search algorithm is inside hardware, and K1_INDEP_EYE replaces the data-eye stages with software pattern sweeps

Start with Architecture for the subsystem and Boot sequence for how the firmware brings it up.

Evidence labels

Confidence labels:

[measured]

Observed on these boards, with the UART in logsRefs/.

[required]

Forced by a standard (JEDEC) or by an unavoidable hardware contract.

[inferred]

Deduced from measurements and encodings, not observed in isolation.

[design]

A decision of this project, not a hardware fact.

[open]

Unknown; to be measured.