From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7124C433F5 for ; Wed, 27 Apr 2022 20:43:48 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8CEEA83942; Wed, 27 Apr 2022 22:43:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="AC9J91uT"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 61A8383B9F; Wed, 27 Apr 2022 22:43:45 +0200 (CEST) Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EFCA680FF0 for ; Wed, 27 Apr 2022 22:43:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-wr1-x436.google.com with SMTP id k2so4094883wrd.5 for ; Wed, 27 Apr 2022 13:43:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=wpEOe1RnJlInyBco0L+cxukVvYCF059y8XWKec3SeVU=; b=AC9J91uTrY2EpwV3lj5ZSNEBTTbuO95ZijQ6WNANUC5oRGOAQfJ7y0iqffI5znUvjF 1ooRgIgX/LE/OoAaQo0OrScWCYv8kWz+StTaTSWT2oyJpiR4bkRXoCEsmmXWTuAItgQO Lr74+70VU9/MUB98XqSYS3rXyl9OuKacICAmI5EayPapeR0nWPBkb6HQG6RkAjR+54w5 qS+jcJQtgSyeqzicNwUp3uHX9HAtFX8/i08uQ/s+2P4cMOnxvNA3oirA8YbRQk4JccJi TSJHFArFpMgjN6njkcd+MoktdWa5BV7dZYoyWQUP02F6tzutmJUOtNGG3Jipa6w6Zv44 yDMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=wpEOe1RnJlInyBco0L+cxukVvYCF059y8XWKec3SeVU=; b=FUQ1j/XXrcz9EN0rmHfy/DU5wAU32IZQWqffXFxbvFg4t38YyKqUysu6ksXuZRX40N nebMzKoXy2rrmN+RjJDIRS6o1Pe2UIPc56L65eXzUjYVg1nMQdQUvc3MpQaZoOnTpLbG mJGF+UpCMfuhSBGpq+tqCXxN/rmk87kOJXWfG06P7OL9dqYPBsmY/PoBgpTAlt4bTD5W 4rIBKXtIXxoUW2KE/SVRolub/Ah5anB1LJvvQe+xn5VLjzcSMg8oDKzEL7sMdjuqEX15 5r2+zHgTAQ8ZMLejG7rUJlqM0GcaRfnmd/jereeTpDQ0CQGnussqPjkiha3oZIE6P3RP hQJg== X-Gm-Message-State: AOAM531/icmaKSJ7ZaH0e+QAGbyZtmA+YLfatqeLv3Wu+fyrUpJu091Q GXqpIkMf1QNt8kVAFuhry7Pl5R7kDuQ= X-Google-Smtp-Source: ABdhPJyYs2Z2BtjV3Ed28tffNoOWlL3n8YdT6Q30CXGfkh3jDTo88ZITmDyD5nmg7ojZXewVMhc0vw== X-Received: by 2002:a5d:4702:0:b0:206:b8d:3dce with SMTP id y2-20020a5d4702000000b002060b8d3dcemr24316793wrq.646.1651092221544; Wed, 27 Apr 2022 13:43:41 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id l14-20020adffe8e000000b00207af9cdd90sm13796275wrr.39.2022.04.27.13.43.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Apr 2022 13:43:41 -0700 (PDT) Message-ID: Date: Wed, 27 Apr 2022 23:43:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH v4] board: purism: add the Purism Librem5 phone Content-Language: en-US To: Angus Ainslie , Sebastian Krzyszkowiak 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 References: <20220425170645.1261851-1-angus@akkea.ca> From: Alper Nebi Yasak In-Reply-To: <20220425170645.1261851-1-angus@akkea.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean On 25/04/2022 20:06, Angus Ainslie wrote: > Initial commit of Librem5 u-boot and SPL > > Signed-off-by: Angus Ainslie > Co-developed-by: Sebastian Krzyszkowiak > Signed-off-by: Sebastian Krzyszkowiak > --- > > 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 = ; > + > + images { > + uboot { > + description = "U-Boot (64-bit)"; > + type = "standalone"; > + arch = "arm64"; > + compression = "none"; > + load = ; > + > + 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. > + > +[...]