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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 ADFC6C4338F for ; Sat, 7 Aug 2021 13:08:32 +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 8C19F6103B for ; Sat, 7 Aug 2021 13:08:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8C19F6103B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gerhold.net 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 A61CE83183; Sat, 7 Aug 2021 15:08:06 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gerhold.net header.i=@gerhold.net header.b="lMn3wXOJ"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5C82A82CDE; Sat, 7 Aug 2021 15:07:55 +0200 (CEST) Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2716C82C30 for ; Sat, 7 Aug 2021 15:07:42 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=gerhold.net Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=stephan@gerhold.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1628341661; s=strato-dkim-0002; d=gerhold.net; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=a10rTGZ3n1uvLFXr3zg4oVefnsHAh62prOYbiCn1ukE=; b=lMn3wXOJmbWStolsaYgICi4tN3/7T+I64G42QFsqcvSpxXxtxDN79JYpyuNlAVObYN ef2My2/bHhFId5BnEKxPMTkCrnqCGoufrGz379y2zoueW+2JpE2XLa2XJF3amabCh9Mb 1mi9TzaU40Nv+j8u6qcp0miB3KTxWNihLyhIw1IEtewVXrjwXZj9VZDGaobvSD4vS5HN z0QyZZhD1D2kzngOlahyO8M1pEJnXHdBGm9qkqNqJR0/+9RJnZ2D6C7HB2jWseI8GIUL cazND/MXgKFc+YnvOoQdecz7CC+fSZV0T8Pmz1/F2uoiDDWhU+8MNArWeQAel3WzwQUw /6LA== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVORvLd4SsytBXTbAOHjRHIhr0eFeAWj8=" X-RZG-CLASS-ID: mo00 Received: from droid.. by smtp.strato.de (RZmta 47.31.0 DYNA|AUTH) with ESMTPSA id L01e9cx77D7eHns (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 7 Aug 2021 15:07:40 +0200 (CEST) From: Stephan Gerhold To: u-boot@lists.denx.de Cc: Linus Walleij , Tom Rini , Stephan Gerhold Subject: [PATCH 5/7] board: stemmy: Add basic Fastboot support Date: Sat, 7 Aug 2021 15:07:22 +0200 Message-Id: <20210807130724.155675-6-stephan@gerhold.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210807130724.155675-1-stephan@gerhold.net> References: <20210807130724.155675-1-stephan@gerhold.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Make use of the new drivers for ARM U8500 introduced in the U-Boot 2021.10 merge window by adding basic support for USB Fastboot with the "stemmy" board. As a first step this will always boot directly into USB Fastboot for now with the console displayed on the screen to make that obvious. Samsung uses quite strange GPT partition labels on these boards, so also add a bunch of fastboot_partition_alias_* to make this more easy to use. Signed-off-by: Stephan Gerhold --- arch/arm/dts/ste-ux500-samsung-stemmy.dts | 16 ++++++++++++++ configs/stemmy_defconfig | 14 ++++++++++++ include/configs/stemmy.h | 27 +++++++++++++++++++++++ 3 files changed, 57 insertions(+) diff --git a/arch/arm/dts/ste-ux500-samsung-stemmy.dts b/arch/arm/dts/ste-ux500-samsung-stemmy.dts index 7e7f4c823a..14be86086b 100644 --- a/arch/arm/dts/ste-ux500-samsung-stemmy.dts +++ b/arch/arm/dts/ste-ux500-samsung-stemmy.dts @@ -12,9 +12,25 @@ }; soc { + /* eMMC */ + mmc@80005000 { + status = "okay"; + + arm,primecell-periphid = <0x10480180>; + max-frequency = <100000000>; + bus-width = <8>; + + non-removable; + cap-mmc-highspeed; + }; + /* Debugging console UART */ uart@80007000 { status = "okay"; }; + + mcde@a0350000 { + status = "okay"; + }; }; }; diff --git a/configs/stemmy_defconfig b/configs/stemmy_defconfig index f31960b814..1dbec70f36 100644 --- a/configs/stemmy_defconfig +++ b/configs/stemmy_defconfig @@ -3,6 +3,8 @@ CONFIG_ARCH_U8500=y CONFIG_SYS_TEXT_BASE=0x100000 CONFIG_NR_DRAM_BANKS=2 CONFIG_DEFAULT_DEVICE_TREE="ste-ux500-samsung-stemmy" +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="run fastbootcmd" CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_HUSH_PARSER=y CONFIG_CMD_CONFIG=y @@ -14,5 +16,17 @@ CONFIG_CMD_PART=y CONFIG_CMD_GETTIME=y CONFIG_EFI_PARTITION=y # CONFIG_NET is not set +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_FASTBOOT_BUF_ADDR=0x18100000 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_FLASH_MMC_DEV=0 # CONFIG_MMC_HW_PARTITIONING is not set +CONFIG_USB=y +CONFIG_USB_MUSB_GADGET=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_VENDOR_NUM=0x04e8 +CONFIG_USB_GADGET_PRODUCT_NUM=0x685d +CONFIG_DM_VIDEO=y +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_VIDEO_MCDE_SIMPLE=y # CONFIG_EFI_LOADER is not set diff --git a/include/configs/stemmy.h b/include/configs/stemmy.h index b94ef91c2b..9721c21d61 100644 --- a/include/configs/stemmy.h +++ b/include/configs/stemmy.h @@ -26,4 +26,31 @@ /* Generate initrd atag for downstream kernel (others are copied in stemmy.c) */ #define CONFIG_INITRD_TAG +/* Linux does not boot if FDT / initrd is loaded to end of RAM */ +#define BOOT_ENV \ + "fdt_high=0x6000000\0" \ + "initrd_high=0x6000000\0" + +#define CONSOLE_ENV \ + "stdin=serial\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +#define FASTBOOT_ENV \ + "fastboot_partition_alias_boot=Kernel\0" \ + "fastboot_partition_alias_recovery=Kernel2\0" \ + "fastboot_partition_alias_system=SYSTEM\0" \ + "fastboot_partition_alias_cache=CACHEFS\0" \ + "fastboot_partition_alias_hidden=HIDDEN\0" \ + "fastboot_partition_alias_userdata=DATAFS\0" + +#define BOOTCMD_ENV \ + "fastbootcmd=echo '*** FASTBOOT MODE ***'; fastboot usb 0\0" + +#define CONFIG_EXTRA_ENV_SETTINGS \ + BOOT_ENV \ + CONSOLE_ENV \ + FASTBOOT_ENV \ + BOOTCMD_ENV + #endif -- 2.32.0