From patchwork Fri May 3 09:00:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1930969 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=EpHoAnUM; 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 4VW4Xs0zg6z20fW for ; Fri, 3 May 2024 19:01:17 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9977D88C18; Fri, 3 May 2024 11:00: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=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="EpHoAnUM"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3953A88C0C; Fri, 3 May 2024 11:00:58 +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=-3.6 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 51CD4882CE for ; Fri, 3 May 2024 11:00: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=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-1.canonical.com (Postfix) with ESMTPS id E3F9C3FE64 for ; Fri, 3 May 2024 09:00:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1714726846; bh=4oZ7OaPfMkqwGCHPNp6PtCbQM0i52gkSLYDgMcIo/2w=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=EpHoAnUMBynhTdisLB6O9MaF/kulUx3y/CjDebBs2Bbvq4JfuNJh5BZ3fLJRTY0co e57xsSLumdyMtCupShOs0rWhLqHAvdZjLgzf0efxo6AG4rSFHeoYgY52BSqETse6Ef lASK9YRPjeh1zMBxXH2kYEH3GI+MC8vzW9BsAisuoRPvxzBg3hdW5bmkwXkMTn7sqX ffGD6xxr1qeH5PVT9dDov+tWxsv0c0E2WzcVljdin6Lhlg+TuONCakMpuxCQ7nQfmv aWEbKN4nrqWyiRtrgPB8agspoV/D7Hxn/HBji7aTbyot2rl3ARmjUiiucUDnPzB1V4 RT4JP9XCO/U1g== Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-34e01a857a6so1035839f8f.2 for ; Fri, 03 May 2024 02:00:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714726846; x=1715331646; 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=4oZ7OaPfMkqwGCHPNp6PtCbQM0i52gkSLYDgMcIo/2w=; b=ljz3BZrWuRxyyoI3gKQYo5SdVy1MJKXrcMWWzIxC9B0ecGBkBvELhbLYAdymR6N4ql Og4KzzO2hxjV7D4rXnPnq8iG3/CJZYWHcG22Hm+Ortr4Dvx9gq4c9R2knnDuxZLjHev7 GG5Pv/t1/qr1wa3O4ygvzH2zBwkrX0IlCGqgmb+tVzJQKprybnTHrE76SNRZyjGQUAFv HREAGYqLHyzTPQSmSmCutBRIOf1r+ubTq/hyw7eY1Vd2j1DQSPyobQNcsEsEomlnTq8Z uVSNJCYPElYTxGqQn8e3Ylq4HghchmwwDNN3BhAdS8OAr969R/BoiKVxmvducif51w81 +FJQ== X-Forwarded-Encrypted: i=1; AJvYcCWOlX5OlCtaLQXm6VCcQsPcKuz6b20/Uqej+KL2xeGg6b/uuVGKnJL8p7Pg/iJ0X4bIrpm19HjP0ks0JbSfKt/9fMGXLg== X-Gm-Message-State: AOJu0YyQ3sP0pojtUWVbkDF+2ibNHJqnB6n2axvCUQjLzK58AlfwXDu5 qOxGUr0R64Qv2TWic038ZAB/AS5g8eHEIOMHFKKOEbvvzmKMwalA7b/vAjVYGZgJ4eSy9tVFst2 bioWgny3gF+qgptT+0Ym6maKjf/Z6WnZAYZBV7OkvkPPZF9XkxGKNlpWCqaA7xxd0j7M= X-Received: by 2002:adf:fdca:0:b0:34d:742e:3dbf with SMTP id i10-20020adffdca000000b0034d742e3dbfmr1534690wrs.0.1714726846262; Fri, 03 May 2024 02:00:46 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG5NFXFXZ19J6OEaOE2HqBi4I2RtBOtfQPNXqubcy7ckcLPMamINPVGcbZrtBxhorh31k3VTg== X-Received: by 2002:adf:fdca:0:b0:34d:742e:3dbf with SMTP id i10-20020adffdca000000b0034d742e3dbfmr1534667wrs.0.1714726845927; Fri, 03 May 2024 02:00:45 -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 bf9-20020a0560001cc900b00341b451a31asm3247313wrb.36.2024.05.03.02.00.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:00:45 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Aurelien Jarno , Lukasz Tekieli , Lukas Funke , Shiji Yang , Shengyu Qu , Michal Simek , Seung-Woo Kim , Mason Huo , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH v2 1/4] board: starfive: function to read eMMC size Date: Fri, 3 May 2024 11:00:00 +0200 Message-ID: <20240503090011.37849-2-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240503090011.37849-1-heinrich.schuchardt@canonical.com> References: <20240503090011.37849-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 eMMC. Provide a new function get_mmc_size_from_eeprom() to read it. Signed-off-by: Heinrich Schuchardt Reviewed-by: E. Shattow --- v2: fix typos in get_mmc_size_from_eeprom() description --- 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..45ad2a5f7bc 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 eMMC size from 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 5095a0e9fdb..9648a270494 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 Fri May 3 09:00:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1930968 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=rz5Acqn8; 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 4VW4Xf2GjJz20fW for ; Fri, 3 May 2024 19:01:06 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 3CBE588C0C; Fri, 3 May 2024 11:00: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=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="rz5Acqn8"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CB96488C07; Fri, 3 May 2024 11:00: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=-3.6 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 E3D308823D for ; Fri, 3 May 2024 11:00: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-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 B92753F29F for ; Fri, 3 May 2024 09:00:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1714726854; bh=j+2mSTl9nsYuEP1cItsvboXCsAue6JnxxElx8ZfT7iw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rz5Acqn8e93V9hDEfrU/ggnHl7fEOcKbVCnA3T7rCNVlhsfZeCYkej/s71ezthsmw Z/X5XxxyaKhmidO3vFt6yUdOiXW8ad8FLhu/yWx4ZkgSsIPjeE+d/sdoK1/Oy6xSzW qaPGvWAKNnTFbUvoDL4hW+gRr1IX1O2dBauwvWyzVr20+RykEqJnSmJDdlA6NgwC46 AdI7ZDwqApkREyNpDA5watnelbLQLoOtxMo/Ms96kYVO6w9CIh7q4UY0Fi70nlfoBq GVnr+7qmHsPJgdBXNq6qSH1OavzjvtHffE9XWACRKvxuD7vL5BFxZqX8aJaV1Plmqc U5V+kjnwh0FBw== Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-346c08df987so1290277f8f.0 for ; Fri, 03 May 2024 02:00:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714726847; x=1715331647; 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=j+2mSTl9nsYuEP1cItsvboXCsAue6JnxxElx8ZfT7iw=; b=pBsbmlhuk5cJtIdEpiQQ1DPwScDkTI4rw6T9236xGAgaJowp7mJZfzdMdvL1Hjjxx/ 3mwgQ5gZqSYSLrnRQEFAm8DsHTFJnGC38FYxRBKlgJejIMhwiKMeCS1+CgCqCh4Ci5bO LYk+QnuI59yiutdKpw++KASoHAKmn4vDxFQj4kL0o5EItH1LiOCtYmHstB4H9Qktwoz/ dFqNIJ8Z0KRqhaAb3nI6g4d33Yw/8g8bi6anlKLP17I25FhXENTQ30T60RlFXjI1bSMo dUkbazeUiiPFdHloDfHG5uDpfj+JIZfRGm1U0YZJwqqIPJ5so5POUOskQxRkExuCklYd sY/w== X-Forwarded-Encrypted: i=1; AJvYcCVRFg9Qls7oC8MITk5a4aUh4dgRhUTsltDSMNLkoa7uSX/XqRGInM9f2iPF9rDNfocccqfrWNCpq3drwjaSmNo4Or1qLQ== X-Gm-Message-State: AOJu0Yy+a9ar7Z/POZy0kFHc6zVULSxvGEnpWqUHImO8Q+pPy9v0SMN0 ApPBJGzlxHaKJr2/s1muTdZ81JKZgcROAfWGnbiM4zxoGs/eussYUbyETKEsyiDH5XUrW4gNjOp pw2jD/Mi5vGFl8OVuaIYucXE/QKepf+7Tht6wdwS1tPLomFpf6kzc62ZD+S9HVP4QBcU= X-Received: by 2002:adf:eece:0:b0:34d:a0b4:d122 with SMTP id a14-20020adfeece000000b0034da0b4d122mr1925316wrp.30.1714726847323; Fri, 03 May 2024 02:00:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYmaMsVpjKtd4VMl6pAShxxtzEY70MfCvjnLGuzUpJPaTGCOTUWW7HEy6AeJxrKO49CE4N2Q== X-Received: by 2002:adf:eece:0:b0:34d:a0b4:d122 with SMTP id a14-20020adfeece000000b0034da0b4d122mr1925284wrp.30.1714726846886; Fri, 03 May 2024 02:00:46 -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 bf9-20020a0560001cc900b00341b451a31asm3247313wrb.36.2024.05.03.02.00.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:00:46 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Aurelien Jarno , Lukasz Tekieli , Lukas Funke , Shiji Yang , Shengyu Qu , Michal Simek , Seung-Woo Kim , Mason Huo , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH v2 2/4] board: add support for Milk-V Mars CM Date: Fri, 3 May 2024 11:00:01 +0200 Message-ID: <20240503090011.37849-3-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240503090011.37849-1-heinrich.schuchardt@canonical.com> References: <20240503090011.37849-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 Tested-by: E. Shattow Reviewed-by: E. Shattow --- v2: rename spl_fdt_fixup_marc() to spl_fdt_fixup_mars_cm() rename device-trees for Mars CM and Mars CM Lite change model and compatible properties --- board/starfive/visionfive2/spl.c | 28 ++++++++++++++++++- .../visionfive2/starfive_visionfive2.c | 11 +++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/board/starfive/visionfive2/spl.c b/board/starfive/visionfive2/spl.c index ca61b5be227..b555189556a 100644 --- a/board/starfive/visionfive2/spl.c +++ b/board/starfive/visionfive2/spl.c @@ -129,6 +129,30 @@ void spl_fdt_fixup_mars(void *fdt) } } +void spl_fdt_fixup_mars_cm(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 Lite"; + compat = "milkv,mars-cm-lite\0starfive,jh7110"; + + offset = fdt_path_offset(fdt, "/soc/pinctrl/mmc0-pins/mmc0-pins-rest"); + /* GPIOMUX(22, GPOUT_SYS_SDIO0_RST, GPOEN_ENABLE, GPI_NONE) */ + fdt_setprop_u32(fdt, offset, "pinmux", 0xff130016); + } else { + model = "Milk-V Mars CM"; + compat = "milkv,mars-cm\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 +260,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_mars_cm(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..6be53489626 100644 --- a/board/starfive/visionfive2/starfive_visionfive2.c +++ b/board/starfive/visionfive2/starfive_visionfive2.c @@ -19,6 +19,10 @@ DECLARE_GLOBAL_DATA_PTR; #define JH7110_L2_PREFETCHER_HART_OFFSET 0x2000 #define FDTFILE_MILK_V_MARS \ "starfive/jh7110-milkv-mars.dtb" +#define FDTFILE_MILK_V_MARS_CM \ + "starfive/jh7110-milkv-mars-cm.dtb" +#define FDTFILE_MILK_V_MARS_CM_LITE \ + "starfive/jh7110-milkv-mars-cm-lite.dtb" #define FDTFILE_VISIONFIVE2_1_2A \ "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb" #define FDTFILE_VISIONFIVE2_1_3B \ @@ -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_MARS_CM; + else + fdtfile = FDTFILE_MILK_V_MARS_CM_LITE; + } 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 Fri May 3 09:00:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1930971 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=h+LDrmtn; 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 4VW4YJ5w48z20fW for ; Fri, 3 May 2024 19:01:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 68CDF88BFF; Fri, 3 May 2024 11:01: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="h+LDrmtn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 97C9B88BFF; Fri, 3 May 2024 11:01:02 +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=-3.6 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 38FC288C04 for ; Fri, 3 May 2024 11:00:57 +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-1.canonical.com (Postfix) with ESMTPS id AA7B13FE52 for ; Fri, 3 May 2024 09:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1714726855; bh=w5X2zSxCKfDndW7/7oHySJyGsXUUI8l0iaDzQaFZV8E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=h+LDrmtnox1DsuIyfkgsnpxROEedU8QqeJ3vr569VFl/BYral7N2rN3fZSHxV2rnv x2cMzbPhNLXwphMGeuEB1BwQo9q9JSv1jcgTJT3Ad0pp14tTp9X5Hy3OpXl2S0GTJE /mtdtbpUZ3PXXQ8IXduc7VhLl55DYgCqG+aDEJdNcEx1o98DroGeyLxIIdcl0rSw7p DC7KL3fjzvarL9UJkYXaA2uGb8nph7rMlYDdCbYe9FMJQc6ljjw90hOTkrLDwPXqW/ dx+O28Q3vPcWpH0D0KTHD4xnNKUh1PLyWTcEYMl5vyVsTLM45A81pivHIBO/ENsAt8 gbPgFBNS1t92g== Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-34deefe9142so1387313f8f.0 for ; Fri, 03 May 2024 02:00:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714726848; x=1715331648; 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=w5X2zSxCKfDndW7/7oHySJyGsXUUI8l0iaDzQaFZV8E=; b=ri9DpNWWC13VQdlGK+AA2FBpz2SXUbWdijX68F+he9OjPjC60P9MEzb/oXmj/EYlnC F+YSlarCE3J867Qw54pm7+XhrOE+YYZSa5QlEQl+V72rWCXB6GgrWoWymxuFMh/a4D93 83U8p/pbIQLDlfPLdXqk3wPwDS9XNbgylfKTlPyiEHkaj2qjnQNj0glMgk1a1XaQxJNp W/WzSysZImpXLRC4kckcyiubnxtpy7vQ+1q7hhrrODa6MoACQW2qTFJUSid/qLYsOznu olpe9Ui1PgsU4sdz+mDApdvEnw7svjL5PwgFgHQA2C/CissLId2144PPK5m88VgfyklZ pfbg== X-Forwarded-Encrypted: i=1; AJvYcCWhy+QvXfCVIeU2Xq+O+ewmqlCbpzGSLNaoEGtwSSJwASxdmA/GpYgBOKz4K7x56SRMhE1zuFNy5iM6yt3rCrB2zBDeeg== X-Gm-Message-State: AOJu0Yxgot5GXjNWCDZOL4hlkl69NY2mJbrDa0gUsP7wvcT9nvwtKdvx Dd4xuxubuttg2PULEL67us/ZBLbfaOVUOeFngMzJcEOzRWrxaxV6g9HHRoZ9NIEsOyTki41yglC 7OpucbwPOz8a4Phb+xOB6T0VEaFIA8k2A2WRizmJBwYpxlsjs/f5+1Mpr3Gs8OXGlDkM= X-Received: by 2002:a5d:5f90:0:b0:34b:d659:7d0f with SMTP id dr16-20020a5d5f90000000b0034bd6597d0fmr1894760wrb.16.1714726848478; Fri, 03 May 2024 02:00:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGYdSvpneUr1HfzH9i5lM+6qhByRdAjxgsUs2Lx3VHTXEOQz3pzQuskOb/AqMnWDh7s98Ed4w== X-Received: by 2002:a5d:5f90:0:b0:34b:d659:7d0f with SMTP id dr16-20020a5d5f90000000b0034bd6597d0fmr1894730wrb.16.1714726848040; Fri, 03 May 2024 02:00:48 -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 bf9-20020a0560001cc900b00341b451a31asm3247313wrb.36.2024.05.03.02.00.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:00:47 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Aurelien Jarno , Lukasz Tekieli , Lukas Funke , Shiji Yang , Shengyu Qu , Michal Simek , Seung-Woo Kim , Mason Huo , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH v2 3/4] doc: Milk-V Mars CM and Milk-V Mars CM Lite Date: Fri, 3 May 2024 11:00:02 +0200 Message-ID: <20240503090011.37849-4-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240503090011.37849-1-heinrich.schuchardt@canonical.com> References: <20240503090011.37849-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 --- v2: refer to tio as tool for booting via UART describe how to update serial number description updates as suggested by E. Shattow --- doc/board/starfive/index.rst | 1 + doc/board/starfive/milk-v_mars_cm.rst | 183 ++++++++++++++++++++++++++ 2 files changed, 184 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..d2be064d94c --- /dev/null +++ b/doc/board/starfive/milk-v_mars_cm.rst @@ -0,0 +1,183 @@ +.. 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 and needs a different pin muxing +than the Milk-V Mars CM. The availability and size of the eMMC shows up in the +serial number displayed by the *mac* command, e.g. +MARC-V10-2340-D002E016-00000304. The number after the E is the MMC size. 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 if EEPROM data indicates eMMC is present +on the Milk-V Mars CM Lite. Otherwise you will not be able to read from the +SD-card. + +The serial number can be corrected using the *mac* command: + +.. code-block:: + + mac read_eeprom + mac product_id MARC-V10-2340-D002E000-00000304 + mac write_eeprom + +By default the EEPROM is write protected. The write protection may be overcome +by connecting the "GND" and "EN" test pads on top of the module. + +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_TEXT_START* is not needed anymore after OpenSBI patch d4d2582eef7a +"firmware: remove FW_TEXT_START" which should appear in OpenSBI 1.5.) + +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. + +Compute module boards typically have a switch or jumper for this line. + +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 it to the SPI flash with: + +:: + + sf probe + load mmc 0:1 $kernel_addr_r u-boot-spl.bin.normal.out + sf update $kernel_addr_r 0 $filesize + load mmc 0:1 $kernel_addr_r u-boot.itb + sf update $kernel_addr_r 0x100000 $filesize + +For loading the files from a TFTP server refer to the dhcp and tftpboot +commands. + +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. + +With nRPIBOOT connected to ground for UART boot, power the board and 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. Tio is a terminal emulation that tolerates +these faults. + +:: + + $ tio -b 115200 --databits 8 --flow none --stopbits 1 /dev/ttyUSB0 + [08:14:54.700] tio v2.7 + [08:14:54.700] Press ctrl-t q to quit + [08:14:54.701] Connected + + (C)StarFive + CCC + (C)StarFive + CCCCCCCC + +Press *ctrl-t x* to initate XMODEM transfer. + +:: + + [08:15:14.778] Send file with XMODEM + [08:15:22.459] Sending file 'u-boot-spl.bin.normal.out' + [08:15:22.459] Press any key to abort transfer + ........................................................................ + .......................................................................| + [08:15:22.459] Done + + U-Boot SPL 2024.07-rc1-00075-gd6a4ab20097 (Apr 25 2024 - 16:32:10 +0200) + DDR version: dc2e84f0. + Trying to boot from UART + CC + +Press *ctrl-t y* to initate YMODEM transfer. + +:: + + [08:15:50.331] Send file with YMODEM + [08:15:53.540] Sending file 'u-boot.itb' + [08:15:53.540] Press any key to abort transfer + ........................................................................ + … + ...............| + [08:15:53.540] Done + Loaded 1040599 bytes + + + U-Boot 2024.07-rc1-00075-gd6a4ab20097 (Apr 25 2024 - 16:32:10 +0200) + +Booting from SPI flash +~~~~~~~~~~~~~~~~~~~~~~ + +With nRPIBOOT connected disconnected from ground for SPI boot, power up the +board. You should see the U-Boot prompt on the serial console. From patchwork Fri May 3 09:00:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 1930970 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=NLqsuUXn; 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 4VW4Y45cqzz20fW for ; Fri, 3 May 2024 19:01:28 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0434488BE9; Fri, 3 May 2024 11:01:02 +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="NLqsuUXn"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 9106F88BF8; Fri, 3 May 2024 11:01: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=-3.6 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 7204F88BE9 for ; Fri, 3 May 2024 11:00: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=heinrich.schuchardt@canonical.com Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (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 CDF2D424B5 for ; Fri, 3 May 2024 09:00:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1714726855; bh=qF3hhLFm1Fq+99d+fF5aAs3VR86wC6eY70quLb34GyE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NLqsuUXn6ls/EU4KR2DlHuA/jTv/JTNqpe85ALkM//VPMpOVjNICERdS2HqQuG0i/ XoBvTYGSLR6ZkH8s7is3Xuq+otq7pLnP5YlypWbXcPwhVm23hgf6fKbP9Bw5/fIHVj HfVoivz8DdKIBTWUTXImYEOHbkSVzoJJpyu5Le5dDAlaSgkcBOML9Kzfpcx5w5o0hW LCaVFRW4kKk8WmOfnJhuL2sma4QiylsWshwPqnpWgCu5mEyq3nEh67Qt/z/DjZyjeX C7R/+eEhgPQtZtpm8iosxrm1WXrO7gxZiPwTzBVzzJZvA85NjfDcLqS2kD0tgCG8A+ 7A2OsM4+E/Ouw== Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-34a49f5a6baso7227348f8f.3 for ; Fri, 03 May 2024 02:00:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714726850; x=1715331650; 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=qF3hhLFm1Fq+99d+fF5aAs3VR86wC6eY70quLb34GyE=; b=pJwQoppiNWpAJ6TVqMnfVzV8Uy/BOvpByU140KLsc3M0pWVuYGtlnBIwfrEgCE+yAp s8H5jJiZg6/akEFonUMZPwE6Rjve3jCBg36+mu9Jzp0gFtzX41pueiq9z1oK2TwCQQh8 WzoDibehX3lWfF92hxkbQ/ZYPAssX07i1kWfFKUbreoVszVdcV16sbaKT9+X/gDq5/OX TdrphSUm+8NknGjcoxyIjfLcTahv4OgtZrmtBN+/AkN/2vHzKf66PSaGDFWS2HMmo6ku 0/hCCO0IValz6vzu5sIQG7FFxRPQA9Cj/G578riYWFn7MyFiBXvFnKnzYLrFKVbZa45q MYNg== X-Forwarded-Encrypted: i=1; AJvYcCXZ+BzJG1reD3zuVckZmWmbg4jOAnFi7xU+YV8kJRZwxGxAYKT0OMZQcZqdXPMgAns5Vek6aYp7C5uu0QeTnGLvtv5WRA== X-Gm-Message-State: AOJu0YzEoM4vY+ThnOvjsa9SzQoNp95eqpkji5R9yTbE5RztA47smm2q xqDzM0rwdD+A58UNcPXevQhvKNP3qVH4TTxhYawS55UHXpWCSeKuSctGv2oqGLDOtWlu6xb0Ph1 epZdrkAqKzf+EuSPlyY6Pz9L2mye6Iac1yl4zZe5PsY0+bIFlYsIw6C6CSKlRPhOF6rc= X-Received: by 2002:a5d:4b4c:0:b0:34c:54c8:3f2d with SMTP id w12-20020a5d4b4c000000b0034c54c83f2dmr1507052wrs.69.1714726849276; Fri, 03 May 2024 02:00:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE489BAPgHaQnzR8oU6nBfCRijZwW3ejCdnQEA3wXwbNHrkABGYG/BLPAxbxpYOybvjhmZ3HQ== X-Received: by 2002:a5d:4b4c:0:b0:34c:54c8:3f2d with SMTP id w12-20020a5d4b4c000000b0034c54c83f2dmr1507026wrs.69.1714726848986; Fri, 03 May 2024 02:00:48 -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 bf9-20020a0560001cc900b00341b451a31asm3247313wrb.36.2024.05.03.02.00.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 02:00:48 -0700 (PDT) From: Heinrich Schuchardt To: Minda Chen , Hal Feng , Rick Chen , Leo Cc: Aurelien Jarno , Lukasz Tekieli , Lukas Funke , Shiji Yang , Shengyu Qu , Michal Simek , Seung-Woo Kim , Mason Huo , E Shattow , u-boot@lists.denx.de, Heinrich Schuchardt Subject: [PATCH v2 4/4] configs: visionfive2: enable SPL_YMODEM_SUPPORT Date: Fri, 3 May 2024 11:00:03 +0200 Message-ID: <20240503090011.37849-5-heinrich.schuchardt@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240503090011.37849-1-heinrich.schuchardt@canonical.com> References: <20240503090011.37849-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 Reviewed-by: E. Shattow --- v2: no change --- configs/starfive_visionfive2_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/starfive_visionfive2_defconfig b/configs/starfive_visionfive2_defconfig index 3bbd1dbd67c..174ac24dc74 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