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 X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F2BAC11F66 for ; Tue, 29 Jun 2021 14:16:31 +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 8B3D261DB3 for ; Tue, 29 Jun 2021 14:16:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8B3D261DB3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A5D99831B4; Tue, 29 Jun 2021 16:16:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com 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 3BBCB8318D; Tue, 29 Jun 2021 16:16:27 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id D3B508318D for ; Tue, 29 Jun 2021 16:16:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC65A106F; Tue, 29 Jun 2021 07:16:22 -0700 (PDT) Received: from slackpad.fritz.box (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BF52D3F718; Tue, 29 Jun 2021 07:16:21 -0700 (PDT) Date: Tue, 29 Jun 2021 15:15:52 +0100 From: Andre Przywara To: Tom Rini Cc: Simon Glass , u-boot@lists.denx.de, Linus Walleij , Liviu Dudau Subject: Re: [PATCH] arm: Add (back) VExpress boards support Message-ID: <20210629151552.756ab8b2@slackpad.fritz.box> In-Reply-To: <20210629121122.GV9516@bill-the-cat> References: <20210629114555.20805-1-andre.przywara@arm.com> <20210629121122.GV9516@bill-the-cat> Organization: Arm Ltd. X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Tue, 29 Jun 2021 08:11:22 -0400 Tom Rini wrote: > On Tue, Jun 29, 2021 at 12:45:55PM +0100, Andre Przywara wrote: > > > The v2021.07 merge window saw the removal of the Arm Ltd. Versatile > > Express platform, along with their CA5, CA9 and TC2 boards. The trigger > > was the missing conversion of the MMC driver. > > > > Some folks complained about that internally, so bring those boards back, > > but better than ever: > > - Use DM and OF_CONTROL for all the boards. Use the .dts files from the > > latest Linux kernel (5.13) for that. > > - Move the board selection choice into the platform's Kconfig. > > - Clean up some shared config and common definitions. > > - Drop obsolete features like ATAGs support. > > - Switch to the DM_ETH version of the SMC911X Ethernet driver. > > - Drop MMC support. > > > > The PL180 MMC driver actually supports DM_MMC, but that requires a > > DM_GPIO driver for the card detect GPIO, which we don't have. This > > specific GPIO is actually handled via the "sysregs" device, so we would > > need a driver for that. QEMU does not emulate this part, also the DT > > description is somewhat "special", so this is left for later. > > > > This version compiles without any warning for all three boards now. > > Tested on QEMU. > > > > Signed-off-by: Andre Przywara > > --- > > Hi, > > > > this relies on the SMC911x driver DT changes, as posted here: > > https://lists.denx.de/pipermail/u-boot/2021-June/452989.html > > I put a version with the changes broken down here: > > https://github.com/Andre-ARM/u-boot/commits/tc2-history > > > > This was tested on QEMU, for vexpress_ca15_tc2_defconfig with: > > $ qemu-system-arm -M vexpress-a15,secure=on -cpu cortex-a15 -m 1G -smp 1 \ > > -drive file=tramp-tc2.bin,if=pflash,format=raw,read-only \ > > -device loader,file=u-boot.bin,addr=0x80800000 -nographic > > > > Where tramp-tc2.bin is a trampoline replacing the board's firmware: > > 00000000 00 00 a0 e3 80 00 48 e3 10 ff 2f e1 > > (mov r0, #0; movt r0, #0x8080; bx r0) > > > > The vexpress_ca9x4_defconfig uses a different memory map, so the runes are: > > $ qemu-system-arm -M vexpress-a9 -cpu cortex-a9 -m 1G -smp 1 \ > > -drive file=tramp-ca9.bin,if=pflash,format=raw,read-only \ > > -device loader,file=u-boot.bin,addr=0x60800000 -nographic > > > > tramp-ca9.bin: > > 00000000 00 00 a0 e3 80 00 46 e3 10 ff 2f e1 > > (mov r0, #0; movt r0, #0x6080; bx r0) > > My big question is how do we run this in CI? Or does it not _need_ that > firmware file to really exist? Or is there a pending change to > https://gitlab.denx.de/u-boot/u-boot-test-hooks.git to generate / just > have exist those magic empty bins? Thanks! So from digging into this I see that this loads U-Boot's ELF build, via QEMU's -kernel parameter. Which is fine, but not really what is happening on real hardware. I checked and the v2021.04 version worked with this approach, but my build does not. I will have a look into this now. Thanks! Andre