This is a DRAM tuning/overclocking stability report for various Allwinner A10/A13/A20 based devices. It can be automatically generated by the tools from https://github.com/ssvb/a10-meminfo. Here we primarily focus on finding optimal dram_tpr3 values, tuned individually for every sunxi device. Currently these values need to be hardcoded into the sources of the u-boot-sunxi bootloader. The dram_tpr3 parameter is just a hexadecimal number, composed of the following bit-fields:

The RK30XX manual can be checked to find more details about the MFWDLY, MFBDLY and SDPHASE bit fields. The Rockchip 30XX family of SoCs is apparently using a bit different revision of the same DRAM controller IP. So while there is no perfect match with the DRAM controller in Allwinner A10/A13/A20, it is still good enough.

Results interpretation:

Note: after all the tests have successfully passed for some dram_tpr3 value, it is still a good idea to increase the dcdc3 voltage by 0.025V and/or reduce the DRAM clock speed by 24MHz in order to have some safety margin. Selecting the dram_tpr3 values from the middle of some large green isle is assumed to be a good idea too (it should be less sensitive to the parameters drift caused by temperature changes or some other environmental factors).

Mele A2000

dcdc3_vol = 1250
dram_clk = 468
mbus_clk = 0
dram_type = 3
dram_rank_num = 1
dram_chip_density = 2048
dram_io_width = 16
dram_bus_width = 32
dram_cas = 7
dram_zq = 0x7f
dram_odt_en = 0
dram_tpr0 = 0x30927790
dram_tpr1 = 0xa0b0
dram_tpr2 = 0x23200
dram_tpr3 = 0x0
dram_emr1 = 0x4
dram_emr2 = 0x8
dram_emr3 = 0x0
mfxdlyphase=36phase=54phase=72phase=90phase=108phase=126
0x070x0733330x0722220x0711110x0700000x07EEEE0x07DDDD
0x060x0633330x0622220x0611110x0600000x06EEEE0x06DDDD
0x050x0533330x0522220x0511110x0500000x05EEEE0x05DDDD
0x040x0433330x0422220x0411110x0400000x04EEEE0x04DDDD
0x030x0333330x0322220x0311110x0300000x03EEEE0x03DDDD
0x020x0233330x0222220x0211110x0200000x02EEEE0x02DDDD
0x010x0133330x0122220x0111110x0100000x01EEEE0x01DDDD
0x000x0033330x0022220x0011110x0000000x00EEEE0x00DDDD
0x080x0833330x0822220x0811110x0800000x08EEEE0x08DDDD
0x100x1033330x1022220x1011110x1000000x10EEEE0x10DDDD
0x180x1833330x1822220x1811110x1800000x18EEEE0x18DDDD
0x200x2033330x2022220x2011110x2000000x20EEEE0x20DDDD
0x280x2833330x2822220x2811110x2800000x28EEEE0x28DDDD
0x300x3033330x3022220x3011110x3000000x30EEEE0x30DDDD
0x380x3833330x3822220x3811110x3800000x38EEEE0x38DDDD
Lane phase adjustments: [0, 0, 0, 0]
Error statistics from memtester: [solidbits=63, bitflip=16, bitspread=6]

Best number of successful memtester runs, which span over 1 columns (0-0): 51
Best number of successful memtester runs, which span over 2 columns (0-1): 82
Best number of successful memtester runs, which span over 3 columns (0-2): 118
Best number of successful memtester runs, which span over 4 columns (0-3): 138
Best number of successful memtester runs, which span over 5 columns (0-4): 157
Best number of successful memtester runs, which span over 6 columns (0-5): 157

Read errors per lane: [1, 3, 2, 2]. Lane 2 is the most noisy/problematic.
Errors from the lane 0 are not intersecting with the errors from the worst line 2.
Errors from the lane 1 are not intersecting with the errors from the worst line 2.
Errors from the lane 3 are not intersecting with the errors from the worst line 2.

Write errors per lane: [55, 55, 20, 24]. Lane 3 is the most noisy/problematic.
Errors from the lane 0 are not intersecting with the errors from the worst line 3.
Errors from the lane 1 are not intersecting with the errors from the worst line 3.
Errors from the lane 2 are 100.0% eclipsed by the worst lane 3.

Mele A2000

dcdc3_vol = 1250
dram_clk = 468
mbus_clk = 0
dram_type = 3
dram_rank_num = 1
dram_chip_density = 2048
dram_io_width = 16
dram_bus_width = 32
dram_cas = 7
dram_zq = 0x7b
dram_odt_en = 0
dram_tpr0 = 0x30927790
dram_tpr1 = 0xa0b0
dram_tpr2 = 0x23200
dram_tpr3 = 0x0
dram_emr1 = 0x0
dram_emr2 = 0x8
dram_emr3 = 0x0
mfxdlyphase=36phase=54phase=72phase=90phase=108phase=126
0x07
0x06
0x05
0x04
0x03
0x02
0x01
0x00
0x08
0x10
0x180x183333
0x200x2033330x2022220x2011110x2000000x20EEEE0x20DDDD
0x280x2833330x2822220x2811110x2800000x28EEEE0x28DDDD
0x300x3033330x3022220x3011110x3000000x30EEEE0x30DDDD
0x380x3833330x3822220x3811110x3800000x38EEEE0x38DDDD
Lane phase adjustments: [0, 0, 0, 0]
Error statistics from memtester: [bitflip=7, solidbits=2]

Best number of successful memtester runs, which span over 1 columns (0-0): 45
Best number of successful memtester runs, which span over 2 columns (0-1): 75
Best number of successful memtester runs, which span over 3 columns (0-2): 115
Best number of successful memtester runs, which span over 4 columns (0-3): 135
Best number of successful memtester runs, which span over 5 columns (0-4): 158
Best number of successful memtester runs, which span over 6 columns (0-5): 158

Read errors per lane: [0, 1, 2, 0]. Lane 1 is the most noisy/problematic.
Errors from the lane 2 are not intersecting with the errors from the worst line 1.

Write errors per lane: [4, 4, 2, 2]. Lane 3 is the most noisy/problematic.
Errors from the lane 0 are not intersecting with the errors from the worst line 3.
Errors from the lane 1 are not intersecting with the errors from the worst line 3.
Errors from the lane 2 are 100.0% eclipsed by the worst lane 3.