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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 55F45C433F5 for ; Thu, 11 Nov 2021 11:21:38 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5D26061058 for ; Thu, 11 Nov 2021 11:21:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5D26061058 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=blueri.se Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A66E8839F0; Thu, 11 Nov 2021 12:21:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=blueri.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 71F2683A1A; Thu, 11 Nov 2021 12:21:33 +0100 (CET) Received: from pwildt.genua.de (pwildt.genua.de [80.154.94.49]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3858A83748 for ; Thu, 11 Nov 2021 12:21:29 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=blueri.se Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=patrick@blueri.se Received: from lx2k.blueri.se (pc19f8246.dip0.t-ipconnect.de [193.159.130.70]) by pwildt.genua.de (OpenSMTPD) with ESMTPSA id a52afcc2 (TLSv1.3:AEAD-CHACHA20-POLY1305-SHA256:256:NO); Thu, 11 Nov 2021 12:21:28 +0100 (CET) Date: Thu, 11 Nov 2021 12:21:26 +0100 From: Patrick Wildt To: Vagrant Cascadian Cc: Stefano Babic , Fabio Estevam , u-boot@lists.denx.de, "Lukas F. Hartmann" Subject: Re: [PATCH v2 2/2] board: mntre: imx8mq: Add MNT Reform 2 board support Message-ID: References: <878rxvhck1.fsf@ponder> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878rxvhck1.fsf@ponder> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean On Wed, Nov 10, 2021 at 02:26:54PM -0800, Vagrant Cascadian wrote: > On 2021-09-02, Patrick Wildt wrote: > > The MNT Reform 2 is a modular DIY laptop. In its initial version it > > is based on the BoundaryDevices i.MX8MQ SoM. Some parts have been > > lifted from BoundaryDevices official U-Boot downstream project. > > Thanks for working on this! > > I'm struggling a bit getting it to actually boot; how is this supposed > to be installed to the device? > > I've built with the two applied patches on a patched v2021.10, copying > various firmware parts from: > > https://source.mnt.re/reform/reform-boundary-uboot/-/blob/master/bl31-iMX8MQ.bin > https://source.mnt.re/reform/reform-boundary-uboot/-/blob/master/lpddr4_pmu_train_1d_dmem.bin > https://source.mnt.re/reform/reform-boundary-uboot/-/blob/master/lpddr4_pmu_train_1d_imem.bin > https://source.mnt.re/reform/reform-boundary-uboot/-/blob/master/lpddr4_pmu_train_2d_dmem.bin > https://source.mnt.re/reform/reform-boundary-uboot/-/blob/master/lpddr4_pmu_train_2d_imem.bin > > export BL31=bl31-iMX8MQ.bin > > make imx8mq_reform2_defconfig > make > make flash.bin > > Then grepping various other README's from imx8mq devices, I tried two > different processes: > > dd if=flash.bin of=/dev/sd[x] bs=1K seek=33 You only need to dd flash.bin, the command looks fine. > and: > > dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 conv=sync > dd if=u-boot.itb of=/dev/sd[x] bs=1024 seek=384 conv=sync > > Both simply hanging with: > > U-Boot SPL 2021.10 (Jan 01 1970 - 00:00:01 +0000) There have been a few changes in U-Boot since I sent my patchset, it's possible the diff by itself might not be enough. I will send out a new patchset soon, but the move to Binman doesn't work for me yet. It's weird, because I don't see a diff to other i.MX8MQ platforms, so I'm still debugging that. Maybe the other i.MX8MQ boards don't work with Binman either? Keep note that the build procedure (how to supply bl31) changes once Binman is used. > Is the flash.bin step unecessary? I see DDR timing code in the patch > series; are corresponding lpddr4*.bin no longer necessary? The flash.bin has all bits: U-Boot, U-Boot SPL, lpddr4*.bin and bl31.bin lpddr4*.bin is the firmware for the DDR controller. So you need the timing information *and* the firmware. > I also tried building with an old version of arm-trusted-firmware > (v2.2), as that was the most recent upstream version that successfully > built. This seems to be a fork of ATF that has support for iMX8MQ, but > it is unclear which branch/tag/etc. should be used with the mnt/reform: > > https://source.codeaurora.org/external/imx/imx-atf Not sure right now, but I think I was using the one that's build on OpenBSD-current, which seems to be arm-trusted-firmware 2.5. I'll check it. > It would be nice to include a board README in the next patch revision to > spell out some of the details of exactly which other projects and > versions/comments/branches are expected to work with MNT Reform2. > This is nothing specific to the MNT Reform2. It's the same for all i.MX8MQ boards. ATF+DDR+U-Boot have to work together, and it doesn't matter which board it is. Hence I don't believe providing that kind information in a Reform-specific README makes sense. Patrick > > I would be nice if you could CC me on future patch series revisions to > be able to test. Thanks! > > > live well, > vagrant > > > > Signed-off-by: Patrick Wildt > > --- > > arch/arm/dts/imx8mq-mnt-reform2-u-boot.dtsi | 11 + > > arch/arm/mach-imx/imx8m/Kconfig | 6 + > > board/mntre/imx8mq_reform2/Kconfig | 12 + > > board/mntre/imx8mq_reform2/MAINTAINERS | 7 + > > board/mntre/imx8mq_reform2/Makefile | 12 + > > board/mntre/imx8mq_reform2/imx8mq_reform2.c | 213 ++++ > > board/mntre/imx8mq_reform2/lpddr4_timing.c | 1014 +++++++++++++++++ > > .../mntre/imx8mq_reform2/lpddr4_timing_ch2.h | 95 ++ > > board/mntre/imx8mq_reform2/spl.c | 260 +++++ > > configs/imx8mq_reform2_defconfig | 67 ++ > > include/configs/imx8mq_reform2.h | 151 +++ > > 11 files changed, 1848 insertions(+) > > create mode 100644 arch/arm/dts/imx8mq-mnt-reform2-u-boot.dtsi > > create mode 100644 board/mntre/imx8mq_reform2/Kconfig > > create mode 100644 board/mntre/imx8mq_reform2/MAINTAINERS > > create mode 100644 board/mntre/imx8mq_reform2/Makefile > > create mode 100644 board/mntre/imx8mq_reform2/imx8mq_reform2.c > > create mode 100644 board/mntre/imx8mq_reform2/lpddr4_timing.c > > create mode 100644 board/mntre/imx8mq_reform2/lpddr4_timing_ch2.h > > create mode 100644 board/mntre/imx8mq_reform2/spl.c > > create mode 100644 configs/imx8mq_reform2_defconfig > > create mode 100644 include/configs/imx8mq_reform2.h