On Mon, 1 Jul 2013 01:40:11 +0300
Appears that in practice MBUS can be clocked much higher than that.
Some days ago Turl tried an extreme overclocking to 600MHz (possibly
because of assuming that the base clock was PLL6 and not PLL6*2). And
the system did not immediately fail:
http://irclog.whitequark.org/linux-sunxi/2013-09-14#4956716;
I also tried to run some tests for different MBUS clock frequencies on
my Cubieboard2. Here are the results for the memory write speed and the
latencies of random memory accesses inside of large memory blocks:
=== Allwinner A20, 1GHz, MBUS clock = 300 MHz, DRAM clock = 480MHz ===
NEON fill bandwidth = 2015.6 MB/s
block size : single random read / dual random read
262144 : 13.6 ns / 19.4 ns
524288 : 98.3 ns / 153.6 ns
1048576 : 145.0 ns / 199.9 ns
2097152 : 175.7 ns / 222.6 ns
4194304 : 191.3 ns / 232.0 ns
8388608 : 201.3 ns / 239.9 ns
16777216 : 211.6 ns / 252.8 ns
33554432 : 226.9 ns / 278.9 ns
67108864 : 254.5 ns / 333.2 ns
=== Allwinner A20, 1GHz, MBUS clock = 400 MHz, DRAM clock = 480MHz ===
NEON fill bandwidth = 2689.5 MB/s
block size : single random read / dual random read
262144 : 13.4 ns / 19.1 ns
524288 : 90.3 ns / 140.5 ns
1048576 : 133.2 ns / 182.1 ns
2097152 : 161.6 ns / 203.0 ns
4194304 : 176.4 ns / 211.7 ns
8388608 : 186.4 ns / 219.1 ns
16777216 : 196.0 ns / 231.7 ns
33554432 : 210.6 ns / 257.9 ns
67108864 : 235.3 ns / 306.6 ns
=== Allwinner A20, 1GHz, MBUS clock = 480 MHz, DRAM clock = 480MHz ===
NEON fill bandwidth = 3201.5 MB/s
block size : single random read / dual random read
262144 : 13.4 ns / 19.1 ns
524288 : 87.1 ns / 134.3 ns
1048576 : 127.7 ns / 173.1 ns
2097152 : 154.1 ns / 193.0 ns
4194304 : 168.6 ns / 201.5 ns
8388608 : 177.6 ns / 209.4 ns
16777216 : 186.9 ns / 222.1 ns
33554432 : 201.5 ns / 248.2 ns
67108864 : 226.0 ns / 295.1 ns
=== Allwinner A20, 1GHz, MBUS clock = 600 MHz, DRAM clock = 480MHz ===
NEON fill bandwidth = 3203.5 MB/s
block size : single random read / dual random read
262144 : 13.3 ns / 19.5 ns
524288 : 84.3 ns / 131.3 ns
1048576 : 123.6 ns / 169.2 ns
2097152 : 150.0 ns / 188.9 ns
4194304 : 164.1 ns / 197.4 ns
8388608 : 172.9 ns / 204.8 ns
16777216 : 182.3 ns / 218.1 ns
33554432 : 196.1 ns / 242.2 ns
67108864 : 219.0 ns / 287.0 ns
The system boots with 600MHz MBUS clock speed, but is not really
stable. So 600MHz is not something that anyone would ever want
to use. Still it is interesting that it does not cause immediate
failures on at least two A20 devices.
Other than improving the memory write bandwidth, the random
memory read latency gets better too (which is understandable,
because we need to transfer 64 bytes when doing cache line fills
on each read miss).
The comments in the kernel sources seem to imply that 400MHz
MBUS clock is supported for Allwinner-A20:
https://github.com/linux-sunxi/linux-sunxi/blob/sunxi-v3.4.61-r0/arch/arm/mach-sun7i/clock/mod_clk.c#L2076
So should we bump the MBUS clock frequency to 400MHz in u-boot?
Or maybe it's better to clock MBUS at the same speed as DRAM?
Some vendors prefer to set DRAM to 384MHz in A20 devices by
default:
http://irclog.whitequark.org/linux-sunxi/2013-07-29#4520613;
DRAM is often overclockable to 480MHz, but MBUS also seems to be
able to run at this speed.
Faster memory speed usually works better when driving 1920x1080
monitors (at least based on the experience dealing with Allwinner A10).
Every little bit helps.
PS. Allwinner-A10 does not have the MBUS configuration register. So
presumably the MBUS clock configuration is hardcoded for A10 (assuming
that it even has MBUS).