linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Troy Benjegerdes <troy.benjegerdes@sifive.com>
To: Anup Patel <Anup.Patel@wdc.com>
Cc: "jamez@wit.com" <jamez@wit.com>,
	"palmer@sifive.com" <palmer@sifive.com>,
	Atish Patra <Atish.Patra@wdc.com>,
	"Auer, Lukas" <lukas.auer@aisec.fraunhofer.de>,
	"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
	"linux-riscv@lists.infradead.org"
	<linux-riscv@lists.infradead.org>,
	"jcarr@wit.com" <jcarr@wit.com>,
	"bjorn.topel@gmail.com" <bjorn.topel@gmail.com>
Subject: Re: 5.2-rc1 boot on Unleashed
Date: Sat, 25 May 2019 11:23:40 -0500	[thread overview]
Message-ID: <E5768027-0690-449C-91E7-BD9CBC78B0B2@sifive.com> (raw)
In-Reply-To: <MN2PR04MB606103F231BC76C345446A858D030@MN2PR04MB6061.namprd04.prod.outlook.com>



> On May 24, 2019, at 10:49 PM, Anup Patel <Anup.Patel@wdc.com> wrote:
> 
> 
> 
>> -----Original Message-----
>> From: Auer, Lukas <lukas.auer@aisec.fraunhofer.de>
>> Sent: Saturday, May 25, 2019 3:05 AM
>> To: Atish Patra <Atish.Patra@wdc.com>; troy.benjegerdes@sifive.com
>> Cc: paul.walmsley@sifive.com; linux-riscv@lists.infradead.org;
>> jamez@wit.com; palmer@sifive.com; Anup Patel <Anup.Patel@wdc.com>;
>> bjorn.topel@gmail.com; jcarr@wit.com
>> Subject: Re: 5.2-rc1 boot on Unleashed
>> 
>> On Fri, 2019-05-24 at 13:48 -0500, Troy Benjegerdes wrote:
>>> Would a reasonable answer be two device trees, one for M-mode and
>> another for S-mode?
>>> 
>>> This would let us easily keep synced with the kernel version
>>> 
>> 
>> That makes sense, I wasn't aware of the DDR init data in the device tree. It's
>> great to see that you are working on adding support for the DDR controller to
>> U-Boot!
>> 
>> That would work, but probably takes more effort to maintain than is needed.
>> For situations like this, where the U-Boot device tree requires a few
>> additional entries compared with the kernel device tree, U-Boot provides a
>> useful function. It automatically includes [board-dts]-u- boot.dtsi in the
>> compiled device tree, where [board-dts].dts is specified in the defconfig. In
>> this case, we can directly use hifive- unleashed-a00-fu540.dts from the
>> kernel and add a hifive-unleashed-a00- fu540-u-boot.dtsi with the DDR
>> controller entries. Since they are only needed in machine mode, we can use
>> ifdefs to remove them in supervisor mode builds.
> 
> Based on our previous discussion on U-Boot mailing list, Lukas had suggest
> very nice boot-flow for U-Boot which is as follows:
> 
> ZSBL -> U-Boot SPL (M-Mode)->OpenSBI/BBL->U-Boot(S-Mode)->Linux.
> 
> The U-Boot SPL above will:
> 1. Run from internal SRAM
> 2. Will do DDR init
> 3. Ethernet PHY reset using GPIO

Right now I am able do all of the above (although without a proper GPIO driver) 

What I’d like to get working before submitting patches is loading BBL/OpenSBI and a payload
(either the kernel directly, or U-boot(S-Mode) via TFTP. I suspect some kind of issue with
the ring buffer being in SRAM and/or a clocking init problem, as this is what I get:

U-Boot 2019.07-rc2-00202-g814bfda9a6 (May 24 2019 - 10:24:26 -0500)

CPU:   rv64imac
DRAM:  dram_init() start
dram_init() end
8 GiB
MMC:   
In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet@10090000
Hit any key to stop autoboot:  0 
ethernet@10090000: PHY present at 0
ethernet@10090000: Starting autonegotiation...
ethernet@10090000: Autonegotiation complete
ethernet@10090000: link up, 1000Mbps full-duplex (lpa: 0x7800)
BOOTP broadcast 1
ethernet@10090000: TX timeout


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2019-05-25 16:25 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 23:31 5.2-rc1 boot on Unleashed Atish Patra
2019-05-21  9:40 ` Andreas Schwab
2019-05-21 18:14   ` Atish Patra
2019-05-22  7:31     ` Andreas Schwab
2019-05-22  8:40     ` Andreas Schwab
2019-05-22  9:58     ` Andreas Schwab
2019-05-22 21:13       ` Paul Walmsley
2019-05-21 17:47 ` Kevin Hilman
2019-05-21 18:18   ` Atish Patra
2019-05-23  9:42     ` Andreas Schwab
2019-05-22  4:42 ` Sagar Kadam
2019-05-22  9:51   ` Atish Patra
2019-05-22 16:42 ` Paul Walmsley
2019-05-22 17:38   ` Atish Patra
2019-05-22 20:43     ` Paul Walmsley
2019-05-22 22:14       ` Troy Benjegerdes
2019-05-25  8:06         ` Anup Patel
2019-05-25 14:16           ` Troy Benjegerdes
2019-05-29  5:00             ` Anup Patel
2019-05-29  8:31               ` Andreas Schwab
2019-05-29 17:38                 ` Troy Benjegerdes
2019-05-29 18:59                   ` Karsten Merker
2019-05-30 17:00                     ` Palmer Dabbelt
2019-06-03 10:49                     ` Andreas Schwab
2019-06-03 14:44                       ` Distro bootcmd: " Troy Benjegerdes
2019-06-03 17:02                         ` [U-Boot] " Tom Rini
2019-06-03 19:17                           ` Palmer Dabbelt
2019-06-03 19:32                             ` Tom Rini
2019-06-03 19:47                           ` Troy Benjegerdes
2019-05-24  0:23       ` Troy Benjegerdes
2019-05-24  3:59         ` Atish Patra
2019-05-24 14:46           ` Troy Benjegerdes
2019-05-24 15:35             ` Auer, Lukas
2019-05-24 16:01               ` Troy Benjegerdes
2019-05-24 17:40                 ` Atish Patra
     [not found]                   ` <CAF5mof3_PSwpsSMnjMALpfvmOPdeAgDLa2p6jp4y+Hmas83mbw@mail.gmail.com>
2019-05-24 21:34                     ` Auer, Lukas
2019-05-25  3:49                       ` Anup Patel
2019-05-25 16:23                         ` Troy Benjegerdes [this message]
2019-05-25 18:09             ` Paul Walmsley
2019-05-25 18:40               ` Troy Benjegerdes
2019-05-27 12:21                 ` Andreas Schwab
2019-05-27 16:51                   ` Troy Benjegerdes

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=E5768027-0690-449C-91E7-BD9CBC78B0B2@sifive.com \
    --to=troy.benjegerdes@sifive.com \
    --cc=Anup.Patel@wdc.com \
    --cc=Atish.Patra@wdc.com \
    --cc=bjorn.topel@gmail.com \
    --cc=jamez@wit.com \
    --cc=jcarr@wit.com \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lukas.auer@aisec.fraunhofer.de \
    --cc=palmer@sifive.com \
    --cc=paul.walmsley@sifive.com \
    /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;
as well as URLs for NNTP newsgroup(s).