Files
NANOKVM-LicheeRV-Nano-Build…/fsbl/plat/cv181x/include/ddr/regconfig.h
916BGAI dbbad1938a fsbl: sync sg200x-dev through 5a80c12
Update the vendored FSBL from Sophgo sg200x-dev commit
426d1e7eccce84b34169e5f21de7d6e7da1804a1 to
5a80c127cf614dea7f534d5b5352886a1c720d37, incorporating 24 upstream
commits. Keep the local plat/sg200x symlink to cv181x.

Import the upstream DDR, clock, storage and boot-image changes together
with their platform support, prebuilt firmware and licensing files.
All 935 upstream files match the target revision.

Validation on LicheeRV Nano (SG2002/C906, SD, DDR3-1866 x16):
- Cross-build BL2 with the existing Xuantie GCC 10.2.0 toolchain.
- Repack FIP while preserving the installed OpenSBI and U-Boot byte
  for byte; verify headers, payload checksums, entry addresses and LZMA.
- Software reboot and power-cycle boot succeed; memtester 16M 1 passes
  all 18 checks.

Validation covers the FSBL update with existing later boot stages.
Full firmware builds, A53 and video/HID acceptance are not covered.
2026-11-06 18:34:01 +08:00

37 lines
758 B
C

#ifndef __REG_CFG_H__
#define __REG_CFG_H__
// #include <stdint.h>
// #include "ddr_sys.h"
// #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
struct regconf {
uint32_t addr;
uint32_t val;
};
struct regpatch {
uint32_t addr;
uint32_t mask;
uint32_t val;
};
// #define DDR_CFG_TYPE_DDR3 1
// #define DDR_CFG_TYPE_DDR2 2
// #define DDR_CFG_TYPE_DDR3_AUTO 3
// #define DDR_CFG_TYPE_DDR2_AUTO 4
#ifdef DDR2_3
extern struct regpatch ddr3_1866_patch_regs[];
extern uint32_t ddr3_1866_patch_regs_count;
extern struct regpatch ddr2_1333_patch_regs[];
extern uint32_t ddr2_1333_patch_regs_count;
#else
extern struct regpatch *ddr_patch_regs;
extern uint32_t ddr_patch_regs_count;
#endif
void ddr_patch_regs_init(void);
#endif /* __REG_CFG_H__ */