summaryrefslogtreecommitdiff
path: root/board/starfive
AgeCommit message (Collapse)Author
2025-10-28board: starfive: visionfive2: Add Milk-V Mars CM and Mars CM Lite selection ↵E Shattow
by product_id Add identifier for Milk-V Mars CM to dts selection callback in SPL, and to fdtfile environment variable default value selection in payload. Signed-off-by: E Shattow <e@freeshell.de> Reviewed-by: Hal Feng <hal.feng@starfivetech.com>
2025-10-22spl: split spl_board_fixups to arch/board specificAnshul Dalal
The current spl_board_fixups API allows for modification of spl_image before the SPL jumps to it. This can be used to modify the DT for the next boot stage, however the current API only allows either the machine arch or the board to use it. This limits the utility of the API as there might be certain fixups that should be applied to all boards sharing the same machine architecture with others being board specific. For TI's K3 specifically, this prevents us from performing architecture level fixups since a lot of TI boards are already making use of the spl_board_fixups API. Therefore this patch splits the API into two to allow both board and the architecture specific fixups. The order is kept as arch then board to give board specific fixups the precedence. Reviewed-by: Dhruva Gole <d-gole@ti.com> Signed-off-by: Anshul Dalal <anshuld@ti.com> Tested-by: Wadim Egorov <w.egorov@phytec.de>
2025-09-23Merge tag 'v2025.10-rc5' into nextTom Rini
Prepare v2025.10-rc5
2025-09-19starfive: avoid NULL dereference in fdt_check_header()Heinrich Schuchardt
If the u-boot.itb read from SD-card is invalid, fdt_check_header() may be called with a NULL pointer. This was observed on an StarFive VisionFive Lite when trying to revover the board via UART. Add a missing check in the starfive board code. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: E Shattow <e@freeshell.de>
2025-09-16board: starfive: visionfive2: deprecate mixed-case product ids VF7110a VF7110bE Shattow
Per recent discussion [1] product IDs VF7110A or VF7110B from EEPROM are sufficient to select for VisionFive 2 1.2a or VisionFive 2 1.3b boards. There are no VisionFive 2 products with mixed-case product IDs in EERPOM so factor out the unnecessary select case conditional. 1: https://lore.kernel.org/u-boot/ZQ2PR01MB1307D97D2C9566B8EE443812E6062@ZQ2PR01MB1307.CHNPR01.prod.partner.outlook.cn/ Signed-off-by: E Shattow <e@freeshell.de> Reported-by: Hal Feng <hal.feng@starfivetech.com>
2025-08-14starfive: fix return code of `mac write_eeprom`Heinrich Schuchardt
When writing the EEPROM fails, the command usage help text is displayed after the error message. We should only display the error message instead. If writing the EEPROM fails, return CMD_RET_FAILURE (1) instead of CMD_RET_USAGE (-1). Fixes: aea1bd95b61e ("eeprom: starfive: Enable ID EEPROM configuration") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Acked-by: E Shattow <e@freeshell.de>
2025-04-27board: starfive: visionfive2: Order board detection logic to match configE Shattow
Fixup previous merge resolution of this series. Intent is to ease code readability and logic to match ordering in CONFIG_OF_LIST - Remove "starfive/" string math - Remove redundant local cache of calls to get_*_from_eeprom() - Match name before EEPROM product_id in board_fit_config_name_match() - Remove single-consumer FDTFILE_* defines - Do not set fdtfile for visionfive-2-* when unknown model revision Fixes: 5a0a93a76848 ("Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscv") Signed-off-by: E Shattow <e@freeshell.de>
2025-04-25Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-riscvTom Rini
CI: https://source.denx.de/u-boot/custodians/u-boot-riscv/-/pipelines/25940 - riscv: lib: Simplify FDT retrieving process - board: k1: pinctrl: Add pinctrl support for bananapi-f3 - binman: riscv: Fix binman_sym functionality - board: starfive: visionfive2: Reorder board detection logic - board: starfive: Add DeepComputing FML13V01 support
2025-04-25board: starfive: spl: support DeepComputing FML13V01Heinrich Schuchardt
On the DeepComputing Framework motherboard (FML13V01) choose the matching FIT configuration. Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: E Shattow <e@freeshell.de> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-25board: starfive: DeepComputing FML13V01 fdt selectionHeinrich Schuchardt
We support all JH7110 boards with starfive_visionfive2_defconfig. The relevant device-tree is selected at runtime based on EEPROM data. Support setting $fdtfile to the file name of the DeepComputing Framework motherboard (FML13V01) device-tree. Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: E Shattow <e@freeshell.de> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2025-04-25board: starfive: visionfive2: Order board detection logic to match configE Shattow
Refactor inside-out EEPROM-checking logic to better match the board-seeking callback and ordered list of targets from starfive_visionfive2_config since the JH7110 OF_UPSTREAM migration. Signed-off-by: E Shattow <e@freeshell.de> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-04-25board: starfive: spl: support DeepComputing FML13V01Heinrich Schuchardt
On the DeepComputing Framework motherboard (FML13V01) choose the matching FIT configuration. Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: E Shattow <e@freeshell.de>
2025-04-25board: starfive: DeepComputing FML13V01 fdt selectionHeinrich Schuchardt
We support all JH7110 boards with starfive_visionfive2_defconfig. The relevant device-tree is selected at runtime based on EEPROM data. Support setting $fdtfile to the file name of the DeepComputing Framework motherboard (FML13V01) device-tree. Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: E Shattow <e@freeshell.de>
2025-04-25MAINTAINERS: visionfive2: Add match N: starfive patternMinda Chen
Add match N:starfive pattern to visionfive2 board. Now starfive pattern just related to JH7110 IC. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Reviewed-by: Marek Vasut <marex@denx.de>
2025-04-25board: starfive: Remove duplicated board_fdt_blob_setupYao Zi
The default version should work for Starfive VisionFive 2. Signed-off-by: Yao Zi <ziyao@disroot.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-04-08Merge branch 'next'Tom Rini
Note that this undoes the changes of commit cf6d4535cc4c ("x86: emulation: Disable bloblist for now") as that was intended only for the release due to time.
2025-03-28board: starfive: Remove compatible boards Milk-V Mars CM and Mars CM LiteE Shattow
Remove leftover code from Milk-V Mars CM and Mars CM Lite boards that do not exist in upstream Linux Kernel devicetree-rebasing. These will be re- introduced when submitted upstream for a future U-Boot release. Users of these boards should use the previous stable release of U-Boot until then. Signed-off-by: E Shattow <e@freeshell.de>
2025-03-25board: starfive: spl: strip off 'starfive/' prefixHeinrich Schuchardt
The configuration descriptions generated by binman contain the vendor device-tree directory. Instead of adding it to all match strings just strip it off. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2025-03-17spl: starfive: visionfive2: Disable USB overcurrent pin by default.Minda Chen
For some JH7110 boards, USB host overcurent pin is not reserved, To make USB host work, overcurrent pin must be disabled. So set the pin default disabled in spl stage. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Tested-by: E Shattow <lucent@gmail.com>
2025-02-20board: starfive: Update the maintainer file for VisionFive 2 boardHal Feng
Update the maintainer file and mark jh7110 / visionfive2 related files with N: patterns. Signed-off-by: Hal Feng <hal.feng@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-12-18fdt: Swap the signature for board_fdt_blob_setup()Simon Glass
This returns a devicetree and updates a parameter with an error code. Swap it, since this fits better with the way U-Boot normally works. It also (more easily) allows leaving the existing pointer unchanged. No yaks were harmed in this change, but there is a very small code-size reduction. For sifive, the OF_BOARD option must be set for the function to be called, so there is no point in checking it again. Also OF_SEPARATE is defined always. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Matthias Brugger <mbrugger@suse.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> [trini: Update total_compute] Signed-off-by: Tom Rini <trini@konsulko.com>
2024-12-18board: starfive: spl: Support multiple DTBs for JH7110 based boardsHal Feng
Get product ID and the other information from EEPROM, use them to select the correct DTB. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18board: starfive: spl: Fix the wrong use of CONFIG_IS_ENABLED()Hal Feng
The prefix "SPL_" is not needed when using CONFIG_IS_ENABLED(). Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Fixes: 5ecf9b0b8a75 ("board: starfive: add StarFive VisionFive v2 board support") Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-12-18board: starfive: spl: Drop the unneeded DT modification codeHal Feng
As OF_UPSTREAM is implemented, these code are redundant. Tested-by: Anand Moon <linux.amoon@gmail.com> Tested-by: E Shattow <lucent@gmail.com> Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
2024-10-28riscv64: dts: starfive: Mars ethernet0 phy delay values sync with upstream LinuxE Shattow
Milk-V Mars vendor board support package has value 0xa (multiplier=150) for both rx and tx delay. Upstream Linux has this as 1500 for both rx and tx delay. There is no documentation for why this should remain 1900 so correct it now. Mars CM and Mars CM Lite follow the same network phy delay values as Mars in the vendor board support package. Fixes: 92db23f7660de5897c8e3b91489b5b5780ffcd16 Signed-off-by: E Shattow <e@freeshell.de> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-28riscv64: dts: starfive: Star64 ethernet0 phy delay values sync with upstream ↵E Shattow
Linux Fix bad delay values copied from vendor board support package of Star64, improves performance and reliability of bottom network port. Fixes: 7ebf7e77c0616ef0d2f58cc1684c230f656bd3d6 Signed-off-by: E Shattow <e@freeshell.de> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-10-11board: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILDSimon Glass
Use the new symbol to refer to any 'SPL' build, including TPL and VPL Signed-off-by: Simon Glass <sjg@chromium.org>
2024-09-10board: fix compatible property Milk-V Mars CMHeinrich Schuchardt
For the Milk-V Mars CM (lite) we have only been copying sizeof(void *) bytes to the compatible property instead of the whole string list. Fixes: de3229599d4f ("board: add support for Milk-V Mars CM") Reported-by: E Shattow <lucent@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-05-30board: starfive: support Pine64 Star64 boardH Bell
Similar to the Milk-V Mars, The Star64 board contains few differences to the VisionFive 2 boards, so can be part of the same U-boot build. Signed-off-by: Henry Bell <dmoo_dv@protonmail.com> Cc: ycliang@andestech.com Cc: heinrich.schuchardt@canonical.com Reviewed-by: E Shattow <lucent@gmail.com>
2024-05-14starfive: add mac vendor sub-commandHeinrich Schuchardt
As boards from multiple vendors (Milk-V, StarFive, Pine64) use the mac command provide a sub-command to set the vendor string. Reported-by: E. Shattow <lucent@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2024-05-14board: add support for Milk-V Mars CMHeinrich Schuchardt
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 <heinrich.schuchardt@canonical.com> Tested-by: E. Shattow <lucent@gmail.com> Reviewed-by: E. Shattow <lucent@gmail.com>
2024-05-14board: starfive: function to read eMMC sizeHeinrich Schuchardt
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 <heinrich.schuchardt@canonical.com> Reviewed-by: E. Shattow <lucent@gmail.com>
2024-05-02board: starfive: Rename spl_soc_init() to spl_dram_init()Lukas Funke
Rename spl_soc_init() to spl_dram_init() because the generic function name does not reflect what the function actually does. Also spl_dram_init() is commonly used for dram initialization and should be called from board_init_f(). Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2024-04-22common: Convert *.c/h from UTF-8 to ASCII enconfingMichal Simek
Convert UTF-8 chars to ASCII in cases where make sense. No Copyright or names are converted. Signed-off-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Marek Behún <kabel@kernel.org>
2024-04-09riscv: starfive: avoid including common.hHeinrich Schuchardt
The usage of common.h is deprecated. Remove it from board files. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09board: starfive: support Milk-V Mars boardHeinrich Schuchardt
The differences between the Milk-V Mars board and the VisionFive 2 board are small enough that we can support both using the same U-Boot build. * The model and compatible property are taken from proposed Linux patches. * The EEPROM is atmel,24c02 according to the vendor U-Boot. * The second Ethernet port is not available. usb@10100000 does not exist in U-Boot yet. So we don't have to reflect differences in usage here. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09riscv: set fdtfile on Milk-V MarsHeinrich Schuchardt
Set environment variable fdtfile to the correct value for the Milk-V Mars board. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09eeprom: starfive: function get_product_id_from_eeprom()Heinrich Schuchardt
Export a function get_product_id_from_eeprom() to read the product ID. This value can be used for fixing up the device-tree on JH7110 based products. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-04-09riscv: do not set default fdt for VisionFive 2Heinrich Schuchardt
Currently in set_fdtfile() we set the value of environment variable fdtfile unconditionally. The implies that a value in the environment will be ignored. With the patch environment variable fdtfile will only be set if it does not yet exist. This requires that CONFIG_DEFAULT_FDT_FILE is not set. Now the user can either set and save fdtfile interactively or in the U-Boot configuration to overrule the device-tree name chosen based on the hardware in set_fdtfile(). Reported-by: E Shattow <lucent@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-03-12board: starfive: maintainer: Add visionfive2 PCIe driverMinda Chen
Add PCIe driver file to visionfive2 board MAINTAINERS list. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-03-12board: starfive: Update maintainer of VisionFive v2 boardMinda Chen
Update the maintainer of Starfive VisionFive v2 board. Signed-off-by: Minda Chen <minda.chen@starfivetech.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31board: visionfive2: configure PHY pad drive strengthLukasz Tekieli
Configure the pad drive strength register for both PHYs. The values correspond to what can be found in the Linux DTS for VisionFive2 v1.3b. Pad drive strength configuration is required for the phy0 to work correctly with 100Mbit links. Signed-off-by: Lukasz Tekieli <tekieli.lukasz@gmail.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2024-01-31board: starfive: handle compatible property in dynamic DT configurationAurelien Jarno
The difference between the StarFive VisionFive 2 1.2A and 1.3B boards is handled dynamically by looking at the PCB version in the EEPROM in order to have a single u-boot version for both versions of the board. While the "model" property is correctly handled, the "compatible" one is always the the one of version 1.3b. This patch add support for dynamically configuring that property. Fixes: 9b7060bd15e7 ("riscv: dts: jh7110: Combine the board device tree files of 1.2A and 1.3B") Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-11-02board: starfive: spl: Support jtag for VisionFive2 boardChanho Park
JTAG pins are mapped as below. To access the JTAG pins, we need to control the GPIO pins from SPL which seems to be the earliest stage for JTAG. - JTAG nTRST: GPIO36 / Input - JTAG TDI: GPIO61 / Input - JTAG TMS: GPIO63 / Input - JTAG TCK: GPIO60 / Input - JTAG TDO: GPIO44 / Output Signed-off-by: Chanho Park <chanho61.park@samsung.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2023-10-16cmd: Convert existing long help messages to the new macroTom Rini
- Generally we just drop the #ifdef CONFIG_SYS_LONGHELP and endif lines and use U_BOOT_LONGHELP to declare the same variable name as before - In a few places, either rename the variable to follow convention or introduce the variable as it was being done inline before. Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-10-16eeprom: starfive: add 'mac raw' commandHeinrich Schuchardt
Add a sub-command to print a hexdump of the EEPROM content. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16eeprom: starfive: raw dump if unsupported data versionHeinrich Schuchardt
If the data version field of the EEPROM is not supported, provide a hexdump of the data. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-16eeprom: starfive: re-implement mac commandHeinrich Schuchardt
The different implementations of the mac command have board or vendor specific sub-commands. Add the command definition specific to the VisionFive 2 board. Don't call cmd_usage() directly but return CMD_RET_USAGE instead. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-10-02Merge branch 'next'Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-09-26riscv: set fdtfile on VisionFive 2Heinrich Schuchardt
Multiple revisions of the StarFive VisionFive 2 board exist. They can be identified by reading their EEPROM. Linux uses two differently named device-tree files. To load the correct device-tree we need to set $fdtfile to the device-tree file name that matches the board revision. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com> Tested-by: Milan P. Stanić <mps@arvanta.net>