Skip to content

Disable SVB for hi3516av200 to fix DDR instability - #2

Closed
widgetii wants to merge 1 commit into
masterfrom
fix/hi3516av200-svb-rmii
Closed

Disable SVB for hi3516av200 to fix DDR instability#2
widgetii wants to merge 1 commit into
masterfrom
fix/hi3516av200-svb-rmii

Conversation

@widgetii

@widgetii widgetii commented Apr 21, 2026

Copy link
Copy Markdown
Member

Summary

Disable CONFIG_SVB_ENABLE for hi3516av200 (SPI NOR and NAND configs).

Root cause

start_svb() runs at the beginning of start_ddr_training() and adjusts CPU/DDR voltages via HPM readings after the .reg table has already initialized DDR. This causes DDR to work at low addresses (0x81000000) but fail at higher addresses (0x88300000, TEXT_BASE), crashing the mini-boot.

The vendor firmware does not have SVB enabled — binary analysis shows zero references to the PMC register block (0x120A0000) in the vendor SPL.

Test plan

  • Binary-patched SVB disable verified on real camera
  • Source-built with arm-hisiv500-linux- toolchain — boots with 512MB RAM detected
  • Ping verified working through PoE switch

Fixes: OpenIPC/firmware#517

🤖 Generated with Claude Code

@widgetii
widgetii force-pushed the fix/hi3516av200-svb-rmii branch 5 times, most recently from d96ade4 to 180d314 Compare April 21, 2026 11:42
@widgetii
widgetii force-pushed the fix/hi3516av200-svb-rmii branch 5 times, most recently from 847aa58 to bcc0826 Compare April 21, 2026 13:05
CONFIG_SVB_ENABLE adjusts CPU/DDR voltages after DDR initialization,
destabilizing memory at higher addresses. The vendor firmware does not
enable SVB. Confirmed by binary analysis and real hardware testing.

Camera: Hi3516AV200 + 512MB DDR + SPI NAND MX35LF1GE4AB

Fixes: OpenIPC/firmware#517

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@widgetii
widgetii force-pushed the fix/hi3516av200-svb-rmii branch from bcc0826 to ae2fe03 Compare April 21, 2026 13:30
@widgetii widgetii changed the title Fix hi3516av200 DDR instability: disable SVB, set RMII Disable SVB for hi3516av200 to fix DDR instability Apr 21, 2026
@widgetii

Copy link
Copy Markdown
Member Author

Closing — the root cause was not SVB but SPL size truncation.

With SVB enabled, start_ddr_training() grows from 240 to 916 bytes, pushing its tail past the 20224-byte SPL boundary. The bootrom sends only the first 20224 bytes to SRAM, so the function executes truncated code.

The proper fix is in defib (OpenIPC/defib#55): dynamically detect SPL code size from the LZMA boundary instead of using the hardcoded profile value. Verified on hardware — SVB-enabled U-Boot boots and pings successfully with the defib fix.

@widgetii widgetii closed this Apr 21, 2026
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.

IMX385 on Hi3516AV200

2 participants