From: Fabio Estevam <festevam@gmail.com>
To: Giorgio Dal Molin <giorgio.nicole@arcor.de>
Cc: Barebox List <barebox@lists.infradead.org>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: Re: reset / watchdog on an imx7d soc
Date: Mon, 29 Jun 2020 13:39:31 -0300 [thread overview]
Message-ID: <CAOMZO5Cxa6Yk-uWUummRhNVQbLHvduCZQM9djxXNG683GQ4gRw@mail.gmail.com> (raw)
In-Reply-To: <1036676243.111725.1593448425601@mail.vodafone.de>
Hi Giorgio,
On Mon, Jun 29, 2020 at 1:33 PM Giorgio Dal Molin
<giorgio.nicole@arcor.de> wrote:
> U-Boot configures the ddr3 with c code in its board code 'lowlevel.c'.
> Looking at the code I noticed this special treatment:
>
> static void spl_dram_init(void)
> {
> ...
> /*
> * Make sure that both aresetn/core_ddrc_rstn and preset/PHY reset
> * bits are set after WDOG reset event. DDRC_PRST can only be
> * released when DDRC clock inputs are stable for at least 30 cycles.
> */
> writel(SRC_DDRC_RCR_DDRC_CORE_RST_MASK | SRC_DDRC_RCR_DDRC_PRST_MASK, &src_regs->ddrc_rcr);
> udelay(500);
> ...
>
> This writel() set both reset bits, the DDRC_CORE (0x2) and the DDRC_PRST (0x1) of the SRC
> register 0x30391000.
> Unfortunately, if I try also to set both bits in my DCD table then barebox doesn't boot anymore;
> I also tried to port the uboot spl_dram_init(void) to my barebox lowlevel.c and I could eventually
> boot barebox with an empty DCD but still adding the second bit (SRC_DDRC_RCR_DDRC_PRST_MASK)
> hangs the soc.
Does it help if you try to apply this U-Boot commit to Barebox?
https://gitlab.denx.de/u-boot/u-boot/-/commit/0e06d63d195670f5181958f43216d7106c05357f
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2020-06-29 16:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-23 13:45 Giorgio Dal Molin
2020-06-23 13:53 ` Fabio Estevam
2020-06-23 15:11 ` Giorgio Dal Molin
2020-06-29 8:44 ` Ahmad Fatoum
2020-06-29 10:53 ` Giorgio Dal Molin
2020-06-29 13:30 ` Ahmad Fatoum
2020-06-29 15:30 ` Giorgio Dal Molin
2020-06-29 15:35 ` Ahmad Fatoum
2020-06-29 16:03 ` Giorgio Dal Molin
2020-06-29 16:11 ` Ahmad Fatoum
2020-06-29 16:33 ` Giorgio Dal Molin
2020-06-29 16:39 ` Fabio Estevam [this message]
2020-07-01 9:52 ` Giorgio Dal Molin
2020-07-02 9:25 ` Ahmad Fatoum
2020-07-02 14:51 ` Giorgio Dal Molin
2020-07-02 15:28 ` Giorgio Dal Molin
2020-07-02 16:05 ` Lucas Stach
2020-07-03 14:13 ` Giorgio Dal Molin
2020-07-02 16:24 ` Fabio Estevam
2020-07-07 5:52 ` Giorgio Dal Molin
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=CAOMZO5Cxa6Yk-uWUummRhNVQbLHvduCZQM9djxXNG683GQ4gRw@mail.gmail.com \
--to=festevam@gmail.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=giorgio.nicole@arcor.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