All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko@sntech.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 12/13] armv7: support rk3066 early back to bootrom in start.S
Date: Fri, 09 Jun 2017 13:46:37 +0200	[thread overview]
Message-ID: <7090266.D1EBx59VzE@phil> (raw)
In-Reply-To: <4390d406-b0ac-da01-1a07-982b7b010c98@gmail.com>

Am Mittwoch, 7. Juni 2017, 17:37:13 CEST schrieb Paweł Jarosz:
> Hi Simon,
> 
> 
> W dniu 06.06.2017 o 23:10, Simon Glass pisze:
> > Hi Pawel,
> >
> > On 6 June 2017 at 12:53, Paweł Jarosz <paweljarosz3691@gmail.com> wrote:
> >> Rockchip bootrom first reads 1KB data from nand at offset 0x10080C00 and
> >> executes it. Then waits for back to bootrom and loads another 32KB to sram
> >> which also executes. Sdram initialisation code needs to be in one of these two
> >> steps. Then bootloader loads another ~200KB of data at offset 0x60000000
> >> and jumps to it.
> >>
> >> 32KB of data is a little low for tpl + spl part and ~200KB data is to low for
> >> u-boot part(for example to boot from mmc you need to disable usb support.
> >>
> >> My solution to size problem is to move sdram initialisation code to tpl stage,
> >> move spl part to third stage(reading 200KB data) and add support for loading
> >> u-boot by spl from ext2/4, fat partitions.
> >>
> >> But moving sdram initialisation code to tpl increases size of tpl above 1KB
> >> (first boot stage). Solution to this is to add code which will be below 1KB
> >> offset in tpl binary and do back to bootrom at very beginning of the tpl
> >> execution.
> > So do you mean that TPL starts and then loads more of itself? Why not
> > put SDRAM init in SPL? You say above that 32KB is 'too low', but It's
> > not clear why.
> Ad.1 No. Tpl starts and at the first execution returns to bootrom. 
> Bootrom then loads
> rest of the tpl (31KB) and executes it for a second time.
> 
> Ad.2,3 Due to size issues (200KB limit) i needed to move main u-boot to 
> mmc. To load u-boot from
> mmc by SPL (there is 32KB bootrom limit, not enough space for mmc 
> support) i moved SPL to sdram.
> Code executed in sdram can't mess with sdram settings because it will 
> hang the board. Sdram setup
> needs to be done by code in SRAM (tpl).

At least the rk3288-Firefly was able to also have mmc stack in the SPL in
the past, without requiring the back_to_bootrom at all. So question would
be why this doesn't fit anymore, or on the rk3066 specifically.

Also, it seems like I got my hands on a preliminary (linux/mtd) nand driver
(rk3228 but cursory glance at the registers suggests that it may actually
work on previous socs down to the rk3066 as well) and it may be possible
to adapt that for uboot, therefore making the spl able to also load the
full u-boot from without needing back_to_bootrom.


Heiko

  reply	other threads:[~2017-06-09 11:46 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06 18:48 [U-Boot] [PATCH 00/13] add support for rk3066 platform Paweł Jarosz
2017-06-06 18:48 ` [U-Boot] [PATCH 01/13] rockchip: rk3066: add grf header file Paweł Jarosz
2017-06-06 21:09   ` Simon Glass
2017-06-07 15:07     ` Paweł Jarosz
2017-06-25 23:23   ` [U-Boot] [U-Boot,01/13] " Philipp Tomsich
2017-06-06 18:49 ` [U-Boot] [PATCH 02/13] rockchip: rk3066: add rk3066 pinctrl driver Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-06-06 18:49 ` [U-Boot] [PATCH 03/13] rockchip: rk3066: add sysreset driver Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot,03/13] " Philipp Tomsich
2017-07-04 17:41   ` Philipp Tomsich
2017-07-07  3:59     ` Simon Glass
2017-06-06 18:50 ` [U-Boot] [PATCH 04/13] rockchip: rk3066: add clock driver for rk3066 soc Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-06-06 18:50 ` [U-Boot] [PATCH 05/13] rockchip: rk3066: add rk3066 platform devicetree file Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-07 15:12     ` Paweł Jarosz
2017-06-08 12:41       ` Heiko Stübner
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-07-04 17:43   ` Philipp Tomsich
2017-06-06 18:50 ` [U-Boot] [PATCH 06/13] rockchip: rk3066: add core support Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-07 15:22     ` Paweł Jarosz
2017-06-09 12:27       ` Simon Glass
2017-06-09 13:03         ` Paweł Jarosz
2017-06-12 23:50           ` Simon Glass
2017-06-14 12:15             ` Kever Yang
2017-06-15 14:57               ` Simon Glass
2017-06-15 15:41                 ` Paweł Jarosz
2017-06-15 15:59                   ` Simon Glass
2017-06-07  6:37   ` Andy Yan
2017-06-25 23:23   ` [U-Boot] [U-Boot,06/13] " Philipp Tomsich
2017-07-04 17:35   ` Philipp Tomsich
2017-08-09 19:54     ` Paweł Jarosz
2017-06-06 18:51 ` [U-Boot] [PATCH 07/13] rockchip: rk3066: add mk808 board files Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-07-04 17:43   ` Philipp Tomsich
2017-06-06 18:51 ` [U-Boot] [PATCH 08/13] rockchip: mmc: support rk3066 mmc Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-07  3:23     ` Kever Yang
2017-06-08  3:30       ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot,08/13] " Philipp Tomsich
2017-06-06 18:52 ` [U-Boot] [PATCH 09/13] rockchip: dts: set fifo mode as default for mmc Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-07-04 16:41   ` Philipp Tomsich
2017-06-06 18:52 ` [U-Boot] [PATCH 10/13] rockchip: rk3066: add sdram driver Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-07  3:14     ` Kever Yang
2017-06-25 23:23   ` [U-Boot] [U-Boot,10/13] " Philipp Tomsich
2017-07-04 16:18   ` Philipp Tomsich
2017-06-06 18:53 ` [U-Boot] [PATCH 11/13] rockchip: serial: support rockchip rk3066 Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-06-06 18:53 ` [U-Boot] [PATCH 12/13] armv7: support rk3066 early back to bootrom in start.S Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-07 15:37     ` Paweł Jarosz
2017-06-09 11:46       ` Heiko Stuebner [this message]
2017-06-09 12:31         ` Paweł Jarosz
2017-06-12 23:50           ` Simon Glass
2017-06-14 11:06             ` Simon Glass
2017-06-15  7:15               ` Paweł Jarosz
2017-06-15 14:50                 ` Simon Glass
2017-06-15 15:42                   ` Paweł Jarosz
2017-06-15 16:00                     ` Simon Glass
2017-06-15 16:32                       ` Paweł Jarosz
2017-06-15 16:40                         ` Simon Glass
2017-08-04 16:33                           ` Paweł Jarosz
2017-08-04 16:51                             ` Dr. Philipp Tomsich
2017-08-04 17:01                               ` Paweł Jarosz
2017-08-09 20:01                                 ` Dr. Philipp Tomsich
2017-08-09 20:08                                   ` Paweł Jarosz
2017-06-09 12:27       ` Simon Glass
2017-06-09 13:11         ` Paweł Jarosz
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich
2017-07-04 16:20   ` Philipp Tomsich
2017-06-06 18:53 ` [U-Boot] [PATCH 13/13] rockchip: rk3066: add sdram init code for tpl Paweł Jarosz
2017-06-06 21:10   ` Simon Glass
2017-06-07 15:44     ` Paweł Jarosz
2017-06-09 12:27       ` Simon Glass
2017-06-09 13:15         ` Paweł Jarosz
2017-06-12 23:50           ` Simon Glass
2017-06-25 23:23   ` [U-Boot] [U-Boot, " Philipp Tomsich

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=7090266.D1EBx59VzE@phil \
    --to=heiko@sntech.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.