From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 13/14] sun8i: Add dram initialization support
Date: Mon, 22 Dec 2014 09:43:38 +0200 [thread overview]
Message-ID: <20141222094338.212f1fca@i7> (raw)
In-Reply-To: <54945AED.3090904@redhat.com>
On Fri, 19 Dec 2014 18:05:49 +0100
Hans de Goede <hdegoede@redhat.com> wrote:
> Hi,
>
> On 19-12-14 11:20, Siarhei Siamashka wrote:
> > On Tue, 16 Dec 2014 21:31:38 +0100
> > Hans de Goede <hdegoede@redhat.com> wrote:
> >
> >> Based on the register / dram_para headers from the Allwinner u-boot / linux
> >> sources + the init sequences from boot0.
> >
> > Can the commit message have more detailed information about the precise
> > location of the original Allwinner code, which was used as the
> > reference?
>
> No, it cannot because no code was referenced, I traced the boot0 binary to
> figure out what was needed to get dram going on the A23.
Thanks for explaining. And good job extracting all the information
from there.
In this case, can we have a clear reference to this binary in the
commit message? It might be useful to have a look at objdump logs
when reviewing your patch.
[...]
> >> +++ b/arch/arm/cpu/armv7/sunxi/dram_sun8i.c
> >> @@ -0,0 +1,340 @@
> >> +/*
> >> + * Sun8i platform dram controller init.
> >> + *
> >> + * (C) Copyright 2014 Hans de Goede <hdegoede@redhat.com>
> >
> > Is Allwinner copyright really not necessary here?
> >
> >> + * SPDX-License-Identifier: GPL-2.0+
> >> + */
> >> +
> >> +/*
> >> + * Note this code uses a lot of magic hex values, that is because this code
> >> + * simply replays the init sequence as done by the Allwinner boot0 code, so
> >> + * we do not know what these values mean. There are no symbolic constants for
> >> + * these magic values, since we do not know how to name them and making up
> >> + * names for them is not useful.
> >> + */
> >
> > You are well aware of this documentation since a long time ago, right?
> > http://www.ti.com/lit/ug/spruhn7a/spruhn7a.pdf
>
> I'm aware you've used various sources to figure out more about the A10
> dram controller, since this DRAM controller seems significantly different
> I assumed your sources would not apply, it is good to hear that they do.
I wonder how could you have ended up with this strange assumption?
When I clearly told you that "It looks like the Allwinner A31 DRAM
controller registers are very similar to what is used in RK3288" and
provided the links to the relevant sources and documentation back
in September:
http://lists.denx.de/pipermail/u-boot/2014-September/189199.html
Then reminded yet again about this RK3288 similarity and used the
mctl_phy->ptr0 register as an example:
http://lists.denx.de/pipermail/u-boot/2014-December/198582.html
When we were discussing the A31 DRAM controller, of course you should
have expected the information about A31.
Yes, A23 was not a part of the picture at that time. However comparing
its registers with the information from spruhn7a.pdf and various
Rockchip source code drops is a very natural thing to try.
So far the best matching pairs (almost 100% identical PHY) are:
Allwinner A10 (sun4i) - RK29xx
Allwinner A31 (sun6i) - RK3288
Allwinner A23 (sun8i) - TI Keystone2
It's all the same family of DRAM controllers, very likely just
different revisions/generations from the same supplier. I don't
expect A80 or other Allwinner chips to be any different.
[...]
> >> + else
> >> + writel(0x1000040b, &mctl_phy->dcr);
> >
> > The bit 28 is marked as reserved and "Reads return zeros" in the
> > TI Keystone2 documentation. It's a nice chance to test whether
> > this write has any effect and whether it does modify the register.
>
> It modifies the register, so that means that at least that bit does
> not match the TI Keystone2 documentation.
OK.
--
Best regards,
Siarhei Siamashka
next prev parent reply other threads:[~2014-12-22 7:43 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-16 20:31 [U-Boot] [PATCH 01/14] sun6i: s/SUNXI_GPL0_R_P2WI/SUN6I_GPL0_R_P2WI/ Hans de Goede
2014-12-16 20:31 ` [U-Boot] [PATCH 02/14] sunxi: Add support for the rsb (Reduced Serial Bus) Hans de Goede
2014-12-17 2:22 ` Chen-Yu Tsai
2014-12-17 12:56 ` Hans de Goede
2014-12-18 18:57 ` Ian Campbell
2014-12-18 18:59 ` Ian Campbell
2014-12-19 15:26 ` Hans de Goede
2014-12-16 20:31 ` [U-Boot] [PATCH 03/14] sunxi: axp221: Add axp223 support Hans de Goede
2014-12-17 2:34 ` Chen-Yu Tsai
2014-12-18 10:44 ` Hans de Goede
2014-12-18 19:00 ` Ian Campbell
2014-12-16 20:31 ` [U-Boot] [PATCH 04/14] sunxi: axp221: Add Kconfig help and sane defaults for typical ldo usage Hans de Goede
2014-12-18 19:02 ` Ian Campbell
2014-12-16 20:31 ` [U-Boot] [PATCH 05/14] sunxi: axp221: Make dcdc1 voltage configurable Hans de Goede
2014-12-18 19:03 ` Ian Campbell
2014-12-16 20:31 ` [U-Boot] [PATCH 06/14] sunxi: axp221: Explicitly turn off unused voltages Hans de Goede
2014-12-18 19:04 ` Ian Campbell
2014-12-16 20:31 ` [U-Boot] [PATCH 07/14] sunxi: axp221: Disable dcdc4 on sun8i (A23) Hans de Goede
2014-12-18 19:05 ` Ian Campbell
2014-12-16 20:31 ` [U-Boot] [PATCH 08/14] sun6i: Add a sigma_delta_enable paramter to clock_set_pll5() Hans de Goede
2014-12-18 19:07 ` Ian Campbell
2014-12-19 10:02 ` Siarhei Siamashka
2014-12-16 20:31 ` [U-Boot] [PATCH 09/14] sun6i: Add k and m parameters " Hans de Goede
2014-12-18 19:07 ` Ian Campbell
2014-12-19 10:03 ` Siarhei Siamashka
2014-12-19 16:40 ` Hans de Goede
2014-12-22 7:25 ` Siarhei Siamashka
2014-12-16 20:31 ` [U-Boot] [PATCH 10/14] sunxi: Move await_completion dram helper to dram.h Hans de Goede
2014-12-18 19:08 ` Ian Campbell
2014-12-19 10:06 ` Siarhei Siamashka
2014-12-19 16:42 ` Hans de Goede
2014-12-22 7:28 ` Siarhei Siamashka
2014-12-16 20:31 ` [U-Boot] [PATCH 11/14] sunxi: Fill memory before comparing it when doing dram init on sun6i Hans de Goede
2014-12-18 19:12 ` Ian Campbell
2014-12-19 10:08 ` Siarhei Siamashka
2014-12-19 16:56 ` Hans de Goede
2014-12-22 7:39 ` Siarhei Siamashka
2014-12-19 16:55 ` Hans de Goede
2014-12-22 14:19 ` Ian Campbell
2014-12-22 14:32 ` Siarhei Siamashka
2014-12-22 14:34 ` Ian Campbell
2014-12-22 15:47 ` Hans de Goede
2014-12-16 20:31 ` [U-Boot] [PATCH 12/14] sunxi: Use memcmp for mctl_mem_matches Hans de Goede
2014-12-18 19:13 ` Ian Campbell
2014-12-16 20:31 ` [U-Boot] [PATCH 13/14] sun8i: Add dram initialization support Hans de Goede
2014-12-18 11:12 ` Chen-Yu Tsai
2014-12-18 19:17 ` Ian Campbell
2014-12-19 16:51 ` Hans de Goede
2014-12-19 10:20 ` Siarhei Siamashka
2014-12-19 17:05 ` Hans de Goede
2014-12-22 7:43 ` Siarhei Siamashka [this message]
2014-12-16 20:31 ` [U-Boot] [PATCH 14/14] sun8i: Add defconfig for Ippo_q8h v1.2 Hans de Goede
2014-12-18 19:19 ` Ian Campbell
2014-12-18 18:56 ` [U-Boot] [PATCH 01/14] sun6i: s/SUNXI_GPL0_R_P2WI/SUN6I_GPL0_R_P2WI/ Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141222094338.212f1fca@i7 \
--to=siarhei.siamashka@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox