diff mbox series

[v3,5/9] board: qualcomm: Add support for dragonboard845c

Message ID 20220712071212.2188390-6-sumit.garg@linaro.org
State Accepted
Commit d35b2113745dca34f1557cfad394e6ea79531f2b
Headers show
Series New boards support: db845c and qcs404-evb | expand

Commit Message

Sumit Garg July 12, 2022, 7:12 a.m. UTC
Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
platform. This board complies with 96Boards Open Platform Specifications.

Features:
- Qualcomm Snapdragon SDA845 SoC
- 4GiB RAM
- 64GiB UFS drive

U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
For detailed build and boot instructions, refer to
doc/board/qualcomm/sdm845.rst, board: dragonboard845c.

Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
---
 arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
 arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
 arch/arm/mach-snapdragon/Kconfig              |  14 +++
 board/qualcomm/dragonboard845c/Kconfig        |  12 +++
 board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
 board/qualcomm/dragonboard845c/Makefile       |   9 ++
 board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
 .../dragonboard845c/dragonboard845c.c         |   9 ++
 configs/dragonboard845c_defconfig             |  28 +++++
 doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
 include/configs/dragonboard845c.h             |  28 +++++
 11 files changed, 337 insertions(+), 13 deletions(-)
 create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
 create mode 100644 arch/arm/dts/dragonboard845c.dts
 create mode 100644 board/qualcomm/dragonboard845c/Kconfig
 create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
 create mode 100644 board/qualcomm/dragonboard845c/Makefile
 create mode 100644 board/qualcomm/dragonboard845c/db845c.its
 create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
 create mode 100644 configs/dragonboard845c_defconfig
 create mode 100644 include/configs/dragonboard845c.h

Comments

Tom Rini July 25, 2022, 9:21 p.m. UTC | #1
On Tue, Jul 12, 2022 at 12:42:08PM +0530, Sumit Garg wrote:

> Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> platform. This board complies with 96Boards Open Platform Specifications.
> 
> Features:
> - Qualcomm Snapdragon SDA845 SoC
> - 4GiB RAM
> - 64GiB UFS drive
> 
> U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> For detailed build and boot instructions, refer to
> doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
> 
> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

Applied to u-boot/master, thanks!
Simon Glass Aug. 23, 2023, 11:57 p.m. UTC | #2
Hi Sumit,

On Tue, 12 Jul 2022 at 01:12, Sumit Garg <sumit.garg@linaro.org> wrote:
>
> Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> platform. This board complies with 96Boards Open Platform Specifications.
>
> Features:
> - Qualcomm Snapdragon SDA845 SoC
> - 4GiB RAM
> - 64GiB UFS drive
>
> U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> For detailed build and boot instructions, refer to
> doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
>
> Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> ---
>  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
>  arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
>  arch/arm/mach-snapdragon/Kconfig              |  14 +++
>  board/qualcomm/dragonboard845c/Kconfig        |  12 +++
>  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
>  board/qualcomm/dragonboard845c/Makefile       |   9 ++
>  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
>  .../dragonboard845c/dragonboard845c.c         |   9 ++
>  configs/dragonboard845c_defconfig             |  28 +++++
>  doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
>  include/configs/dragonboard845c.h             |  28 +++++
>  11 files changed, 337 insertions(+), 13 deletions(-)
>  create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
>  create mode 100644 arch/arm/dts/dragonboard845c.dts
>  create mode 100644 board/qualcomm/dragonboard845c/Kconfig
>  create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
>  create mode 100644 board/qualcomm/dragonboard845c/Makefile
>  create mode 100644 board/qualcomm/dragonboard845c/db845c.its
>  create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
>  create mode 100644 configs/dragonboard845c_defconfig
>  create mode 100644 include/configs/dragonboard845c.h
>
[..]

> diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
> index b6642c9579..8ef4749287 100644
> --- a/doc/board/qualcomm/sdm845.rst
> +++ b/doc/board/qualcomm/sdm845.rst
> @@ -35,9 +35,25 @@ Pack android boot image
>  ^^^^^^^^^^^^^^^^^^^^^^^
>  We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
>  and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
> -with appended dtb, so let's mimic linux to satisfy stock bootloader:
> +with appended dtb, so let's mimic linux to satisfy stock bootloader.
>

[..]

> +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
> +the Qualcomm SDM845 SoC.
> +
> +Steps:
> +
> +- Build u-boot::
> +
> +       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
> +       $ make dragonboard845c_defconfig
> +       $ make
> +
> +- Create dummy dtb::
> +
> +       workdir=/tmp/prepare_payload
> +       mkdir -p "$workdir"
> +       mock_dtb="$workdir"/payload_mock.dtb
> +
> +       dtc -I dts -O dtb -o "$mock_dtb" << EOF
> +       /dts-v1/;
> +       / {
> +               #address-cells = <2>;
> +               #size-cells = <2>;
> +
> +               memory@80000000 {
> +                       device_type = "memory";
> +                       /* We expect the bootloader to fill in the size */
> +                       reg = <0 0x80000000 0 0>;
> +               };
> +
> +               chosen { };
> +       };
> +       EOF
> +
> +- gzip u-boot::
> +
> +       gzip u-boot.bin
> +
> +- Append dtb to gzipped u-boot::
> +
> +        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
> +
> +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
> +  directory. It expects a folder as ``db845c_imgs/`` in the main directory
> +  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
> +  for full path to images::
> +
> +       mkimage -f db845c.its db845c.itb
> +
> +- Now we've got everything to build android boot image::
> +
> +       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
> +       --output boot.img --pagesize 4096 --base 0x80000000
> +
> +- Flash boot.img using db845c fastboot method.

What command should be used here? I can run 'fastboot devices' but am
not sure what command to use to flash U-Boot.

Also, is it possible to flash U-Boot as a first-stage bootloader?

> +
> +More information can be found on the `DragonBoard 845c page`_.
>
>  .. _Samsung S9 page: https://en.wikipedia.org/wiki/Samsung_Galaxy_S9
> +.. _DragonBoard 845c page: https://www.96boards.org/product/rb3-platform/
> diff --git a/include/configs/dragonboard845c.h b/include/configs/dragonboard845c.h
> new file mode 100644
> index 0000000000..108dde199b
> --- /dev/null
> +++ b/include/configs/dragonboard845c.h
> @@ -0,0 +1,28 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Configuration file for Dragonboard 845c, based on Qualcomm SDA845 chip
> + *
> + * (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
> + */
> +
> +#ifndef __CONFIGS_SDM845_H
> +#define __CONFIGS_SDM845_H
> +
> +#include <linux/sizes.h>
> +#include <asm/arch/sysmap-sdm845.h>
> +
> +#define CONFIG_SYS_BAUDRATE_TABLE      { 115200, 230400, 460800, 921600 }
> +
> +#define CONFIG_EXTRA_ENV_SETTINGS \
> +       "bootm_size=0x5000000\0"        \
> +       "bootm_low=0x80000000\0"        \
> +       "bootcmd=bootm $prevbl_initrd_start_addr\0"
> +
> +/* Size of malloc() pool */
> +#define CONFIG_SYS_BOOTM_LEN   SZ_64M
> +
> +/* Monitor Command Prompt */
> +#define CONFIG_SYS_CBSIZE      512
> +#define CONFIG_SYS_MAXARGS     64
> +
> +#endif
> --
> 2.25.1
>

Regards,
Simon
Sumit Garg Aug. 24, 2023, 10:43 a.m. UTC | #3
Hi Simon,

On Thu, 24 Aug 2023 at 05:29, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Sumit,
>
> On Tue, 12 Jul 2022 at 01:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> >
> > Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> > platform. This board complies with 96Boards Open Platform Specifications.
> >
> > Features:
> > - Qualcomm Snapdragon SDA845 SoC
> > - 4GiB RAM
> > - 64GiB UFS drive
> >
> > U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> > For detailed build and boot instructions, refer to
> > doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
> >
> > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> > ---
> >  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
> >  arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
> >  arch/arm/mach-snapdragon/Kconfig              |  14 +++
> >  board/qualcomm/dragonboard845c/Kconfig        |  12 +++
> >  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
> >  board/qualcomm/dragonboard845c/Makefile       |   9 ++
> >  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
> >  .../dragonboard845c/dragonboard845c.c         |   9 ++
> >  configs/dragonboard845c_defconfig             |  28 +++++
> >  doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
> >  include/configs/dragonboard845c.h             |  28 +++++
> >  11 files changed, 337 insertions(+), 13 deletions(-)
> >  create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
> >  create mode 100644 arch/arm/dts/dragonboard845c.dts
> >  create mode 100644 board/qualcomm/dragonboard845c/Kconfig
> >  create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
> >  create mode 100644 board/qualcomm/dragonboard845c/Makefile
> >  create mode 100644 board/qualcomm/dragonboard845c/db845c.its
> >  create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
> >  create mode 100644 configs/dragonboard845c_defconfig
> >  create mode 100644 include/configs/dragonboard845c.h
> >
> [..]
>
> > diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
> > index b6642c9579..8ef4749287 100644
> > --- a/doc/board/qualcomm/sdm845.rst
> > +++ b/doc/board/qualcomm/sdm845.rst
> > @@ -35,9 +35,25 @@ Pack android boot image
> >  ^^^^^^^^^^^^^^^^^^^^^^^
> >  We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
> >  and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
> > -with appended dtb, so let's mimic linux to satisfy stock bootloader:
> > +with appended dtb, so let's mimic linux to satisfy stock bootloader.
> >
>
> [..]
>
> > +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
> > +the Qualcomm SDM845 SoC.
> > +
> > +Steps:
> > +
> > +- Build u-boot::
> > +
> > +       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
> > +       $ make dragonboard845c_defconfig
> > +       $ make
> > +
> > +- Create dummy dtb::
> > +
> > +       workdir=/tmp/prepare_payload
> > +       mkdir -p "$workdir"
> > +       mock_dtb="$workdir"/payload_mock.dtb
> > +
> > +       dtc -I dts -O dtb -o "$mock_dtb" << EOF
> > +       /dts-v1/;
> > +       / {
> > +               #address-cells = <2>;
> > +               #size-cells = <2>;
> > +
> > +               memory@80000000 {
> > +                       device_type = "memory";
> > +                       /* We expect the bootloader to fill in the size */
> > +                       reg = <0 0x80000000 0 0>;
> > +               };
> > +
> > +               chosen { };
> > +       };
> > +       EOF
> > +
> > +- gzip u-boot::
> > +
> > +       gzip u-boot.bin
> > +
> > +- Append dtb to gzipped u-boot::
> > +
> > +        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
> > +
> > +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
> > +  directory. It expects a folder as ``db845c_imgs/`` in the main directory
> > +  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
> > +  for full path to images::
> > +
> > +       mkimage -f db845c.its db845c.itb
> > +
> > +- Now we've got everything to build android boot image::
> > +
> > +       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
> > +       --output boot.img --pagesize 4096 --base 0x80000000
> > +
> > +- Flash boot.img using db845c fastboot method.
>
> What command should be used here? I can run 'fastboot devices' but am
> not sure what command to use to flash U-Boot.
>

At the time of writing this doc, I thought it was understood how to
flash boot.img on db845c. But I will make that more explicit. Since
u-boot has to be chain loaded by ABL, the command to flash boot.img
(containing u-boot) is as follows:

sudo fastboot flash boot boot.img

> Also, is it possible to flash U-Boot as a first-stage bootloader?
>

That's not possible currently due to Qcom proprietary bootloader being
used. But there were plans to replace atleast ABL with u-boot (See
slide 9 from this Linaro connect Qcom keynote [1]). I hope that will
materialize soon.

[1] https://resources.linaro.org/en/resource/necH5bQcfrhCCkjSGHXJyA

-Sumit

> > +
> > +More information can be found on the `DragonBoard 845c page`_.
> >
> >  .. _Samsung S9 page: https://en.wikipedia.org/wiki/Samsung_Galaxy_S9
> > +.. _DragonBoard 845c page: https://www.96boards.org/product/rb3-platform/
> > diff --git a/include/configs/dragonboard845c.h b/include/configs/dragonboard845c.h
> > new file mode 100644
> > index 0000000000..108dde199b
> > --- /dev/null
> > +++ b/include/configs/dragonboard845c.h
> > @@ -0,0 +1,28 @@
> > +/* SPDX-License-Identifier: GPL-2.0+ */
> > +/*
> > + * Configuration file for Dragonboard 845c, based on Qualcomm SDA845 chip
> > + *
> > + * (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
> > + */
> > +
> > +#ifndef __CONFIGS_SDM845_H
> > +#define __CONFIGS_SDM845_H
> > +
> > +#include <linux/sizes.h>
> > +#include <asm/arch/sysmap-sdm845.h>
> > +
> > +#define CONFIG_SYS_BAUDRATE_TABLE      { 115200, 230400, 460800, 921600 }
> > +
> > +#define CONFIG_EXTRA_ENV_SETTINGS \
> > +       "bootm_size=0x5000000\0"        \
> > +       "bootm_low=0x80000000\0"        \
> > +       "bootcmd=bootm $prevbl_initrd_start_addr\0"
> > +
> > +/* Size of malloc() pool */
> > +#define CONFIG_SYS_BOOTM_LEN   SZ_64M
> > +
> > +/* Monitor Command Prompt */
> > +#define CONFIG_SYS_CBSIZE      512
> > +#define CONFIG_SYS_MAXARGS     64
> > +
> > +#endif
> > --
> > 2.25.1
> >
>
> Regards,
> Simon
Simon Glass Aug. 28, 2023, 5:54 p.m. UTC | #4
Hi Sumit,

On Thu, 24 Aug 2023 at 04:44, Sumit Garg <sumit.garg@linaro.org> wrote:
>
> Hi Simon,
>
> On Thu, 24 Aug 2023 at 05:29, Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Sumit,
> >
> > On Tue, 12 Jul 2022 at 01:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> > >
> > > Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> > > platform. This board complies with 96Boards Open Platform Specifications.
> > >
> > > Features:
> > > - Qualcomm Snapdragon SDA845 SoC
> > > - 4GiB RAM
> > > - 64GiB UFS drive
> > >
> > > U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> > > For detailed build and boot instructions, refer to
> > > doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
> > >
> > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> > > ---
> > >  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
> > >  arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
> > >  arch/arm/mach-snapdragon/Kconfig              |  14 +++
> > >  board/qualcomm/dragonboard845c/Kconfig        |  12 +++
> > >  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
> > >  board/qualcomm/dragonboard845c/Makefile       |   9 ++
> > >  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
> > >  .../dragonboard845c/dragonboard845c.c         |   9 ++
> > >  configs/dragonboard845c_defconfig             |  28 +++++
> > >  doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
> > >  include/configs/dragonboard845c.h             |  28 +++++
> > >  11 files changed, 337 insertions(+), 13 deletions(-)
> > >  create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
> > >  create mode 100644 arch/arm/dts/dragonboard845c.dts
> > >  create mode 100644 board/qualcomm/dragonboard845c/Kconfig
> > >  create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
> > >  create mode 100644 board/qualcomm/dragonboard845c/Makefile
> > >  create mode 100644 board/qualcomm/dragonboard845c/db845c.its
> > >  create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
> > >  create mode 100644 configs/dragonboard845c_defconfig
> > >  create mode 100644 include/configs/dragonboard845c.h
> > >
> > [..]
> >
> > > diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
> > > index b6642c9579..8ef4749287 100644
> > > --- a/doc/board/qualcomm/sdm845.rst
> > > +++ b/doc/board/qualcomm/sdm845.rst
> > > @@ -35,9 +35,25 @@ Pack android boot image
> > >  ^^^^^^^^^^^^^^^^^^^^^^^
> > >  We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
> > >  and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
> > > -with appended dtb, so let's mimic linux to satisfy stock bootloader:
> > > +with appended dtb, so let's mimic linux to satisfy stock bootloader.
> > >
> >
> > [..]
> >
> > > +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
> > > +the Qualcomm SDM845 SoC.
> > > +
> > > +Steps:
> > > +
> > > +- Build u-boot::
> > > +
> > > +       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
> > > +       $ make dragonboard845c_defconfig
> > > +       $ make
> > > +
> > > +- Create dummy dtb::
> > > +
> > > +       workdir=/tmp/prepare_payload
> > > +       mkdir -p "$workdir"
> > > +       mock_dtb="$workdir"/payload_mock.dtb
> > > +
> > > +       dtc -I dts -O dtb -o "$mock_dtb" << EOF
> > > +       /dts-v1/;
> > > +       / {
> > > +               #address-cells = <2>;
> > > +               #size-cells = <2>;
> > > +
> > > +               memory@80000000 {
> > > +                       device_type = "memory";
> > > +                       /* We expect the bootloader to fill in the size */
> > > +                       reg = <0 0x80000000 0 0>;
> > > +               };
> > > +
> > > +               chosen { };
> > > +       };
> > > +       EOF
> > > +
> > > +- gzip u-boot::
> > > +
> > > +       gzip u-boot.bin
> > > +
> > > +- Append dtb to gzipped u-boot::
> > > +
> > > +        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
> > > +
> > > +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
> > > +  directory. It expects a folder as ``db845c_imgs/`` in the main directory
> > > +  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
> > > +  for full path to images::
> > > +
> > > +       mkimage -f db845c.its db845c.itb
> > > +
> > > +- Now we've got everything to build android boot image::
> > > +
> > > +       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
> > > +       --output boot.img --pagesize 4096 --base 0x80000000
> > > +
> > > +- Flash boot.img using db845c fastboot method.
> >
> > What command should be used here? I can run 'fastboot devices' but am
> > not sure what command to use to flash U-Boot.
> >
>
> At the time of writing this doc, I thought it was understood how to
> flash boot.img on db845c. But I will make that more explicit. Since
> u-boot has to be chain loaded by ABL, the command to flash boot.img
> (containing u-boot) is as follows:
>
> sudo fastboot flash boot boot.img
>
> > Also, is it possible to flash U-Boot as a first-stage bootloader?
> >
>
> That's not possible currently due to Qcom proprietary bootloader being
> used. But there were plans to replace atleast ABL with u-boot (See
> slide 9 from this Linaro connect Qcom keynote [1]). I hope that will
> materialize soon.
>
> [1] https://resources.linaro.org/en/resource/necH5bQcfrhCCkjSGHXJyA
>

Thank you for the link. I am pleased to hear it and hope it plays out
as that slide seems to indicate.

I would like to suggest that 96 boards should use open-source firmware
when they launch. Once they launch there is little incentive to clean
things up.

Regards,
Simon
Peter Robinson Aug. 28, 2023, 8:23 p.m. UTC | #5
On Mon, Aug 28, 2023 at 6:55 PM Simon Glass <sjg@chromium.org> wrote:
>
> Hi Sumit,
>
> On Thu, 24 Aug 2023 at 04:44, Sumit Garg <sumit.garg@linaro.org> wrote:
> >
> > Hi Simon,
> >
> > On Thu, 24 Aug 2023 at 05:29, Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Hi Sumit,
> > >
> > > On Tue, 12 Jul 2022 at 01:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> > > >
> > > > Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> > > > platform. This board complies with 96Boards Open Platform Specifications.
> > > >
> > > > Features:
> > > > - Qualcomm Snapdragon SDA845 SoC
> > > > - 4GiB RAM
> > > > - 64GiB UFS drive
> > > >
> > > > U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> > > > For detailed build and boot instructions, refer to
> > > > doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
> > > >
> > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > > Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> > > > ---
> > > >  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
> > > >  arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
> > > >  arch/arm/mach-snapdragon/Kconfig              |  14 +++
> > > >  board/qualcomm/dragonboard845c/Kconfig        |  12 +++
> > > >  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
> > > >  board/qualcomm/dragonboard845c/Makefile       |   9 ++
> > > >  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
> > > >  .../dragonboard845c/dragonboard845c.c         |   9 ++
> > > >  configs/dragonboard845c_defconfig             |  28 +++++
> > > >  doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
> > > >  include/configs/dragonboard845c.h             |  28 +++++
> > > >  11 files changed, 337 insertions(+), 13 deletions(-)
> > > >  create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
> > > >  create mode 100644 arch/arm/dts/dragonboard845c.dts
> > > >  create mode 100644 board/qualcomm/dragonboard845c/Kconfig
> > > >  create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
> > > >  create mode 100644 board/qualcomm/dragonboard845c/Makefile
> > > >  create mode 100644 board/qualcomm/dragonboard845c/db845c.its
> > > >  create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
> > > >  create mode 100644 configs/dragonboard845c_defconfig
> > > >  create mode 100644 include/configs/dragonboard845c.h
> > > >
> > > [..]
> > >
> > > > diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
> > > > index b6642c9579..8ef4749287 100644
> > > > --- a/doc/board/qualcomm/sdm845.rst
> > > > +++ b/doc/board/qualcomm/sdm845.rst
> > > > @@ -35,9 +35,25 @@ Pack android boot image
> > > >  ^^^^^^^^^^^^^^^^^^^^^^^
> > > >  We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
> > > >  and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
> > > > -with appended dtb, so let's mimic linux to satisfy stock bootloader:
> > > > +with appended dtb, so let's mimic linux to satisfy stock bootloader.
> > > >
> > >
> > > [..]
> > >
> > > > +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
> > > > +the Qualcomm SDM845 SoC.
> > > > +
> > > > +Steps:
> > > > +
> > > > +- Build u-boot::
> > > > +
> > > > +       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
> > > > +       $ make dragonboard845c_defconfig
> > > > +       $ make
> > > > +
> > > > +- Create dummy dtb::
> > > > +
> > > > +       workdir=/tmp/prepare_payload
> > > > +       mkdir -p "$workdir"
> > > > +       mock_dtb="$workdir"/payload_mock.dtb
> > > > +
> > > > +       dtc -I dts -O dtb -o "$mock_dtb" << EOF
> > > > +       /dts-v1/;
> > > > +       / {
> > > > +               #address-cells = <2>;
> > > > +               #size-cells = <2>;
> > > > +
> > > > +               memory@80000000 {
> > > > +                       device_type = "memory";
> > > > +                       /* We expect the bootloader to fill in the size */
> > > > +                       reg = <0 0x80000000 0 0>;
> > > > +               };
> > > > +
> > > > +               chosen { };
> > > > +       };
> > > > +       EOF
> > > > +
> > > > +- gzip u-boot::
> > > > +
> > > > +       gzip u-boot.bin
> > > > +
> > > > +- Append dtb to gzipped u-boot::
> > > > +
> > > > +        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
> > > > +
> > > > +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
> > > > +  directory. It expects a folder as ``db845c_imgs/`` in the main directory
> > > > +  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
> > > > +  for full path to images::
> > > > +
> > > > +       mkimage -f db845c.its db845c.itb
> > > > +
> > > > +- Now we've got everything to build android boot image::
> > > > +
> > > > +       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
> > > > +       --output boot.img --pagesize 4096 --base 0x80000000
> > > > +
> > > > +- Flash boot.img using db845c fastboot method.
> > >
> > > What command should be used here? I can run 'fastboot devices' but am
> > > not sure what command to use to flash U-Boot.
> > >
> >
> > At the time of writing this doc, I thought it was understood how to
> > flash boot.img on db845c. But I will make that more explicit. Since
> > u-boot has to be chain loaded by ABL, the command to flash boot.img
> > (containing u-boot) is as follows:
> >
> > sudo fastboot flash boot boot.img
> >
> > > Also, is it possible to flash U-Boot as a first-stage bootloader?
> > >
> >
> > That's not possible currently due to Qcom proprietary bootloader being
> > used. But there were plans to replace atleast ABL with u-boot (See
> > slide 9 from this Linaro connect Qcom keynote [1]). I hope that will
> > materialize soon.
> >
> > [1] https://resources.linaro.org/en/resource/necH5bQcfrhCCkjSGHXJyA
> >
>
> Thank you for the link. I am pleased to hear it and hope it plays out
> as that slide seems to indicate.
>
> I would like to suggest that 96 boards should use open-source firmware
> when they launch. Once they launch there is little incentive to clean
> things up.

It's something that has been suggested from the outset but the fact is
there is no way to enforce it.
Simon Glass Aug. 28, 2023, 10:09 p.m. UTC | #6
Hi Peter,

On Mon, 28 Aug 2023 at 14:24, Peter Robinson <pbrobinson@gmail.com> wrote:
>
> On Mon, Aug 28, 2023 at 6:55 PM Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Sumit,
> >
> > On Thu, 24 Aug 2023 at 04:44, Sumit Garg <sumit.garg@linaro.org> wrote:
> > >
> > > Hi Simon,
> > >
> > > On Thu, 24 Aug 2023 at 05:29, Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > Hi Sumit,
> > > >
> > > > On Tue, 12 Jul 2022 at 01:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> > > > >
> > > > > Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> > > > > platform. This board complies with 96Boards Open Platform Specifications.
> > > > >
> > > > > Features:
> > > > > - Qualcomm Snapdragon SDA845 SoC
> > > > > - 4GiB RAM
> > > > > - 64GiB UFS drive
> > > > >
> > > > > U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> > > > > For detailed build and boot instructions, refer to
> > > > > doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
> > > > >
> > > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > > > Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> > > > > ---
> > > > >  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
> > > > >  arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
> > > > >  arch/arm/mach-snapdragon/Kconfig              |  14 +++
> > > > >  board/qualcomm/dragonboard845c/Kconfig        |  12 +++
> > > > >  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
> > > > >  board/qualcomm/dragonboard845c/Makefile       |   9 ++
> > > > >  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
> > > > >  .../dragonboard845c/dragonboard845c.c         |   9 ++
> > > > >  configs/dragonboard845c_defconfig             |  28 +++++
> > > > >  doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
> > > > >  include/configs/dragonboard845c.h             |  28 +++++
> > > > >  11 files changed, 337 insertions(+), 13 deletions(-)
> > > > >  create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
> > > > >  create mode 100644 arch/arm/dts/dragonboard845c.dts
> > > > >  create mode 100644 board/qualcomm/dragonboard845c/Kconfig
> > > > >  create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
> > > > >  create mode 100644 board/qualcomm/dragonboard845c/Makefile
> > > > >  create mode 100644 board/qualcomm/dragonboard845c/db845c.its
> > > > >  create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
> > > > >  create mode 100644 configs/dragonboard845c_defconfig
> > > > >  create mode 100644 include/configs/dragonboard845c.h
> > > > >
> > > > [..]
> > > >
> > > > > diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
> > > > > index b6642c9579..8ef4749287 100644
> > > > > --- a/doc/board/qualcomm/sdm845.rst
> > > > > +++ b/doc/board/qualcomm/sdm845.rst
> > > > > @@ -35,9 +35,25 @@ Pack android boot image
> > > > >  ^^^^^^^^^^^^^^^^^^^^^^^
> > > > >  We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
> > > > >  and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
> > > > > -with appended dtb, so let's mimic linux to satisfy stock bootloader:
> > > > > +with appended dtb, so let's mimic linux to satisfy stock bootloader.
> > > > >
> > > >
> > > > [..]
> > > >
> > > > > +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
> > > > > +the Qualcomm SDM845 SoC.
> > > > > +
> > > > > +Steps:
> > > > > +
> > > > > +- Build u-boot::
> > > > > +
> > > > > +       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
> > > > > +       $ make dragonboard845c_defconfig
> > > > > +       $ make
> > > > > +
> > > > > +- Create dummy dtb::
> > > > > +
> > > > > +       workdir=/tmp/prepare_payload
> > > > > +       mkdir -p "$workdir"
> > > > > +       mock_dtb="$workdir"/payload_mock.dtb
> > > > > +
> > > > > +       dtc -I dts -O dtb -o "$mock_dtb" << EOF
> > > > > +       /dts-v1/;
> > > > > +       / {
> > > > > +               #address-cells = <2>;
> > > > > +               #size-cells = <2>;
> > > > > +
> > > > > +               memory@80000000 {
> > > > > +                       device_type = "memory";
> > > > > +                       /* We expect the bootloader to fill in the size */
> > > > > +                       reg = <0 0x80000000 0 0>;
> > > > > +               };
> > > > > +
> > > > > +               chosen { };
> > > > > +       };
> > > > > +       EOF
> > > > > +
> > > > > +- gzip u-boot::
> > > > > +
> > > > > +       gzip u-boot.bin
> > > > > +
> > > > > +- Append dtb to gzipped u-boot::
> > > > > +
> > > > > +        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
> > > > > +
> > > > > +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
> > > > > +  directory. It expects a folder as ``db845c_imgs/`` in the main directory
> > > > > +  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
> > > > > +  for full path to images::
> > > > > +
> > > > > +       mkimage -f db845c.its db845c.itb
> > > > > +
> > > > > +- Now we've got everything to build android boot image::
> > > > > +
> > > > > +       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
> > > > > +       --output boot.img --pagesize 4096 --base 0x80000000
> > > > > +
> > > > > +- Flash boot.img using db845c fastboot method.
> > > >
> > > > What command should be used here? I can run 'fastboot devices' but am
> > > > not sure what command to use to flash U-Boot.
> > > >
> > >
> > > At the time of writing this doc, I thought it was understood how to
> > > flash boot.img on db845c. But I will make that more explicit. Since
> > > u-boot has to be chain loaded by ABL, the command to flash boot.img
> > > (containing u-boot) is as follows:
> > >
> > > sudo fastboot flash boot boot.img
> > >
> > > > Also, is it possible to flash U-Boot as a first-stage bootloader?
> > > >
> > >
> > > That's not possible currently due to Qcom proprietary bootloader being
> > > used. But there were plans to replace atleast ABL with u-boot (See
> > > slide 9 from this Linaro connect Qcom keynote [1]). I hope that will
> > > materialize soon.
> > >
> > > [1] https://resources.linaro.org/en/resource/necH5bQcfrhCCkjSGHXJyA
> > >
> >
> > Thank you for the link. I am pleased to hear it and hope it plays out
> > as that slide seems to indicate.
> >
> > I would like to suggest that 96 boards should use open-source firmware
> > when they launch. Once they launch there is little incentive to clean
> > things up.
>
> It's something that has been suggested from the outset but the fact is
> there is no way to enforce it.

Er, the board is listed on Linaros web site and has presumably been
blessed by Linaro. So don't bless it until the patches are send and/or
landed?

Regards,
Simon
Sumit Garg Aug. 29, 2023, 10:24 a.m. UTC | #7
Hi Simon,

On Tue, 29 Aug 2023 at 03:39, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Peter,
>
> On Mon, 28 Aug 2023 at 14:24, Peter Robinson <pbrobinson@gmail.com> wrote:
> >
> > On Mon, Aug 28, 2023 at 6:55 PM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > Hi Sumit,
> > >
> > > On Thu, 24 Aug 2023 at 04:44, Sumit Garg <sumit.garg@linaro.org> wrote:
> > > >
> > > > Hi Simon,
> > > >
> > > > On Thu, 24 Aug 2023 at 05:29, Simon Glass <sjg@chromium.org> wrote:
> > > > >
> > > > > Hi Sumit,
> > > > >
> > > > > On Tue, 12 Jul 2022 at 01:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> > > > > >
> > > > > > Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> > > > > > platform. This board complies with 96Boards Open Platform Specifications.
> > > > > >
> > > > > > Features:
> > > > > > - Qualcomm Snapdragon SDA845 SoC
> > > > > > - 4GiB RAM
> > > > > > - 64GiB UFS drive
> > > > > >
> > > > > > U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> > > > > > For detailed build and boot instructions, refer to
> > > > > > doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
> > > > > >
> > > > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > > > > Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> > > > > > ---
> > > > > >  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
> > > > > >  arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
> > > > > >  arch/arm/mach-snapdragon/Kconfig              |  14 +++
> > > > > >  board/qualcomm/dragonboard845c/Kconfig        |  12 +++
> > > > > >  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
> > > > > >  board/qualcomm/dragonboard845c/Makefile       |   9 ++
> > > > > >  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
> > > > > >  .../dragonboard845c/dragonboard845c.c         |   9 ++
> > > > > >  configs/dragonboard845c_defconfig             |  28 +++++
> > > > > >  doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
> > > > > >  include/configs/dragonboard845c.h             |  28 +++++
> > > > > >  11 files changed, 337 insertions(+), 13 deletions(-)
> > > > > >  create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
> > > > > >  create mode 100644 arch/arm/dts/dragonboard845c.dts
> > > > > >  create mode 100644 board/qualcomm/dragonboard845c/Kconfig
> > > > > >  create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
> > > > > >  create mode 100644 board/qualcomm/dragonboard845c/Makefile
> > > > > >  create mode 100644 board/qualcomm/dragonboard845c/db845c.its
> > > > > >  create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
> > > > > >  create mode 100644 configs/dragonboard845c_defconfig
> > > > > >  create mode 100644 include/configs/dragonboard845c.h
> > > > > >
> > > > > [..]
> > > > >
> > > > > > diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
> > > > > > index b6642c9579..8ef4749287 100644
> > > > > > --- a/doc/board/qualcomm/sdm845.rst
> > > > > > +++ b/doc/board/qualcomm/sdm845.rst
> > > > > > @@ -35,9 +35,25 @@ Pack android boot image
> > > > > >  ^^^^^^^^^^^^^^^^^^^^^^^
> > > > > >  We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
> > > > > >  and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
> > > > > > -with appended dtb, so let's mimic linux to satisfy stock bootloader:
> > > > > > +with appended dtb, so let's mimic linux to satisfy stock bootloader.
> > > > > >
> > > > >
> > > > > [..]
> > > > >
> > > > > > +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
> > > > > > +the Qualcomm SDM845 SoC.
> > > > > > +
> > > > > > +Steps:
> > > > > > +
> > > > > > +- Build u-boot::
> > > > > > +
> > > > > > +       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
> > > > > > +       $ make dragonboard845c_defconfig
> > > > > > +       $ make
> > > > > > +
> > > > > > +- Create dummy dtb::
> > > > > > +
> > > > > > +       workdir=/tmp/prepare_payload
> > > > > > +       mkdir -p "$workdir"
> > > > > > +       mock_dtb="$workdir"/payload_mock.dtb
> > > > > > +
> > > > > > +       dtc -I dts -O dtb -o "$mock_dtb" << EOF
> > > > > > +       /dts-v1/;
> > > > > > +       / {
> > > > > > +               #address-cells = <2>;
> > > > > > +               #size-cells = <2>;
> > > > > > +
> > > > > > +               memory@80000000 {
> > > > > > +                       device_type = "memory";
> > > > > > +                       /* We expect the bootloader to fill in the size */
> > > > > > +                       reg = <0 0x80000000 0 0>;
> > > > > > +               };
> > > > > > +
> > > > > > +               chosen { };
> > > > > > +       };
> > > > > > +       EOF
> > > > > > +
> > > > > > +- gzip u-boot::
> > > > > > +
> > > > > > +       gzip u-boot.bin
> > > > > > +
> > > > > > +- Append dtb to gzipped u-boot::
> > > > > > +
> > > > > > +        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
> > > > > > +
> > > > > > +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
> > > > > > +  directory. It expects a folder as ``db845c_imgs/`` in the main directory
> > > > > > +  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
> > > > > > +  for full path to images::
> > > > > > +
> > > > > > +       mkimage -f db845c.its db845c.itb
> > > > > > +
> > > > > > +- Now we've got everything to build android boot image::
> > > > > > +
> > > > > > +       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
> > > > > > +       --output boot.img --pagesize 4096 --base 0x80000000
> > > > > > +
> > > > > > +- Flash boot.img using db845c fastboot method.
> > > > >
> > > > > What command should be used here? I can run 'fastboot devices' but am
> > > > > not sure what command to use to flash U-Boot.
> > > > >
> > > >
> > > > At the time of writing this doc, I thought it was understood how to
> > > > flash boot.img on db845c. But I will make that more explicit. Since
> > > > u-boot has to be chain loaded by ABL, the command to flash boot.img
> > > > (containing u-boot) is as follows:
> > > >
> > > > sudo fastboot flash boot boot.img
> > > >
> > > > > Also, is it possible to flash U-Boot as a first-stage bootloader?
> > > > >
> > > >
> > > > That's not possible currently due to Qcom proprietary bootloader being
> > > > used. But there were plans to replace atleast ABL with u-boot (See
> > > > slide 9 from this Linaro connect Qcom keynote [1]). I hope that will
> > > > materialize soon.
> > > >
> > > > [1] https://resources.linaro.org/en/resource/necH5bQcfrhCCkjSGHXJyA
> > > >
> > >
> > > Thank you for the link. I am pleased to hear it and hope it plays out
> > > as that slide seems to indicate.
> > >
> > > I would like to suggest that 96 boards should use open-source firmware
> > > when they launch. Once they launch there is little incentive to clean
> > > things up.
> >
> > It's something that has been suggested from the outset but the fact is
> > there is no way to enforce it.
>
> Er, the board is listed on Linaros web site and has presumably been
> blessed by Linaro. So don't bless it until the patches are send and/or
> landed?

I see the reasoning behind your thoughts but I would suggest you read
through [1]. It should provide you with enough background thinking.

[1] https://www.96boards.org/compliance/

-Sumit

>
> Regards,
> Simon
Simon Glass Sept. 10, 2023, 11:14 p.m. UTC | #8
Hi Sumit,

On Tue, 29 Aug 2023 at 04:24, Sumit Garg <sumit.garg@linaro.org> wrote:
>
> Hi Simon,
>
> On Tue, 29 Aug 2023 at 03:39, Simon Glass <sjg@chromium.org> wrote:
> >
> > Hi Peter,
> >
> > On Mon, 28 Aug 2023 at 14:24, Peter Robinson <pbrobinson@gmail.com> wrote:
> > >
> > > On Mon, Aug 28, 2023 at 6:55 PM Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > Hi Sumit,
> > > >
> > > > On Thu, 24 Aug 2023 at 04:44, Sumit Garg <sumit.garg@linaro.org> wrote:
> > > > >
> > > > > Hi Simon,
> > > > >
> > > > > On Thu, 24 Aug 2023 at 05:29, Simon Glass <sjg@chromium.org> wrote:
> > > > > >
> > > > > > Hi Sumit,
> > > > > >
> > > > > > On Tue, 12 Jul 2022 at 01:12, Sumit Garg <sumit.garg@linaro.org> wrote:
> > > > > > >
> > > > > > > Add support for 96Boards Dragonboard 845C aka Robotics RB3 development
> > > > > > > platform. This board complies with 96Boards Open Platform Specifications.
> > > > > > >
> > > > > > > Features:
> > > > > > > - Qualcomm Snapdragon SDA845 SoC
> > > > > > > - 4GiB RAM
> > > > > > > - 64GiB UFS drive
> > > > > > >
> > > > > > > U-boot is chain loaded by ABL in 64-bit mode as part of boot.img.
> > > > > > > For detailed build and boot instructions, refer to
> > > > > > > doc/board/qualcomm/sdm845.rst, board: dragonboard845c.
> > > > > > >
> > > > > > > Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
> > > > > > > Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
> > > > > > > ---
> > > > > > >  arch/arm/dts/dragonboard845c-uboot.dtsi       |  37 +++++++
> > > > > > >  arch/arm/dts/dragonboard845c.dts              |  44 ++++++++
> > > > > > >  arch/arm/mach-snapdragon/Kconfig              |  14 +++
> > > > > > >  board/qualcomm/dragonboard845c/Kconfig        |  12 +++
> > > > > > >  board/qualcomm/dragonboard845c/MAINTAINERS    |   6 ++
> > > > > > >  board/qualcomm/dragonboard845c/Makefile       |   9 ++
> > > > > > >  board/qualcomm/dragonboard845c/db845c.its     |  63 +++++++++++
> > > > > > >  .../dragonboard845c/dragonboard845c.c         |   9 ++
> > > > > > >  configs/dragonboard845c_defconfig             |  28 +++++
> > > > > > >  doc/board/qualcomm/sdm845.rst                 | 100 +++++++++++++++---
> > > > > > >  include/configs/dragonboard845c.h             |  28 +++++
> > > > > > >  11 files changed, 337 insertions(+), 13 deletions(-)
> > > > > > >  create mode 100644 arch/arm/dts/dragonboard845c-uboot.dtsi
> > > > > > >  create mode 100644 arch/arm/dts/dragonboard845c.dts
> > > > > > >  create mode 100644 board/qualcomm/dragonboard845c/Kconfig
> > > > > > >  create mode 100644 board/qualcomm/dragonboard845c/MAINTAINERS
> > > > > > >  create mode 100644 board/qualcomm/dragonboard845c/Makefile
> > > > > > >  create mode 100644 board/qualcomm/dragonboard845c/db845c.its
> > > > > > >  create mode 100644 board/qualcomm/dragonboard845c/dragonboard845c.c
> > > > > > >  create mode 100644 configs/dragonboard845c_defconfig
> > > > > > >  create mode 100644 include/configs/dragonboard845c.h
> > > > > > >
> > > > > > [..]
> > > > > >
> > > > > > > diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
> > > > > > > index b6642c9579..8ef4749287 100644
> > > > > > > --- a/doc/board/qualcomm/sdm845.rst
> > > > > > > +++ b/doc/board/qualcomm/sdm845.rst
> > > > > > > @@ -35,9 +35,25 @@ Pack android boot image
> > > > > > >  ^^^^^^^^^^^^^^^^^^^^^^^
> > > > > > >  We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
> > > > > > >  and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
> > > > > > > -with appended dtb, so let's mimic linux to satisfy stock bootloader:
> > > > > > > +with appended dtb, so let's mimic linux to satisfy stock bootloader.
> > > > > > >
> > > > > >
> > > > > > [..]
> > > > > >
> > > > > > > +The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
> > > > > > > +the Qualcomm SDM845 SoC.
> > > > > > > +
> > > > > > > +Steps:
> > > > > > > +
> > > > > > > +- Build u-boot::
> > > > > > > +
> > > > > > > +       $ export CROSS_COMPILE=<aarch64 toolchain prefix>
> > > > > > > +       $ make dragonboard845c_defconfig
> > > > > > > +       $ make
> > > > > > > +
> > > > > > > +- Create dummy dtb::
> > > > > > > +
> > > > > > > +       workdir=/tmp/prepare_payload
> > > > > > > +       mkdir -p "$workdir"
> > > > > > > +       mock_dtb="$workdir"/payload_mock.dtb
> > > > > > > +
> > > > > > > +       dtc -I dts -O dtb -o "$mock_dtb" << EOF
> > > > > > > +       /dts-v1/;
> > > > > > > +       / {
> > > > > > > +               #address-cells = <2>;
> > > > > > > +               #size-cells = <2>;
> > > > > > > +
> > > > > > > +               memory@80000000 {
> > > > > > > +                       device_type = "memory";
> > > > > > > +                       /* We expect the bootloader to fill in the size */
> > > > > > > +                       reg = <0 0x80000000 0 0>;
> > > > > > > +               };
> > > > > > > +
> > > > > > > +               chosen { };
> > > > > > > +       };
> > > > > > > +       EOF
> > > > > > > +
> > > > > > > +- gzip u-boot::
> > > > > > > +
> > > > > > > +       gzip u-boot.bin
> > > > > > > +
> > > > > > > +- Append dtb to gzipped u-boot::
> > > > > > > +
> > > > > > > +        cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
> > > > > > > +
> > > > > > > +- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
> > > > > > > +  directory. It expects a folder as ``db845c_imgs/`` in the main directory
> > > > > > > +  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
> > > > > > > +  for full path to images::
> > > > > > > +
> > > > > > > +       mkimage -f db845c.its db845c.itb
> > > > > > > +
> > > > > > > +- Now we've got everything to build android boot image::
> > > > > > > +
> > > > > > > +       mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
> > > > > > > +       --output boot.img --pagesize 4096 --base 0x80000000
> > > > > > > +
> > > > > > > +- Flash boot.img using db845c fastboot method.
> > > > > >
> > > > > > What command should be used here? I can run 'fastboot devices' but am
> > > > > > not sure what command to use to flash U-Boot.
> > > > > >
> > > > >
> > > > > At the time of writing this doc, I thought it was understood how to
> > > > > flash boot.img on db845c. But I will make that more explicit. Since
> > > > > u-boot has to be chain loaded by ABL, the command to flash boot.img
> > > > > (containing u-boot) is as follows:
> > > > >
> > > > > sudo fastboot flash boot boot.img
> > > > >
> > > > > > Also, is it possible to flash U-Boot as a first-stage bootloader?
> > > > > >
> > > > >
> > > > > That's not possible currently due to Qcom proprietary bootloader being
> > > > > used. But there were plans to replace atleast ABL with u-boot (See
> > > > > slide 9 from this Linaro connect Qcom keynote [1]). I hope that will
> > > > > materialize soon.
> > > > >
> > > > > [1] https://resources.linaro.org/en/resource/necH5bQcfrhCCkjSGHXJyA
> > > > >
> > > >
> > > > Thank you for the link. I am pleased to hear it and hope it plays out
> > > > as that slide seems to indicate.
> > > >
> > > > I would like to suggest that 96 boards should use open-source firmware
> > > > when they launch. Once they launch there is little incentive to clean
> > > > things up.
> > >
> > > It's something that has been suggested from the outset but the fact is
> > > there is no way to enforce it.
> >
> > Er, the board is listed on Linaros web site and has presumably been
> > blessed by Linaro. So don't bless it until the patches are send and/or
> > landed?
>
> I see the reasoning behind your thoughts but I would suggest you read
> through [1]. It should provide you with enough background thinking.
>
> [1] https://www.96boards.org/compliance/

"It is recommended that all documentation required under the 96Boards
program for the board and SoC be freely available from the 96Boards
website. Any documentation that cannot be provided from the 96Boards
website shall be available from a vendor or other public website that
can be linked to from the 96Boards website."

So are the SoC docs available for this board?

"It is strongly recommended one open source bootloader to be provided
for the board that executes immediately after the internal SoC startup
code. The source for this bootloader should be available from a
publicly accessible site or integrated into the bootloader trees
onhttps://github.com/96boards"

My reading of this is that an open source bootloader is optional.
Would it not make sense to make it mandatory?

"It is strongly recommended that vendors of an ARMv8 board provide a
port of the ARM Trusted Firmware (ATF) and PSCI reference
implementations, and a port of the Tianocore EDK2 UEFI reference
implementation."

Why suggest a UEFI port? Wouldn't suggesting U-Boot be a lot more
useful in terms of building the open source community?

Regards,
Simon
diff mbox series

Patch

diff --git a/arch/arm/dts/dragonboard845c-uboot.dtsi b/arch/arm/dts/dragonboard845c-uboot.dtsi
new file mode 100644
index 0000000000..8b5a7ee573
--- /dev/null
+++ b/arch/arm/dts/dragonboard845c-uboot.dtsi
@@ -0,0 +1,37 @@ 
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * U-Boot addition to handle Qualcomm Robotics RB3 Development Platform
+ * (dragonboard845c) pins
+ *
+ * (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
+ */
+
+/
+{
+	soc {
+		u-boot,dm-pre-reloc;
+
+		serial@a84000 {
+			u-boot,dm-pre-reloc;
+		};
+
+		clock-controller@100000 {
+			u-boot,dm-pre-reloc;
+		};
+
+		pinctrl_north@3900000 {
+			u-boot,dm-pre-reloc;
+		};
+	};
+};
+
+&pm8998_pon {
+	key_vol_down {
+		gpios = <&pm8998_pon 1 0>;
+		label = "key_vol_down";
+	};
+	key_power {
+		gpios = <&pm8998_pon 0 0>;
+		label = "key_power";
+	};
+};
diff --git a/arch/arm/dts/dragonboard845c.dts b/arch/arm/dts/dragonboard845c.dts
new file mode 100644
index 0000000000..1722dce33f
--- /dev/null
+++ b/arch/arm/dts/dragonboard845c.dts
@@ -0,0 +1,44 @@ 
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Qualcomm Robotics RB3 Development (dragonboard845c) board device
+ * tree source
+ *
+ * (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
+ */
+
+/dts-v1/;
+
+#include "sdm845.dtsi"
+
+/ {
+	model = "Thundercomm Dragonboard 845c";
+	compatible = "thundercomm,db845c", "qcom,sdm845";
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	aliases {
+		serial0 = &debug_uart;
+	};
+
+	memory {
+		device_type = "memory";
+		reg = <0 0x80000000 0 0xfdfa0000>;
+	};
+
+	psci {
+		compatible = "arm,psci-1.0";
+		method = "smc";
+	};
+
+	soc: soc {
+		serial@a84000 {
+			status = "okay";
+		};
+	};
+};
+
+#include "dragonboard845c-uboot.dtsi"
diff --git a/arch/arm/mach-snapdragon/Kconfig b/arch/arm/mach-snapdragon/Kconfig
index 12cf02a56a..cb53dc8901 100644
--- a/arch/arm/mach-snapdragon/Kconfig
+++ b/arch/arm/mach-snapdragon/Kconfig
@@ -44,6 +44,19 @@  config TARGET_DRAGONBOARD820C
 	  - 3GiB RAM
 	  - 32GiB UFS drive
 
+config TARGET_DRAGONBOARD845C
+	bool "96Boards Dragonboard 845C"
+	help
+	  Support for 96Boards Dragonboard 845C aka Robotics RB3 Development
+	  Platform. This board complies with 96Boards Open Platform
+	  Specifications. Features:
+	  - Qualcomm Snapdragon SDA845 SoC
+	  - 4GiB RAM
+	  - 64GiB UFS drive
+	select MISC_INIT_R
+	select SDM845
+	select DM_ETH if NET
+
 config TARGET_STARQLTECHN
 	bool "Samsung S9 SM-G9600(starqltechn)"
 	help
@@ -60,6 +73,7 @@  endchoice
 
 source "board/qualcomm/dragonboard410c/Kconfig"
 source "board/qualcomm/dragonboard820c/Kconfig"
+source "board/qualcomm/dragonboard845c/Kconfig"
 source "board/samsung/starqltechn/Kconfig"
 
 endif
diff --git a/board/qualcomm/dragonboard845c/Kconfig b/board/qualcomm/dragonboard845c/Kconfig
new file mode 100644
index 0000000000..52fdff288d
--- /dev/null
+++ b/board/qualcomm/dragonboard845c/Kconfig
@@ -0,0 +1,12 @@ 
+if TARGET_DRAGONBOARD845C
+
+config SYS_BOARD
+	default "dragonboard845c"
+
+config SYS_CONFIG_NAME
+	default "dragonboard845c"
+
+config SYS_VENDOR
+	default "qualcomm"
+
+endif
diff --git a/board/qualcomm/dragonboard845c/MAINTAINERS b/board/qualcomm/dragonboard845c/MAINTAINERS
new file mode 100644
index 0000000000..e555953df6
--- /dev/null
+++ b/board/qualcomm/dragonboard845c/MAINTAINERS
@@ -0,0 +1,6 @@ 
+Qualcomm Robotics RB3 Development Platform (dragonboard845c)
+M:	Sumit Garg <sumit.garg@linaro.org>
+S:	Maintained
+F:	board/qualcomm/dragonboard845c/
+F:	include/configs/dragonboard845c.h
+F:	configs/dragonboard845c_defconfig
diff --git a/board/qualcomm/dragonboard845c/Makefile b/board/qualcomm/dragonboard845c/Makefile
new file mode 100644
index 0000000000..0abefdaf36
--- /dev/null
+++ b/board/qualcomm/dragonboard845c/Makefile
@@ -0,0 +1,9 @@ 
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
+#
+# This empty file prevents make error.
+# Board logic defined in board/qualcomm/common/sdm845.c, no custom logic for dragonboard845c so far.
+#
+
+obj-y += dragonboard845c.o
diff --git a/board/qualcomm/dragonboard845c/db845c.its b/board/qualcomm/dragonboard845c/db845c.its
new file mode 100644
index 0000000000..a2621340d1
--- /dev/null
+++ b/board/qualcomm/dragonboard845c/db845c.its
@@ -0,0 +1,63 @@ 
+/*
+ * U-Boot uImage source file with multiple kernels, ramdisks and FDT blobs
+ */
+
+/dts-v1/;
+
+/ {
+	description = "Various kernels, ramdisks and FDT blobs";
+	#address-cells = <1>;
+
+	images {
+		kernel-1 {
+			description = "5.15.0-qcomlt-arm64";
+			data = /incbin/("./db845c_imgs/Image.gz--5.15-r0-dragonboard-845c-20211218193034-511.bin");
+			type = "kernel";
+			arch = "arm64";
+			os = "linux";
+			compression = "gzip";
+			load = <0x80000000>;
+			entry = <0x80000000>;
+			hash-1 {
+				algo = "sha1";
+			};
+		};
+
+		ramdisk-1 {
+			description = "initramfs-test-full-image-dragonboard-845c";
+			data = /incbin/("./db845c_imgs/initramfs-test-full-image-dragonboard-845c-20211218193034-511.rootfs.cpio.gz");
+			type = "ramdisk";
+			arch = "arm64";
+			os = "linux";
+			compression = "gzip";
+			load = <00000000>;
+			entry = <00000000>;
+			hash-1 {
+				algo = "sha1";
+			};
+		};
+
+		fdt-1 {
+			description = "sdm845-db845c-fdt";
+			data = /incbin/("./db845c_imgs/sdm845-db845c--5.15-r0-dragonboard-845c-20211218193034.dtb");
+			type = "flat_dt";
+			arch = "arm64";
+			compression = "none";
+			hash-1 {
+				algo = "sha1";
+			};
+		};
+
+	};
+
+	configurations {
+		default = "config-1";
+
+		config-1 {
+			description = "db845c kernel-5.15.0 configuration";
+			kernel = "kernel-1";
+			ramdisk = "ramdisk-1";
+			fdt = "fdt-1";
+		};
+	};
+};
diff --git a/board/qualcomm/dragonboard845c/dragonboard845c.c b/board/qualcomm/dragonboard845c/dragonboard845c.c
new file mode 100644
index 0000000000..c7685de306
--- /dev/null
+++ b/board/qualcomm/dragonboard845c/dragonboard845c.c
@@ -0,0 +1,9 @@ 
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * This empty file prevents make linking error.
+ * No custom logic for dragonboard845c so far.
+ *
+ * (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
+ */
+
+void noop(void) {}
diff --git a/configs/dragonboard845c_defconfig b/configs/dragonboard845c_defconfig
new file mode 100644
index 0000000000..a19e46a74b
--- /dev/null
+++ b/configs/dragonboard845c_defconfig
@@ -0,0 +1,28 @@ 
+CONFIG_ARM=y
+CONFIG_SKIP_LOWLEVEL_INIT=y
+CONFIG_COUNTER_FREQUENCY=19000000
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_SNAPDRAGON=y
+CONFIG_DEFAULT_DEVICE_TREE="dragonboard845c"
+CONFIG_TARGET_DRAGONBOARD845C=y
+CONFIG_IDENT_STRING="\nQualcomm-DragonBoard 845C"
+CONFIG_SYS_LOAD_ADDR=0x80000000
+CONFIG_FIT=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_BOOTDELAY=5
+CONFIG_SAVE_PREV_BL_FDT_ADDR=y
+CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR=y
+# CONFIG_DISPLAY_CPUINFO is not set
+CONFIG_HUSH_PARSER=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_BMP=y
+# CONFIG_NET is not set
+CONFIG_CLK=y
+CONFIG_MSM_GPIO=y
+CONFIG_PM8916_GPIO=y
+CONFIG_PINCTRL=y
+CONFIG_DM_PMIC=y
+CONFIG_PMIC_PM8916=y
+CONFIG_MSM_GENI_SERIAL=y
+CONFIG_SPMI_MSM=y
+CONFIG_LMB_MAX_REGIONS=64
diff --git a/doc/board/qualcomm/sdm845.rst b/doc/board/qualcomm/sdm845.rst
index b6642c9579..8ef4749287 100644
--- a/doc/board/qualcomm/sdm845.rst
+++ b/doc/board/qualcomm/sdm845.rst
@@ -35,9 +35,25 @@  Pack android boot image
 ^^^^^^^^^^^^^^^^^^^^^^^
 We'll assemble android boot image with ``u-boot.bin`` instead of linux kernel,
 and FIT image instead of ``initramfs``. Android bootloader expect gzipped kernel
-with appended dtb, so let's mimic linux to satisfy stock bootloader:
+with appended dtb, so let's mimic linux to satisfy stock bootloader.
 
-- create dump dtb::
+Boards
+------------
+starqlte
+^^^^^^^^^^^^
+
+The starqltechn is a production board for Samsung S9 (SM-G9600) phone,
+based on the Qualcomm SDM845 SoC.
+
+Steps:
+
+- Build u-boot::
+
+	$ export CROSS_COMPILE=<aarch64 toolchain prefix>
+	$ make starqltechn_defconfig
+	$ make
+
+- Create dump dtb::
 
 	workdir=/tmp/prepare_payload
 	mkdir -p "$workdir"
@@ -56,10 +72,15 @@  with appended dtb, so let's mimic linux to satisfy stock bootloader:
 	};
 	EOF
 
-- gzip u-boot ``gzip u-boot.bin``
-- append dtb to gzipped u-boot: ``cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb``
+- gzip u-boot::
+
+	gzip u-boot.bin
 
-Now we've got everything to build android boot image:::
+- Append dtb to gzipped u-boot::
+
+	cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
+
+- Now we've got everything to build android boot image::
 
 	mkbootimg --base 0x0 --kernel_offset 0x00008000 \
 	--ramdisk_offset 0x02000000 --tags_offset 0x01e00000 \
@@ -68,16 +89,69 @@  Now we've got everything to build android boot image:::
 	--kernel u-boot.bin.gz-dtb \
 	-o boot.img
 
-Flash image with your phone's flashing method.
+- Flash image with your phone's flashing method.
 
-Boards
-------------
-starqlte
-^^^^^^^^^^^^
+More information can be found on the `Samsung S9 page`_.
 
-The starqltechn is a production board for Samsung S9 (SM-G9600) phone,
-based on the Qualcomm SDM845 SoC.
+dragonboard845c
+^^^^^^^^^^^^^^^
 
-More information can be found on the `Samsung S9 page`_.
+The dragonboard845c is a Qualcomm Robotics RB3 Development Platform, based on
+the Qualcomm SDM845 SoC.
+
+Steps:
+
+- Build u-boot::
+
+	$ export CROSS_COMPILE=<aarch64 toolchain prefix>
+	$ make dragonboard845c_defconfig
+	$ make
+
+- Create dummy dtb::
+
+	workdir=/tmp/prepare_payload
+	mkdir -p "$workdir"
+	mock_dtb="$workdir"/payload_mock.dtb
+
+	dtc -I dts -O dtb -o "$mock_dtb" << EOF
+	/dts-v1/;
+	/ {
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		memory@80000000 {
+			device_type = "memory";
+			/* We expect the bootloader to fill in the size */
+			reg = <0 0x80000000 0 0>;
+		};
+
+		chosen { };
+	};
+	EOF
+
+- gzip u-boot::
+
+	gzip u-boot.bin
+
+- Append dtb to gzipped u-boot::
+
+	 cat u-boot.bin.gz "$mock_dtb" > u-boot.bin.gz-dtb
+
+- A ``db845c.its`` file can be found in ``board/qualcomm/dragonboard845c/``
+  directory. It expects a folder as ``db845c_imgs/`` in the main directory
+  containing pre-built kernel, dts and ramdisk images. See ``db845c.its``
+  for full path to images::
+
+	mkimage -f db845c.its db845c.itb
+
+- Now we've got everything to build android boot image::
+
+	mkbootimg --kernel u-boot.bin.gz-dtb --ramdisk db845c.itb \
+	--output boot.img --pagesize 4096 --base 0x80000000
+
+- Flash boot.img using db845c fastboot method.
+
+More information can be found on the `DragonBoard 845c page`_.
 
 .. _Samsung S9 page: https://en.wikipedia.org/wiki/Samsung_Galaxy_S9
+.. _DragonBoard 845c page: https://www.96boards.org/product/rb3-platform/
diff --git a/include/configs/dragonboard845c.h b/include/configs/dragonboard845c.h
new file mode 100644
index 0000000000..108dde199b
--- /dev/null
+++ b/include/configs/dragonboard845c.h
@@ -0,0 +1,28 @@ 
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration file for Dragonboard 845c, based on Qualcomm SDA845 chip
+ *
+ * (C) Copyright 2022 Sumit Garg <sumit.garg@linaro.org>
+ */
+
+#ifndef __CONFIGS_SDM845_H
+#define __CONFIGS_SDM845_H
+
+#include <linux/sizes.h>
+#include <asm/arch/sysmap-sdm845.h>
+
+#define CONFIG_SYS_BAUDRATE_TABLE	{ 115200, 230400, 460800, 921600 }
+
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"bootm_size=0x5000000\0"	\
+	"bootm_low=0x80000000\0"	\
+	"bootcmd=bootm $prevbl_initrd_start_addr\0"
+
+/* Size of malloc() pool */
+#define CONFIG_SYS_BOOTM_LEN	SZ_64M
+
+/* Monitor Command Prompt */
+#define CONFIG_SYS_CBSIZE	512
+#define CONFIG_SYS_MAXARGS	64
+
+#endif