← Back to list

How I Migrated U-Boot to Support a New eMMC Chip After Samsung’s Line Shutdown

How I Migrated U-Boot to Support a New eMMC Chip After Samsung’s Line Shutdown

Eric Liu – Android SBC / TFT Display · 2025-06-24 14:34 · 0 claps · 2.2 min read
#u-boot #emmc
Open on Medium ↗

How I Migrated U-Boot to Support a New eMMC Chip After Samsung’s Line Shutdown

How I Migrated U-Boot to Support a New eMMC Chip After Samsung’s Line Shutdown

In early 2025, Samsung discontinued one of its popular eMMC chips used in our PX30-based SBC. This unexpected change triggered a critical migration process — from evaluating alternative chips to rewriting low-level bootloader logic.

This post walks through the complete journey of adapting U-Boot to support Foresee’s eMMC module, including hardware evaluation, debugging, quirk handling, and field testing.

Why eMMC Still Matters in Embedded Systems

eMMC (embedded MultiMediaCard) remains a common storage solution in embedded Linux platforms due to its balance between cost, performance, and board integration simplicity. Many boards — including ours — rely on it not just for data storage, but as the first-stage boot source.

The Samsung KLMAG1JETD had been our go-to choice, thanks to its mature driver support. Its sudden unavailability meant compatibility challenges when switching to new chips — especially during early boot phases handled by U-Boot.

🔍 Step 1: Evaluating Replacement Candidates

Our hardware team shortlisted three replacements:

  • Foresee NCEMBS99–32G
  • Kingston EMMC32G-M525
  • Longsys/AISINO eMMC 5.1 (32GB)

We benchmarked each using mmc-utils under Linux. Foresee won out due to availability, stable performance, and reliable response across voltage variations.

🔧 Step 2: Understanding U-Boot’s MMC Stack

U-Boot interacts with eMMC through its MMC subsystem in drivers/mmc/. This layer abstracts host controllers and cards using standard MMC/SD commands (CMD0, CMD1, CMD8, etc).

The Foresee chip initially failed during boot, hanging at:

mmc_send_op_cond: timeout waiting for OCR

After debugging, we discovered it required additional clock delay and didn’t fully respond to CMD8, which Samsung chips handled gracefully.

🛠️ Step 3: Refactoring the Initialization Path

To accommodate Foresee, we added a new quirk in mmc.c:

if (cid[0] == 0x70) { // Foresee
    host->quirks |= MMC_QUIRK_NEED_CLOCK_DELAY;
}

We also tweaked mmc_set_ios() and mmc_send_op_cond() to include longer retry intervals and Foresee-specific delays via udelay(500).

⚙️ Step 4: Tuning Timing and Clock Settings

Foresee struggled with UHS modes. We downgraded to DDR52 legacy mode:

mmc->timing = MMC_TIMING_LEGACY;

Additionally, we adjusted the host clock divider from 1:4 to 1:8 for improved cold-boot stability.

📄 Step 5: Device Tree Adjustments

Although U-Boot can function with limited DT support, we updated the board’s px30-u-boot.dtsi:

mmc@fe310000 {
    clock-frequency = <100000000>;
    disable-cmd23;
    no-sd;
};

This ensured consistent behavior during Linux handoff post-boot.

🧪 Step 6: Test & Validation Strategy

We validated with the following:

  • ✅ 30× cold boot cycles
  • ✅ 50× warm reboots
  • ✅ 5× OTA update tests
  • ✅ Simulated power-loss via GPIO-reset
  • ✅ Bonnie++ benchmark
  • ✅ Thermal soak at -10°C to +60°C

The Foresee eMMC passed all tests with stable performance.

✅ Outcome

With these changes, U-Boot now supports both Samsung and Foresee eMMC modules seamlessly.

We pushed the migration branch to GitHub for others facing similar transitions.

🔁 Lessons Learned

  • Even with standardized specs, vendor-specific quirks matter.
  • Clock timing, CMD behaviors, and retry logic all affect early boot success.
  • Real-world conditions (cold boot, brown-out) are essential test vectors.
  • Bootloader work is invisible but foundational to embedded stability.

🧹 More Projects

I share technical insights, configuration examples, and open-source projects around SBCs and industrial displays.

📝 Tags suggestion for Medium:

#u-boot #emmc #embedded-linux #rockchip #sbc #bootloader #firmware

메타데이터
post_id
477ec3efd019
slug
how-i-migrated-u-boot-to-support-a-new-emmc-chip-after-samsungs-line-shutdown-477ec3efd019
url
https://medium.com/@ericliu1/how-i-migrated-u-boot-to-support-a-new-emmc-chip-after-samsungs-line-shutdown-477ec3efd019
canonical_url
https://medium.com/@ericliu1/how-i-migrated-u-boot-to-support-a-new-emmc-chip-after-samsungs-line-shutdown-477ec3efd019
author_url
https://medium.com/@ericliu1
status
ok
fetched_at
2026-06-20 20:29:01