[PATCH v3 29/49] rockchip: Enable building a SPI ROM image on bob

Simon Glass sjg at chromium.org
Thu Jul 16 17:44:10 CEST 2020


Hi Jagan,

On Wed, 15 Jul 2020 at 13:14, Jagan Teki <jagan at amarulasolutions.com> wrote:
>
> Hi Simon,
>
> On Thu, Jul 16, 2020 at 12:10 AM Simon Glass <sjg at chromium.org> wrote:
> >
> > Hi Jagan,
> >
> > On Mon, 13 Jul 2020 at 09:36, Jagan Teki <jagan at amarulasolutions.com> wrote:
> > >
> > > On Fri, Jul 10, 2020 at 6:11 AM Simon Glass <sjg at chromium.org> wrote:
> > > >
> > > > Add a simple binman config and enable CONFIG_HAS_ROM so that U-Boot
> > > > produces a ROM for bob.
> > > >
> > > > Signed-off-by: Simon Glass <sjg at chromium.org>
> > > > ---
> > > >
> > > > (no changes since v1)
> > > >
> > > >  arch/arm/dts/rk3399-gru-u-boot.dtsi   |  4 ++++
> > > >  arch/arm/dts/rk3399-gru.dtsi          |  2 +-
> > > >  arch/arm/dts/rk3399-u-boot.dtsi       | 27 +++++++++++++++++++++++++++
> > > >  arch/arm/mach-rockchip/rk3399/Kconfig |  1 +
> > > >  4 files changed, 33 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/arch/arm/dts/rk3399-gru-u-boot.dtsi b/arch/arm/dts/rk3399-gru-u-boot.dtsi
> > > > index 7bddc3acdb..390ac2bb5a 100644
> > > > --- a/arch/arm/dts/rk3399-gru-u-boot.dtsi
> > > > +++ b/arch/arm/dts/rk3399-gru-u-boot.dtsi
> > > > @@ -4,3 +4,7 @@
> > > >   */
> > > >
> > > >  #include "rk3399-u-boot.dtsi"
> > > > +
> > > > +&spi_flash {
> > > > +       u-boot,dm-pre-reloc;
> > > > +};
> > > > diff --git a/arch/arm/dts/rk3399-gru.dtsi b/arch/arm/dts/rk3399-gru.dtsi
> > > > index 7ac88392f2..f9c5bb607b 100644
> > > > --- a/arch/arm/dts/rk3399-gru.dtsi
> > > > +++ b/arch/arm/dts/rk3399-gru.dtsi
> > > > @@ -537,7 +537,7 @@ ap_i2c_audio: &i2c8 {
> > > >         pinctrl-names = "default", "sleep";
> > > >         pinctrl-1 = <&spi1_sleep>;
> > > >
> > > > -       spiflash at 0 {
> > > > +       spi_flash: spiflash at 0 {
> > > >                 compatible = "jedec,spi-nor";
> > > >                 reg = <0>;
> > > >
> > > > diff --git a/arch/arm/dts/rk3399-u-boot.dtsi b/arch/arm/dts/rk3399-u-boot.dtsi
> > > > index 8237782408..a76bbea730 100644
> > > > --- a/arch/arm/dts/rk3399-u-boot.dtsi
> > > > +++ b/arch/arm/dts/rk3399-u-boot.dtsi
> > > > @@ -4,11 +4,14 @@
> > > >   */
> > > >  #define USB_CLASS_HUB                  9
> > > >
> > > > +#include "rockchip-u-boot.dtsi"
> > > > +
> > > >  / {
> > > >         aliases {
> > > >                 mmc0 = &sdhci;
> > > >                 mmc1 = &sdmmc;
> > > >                 pci0 = &pcie0;
> > > > +               spi1 = &spi1;
> > > >         };
> > > >
> > > >         cic: syscon at ff620000 {
> > > > @@ -57,6 +60,30 @@
> > > >
> > > >  };
> > > >
> > > > +#ifdef CONFIG_HAS_ROM
> > > > +&binman {
> > > > +       rom {
> > > > +               filename = "u-boot.rom";
> > > > +               size = <0x400000>;
> > > > +               pad-byte = <0xff>;
> > > > +
> > > > +               mkimage {
> > > > +                       args = "-n rk3399 -T rkspi";
> > > > +                       u-boot-spl {
> > > > +                       };
> > > > +               };
> > >
> > > How could attach u-boot-spl for TPL builds where TPL has to args with
> > > ROM header. right now we are doing in a monolithic way.
> > >
> > > ./tools/mkimage -n rk3399 -T rkspi -d
> > > tpl/u-boot-tpl.bin:spl/u-boot-spl.bin idbloader.img
> >
> > I don't really follow this question and I have read it many times over
> > the past few days,
>
> Sorry for the confusion. What I'm trying to ask here is about binman
> node syntax for TPL based images?

OK, that would be:

mkimage {
   args = "-n rk3399 -T rkspi";
   u-boot-tpl {
   };
};

Regards,
Simon


More information about the U-Boot mailing list