public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
To: Angus Ainslie <angus@akkea.ca>,
	Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Cc: uboot-imx@nxp.com, festevam@gmail.com, peng.fan@nxp.com,
	marcel.ziswiler@toradex.com, t.remmet@phytec.de,
	tharvey@gateworks.com, jagan@amarulasolutions.com,
	iliev@ronetix.at, kernel@puri.sm, trini@konsulko.com,
	u-boot@lists.denx.de, sbabic@denx.de
Subject: Re: [PATCH v4] board: purism: add the Purism Librem5 phone
Date: Wed, 27 Apr 2022 23:43:26 +0300	[thread overview]
Message-ID: <c34d26f1-c4e0-a058-96aa-003d006efdbf@gmail.com> (raw)
In-Reply-To: <20220425170645.1261851-1-angus@akkea.ca>

On 25/04/2022 20:06, Angus Ainslie wrote:
> Initial commit of Librem5 u-boot and SPL
> 
> Signed-off-by: Angus Ainslie <angus@akkea.ca>
> Co-developed-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
> Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
> ---
> 
> All of the pre-requisite patches for this board are now upstream or in review.
> 
> Changes since v3:
> 
> Dropped unused MMCROOT
> Rebased on u-boot-imx
> Needs this patch to supress SPL warnings
> https://lists.denx.de/pipermail/u-boot/2022-April/482369.html
> 
> Changes since v2:
> 
> Cleanup Kconfig symbols used in librem5.h
> Cleanup various checkpatch issues
> Drop some un-used functions
> 
> Changes since v1:
> 
> Merged patches into a monolithic board patch
> Using DM drivers for devices in u-boot
> Added USB storage support for uSD rootfs
> Dropped many SPL_BUILD guarded define's
> Fixed documentation index
> 
>  arch/arm/dts/Makefile                        |    3 +-
>  arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi   |  134 ++
>  arch/arm/dts/imx8mq-librem5-r4.dts           |   35 +
>  arch/arm/dts/imx8mq-librem5.dtsi             | 1255 +++++++++++++++++
>  arch/arm/mach-imx/imx8m/Kconfig              |    9 +
>  board/purism/librem5/Kconfig                 |   15 +
>  board/purism/librem5/MAINTAINERS             |    8 +
>  board/purism/librem5/Makefile                |   13 +
>  board/purism/librem5/imximage-8mq-lpddr4.cfg |    8 +
>  board/purism/librem5/librem5.c               |  425 ++++++
>  board/purism/librem5/librem5.h               |  181 +++
>  board/purism/librem5/lpddr4_timing.c         | 1324 ++++++++++++++++++
>  board/purism/librem5/lpddr4_timing_b0.c      | 1191 ++++++++++++++++
>  board/purism/librem5/spl.c                   |  593 ++++++++
>  configs/librem5_defconfig                    |  142 ++
>  doc/board/index.rst                          |    1 +
>  doc/board/purism/index.rst                   |    9 +
>  doc/board/purism/librem5.rst                 |   60 +
>  include/configs/librem5.h                    |  113 ++
>  19 files changed, 5518 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi
>  create mode 100644 arch/arm/dts/imx8mq-librem5-r4.dts
>  create mode 100644 arch/arm/dts/imx8mq-librem5.dtsi
>  create mode 100644 board/purism/librem5/Kconfig
>  create mode 100644 board/purism/librem5/MAINTAINERS
>  create mode 100644 board/purism/librem5/Makefile
>  create mode 100644 board/purism/librem5/imximage-8mq-lpddr4.cfg
>  create mode 100644 board/purism/librem5/librem5.c
>  create mode 100644 board/purism/librem5/librem5.h
>  create mode 100644 board/purism/librem5/lpddr4_timing.c
>  create mode 100644 board/purism/librem5/lpddr4_timing_b0.c
>  create mode 100644 board/purism/librem5/spl.c
>  create mode 100644 configs/librem5_defconfig
>  create mode 100644 doc/board/purism/index.rst
>  create mode 100644 doc/board/purism/librem5.rst
>  create mode 100644 include/configs/librem5.h
> 
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 90f86e3fca..719fd7db8d 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -937,7 +937,8 @@ dtb-$(CONFIG_ARCH_IMX8M) += \
>  	imx8mp-venice-gw74xx.dtb \
>  	imx8mp-verdin.dtb \
>  	imx8mq-pico-pi.dtb \
> -	imx8mq-kontron-pitx-imx8m.dtb
> +	imx8mq-kontron-pitx-imx8m.dtb \
> +	imx8mq-librem5-r4.dtb
>  
>  dtb-$(CONFIG_ARCH_IMXRT) += imxrt1050-evk.dtb \
>  	imxrt1020-evk.dtb
> diff --git a/arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi b/arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi
> new file mode 100644
> index 0000000000..e3f780ca75
> --- /dev/null
> +++ b/arch/arm/dts/imx8mq-librem5-r4-u-boot.dtsi
> @@ -0,0 +1,134 @@
> +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
> +
> +/ {
> +	binman: binman {
> +		multiple-images;
> +	};
> +};
> +
> +&binman {
> +	u-boot-spl-ddr {
> +		filename = "u-boot-spl-ddr.bin";
> +		pad-byte = <0xff>;
> +		align-size = <4>;
> +		align = <4>;
> +
> +		u-boot-spl {
> +			align-end = <4>;
> +		};
> +
> +		blob_1: blob-ext@1 {
> +			filename = "lpddr4_pmu_train_1d_imem.bin";
> +			size = <0x8000>;
> +		};
> +
> +		blob_2: blob-ext@2 {
> +			filename = "lpddr4_pmu_train_1d_dmem.bin";
> +			size = <0x4000>;
> +		};
> +
> +		blob_3: blob-ext@3 {
> +			filename = "lpddr4_pmu_train_2d_imem.bin";
> +			size = <0x8000>;
> +		};
> +
> +		blob_4: blob-ext@4 {
> +			filename = "lpddr4_pmu_train_2d_dmem.bin";
> +			size = <0x4000>;
> +		};
> +	};
> +
> +	spl {
> +		filename = "spl.bin";
> +
> +		mkimage {
> +			args = "-n spl/u-boot-spl.cfgout -T imx8mimage -e 0x7e1000";
> +
> +			blob {
> +				filename = "u-boot-spl-ddr.bin";
> +			};
> +		};
> +	};
> +
> +	itb {
> +		filename = "u-boot.itb";
> +
> +		fit {
> +			description = "Configuration to load ATF before U-Boot";
> +			#address-cells = <1>;
> +			fit,external-offset = <CONFIG_FIT_EXTERNAL_OFFSET>;
> +
> +			images {
> +				uboot {
> +					description = "U-Boot (64-bit)";
> +					type = "standalone";
> +					arch = "arm64";
> +					compression = "none";
> +					load = <CONFIG_SYS_TEXT_BASE>;
> +
> +					uboot_blob: blob-ext {
> +						filename = "u-boot-nodtb.bin";
> +					};
> +				};
> +
> +				atf {
> +					description = "ARM Trusted Firmware";
> +					type = "firmware";
> +					arch = "arm64";
> +					compression = "none";
> +					load = <0x910000>;
> +					entry = <0x910000>;
> +
> +					atf_blob: blob-ext {
> +						filename = "bl31.bin";
> +					};
> +				};
> +
> +				fdt {
> +					description = "NAME";
> +					type = "flat_dt";
> +					compression = "none";
> +
> +					uboot_fdt_blob: blob-ext {
> +						filename = "u-boot.dtb";
> +					};
> +				};
> +			};
> +
> +			configurations {
> +				default = "conf";
> +
> +				conf {
> +					description = "NAME";
> +					firmware = "uboot";
> +					loadables = "atf";
> +					fdt = "fdt";
> +				};
> +			};
> +		};
> +	};
> +
> +	imx-boot {
> +		filename = "flash.bin";
> +		pad-byte = <0x00>;
> +
> +		spl: blob-ext@1 {
> +			offset = <0x0>;
> +			filename = "spl.bin";
> +		};
> +
> +		uboot: blob-ext@2 {
> +			offset = <0x57c00>;
> +			filename = "u-boot.itb";
> +		};
> +	};
> +};

These look mostly the same as imx8mq-u-boot.dtsi, try #include-ing that
instead of duplicating things here.

> +
> +[...]

      reply	other threads:[~2022-04-27 20:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-25 17:06 [PATCH v4] board: purism: add the Purism Librem5 phone Angus Ainslie
2022-04-27 20:43 ` Alper Nebi Yasak [this message]

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=c34d26f1-c4e0-a058-96aa-003d006efdbf@gmail.com \
    --to=alpernebiyasak@gmail.com \
    --cc=angus@akkea.ca \
    --cc=festevam@gmail.com \
    --cc=iliev@ronetix.at \
    --cc=jagan@amarulasolutions.com \
    --cc=kernel@puri.sm \
    --cc=marcel.ziswiler@toradex.com \
    --cc=peng.fan@nxp.com \
    --cc=sbabic@denx.de \
    --cc=sebastian.krzyszkowiak@puri.sm \
    --cc=t.remmet@phytec.de \
    --cc=tharvey@gateworks.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-imx@nxp.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