[U-Boot] [PATCH 06/14] sunxi: dram: Configurable MBUS clock speed (use PLL5 or PLL6)

Ian Campbell ijc at hellion.org.uk
Fri Jul 25 09:31:52 CEST 2014


On Fri, 2014-07-25 at 07:00 +0300, Siarhei Siamashka wrote:
> On Mon, 21 Jul 2014 20:31:30 +0100
> Ian Campbell <ijc at hellion.org.uk> wrote:
> 
> > On Fri, 2014-07-18 at 19:22 +0300, Siarhei Siamashka wrote:
> > > The sun5i hardware (Allwinner A13) introduced configurable MBUS clock speed.
> > > Allwinner A13 uses only 16-bit data bus width to connect the external DRAM,
> > > which is halved compared to the 32-bit data bus of sun4i (Allwinner A10), so
> > > it does not make much sense to clock a wider internal bus at a very high speed.
> > > The Allwinner A13 manual specifies 300 MHz MBUS clock speed limit and 533 MHz
> > > DRAM clock speed limit. Newer sun7i hardware (Allwinner A20) has a full width
> > > 32-bit external memory interface again, but still keeps the MBUS clock speed
> > > configurable. Clocking MBUS too low inhibits memory performance and one has
> > > to find the optimal MBUS/DRAM clock speed ratio, which may depend on many
> > > factors.
> > > 
> > > This patch introduces a new 'mbus_clock' parameter for the 'dram_para' struct
> > > and uses it as a desired MBUS clock speed target. If 'mbus_clock' is not set,
> > > 300 MHz is used by default to match the older hardcoded settings.
> > 
> > Nothing in this series seems to set it for any board -- is that
> > expected?
> 
> Yes. Not touching the board config files avoids any extra dependencies
> and merging conflicts.

Makes sense.

>  I could explicitly add ".mbus_clock = 300" to
> the Cubietruck 'dram_para' struct, but this is the default MBUS value
> anyway and makes no real difference.

Sure, no need unless you feel it.

> > When pll6 is viable you prefer the faster clock, even if it might happen
> > to be further from the requested clock, is that right? Or does all the
> > arithmetic end up with that never being the case?
> 
> The 'pll5p_rate' and 'pll6x_rate' values are always equal to or less
> than the requested 'mbus_clock'. Selecting the larger of these two will
> make it closer to the requested clock.

Makes sense. Can you write that in a comment please.

Ian.





More information about the U-Boot mailing list