From patchwork Mon Apr 15 11:50:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1923700 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=AcJd5iQN; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJ59831fQz1yXv for ; Mon, 15 Apr 2024 21:51:08 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id C8E2A881EF; Mon, 15 Apr 2024 13:50:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.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=canonical.com header.i=@canonical.com header.b="AcJd5iQN"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9702C88089; Mon, 15 Apr 2024 13:50:54 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (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 9035B87D5F for ; Mon, 15 Apr 2024 13:50:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 1730C411DE for ; Mon, 15 Apr 2024 11:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1713181852; bh=2zQphO6LktZ2PZImkiw5jaUfGGJl1HlzNOoxQfzKoZE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AcJd5iQNxBZ6XLLR5FLG340ll5fuQH1/xqiRRYpn9X80rL+0KCahtBTFsQoRsxUQg Y80dBoyfqsyZHSdVWqaAEz0XWKbT2DF8Yfl6XdN1Jvu0PH/A3mWUltK2r2MVbDKurT tNv7D+UhP0l4TBVwcaRNIv04g8NMdVRWjY+79SmnoMA0AH9KKVXWXcY8/RECv+dyWk GfztWIRPA/gP+1WJSYpvKcUVuAPE/H4UtBP50ewlwPKwt/vlICJ9EVKRwPW/qdHqcu LXEm6gqpDtQedJlbiLsMlseiWuOpODGGjTosGDaaASAnOkvGdjk4l2cb5OHt48Co85 aKcBGK/tQqhQw== Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-417c92b77e1so13490265e9.1 for ; Mon, 15 Apr 2024 04:50:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713181851; x=1713786651; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=2zQphO6LktZ2PZImkiw5jaUfGGJl1HlzNOoxQfzKoZE=; b=NnnDzZu5JIfi0bhYpvp6QKUR5rRvoSFDSaP4g1lWKbV9k2pznGrFiGO8if3eL6r6VH GBnpOWo/c3HglTmnTXpNFQXuHYFEdWXVTNSaDhhNw2UyzP011IqnvvLdRR0VkYPNX9wN 4eXVAgKvQo7dEU+G8Aw/gHACl41Qh3HOfNvzfc3zKlaHWgCvJ4U+Uorgy4dYoYRwpH7h zk28WSfGMSaEGFqA+HgTlFKH0K92qmZ0Yb2lMOzFQ5CJHz+RUw+jbjfVA4tm6JWgbXEE z4qmguczHcVXs8OaXMht1zPEHW7tvDbHeDXafLiAqNohc5eiW4MvZTrvAx4Pm4ueuM3Q rVMg== X-Forwarded-Encrypted: i=1; AJvYcCUOeQz6wCUWZ4iyCedTr3e5I33PMZwlK4iIqaQj8GAeBNutHBdhv17/QW3VoaQm2OTGBpC+g6UDbFoIxrI3DBO33KpnvA== X-Gm-Message-State: AOJu0YzqfeFLhCaRf52hOCD0hyVNF5zrWTDZ8SLXGMK5WT4FUGMXRl0A Hw6D6ItphtuezUm0f4r1ZWFrlPexcklJ9qYmmIKkYexHmVLokvpqGYgMcwidaCKxXnKX4AsexgC 3pHYmX8EqNztlvQgVfbAwB0S+vmigKzO6hB/6dYQkVWq30GfQWfjoADOIL0p/losKqRI= X-Received: by 2002:a05:600c:3491:b0:418:2323:e87 with SMTP id a17-20020a05600c349100b0041823230e87mr4054189wmq.25.1713181851571; Mon, 15 Apr 2024 04:50:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHv9aO74IafC7mtph9tQruVoEBQ59Kna8ZjYPWm/+Ma2M1wXHFndevKYtxmsTcgopBGQELvqQ== X-Received: by 2002:a05:600c:3491:b0:418:2323:e87 with SMTP id a17-20020a05600c349100b0041823230e87mr4054174wmq.25.1713181851280; Mon, 15 Apr 2024 04:50:51 -0700 (PDT) Received: from workstation5.fritz.box (ip-062-143-245-032.um16.pools.vodafone-ip.de. [62.143.245.32]) by smtp.gmail.com with ESMTPSA id j10-20020adff00a000000b003469e7f5c52sm11924130wro.80.2024.04.15.04.50.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 04:50:50 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Lukasz Tekieli , Aurelien Jarno , Shengyu Qu , Shiji Yang , Seung-Woo Kim , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 1/4] board: starfive: function to read eMMC size Date: Mon, 15 Apr 2024 13:50:32 +0200 Message-ID: <20240415115035.46199-2-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> References: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean The EEPROM provides information about the size of the EEPROM. Provide a new function get_mmc_size_from_eeprom() to read it. Signed-off-by: Heinrich Schuchardt --- arch/riscv/include/asm/arch-jh7110/eeprom.h | 7 +++++++ board/starfive/visionfive2/Kconfig | 9 +++++++++ .../visionfive2/visionfive2-i2c-eeprom.c | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/arch/riscv/include/asm/arch-jh7110/eeprom.h b/arch/riscv/include/asm/arch-jh7110/eeprom.h index 62d184aeb57..17395d4269e 100644 --- a/arch/riscv/include/asm/arch-jh7110/eeprom.h +++ b/arch/riscv/include/asm/arch-jh7110/eeprom.h @@ -12,6 +12,13 @@ u8 get_pcb_revision_from_eeprom(void); u32 get_ddr_size_from_eeprom(void); +/** + * get_mmc_size_from_eeprom() - read MMC size form EEPROM + * + * @return: size in GiB or 0 on error. + */ +u32 get_mmc_size_from_eeprom(void); + /** * get_product_id_from_eeprom - get product ID string * diff --git a/board/starfive/visionfive2/Kconfig b/board/starfive/visionfive2/Kconfig index 2186a939646..d7e8a7a7d78 100644 --- a/board/starfive/visionfive2/Kconfig +++ b/board/starfive/visionfive2/Kconfig @@ -50,4 +50,13 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply PHY_LIB imply PHY_MSCC +config STARFIVE_NO_EMMC + bool "Report eMMC size as zero" + help + The serial number string in the EEPROM is meant to report the + size of onboard eMMC. Unfortunately some Milk-V Mars CM Lite + modules without eMMC show a non-zero size here. + + Set to 'Y' if you have a Mars CM Lite module. + endif diff --git a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c index ddef7d61235..cd3d8bd51a6 100644 --- a/board/starfive/visionfive2/visionfive2-i2c-eeprom.c +++ b/board/starfive/visionfive2/visionfive2-i2c-eeprom.c @@ -548,6 +548,24 @@ u32 get_ddr_size_from_eeprom(void) return hextoul(&pbuf.eeprom.atom1.data.pstr[14], NULL); } +u32 get_mmc_size_from_eeprom(void) +{ + u32 size; + + if (IS_ENABLED(CONFIG_STARFIVE_NO_EMMC)) + return 0; + + if (read_eeprom()) + return 0; + + size = dectoul(&pbuf.eeprom.atom1.data.pstr[19], NULL); + + if (pbuf.eeprom.atom1.data.pstr[21] == 'T') + size <<= 10; + + return size; +} + U_BOOT_LONGHELP(mac, "\n" " - display EEPROM content\n" From patchwork Mon Apr 15 11:50:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1923702 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=FxA1uoaH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJ59L0Rpnz1yXv for ; Mon, 15 Apr 2024 21:51:18 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3A1C888089; Mon, 15 Apr 2024 13:50:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.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=canonical.com header.i=@canonical.com header.b="FxA1uoaH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E9FD8814A; Mon, 15 Apr 2024 13:50:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (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 B9BBF88158 for ; Mon, 15 Apr 2024 13:50:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 3E5AF3F44E for ; Mon, 15 Apr 2024 11:50:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1713181853; bh=4NAFeDaUZWPrleNuu1mePXnsMZQ5brYAVWCYoD/L+70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FxA1uoaH+5z86dD9XcwhcX6wiZMbVZMuW62IGbz82Xzvfar6TL7MZE22dVhx67eNu DTyZI8k1HfLXk8WvGuQP5zApq1m38cqY+E6etwECGUQm+TN5jRNi7MnN1E2vIgJRju CRTh1/zywK8YsQ9Mff0DcSDyjIN9vzWXL6RBNSVPFz0uzN0yx3U6PDqZOp7gAUAEKr 5AKjkCgcMaosEj3LTAC/lSsj5o4JEs4m8lW83w4qrmrQmBiLGJ5+z7dxGHSCJTnn1M xq7j6CilLc7elttqq8Esc2xo5oqIGm+2R4VgF1x3OZ6T01KLC7OZ3Kn3oJRwAp4VHw wY0pJSUFXSAyw== Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-343da0a889dso2451389f8f.0 for ; Mon, 15 Apr 2024 04:50:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713181853; x=1713786653; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4NAFeDaUZWPrleNuu1mePXnsMZQ5brYAVWCYoD/L+70=; b=PMIEah5CZW6v7AJWRSQGves1/Y1ELZ9ZKPwrXcCckvA0BGDaf6dr2i0K5wiLLxcqKV z7l18ZHrfDOGbOKFXTKJm9vjiO/kv7Cvf3SuPqcOr90UZ8cMjNpe7YGwIiFC1YU0Raaq mSIELXsAzEfQtr3TAFStzmUr5FJ7MgH5/uGtkBg1j7oN5u/saOwAOispmGNM61rFTMc3 MRB7KwGvzgyNPPMfF3p/xxIgID+gDDNT+ZnwvTbG6r8bdGbu9U/axEehwOfNXlb660gG FJozjFJPn9GpQsQfzL0sX+zZ85qD5xXdAl/ViPKtXM+ZQw1FnQtqTX6k4eSinW0vV8TJ gDpw== X-Forwarded-Encrypted: i=1; AJvYcCV9XHzo6MdmH2FEwl0/ik/yndxBJitmqLiT6/HozwTeDIWVC/NiYltqbZxeMCO5ThPz3IuNVGcQUIrXTfbdT5ypp+mgaQ== X-Gm-Message-State: AOJu0YxIuEF2kP5Bcd49wMBKO63IN7QauJKYq16xTS/y0viHai2IK+Gh qnbKNi93thu+P6KxZzC+SIAXoznYEhPkEYfoubXiB+EbvK6xX4dxqYmBh5jrHACnmRLeJ50cs0j C+7RSu4bJX1L0K0xbzAC0ir2nhuyobaxXOWjN82fkA7GZg5vVQscOWDFcBKMR3sHIPLk= X-Received: by 2002:adf:e28a:0:b0:343:78da:9817 with SMTP id v10-20020adfe28a000000b0034378da9817mr6979830wri.68.1713181852945; Mon, 15 Apr 2024 04:50:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHjMRvcYv8q57FF7DfXRnwc/fP0JfzSiRZ4W2ugthec/62XdHQl2ISVHz7s14azjzikkQIkZw== X-Received: by 2002:adf:e28a:0:b0:343:78da:9817 with SMTP id v10-20020adfe28a000000b0034378da9817mr6979816wri.68.1713181852541; Mon, 15 Apr 2024 04:50:52 -0700 (PDT) Received: from workstation5.fritz.box (ip-062-143-245-032.um16.pools.vodafone-ip.de. [62.143.245.32]) by smtp.gmail.com with ESMTPSA id j10-20020adff00a000000b003469e7f5c52sm11924130wro.80.2024.04.15.04.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 04:50:52 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Lukasz Tekieli , Aurelien Jarno , Shengyu Qu , Shiji Yang , Seung-Woo Kim , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 2/4] board: add support for Milk-V Mars CM Date: Mon, 15 Apr 2024 13:50:33 +0200 Message-ID: <20240415115035.46199-3-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> References: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean We already support the VisionFive 2 and the Milk-V Mars board by patching the VisionFive 2 device tree. With this patch the same is done for the Milk-V Mars CM. Signed-off-by: Heinrich Schuchardt --- board/starfive/visionfive2/spl.c | 27 ++++++++++++++++++- .../visionfive2/starfive_visionfive2.c | 11 +++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index 45848db6d8b..bb0f28d7aad 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -129,6 +129,29 @@ void spl_fdt_fixup_mars(void *fdt) } } +void spl_fdt_fixup_marc(void *fdt) +{ + const char *compat; + const char *model; + + spl_fdt_fixup_mars(fdt); + + if (!get_mmc_size_from_eeprom()) { + int offset; + + model = "Milk-V Mars CM SDCard"; + compat = "milkv,mars-cm-sdcard\0starfive,jh7110"; + + offset = fdt_path_offset(fdt, "/soc/pinctrl/mmc0-pins/mmc0-pins-rest"); + fdt_setprop_u32(fdt, offset, "pinmux", 0xff130016); + } else { + model = "Milk-V Mars CM eMMC"; + compat = "milkv,mars-cm-emmc\0starfive,jh7110"; + } + fdt_setprop(fdt, fdt_path_offset(fdt, "/"), "compatible", compat, sizeof(compat)); + fdt_setprop_string(fdt, fdt_path_offset(fdt, "/"), "model", model); +} + void spl_fdt_fixup_version_a(void *fdt) { static const char compat[] = "starfive,visionfive-2-v1.2a\0starfive,jh7110"; @@ -236,7 +259,9 @@ void spl_perform_fixups(struct spl_image_info *spl_image) pr_err("Can't read EEPROM\n"); return; } - if (!strncmp(product_id, "MARS", 4)) { + if (!strncmp(product_id, "MARC", 4)) { + spl_fdt_fixup_marc(spl_image->fdt_addr); + } else if (!strncmp(product_id, "MARS", 4)) { spl_fdt_fixup_mars(spl_image->fdt_addr); } else if (!strncmp(product_id, "VF7110", 6)) { version = get_pcb_revision_from_eeprom(); diff --git a/board/starfive/visionfive2/starfive_visionfive2.c b/board/starfive/visionfive2/starfive_visionfive2.c index a86bca533b2..be6ca85b030 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -17,6 +17,10 @@ DECLARE_GLOBAL_DATA_PTR; #define JH7110_L2_PREFETCHER_BASE_ADDR 0x2030000 #define JH7110_L2_PREFETCHER_HART_OFFSET 0x2000 +#define FDTFILE_MILK_V_MARC_SD \ + "starfive/jh7110-milkv-mars-cm-sdcard.dtb" +#define FDTFILE_MILK_V_MARC_MMC \ + "starfive/jh7110-milkv-mars-cm-emmc.dtb" #define FDTFILE_MILK_V_MARS \ "starfive/jh7110-milkv-mars.dtb" #define FDTFILE_VISIONFIVE2_1_2A \ @@ -61,7 +65,12 @@ static void set_fdtfile(void) log_err("Can't read EEPROM\n"); return; } - if (!strncmp(product_id, "MARS", 4)) { + if (!strncmp(product_id, "MARC", 4)) { + if (get_mmc_size_from_eeprom()) + fdtfile = FDTFILE_MILK_V_MARC_MMC; + else + fdtfile = FDTFILE_MILK_V_MARC_SD; + } else if (!strncmp(product_id, "MARS", 4)) { fdtfile = FDTFILE_MILK_V_MARS; } else if (!strncmp(product_id, "VF7110", 6)) { version = get_pcb_revision_from_eeprom(); From patchwork Mon Apr 15 11:50:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1923704 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=BC1uTJ8k; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJ59k47kXz1yXv for ; Mon, 15 Apr 2024 21:51:38 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0F39588233; Mon, 15 Apr 2024 13:51:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.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=canonical.com header.i=@canonical.com header.b="BC1uTJ8k"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D4D1F88213; Mon, 15 Apr 2024 13:51:01 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) (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 9904C8822D for ; Mon, 15 Apr 2024 13:50:59 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 14A4A4123A for ; Mon, 15 Apr 2024 11:50:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1713181859; bh=9b7IwGGzZUJATp+iJLlqiXGedmkhe/b4Y3xvgNeNLR8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BC1uTJ8kHeCQG3yO+u1ts4mVTUsoQc0FWhOYgHG5CBTAI/9oUNDkpzoke6VFPonp4 x2LfGg7VmdiUZsvSG8ldSIXxAn29CxEzmL/NkyWcUwCeXNHA1VywHMIZjQmpegP53y DQ6B13clodefOWkzJXxqom2fDadYSJNBH5F9OinoFMiPfJY2IHne2QQDkOLNhjS83r YmoDl+OuwgOn/zl1s9VdCBRz6AJ5feRHQRV1VS8rD+8qCb/Pe4RGuh/CYq+Pf4VWxN XApTHdnjH/+iCbf32iVa4goK+dgCDwnR4oHoNdLp2Eplz2i/0YlEZqUuBvVx/r7sSC IUnfllt6I3fJA== Received: by mail-wr1-f70.google.com with SMTP id ffacd0b85a97d-345fa9052b7so2000629f8f.1 for ; Mon, 15 Apr 2024 04:50:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713181854; x=1713786654; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9b7IwGGzZUJATp+iJLlqiXGedmkhe/b4Y3xvgNeNLR8=; b=VcHFoHBs1KBxJ2NJ7LlgVWqATqT97sxL/vW7WroeMhKwgtYhJZ+N48ic4mtODIEBKc t5I+CtLyYfQCjE7SEVhqbUACUlQj4da8+nWE9xu0KcxU7oCr1Vh6V2JK92NmOVB/gw9E s2D08cEyeCSVXZqxlkmWykJEPT6B4jPIL38kAOw4G5Pi51vzE9VHHo5BbEkzoNwe3BCU D8t1CbyBZX7mNPQhYnwRobktr5KPS6LWIJIIv0BTRuOiN0xloe0KQgHtIuZBnuuRYwDM D2P5mEJl69HSeIvlDgDQbL9IYsrGG8ekBgN8e4cIAKj5/nnQbKrj0lHWkbusxXW7Jx41 VeUA== X-Forwarded-Encrypted: i=1; AJvYcCWd5YxJkXmymB/KapZyFu/o5daO1eK8iEU3MLzbDNfVhwQMUoFcE8G82OMEcK/1NjnAUlVRziyz19kr5dcVPrLWjbrj0Q== X-Gm-Message-State: AOJu0Ywg5Ne9RtYTcwlIKuXCXveAPTDwYjIKKCzWYCR2+l73qCUsUY99 7UVP7WfAMQ7VOY6t50uk+E7/EGIMaZMMS/1l77PdrU7C7A9MefPIlzbxpC5/EdB2XVsL0HOtJ6F JQk7x1caBSgvrVc1oYtGrNpYe+iH/8Lfjw4PdwkJsHaU9M8DsQ1Xh5Fm+Pain8RCzc+0= X-Received: by 2002:a5d:470c:0:b0:343:7ced:8913 with SMTP id y12-20020a5d470c000000b003437ced8913mr9299702wrq.23.1713181853962; Mon, 15 Apr 2024 04:50:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQn4EhX0Iuf0b2arj0VCs2YGSMj+Obe+kyFbr3VO4NFX83u1vK+WCMB2dmD+ZIMAE6hdfeqg== X-Received: by 2002:a5d:470c:0:b0:343:7ced:8913 with SMTP id y12-20020a5d470c000000b003437ced8913mr9299687wrq.23.1713181853673; Mon, 15 Apr 2024 04:50:53 -0700 (PDT) Received: from workstation5.fritz.box (ip-062-143-245-032.um16.pools.vodafone-ip.de. [62.143.245.32]) by smtp.gmail.com with ESMTPSA id j10-20020adff00a000000b003469e7f5c52sm11924130wro.80.2024.04.15.04.50.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 04:50:53 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Lukasz Tekieli , Aurelien Jarno , Shengyu Qu , Shiji Yang , Seung-Woo Kim , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 3/4] doc: Milk-V Mars CM and Milk-V Mars CM Lite Date: Mon, 15 Apr 2024 13:50:34 +0200 Message-ID: <20240415115035.46199-4-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> References: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean Provide a man-page describing the usage of U-Boot on the Milk-V Mars CM and Milk-V Mars CM Lite boards. Signed-off-by: Heinrich Schuchardt --- doc/board/starfive/index.rst | 1 + doc/board/starfive/milk-v_mars_cm.rst | 125 ++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) create mode 100644 doc/board/starfive/milk-v_mars_cm.rst diff --git a/doc/board/starfive/index.rst b/doc/board/starfive/index.rst index 2762bf74c11..afa85ad2540 100644 --- a/doc/board/starfive/index.rst +++ b/doc/board/starfive/index.rst @@ -7,4 +7,5 @@ StarFive :maxdepth: 1 milk-v_mars.rst + milk-v_mars_cm.rst visionfive2 diff --git a/doc/board/starfive/milk-v_mars_cm.rst b/doc/board/starfive/milk-v_mars_cm.rst new file mode 100644 index 00000000000..4cd6034281c --- /dev/null +++ b/doc/board/starfive/milk-v_mars_cm.rst @@ -0,0 +1,125 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +Milk-V Mars CM +============== + +U-Boot for the Milk-V Mars CM uses the same U-Boot binaries as the VisionFive 2 +board. In U-Boot SPL the actual board is detected and the device-tree patched +accordingly. + +The Milk-V Mars CM Lite comes without eMMC it needs a different pin muxing. +The size of the eMMC shows up in the serial number shown by the *mac* command, +e.g. MARC-V10-2340-D002E016-00000304. The number after the E is the MMC size +in GB. U-Boot takes a value of E000 as an indicator for the Lite version. +Unfortunately the vendor has not set this value correctly on some Lite boards. +Please, use CONFIG_STARFIVE_NO_EMMC=y to indicate a Milk-V Mars CM Lite in this +case. Otherwise you will not be able to read from eMMC + +Building +~~~~~~~~ + +1. Add the RISC-V toolchain to your PATH. +2. Setup ARCH & cross compilation environment variable: + +.. code-block:: none + + export CROSS_COMPILE= + +The M-mode software OpenSBI provides the supervisor binary interface (SBI) and +is responsible for the switch to S-Mode. It is a prerequisite to build U-Boot. +Support for the JH7110 was introduced in OpenSBI 1.2. It is recommended to use +a current release. + +.. code-block:: console + + git clone https://github.com/riscv/opensbi.git + cd opensbi + make PLATFORM=generic FW_TEXT_START=0x40000000 FW_OPTIONS=0 + +Now build the U-Boot SPL and U-Boot proper. + +.. code-block:: console + + cd + make starfive_visionfive2_defconfig + make OPENSBI=$(opensbi_dir)/build/platform/generic/firmware/fw_dynamic.bin + +This will generate the U-Boot SPL image (spl/u-boot-spl.bin.normal.out) as well +as the FIT image (u-boot.itb) with OpenSBI and U-Boot. + +Device-tree selection +~~~~~~~~~~~~~~~~~~~~~ + +Depending on the board version U-Boot sets variable $fdtfile to either +starfive/jh7110-milkv-mars-cm-emmc.dtb (for the generic version or +starfive/jh7110-milkv-mars-cm-sdcard.dtb (for the Lite version). + +To overrule this selection the variable can be set manually and saved in the +environment + +:: + + setenv fdtfile my_device-tree.dtb + env save + +or the configuration variable CONFIG_DEFAULT_FDT_FILE can be used to set to +provide a default value. + +Boot source selection +~~~~~~~~~~~~~~~~~~~~~ + +The low speed connector nRPIBOOT line is used to switch the boot source. + +* If nRPIBOOT is connected to ground, the board boots from UART. +* If nRPIBOOT is not connected, the board boots from SPI flash. + +Flashing a new U-Boot version +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +U-Boot SPL is provided as file spl/u-boot-spl.bin.normal.out. Main U-Boot is +in file u-boot.itb. + +Assuming your new U-Boot version is on partition 1 of an SD-card you could +install to the SPI flash with: + +:: + + sf probe + load mmc 1:1 $kernel_addr_r u-boot-spl.bin.normal.out + sf update $kernel_addr_r 0 $filesize + load mmc 1:1 $kernel_addr_r u-boot.itb + sf update $kernel_addr_r 0x100000 $filesize + +After updating U-Boot you may want to reboot and reset the environment to the +default. + +:: + + env default -f -a + env save + +Booting from UART +~~~~~~~~~~~~~~~~~ + +For booting via UART U-Boot must be built with CONFIG_SPL_YMODEM_SUPPORT=y. + +Upload u-boot-spl.bin.normal.out via XMODEM. Then upload u-boot.itb via +YMODEM. + +The XMODEM implementation in the boot ROM is not fully specification compliant. +It sends too many NAKs in a row. Some tolerant terminal implementations exist. +Or use a dedicated recovery tool e.g. +https://github.com/xypron/JH71xx-tools/tree/VisionFive2: + +.. code-block:: bash + + # send U-Boot SPL via XMODEM + vf2-recover -D /dev/ttyUSB0 -r u-boot-spl.bin.normal.out + # connect to board to transfer main U-Boot via YMODEM + picocom --send-cmd 'sz -b -vv' --baud 115200 /dev/ttyUSB0 + # In Picocom use , to send u-boot.itb + +Booting from SPI flash +~~~~~~~~~~~~~~~~~~~~~~ + +Once you power up, you should see the U-Boot prompt on the serial console. From patchwork Mon Apr 15 11:50:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1923703 X-Patchwork-Delegate: uboot@andestech.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=n3O/F3Pc; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VJ59W311Kz1yXv for ; Mon, 15 Apr 2024 21:51:27 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 99C9388216; Mon, 15 Apr 2024 13:50:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.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=canonical.com header.i=@canonical.com header.b="n3O/F3Pc"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 87C3E88207; Mon, 15 Apr 2024 13:50:57 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) (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 B368B87D5F for ; Mon, 15 Apr 2024 13:50:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=heinrich.schuchardt@canonical.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 43AED411E6 for ; Mon, 15 Apr 2024 11:50:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1713181855; bh=UtzxNnTA/VmFXmVRwLjWOugIkpJKQGL17xO3ULu9enc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=n3O/F3Pckdy7zCzjfblsp+gP/OzUBmYHhHu49lM9oINayJXpuhoIeNqYxRU82AvGK 0Jf+r2xT3496N5yJc/jDda3lhe9eHXhSGoLBYQUFCHdD0ElQX4IzOK8nVYpWLikKBV 8BDxMw2fV6RR3JhJup09SbpfZFtNNW5hl3rJq4miX3yf3U+0iQ3v6olx43u6KxHvLu L7XUBdkOhnfLM0lp3jwNep+fOgAdB0ZKZ3tAfeVqLwNRYoxQzHAXDGiEztoQG4CiNR SsbApbPpv0WrcwxB9n8cxwPL5AYYGdORb6w5y4KJmyZKh3KSY5692igmoxKx85kWMA Wu60x9Hr6EB+w== Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-343d7cd8f46so2392406f8f.2 for ; Mon, 15 Apr 2024 04:50:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713181854; x=1713786654; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UtzxNnTA/VmFXmVRwLjWOugIkpJKQGL17xO3ULu9enc=; b=hDEHBB1JHZFTG51Rccv0bIQtuSI/t1TPn63vwuZ/yYQV2C1hAhWGootn+USzZpiq63 99RwBuPQm/W3Od6J6pO7KFWGpzfArJwg2jCNp7KpMEE/vhOIq+thISP72ZqiHzicbcZ3 K33m2WIfZ3iN5OsjmlHYTMoh+PIMGeOyUREjIixqfYGFnQk8XbDN0j1zHg/8JrQySyFx 44vXaVm+2SV/jGO9yDag7ZULcMWVX9CtfzZAk+4nfZ788n6HDnzmdridme0FbMb8jKtP GK0Os4jD2Cr9GkLa5EtE3zyZvQ7BX2Oc9MlsC3u9gMmN11q0Ioz/ApKnOtfVcA94PuGd WQxA== X-Forwarded-Encrypted: i=1; AJvYcCV7zZq27MxFAw1VoioxH+5hiTEaXaeosRlPQSW79+P7csHWCt1f2oFdzyEMPUa1pf0D7IGN2Y4XAAgR3yrWh1qZSC+KvQ== X-Gm-Message-State: AOJu0YxQ4lSHx34qWR+ziu2D0vZWxIqYixOltnrrQN4iNd5e1I1VgRtT i3MIDiUWj8VmGYFcOmes9l5/NJvGNkAZZPwj+1qyN6hpFsVmW2p5zB+DpbaI/70Nc/oEd/Urlmz hn8Xk9sEJJCgraNyk5RT8w9tOE8IJzz1z72I7nLqyM/Evh/PWU379MPcGW1tjUohzf+M= X-Received: by 2002:a5d:58d4:0:b0:346:dace:5310 with SMTP id o20-20020a5d58d4000000b00346dace5310mr6197696wrf.22.1713181854787; Mon, 15 Apr 2024 04:50:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHGYuwYaVbpXvr7IP3UIWgGQ0MdmgZ1TAfyOI1G8GCl4/cimJ1yXCa1TO8XMjAyY5xh3hOApA== X-Received: by 2002:a5d:58d4:0:b0:346:dace:5310 with SMTP id o20-20020a5d58d4000000b00346dace5310mr6197679wrf.22.1713181854511; Mon, 15 Apr 2024 04:50:54 -0700 (PDT) Received: from workstation5.fritz.box (ip-062-143-245-032.um16.pools.vodafone-ip.de. [62.143.245.32]) by smtp.gmail.com with ESMTPSA id j10-20020adff00a000000b003469e7f5c52sm11924130wro.80.2024.04.15.04.50.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 04:50:54 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Lukasz Tekieli , Aurelien Jarno , Shengyu Qu , Shiji Yang , Seung-Woo Kim , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH 4/4] configs: visionfive2: enable SPL_YMODEM_SUPPORT Date: Mon, 15 Apr 2024 13:50:35 +0200 Message-ID: <20240415115035.46199-5-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> References: <20240415115035.46199-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 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.8 at phobos.denx.de X-Virus-Status: Clean We can use U-Boot for recovering JH7110 based boards via UART if CONFIG_SPL_YMODEM_SUPPORT=y. * Send u-boot-spl.normal.out via XMODEM. * Send u-boot.itb via YMODEM. Signed-off-by: Heinrich Schuchardt Tested-by: E Shattow --- configs/starfive_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig index fa80d489f5e..e2d83c62b28 100644 --- a/configs/starfive_visionfive2_defconfig +++ b/configs/starfive_visionfive2_defconfig @@ -62,6 +62,7 @@ CONFIG_SPL_I2C=y CONFIG_SPL_DM_SPI_FLASH=y CONFIG_SPL_DM_RESET=y CONFIG_SPL_SPI_LOAD=y +CONFIG_SPL_YMODEM_SUPPORT=y CONFIG_SYS_PROMPT="StarFive # " CONFIG_CMD_EEPROM=y CONFIG_SYS_EEPROM_SIZE=512