E Shattow <luc...@gmail.com> schrieb am Fr., 7. Feb. 2025, 19:10: > Can we reduce the visionfive2 multi-target docs down to one document for > the target and not each individual board? Essentially the differences are > the mmc ordering and what boot mode GPIO selection is possible. Much is > copy-paste anyhow. -E >
A user will start searching for the specific board at hand. There is board specific information for the board: - how to access UART0 - open case detection - the labelling of the boot device switch Maybe we could introduce an include for the common parts as has been done for other SoCs. Best regards Heinrich > On Fri, Feb 7, 2025, 09:22 Heinrich Schuchardt < > heinrich.schucha...@canonical.com> wrote: > >> Describe building U-Boot for the board and booting. >> >> Signed-off-by: Heinrich Schuchardt <heinrich.schucha...@canonical.com> >> --- >> doc/board/starfive/deepcomputing_fml13v01.rst | 143 ++++++++++++++++++ >> doc/board/starfive/index.rst | 1 + >> 2 files changed, 144 insertions(+) >> create mode 100644 doc/board/starfive/deepcomputing_fml13v01.rst >> >> diff --git a/doc/board/starfive/deepcomputing_fml13v01.rst >> b/doc/board/starfive/deepcomputing_fml13v01.rst >> new file mode 100644 >> index 00000000000..0d0295555b6 >> --- /dev/null >> +++ b/doc/board/starfive/deepcomputing_fml13v01.rst >> @@ -0,0 +1,143 @@ >> +.. SPDX-License-Identifier: GPL-2.0-or-later >> + >> +DeepComputing Framework Motherboard (FLM13V01) >> +============================================== >> + >> +The DeepComputing Framework motherboard (FLM13V01) can be combined with a >> +13 inch Framework laptop chassis to provide a complete laptop. >> + >> +U-Boot for the board uses the same binaries as the VisionFive 2 board. >> +Currently only serial console output is supported by mainline U-Boot. >> + >> +Building >> +-------- >> + >> +Setup the cross compilation environment variable: >> + >> +.. code-block:: bash >> + >> + export CROSS_COMPILE=riscv64-linux-gnu- >> + >> +The M-mode software OpenSBI provides the supervisor binary interface >> (SBI) and >> +is responsible for the switch to S-Mode. It is a prerequisite for >> building >> +U-Boot. Support for the JH7110 was introduced in OpenSBI 1.2. It is >> recommended >> +to use a current release. >> + >> +.. code-block:: bash >> + >> + git clone https://github.com/riscv/opensbi.git >> + cd opensbi >> + make PLATFORM=generic FW_TEXT_START=0x40000000 FW_OPTIONS=0 >> + export >> OPENSBI="$(pwd)/build/platform/generic/firmware/fw_dynamic.bin" >> + >> +Now build U-Boot SPL and main U-Boot. >> + >> +.. code-block:: bash >> + >> + cd <U-Boot-dir> >> + make starfive_visionfive2_defconfig >> + make >> + >> +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, U-Boot, and device-trees. >> + >> +Device-tree selection >> +--------------------- >> + >> +The product ID stored in the board EEPROM is used by U-Boot SPL to >> select the >> +right configuration and device-tree from the u-boot.itb FIT image. >> + >> +Furthermore if variable $fdtfile has not been saved in the environment >> it is >> +set based on the product ID to >> *starfive/jh7110-deepcomputing-fml13v01.dtb*. >> + >> +To overrule this default the variable can be set manually and saved in >> the >> +environment >> + >> +.. code-block:: console >> + >> + setenv fdtfile my_device-tree.dtb >> + env save >> + >> +Power switch >> +------------ >> + >> +A tiny power switch is located in right upper corner of the board. >> + >> +Open case detection >> +------------------- >> + >> +The board has an open case detection switch. Red lights will flash and >> the >> +board will not boot if the switch is not held down. >> + >> +UART >> +---- >> + >> +UART 0 is exposed via the side channel contacts SBU1 and SBU2 of the >> lower, >> +right USB C connector. A USB C cable and a breakout board are needed for >> +physical access. It depends on the cable orientation on which of SBU1 >> and SBU2 >> +you will find RX and TX. The signal voltage is 3.3 V. The baud rate is >> 115200. >> + >> +Boot source selection >> +--------------------- >> + >> +The board provides DIP switches to select the device for loading the boot >> +firmware. >> + >> +=========== === === >> +Boot source SW1 SW2 >> +=========== === === >> +UART OFF OFF >> +SD-card ON OFF >> +eMMC OFF ON >> +SPI flash ON ON >> +=========== === === >> + >> +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: >> + >> +.. code-block:: console >> + >> + 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 >> + >> +For loading the files from a TFTP server refer to the dhcp and tftpboot >> +commands. >> + >> +After updating U-Boot you may want to erase a saved environment and >> reboot. >> + >> +.. code-block:: console >> + >> + env erase >> + reset >> + >> +Booting from SD-Card or eMMC >> +---------------------------- >> + >> +The device boot ROM loads U-Boot SPL (u-boot-spl.bin.normal.out) from the >> +partition with type GUID 2E54B353-1271-4842-806F-E436D6AF6985. You are >> free >> +to choose any partition number. >> + >> +With the default configuration U-Boot SPL loads the U-Boot FIT image >> +(u-boot.itb) from partition 2 >> (CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=0x2). >> +When formatting it is recommended to use GUID >> +BC13C2FF-59E6-4262-A352-B275FD6F7172 for this partition. >> + >> +Booting from UART >> +----------------- >> + >> +The boot ROM supports the X-modem protocol to upload >> +spl/u-boot-spl.bin.normal.out. U-Boot SPL support loading the FIT image >> +u-boot.itb via the Y-modem protocol. >> + >> +Due to restrictions of the boot ROM not all X-modem implementations are >> +compatible. The package tio (https://github.com/tio/tio) has been found >> to be >> +usable. >> diff --git a/doc/board/starfive/index.rst b/doc/board/starfive/index.rst >> index 72ab6ddfbf6..ce0ee4a0a2f 100644 >> --- a/doc/board/starfive/index.rst >> +++ b/doc/board/starfive/index.rst >> @@ -6,6 +6,7 @@ StarFive >> .. toctree:: >> :maxdepth: 1 >> >> + deepcomputing_fml13v01 >> milk-v_mars >> milk-v_mars_cm >> pine64_star64 >> -- >> 2.47.1 >> >>