doc: add DeepComputing FML13V01 documentation

Describe building U-Boot for the board and booting.

Carve out common information for JH7110 boards into an include.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: E Shattow <e@freeshell.de>
This commit is contained in:
Heinrich Schuchardt 2025-04-24 14:13:12 +02:00 committed by Leo Yu-Chi Liang
parent 26cd7afcce
commit 9b0a451b9e
3 changed files with 170 additions and 0 deletions

View File

@ -0,0 +1,80 @@
.. 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.
.. include:: jh7110_common.rst

View File

@ -6,6 +6,7 @@ StarFive
.. toctree::
:maxdepth: 1
deepcomputing_fml13v01
milk-v_mars
pine64_star64
visionfive2

View File

@ -0,0 +1,89 @@
.. SPDX-License-Identifier: GPL-2.0-or-later
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
--------------------
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 eMMC
-----------------
The device boot ROM tries to load U-Boot SPL (u-boot-spl.bin.normal.out) from
sector 0 of the eMMC's main hardware partition. But this conflicts with GPT
partitioning. Fortunately eMMC can alternatively load U-Boot SPL from a backup
position.
For U-Boot SPL (u-boot-spl.bin.normal.out) starting at sector 2048 (position
0x100000) write the following bytes to the eMMC device after GPT partitioning:
======= ========================
Address Bytes
======= ========================
0x0000 40 02 00 00 00 00 10 00
0x0290 40 02 00 00 00 00 10 00
======= ========================
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.