SRAM Controller Register Guide

= SRAM Controller =

Overview
Static Random Access Memory SRAM is used by devices, such as the CPU, for extra fast memory or as cache.

On the the SRAM is split up into segments, A, B, C, D, NAND and CPU, A - is generally usable ram 48kB CPU caches not mapped to address space and can't be used by any other purpose C,D sections can be mapped over SRAM config but it required for internal hardware caches for VE, NAND, ISP

SRAM Sections
It should be noted, that all accessability tests where done using the u-boot console. It is possible that some secret combination (like emac) needs to be set to actually allow writing.

SRAM Registers
SRAM Base address: 0x01c00000

SRAM_CTL0_CFG
Default value: 0x7fffffff

Offset: 0x0000

SRAM_CTL1_CFG
Default value A10: 0x1300

Default value A20: 0x1314 Default value A13: 0x1000

Offset: 0x0004

SRAM_VER_REG
Default value: 0x0000100

Offset: 0x0024

SRAM_BIST_CTRL
Default value: 0x0000100

Offset: 0x0024

Initial values
In the 0x01c00000 - 0x01c00fff region, designated as SRAM Register, only a small section here is documented. It can be found using the u-boot console, some other default values. 0x01c00016 = 0x0200 0x01c00026 = 0x0100 0x01c00030 - 0x01c000f0 appears to be 0. 0x01c000100 - 0x1c00fff appears to 'wrap around' and display the same section again, so higher address lines seem to be unmapped.

A20
01c00000: 7fffffff 00001314 00000000 00000000   ................ 01c00010: 00000000 00000200 00000000 00000000   ................ 01c00020: 00000000 00000100 00000000 00000000   ................ 01c00030: 00000000 00000001 00000000 00000000   ................ 01c00040: 00000000 00000000 00000000 00000000   ................ 01c00050: 00000000 00000000 00000000 00000000   ................ 01c00060: 00000000 00000000 00000000 00000000   ................ 01c00070: 00000000 00000000 00000000 00000000   ................ 01c00080: 00000000 00000000 00000000 00000000   ................ 01c00090: 00000000 00000000 00000000 00000000   ................ 01c000a0: 00000000 00000000 00000000 00000000   ................ 01c000b0: 00000000 00000000 00000000 00000000   ................ 01c000c0: 00000000 00000000 00000000 00000000   ................ 01c000d0: 00000000 00000000 00000000 00000000   ................ 01c000e0: 00000000 00000000 00000000 00000000   ................ 01c000f0: 00000000 00000000 00000000 00000000   ................ All to 1 01c00000: ffffffff 80ff13ff 000000ff 00000000   ................ 01c00010: 00000000 000001ff ffffffff ffffffff   ................ 01c00020: ffffffff 16518100 00000000 00000000   ......Q......... 01c00030: 00000003 00000000 00000001 00000000   ................ 01c00040: 00000000 00000000 00000000 00000000   ................ 01c00050: 00000000 00000000 00000000 00000000   ................ 01c00060: 00000000 00000000 00000000 00000000   ................ 01c00070: 00000000 00000000 00000000 00000000   ................ 01c00080: 00000000 00000000 00000000 00000000   ................ 01c00090: ffffffff 00ffffff 0000ffff 00000000   ................ 01c000a0: 00000000 00000000 00000000 00000000   ................ 01c000b0: 00000000 00000000 00000000 00000000   ................ 01c000c0: 00000000 00000000 00000000 00000000   ................ 01c000d0: 00000000 00000000 00000000 00000000   ................ 01c000e0: 00000000 00000000 00000000 00000000   ................ 01c000f0: 00000000 00000000 00000000 00000000   ................

A10
md 0x01c00000 0x40 01c00000: 7fffffff 00001300 00000000 00000000   ................ 01c00010: 00000000 00000200 00000000 00000000   ................ 01c00020: 00000000 00000100 00000000 00000000   ................ 01c00030: 00000000 00000000 00000000 00000000   ................ 01c00040: 00000000 00000000 00000000 00000000   ................ 01c00050: 00000000 00000000 00000000 00000000   ................ 01c00060: 00000000 00000000 00000000 00000000   ................ 01c00070: 00000000 00000000 00000000 00000000   ................ 01c00080: 00000000 00000000 00000000 00000000   ................ 01c00090: 00000000 00000000 00000000 00000000   ................ 01c000a0: 00000000 00000000 00000000 00000000   ................ 01c000b0: 00000000 00000000 00000000 00000000   ................ 01c000c0: 00000000 00000000 00000000 00000000   ................ 01c000d0: 00000000 00000000 00000000 00000000   ................ 01c000e0: 00000000 00000000 00000000 00000000   ................ 01c000f0: 00000000 00000000 00000000 00000000   ................

A31
01c00000: 7fffffff 00001300 00000000 00000000   ................ 01c00010: 00000000 00000200 00000000 00000000   ................ 01c00020: 00000000 16338700 00000000 00000000   ......3......... 01c00030: 00000000 00000000 00000000 00000000   ................ 01c00040: 22222222 22223a22 00000000 00000000   """"":""........ 01c00050: 00000000 00000001 00000001 00000000    ................ 01c00060: 00000000 00000000 00000000 00000000    ................ 01c00070: 00000200 00000000 00000000 00000000    ................

All to 1
mw 0x01c00000 0xffffffff 0x40

md 0x01c00000 0x40 01c00000: ffffffff 800f13ff ffffffff 00000000   ................ 01c00010: 00000000 000002ff ffffffff ffffffff   ................ 01c00020: ffffffff 16238100 000f0007 00000000   ......#......... 01c00030: 00000000 00000000 00000000 00000000   ................ 01c00040: 00000000 00000000 00000000 00000000   ................ 01c00050: 00000000 00000000 00000000 00000000   ................ 01c00060: 00000000 00000000 00000000 00000000   ................ 01c00070: 00000000 00000000 00000000 00000000   ................ 01c00080: 00000000 00000000 00000000 00000000   ................ 01c00090: ffffffff 00ffffff 0000ffff 00000000   ................ 01c000a0: 00000000 00000000 00000000 00000000   ................ 01c000b0: 00000000 00000000 00000000 00000000   ................ 01c000c0: 00000000 00000000 00000000 00000000   ................ 01c000d0: 00000000 00000000 00000000 00000000   ................ 01c000e0: 00000000 00000000 00000000 00000000   ................ 01c000f0: 00000000 00000000 00000000 00000000   ................

All to 0
mw 0x01c00000 0x00 0x40

md 0x01c00000 0x40 01c00000: 00000000 00000000 00000000 00000000   ................ 01c00010: 00000000 00000200 00000000 00000000   ................ 01c00020: 00000000 00000100 00000000 00000000   ................ 01c00030: 00000000 00000000 00000000 00000000   ................ 01c00040: 00000000 00000000 00000000 00000000   ................ 01c00050: 00000000 00000000 00000000 00000000   ................ 01c00060: 00000000 00000000 00000000 00000000   ................ 01c00070: 00000000 00000000 00000000 00000000   ................ 01c00080: 00000000 00000000 00000000 00000000   ................ 01c00090: 00000000 00000000 00000000 00000000   ................ 01c000a0: 00000000 00000000 00000000 00000000   ................ 01c000b0: 00000000 00000000 00000000 00000000   ................ 01c000c0: 00000000 00000000 00000000 00000000   ................ 01c000d0: 00000000 00000000 00000000 00000000   ................ 01c000e0: 00000000 00000000 00000000 00000000   ................ 01c000f0: 00000000 00000000 00000000 00000000   ................