aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/README.fdt-overlays114
-rw-r--r--doc/README.gpt34
-rw-r--r--doc/board/amlogic/beelink-gtking.rst115
-rw-r--r--doc/board/amlogic/beelink-gtkingpro.rst116
-rw-r--r--doc/board/amlogic/index.rst123
-rw-r--r--doc/board/amlogic/libretech-cc.rst17
-rw-r--r--doc/board/amlogic/wetek-core2.rst96
-rw-r--r--doc/board/emulation/qemu-riscv.rst2
-rw-r--r--doc/board/freescale/b4860qds.rst4
-rw-r--r--doc/board/freescale/imx8mm_evk.rst10
-rw-r--r--doc/board/freescale/imx8mn_evk.rst10
-rw-r--r--doc/board/freescale/imx8mp_evk.rst16
-rw-r--r--doc/board/freescale/imx8mq_evk.rst12
-rw-r--r--doc/board/index.rst1
-rw-r--r--doc/board/microchip/index.rst9
-rw-r--r--doc/board/microchip/mpfs_icicle.rst810
-rw-r--r--doc/board/sifive/fu540.rst19
-rw-r--r--doc/board/sipeed/maix.rst315
-rw-r--r--doc/board/st/stm32mp1.rst2
-rw-r--r--doc/driver-model/bind.rst2
-rw-r--r--doc/uefi/uefi.rst11
-rw-r--r--doc/usage/base.rst23
-rw-r--r--doc/usage/fdt_overlays.rst134
-rw-r--r--doc/usage/index.rst4
-rw-r--r--doc/usage/mbr.rst94
-rw-r--r--doc/usage/pstore.rst11
26 files changed, 1818 insertions, 286 deletions
diff --git a/doc/README.fdt-overlays b/doc/README.fdt-overlays
deleted file mode 100644
index 39139cb850..0000000000
--- a/doc/README.fdt-overlays
+++ /dev/null
@@ -1,114 +0,0 @@
-U-Boot FDT Overlay usage
-=============================================
-
-Overlays Syntax
----------------
-
-Overlays require slightly different syntax compared to traditional overlays.
-Please refer to dt-object-internal.txt in the dtc sources for information
-regarding the internal format of overlays:
-https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/Documentation/dt-object-internal.txt
-
-Building Overlays
------------------
-
-In a nutshell overlays provides a means to manipulate a symbol a previous dtb
-or overlay has defined. It requires both the base and all the overlays
-to be compiled with the -@ command line switch so that symbol information is
-included.
-
-Note support for -@ option can only be found in dtc version 1.4.4 or newer.
-Only version 4.14 or higher of the Linux kernel includes a built in version
-of dtc that meets this requirement.
-
-Building an overlay follows the same process as building a traditional dtb.
-
-For example:
-
-base.dts
---------
-
- /dts-v1/;
- / {
- foo: foonode {
- foo-property;
- };
- };
-
- $ dtc -@ -I dts -O dtb -o base.dtb base.dts
-
-bar.dts
--------
-
- /dts-v1/;
- /plugin/;
- / {
- fragment@1 {
- target = <&foo>;
- __overlay__ {
- overlay-1-property;
- bar: barnode {
- bar-property;
- };
- };
- };
- };
-
- $ dtc -@ -I dts -O dtb -o bar.dtb bar.dts
-
-Ways to Utilize Overlays in U-boot
-----------------------------------
-
-There are two ways to apply overlays in U-boot.
-1. Include and define overlays within a FIT image and have overlays
- automatically applied.
-
-2. Manually load and apply overlays
-
-The remainder of this document will discuss using overlays via the manual
-approach. For information on using overlays as part of a FIT image please see:
-doc/uImage.FIT/overlay-fdt-boot.txt
-
-Manually Loading and Applying Overlays
---------------------------------------
-
-1. Figure out where to place both the base device tree blob and the
-overlay. Make sure you have enough space to grow the base tree without
-overlapping anything.
-
-=> setenv fdtaddr 0x87f00000
-=> setenv fdtovaddr 0x87fc0000
-
-2. Load the base blob and overlay blobs
-
-=> load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/base.dtb
-=> load ${devtype} ${bootpart} ${fdtovaddr} ${bootdir}/overlay.dtb
-
-3. Set it as the working fdt tree.
-
-=> fdtaddr $fdtaddr
-
-4. Grow it enough so it can 'fit' all the applied overlays
-
-=> fdt resize 8192
-
-5. You are now ready to apply the overlay.
-
-=> fdt apply $fdtovaddr
-
-6. Boot system like you would do with a traditional dtb.
-
-For bootm:
-
-=> bootm ${kerneladdr} - ${fdtaddr}
-
-For bootz:
-
-=> bootz ${kerneladdr} - ${fdtaddr}
-
-Please note that in case of an error, both the base and overlays are going
-to be invalidated, so keep copies to avoid reloading.
-
-Pantelis Antoniou
-pantelis.antoniou@konsulko.com
-11/7/2017
diff --git a/doc/README.gpt b/doc/README.gpt
index facd7afc3a..ac975f66b8 100644
--- a/doc/README.gpt
+++ b/doc/README.gpt
@@ -251,22 +251,24 @@ can specify a other partition type guid:
type=0FC63DAF-8483-4772-8E79-3D69D8477DE4;"
Some strings can be also used at the place of known GUID :
- "system" = PARTITION_SYSTEM_GUID
- (C12A7328-F81F-11D2-BA4B-00A0C93EC93B)
- "mbr" = LEGACY_MBR_PARTITION_GUID
- (024DEE41-33E7-11D3-9D69-0008C781F39F)
- "msft" = PARTITION_MSFT_RESERVED_GUID
- (E3C9E316-0B5C-4DB8-817D-F92DF00215AE)
- "data" = PARTITION_BASIC_DATA_GUID
- (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7)
- "linux" = PARTITION_LINUX_FILE_SYSTEM_DATA_GUID
- (0FC63DAF-8483-4772-8E79-3D69D8477DE4)
- "raid" = PARTITION_LINUX_RAID_GUID
- (A19D880F-05FC-4D3B-A006-743F0F84911E)
- "swap" = PARTITION_LINUX_SWAP_GUID
- (0657FD6D-A4AB-43C4-84E5-0933C84B4F4F)
- "lvm" = PARTITION_LINUX_LVM_GUID
- (E6D6D379-F507-44C2-A23C-238F2A3DF928)
+ "system" = PARTITION_SYSTEM_GUID
+ (C12A7328-F81F-11D2-BA4B-00A0C93EC93B)
+ "mbr" = LEGACY_MBR_PARTITION_GUID
+ (024DEE41-33E7-11D3-9D69-0008C781F39F)
+ "msft" = PARTITION_MSFT_RESERVED_GUID
+ (E3C9E316-0B5C-4DB8-817D-F92DF00215AE)
+ "data" = PARTITION_BASIC_DATA_GUID
+ (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7)
+ "linux" = PARTITION_LINUX_FILE_SYSTEM_DATA_GUID
+ (0FC63DAF-8483-4772-8E79-3D69D8477DE4)
+ "raid" = PARTITION_LINUX_RAID_GUID
+ (A19D880F-05FC-4D3B-A006-743F0F84911E)
+ "swap" = PARTITION_LINUX_SWAP_GUID
+ (0657FD6D-A4AB-43C4-84E5-0933C84B4F4F)
+ "lvm" = PARTITION_LINUX_LVM_GUID
+ (E6D6D379-F507-44C2-A23C-238F2A3DF928)
+ "u-boot-env" = PARTITION_U_BOOT_ENVIRONMENT
+ (3DE21764-95BD-54BD-A5C3-4ABE786F38A8)
"uuid_disk=...;name=u-boot,size=60MiB,uuid=...;
name=kernel,size=60MiB,uuid=...,type=linux;"
diff --git a/doc/board/amlogic/beelink-gtking.rst b/doc/board/amlogic/beelink-gtking.rst
new file mode 100644
index 0000000000..56ce2cb273
--- /dev/null
+++ b/doc/board/amlogic/beelink-gtking.rst
@@ -0,0 +1,115 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+U-Boot for Beelink GT-King
+==========================
+
+The Shenzen AZW (Beelink) GT-King is based on the Amlogic W400 reference
+board with an S922X-H chip.
+
+- 4GB LPDDR4 RAM
+- 64GB eMMC storage
+- 10/100/1000 Base-T Ethernet
+- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1)
+- HDMI 2.1 video
+- S/PDIF optical output
+- Analogue audio output
+- 1x USB 2.0 port
+- 2x USB 3.0 ports
+- IR receiver
+- 1x micro SD card slot
+
+Beelink do not provide public schematics, but have been willing
+to share them with known distro developers on request.
+
+U-Boot compilation
+------------------
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=aarch64-none-elf-
+ $ make beelink-gtking_defconfig
+ $ make
+
+Image creation
+--------------
+
+Amlogic does not provide sources for the firmware and for tools needed
+to create the bootloader image. Beelink have provided the Amlogic "SDK"
+in their forums, but the u-boot sources included result in 2GB RAM being
+detected. The following FIPs were generated with newer private sources
+and give correct (4GB) RAM detection:
+
+https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x
+
+NB: Beelink use a common board config for GT-King, GT-King Pro and the
+GS-King-X model, hence the "beelink-s922x" name.
+
+.. code-block:: bash
+
+ $ wget https://github.com/LibreELEC/amlogic-boot-fip/archive/master.zip
+ $ unzip master.zip
+ $ export FIPDIR=$PWD/amlogic-boot-fip/beelink-s922x
+
+Go back to the mainline U-Boot source tree then:
+
+.. code-block:: bash
+
+ $ mkdir fip
+ $ cp $FIPDIR/* fip/
+ $ cp u-boot.bin fip/bl33.bin
+
+ $ sh fip/blx_fix.sh \
+ fip/bl30.bin \
+ fip/zero_tmp \
+ fip/bl30_zero.bin \
+ fip/bl301.bin \
+ fip/bl301_zero.bin \
+ fip/bl30_new.bin \
+ bl30
+
+ $ sh fip/blx_fix.sh \
+ fip/bl2.bin \
+ fip/zero_tmp \
+ fip/bl2_zero.bin \
+ fip/acs.bin \
+ fip/bl21_zero.bin \
+ fip/bl2_new.bin \
+ bl2
+
+ $ fip/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \
+ --output fip/bl30_new.bin.g12a.enc \
+ --level v3
+ $ fip/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \
+ --output fip/bl30_new.bin.enc \
+ --level v3 --type bl30
+ $ fip/aml_encrypt_g12b --bl3sig --input fip/bl31.img \
+ --output fip/bl31.img.enc \
+ --level v3 --type bl31
+ $ fip/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \
+ --output fip/bl33.bin.enc \
+ --level v3 --type bl33
+ $ fip/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \
+ --output fip/bl2.n.bin.sig
+ $ fip/aml_encrypt_g12b --bootmk \
+ --output fip/u-boot.bin \
+ --bl2 fip/bl2.n.bin.sig \
+ --bl30 fip/bl30_new.bin.enc \
+ --bl31 fip/bl31.img.enc \
+ --bl33 fip/bl33.bin.enc \
+ --ddrfw1 fip/ddr4_1d.fw \
+ --ddrfw2 fip/ddr4_2d.fw \
+ --ddrfw3 fip/ddr3_1d.fw \
+ --ddrfw4 fip/piei.fw \
+ --ddrfw5 fip/lpddr4_1d.fw \
+ --ddrfw6 fip/lpddr4_2d.fw \
+ --ddrfw7 fip/diag_lpddr4.fw \
+ --ddrfw8 fip/aml_ddr.fw \
+ --level v3
+
+and then write the image to SD with:
+
+.. code-block:: bash
+
+ $ DEV=/dev/your_sd_device
+ $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
+ $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
diff --git a/doc/board/amlogic/beelink-gtkingpro.rst b/doc/board/amlogic/beelink-gtkingpro.rst
new file mode 100644
index 0000000000..d750351361
--- /dev/null
+++ b/doc/board/amlogic/beelink-gtkingpro.rst
@@ -0,0 +1,116 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+U-Boot for Beelink GT-King Pro
+==============================
+
+The Shenzen AZW (Beelink) GT-King Pro is based on the Amlogic W400 reference
+board with an S922X-H chip.
+
+- 4GB LPDDR4 RAM
+- 64GB eMMC storage
+- 10/100/1000 Base-T Ethernet
+- AP6356S Wireless (802.11 a/b/g/n/ac, BT 4.1)
+- HDMI 2.1 video
+- Analogue audio output
+- 1x RS232 port
+- 2x USB 2.0 port
+- 2x USB 3.0 ports
+- IR receiver
+- 1x SD card slot
+- 1x Power on/off button
+
+Beelink do not provide public schematics, but have been willing
+to share them with known distro developers on request.
+
+U-Boot compilation
+------------------
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=aarch64-none-elf-
+ $ make beelink-gtkingpro_defconfig
+ $ make
+
+Image creation
+--------------
+
+Amlogic does not provide sources for the firmware and for tools needed
+to create the bootloader image. Beelink have provided the Amlogic "SDK"
+in their forums, but the u-boot sources included result in 2GB RAM being
+detected. The following FIPs were generated with newer private sources
+and give correct (4GB) RAM detection:
+
+https://github.com/LibreELEC/amlogic-boot-fip/tree/master/beelink-s922x
+
+NB: Beelink use a common board config for GT-King, GT-King Pro and the
+GS-King-X model, hence the "beelink-s922x" name.
+
+.. code-block:: bash
+
+ $ wget https://github.com/LibreELEC/amlogic-boot-fip/archive/master.zip
+ $ unzip master.zip
+ $ export FIPDIR=$PWD/amlogic-boot-fip/beelink-s922x
+
+Go back to the mainline U-Boot source tree then:
+
+.. code-block:: bash
+
+ $ mkdir fip
+ $ cp $FIPDIR/* fip/
+ $ cp u-boot.bin fip/bl33.bin
+
+ $ sh fip/blx_fix.sh \
+ fip/bl30.bin \
+ fip/zero_tmp \
+ fip/bl30_zero.bin \
+ fip/bl301.bin \
+ fip/bl301_zero.bin \
+ fip/bl30_new.bin \
+ bl30
+
+ $ sh fip/blx_fix.sh \
+ fip/bl2.bin \
+ fip/zero_tmp \
+ fip/bl2_zero.bin \
+ fip/acs.bin \
+ fip/bl21_zero.bin \
+ fip/bl2_new.bin \
+ bl2
+
+ $ fip/aml_encrypt_g12b --bl30sig --input fip/bl30_new.bin \
+ --output fip/bl30_new.bin.g12a.enc \
+ --level v3
+ $ fip/aml_encrypt_g12b --bl3sig --input fip/bl30_new.bin.g12a.enc \
+ --output fip/bl30_new.bin.enc \
+ --level v3 --type bl30
+ $ fip/aml_encrypt_g12b --bl3sig --input fip/bl31.img \
+ --output fip/bl31.img.enc \
+ --level v3 --type bl31
+ $ fip/aml_encrypt_g12b --bl3sig --input fip/bl33.bin --compress lz4 \
+ --output fip/bl33.bin.enc \
+ --level v3 --type bl33
+ $ fip/aml_encrypt_g12b --bl2sig --input fip/bl2_new.bin \
+ --output fip/bl2.n.bin.sig
+ $ fip/aml_encrypt_g12b --bootmk \
+ --output fip/u-boot.bin \
+ --bl2 fip/bl2.n.bin.sig \
+ --bl30 fip/bl30_new.bin.enc \
+ --bl31 fip/bl31.img.enc \
+ --bl33 fip/bl33.bin.enc \
+ --ddrfw1 fip/ddr4_1d.fw \
+ --ddrfw2 fip/ddr4_2d.fw \
+ --ddrfw3 fip/ddr3_1d.fw \
+ --ddrfw4 fip/piei.fw \
+ --ddrfw5 fip/lpddr4_1d.fw \
+ --ddrfw6 fip/lpddr4_2d.fw \
+ --ddrfw7 fip/diag_lpddr4.fw \
+ --ddrfw8 fip/aml_ddr.fw \
+ --level v3
+
+and then write the image to SD with:
+
+.. code-block:: bash
+
+ $ DEV=/dev/your_sd_device
+ $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
+ $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
diff --git a/doc/board/amlogic/index.rst b/doc/board/amlogic/index.rst
index 9e780ba47c..275c3664b7 100644
--- a/doc/board/amlogic/index.rst
+++ b/doc/board/amlogic/index.rst
@@ -10,66 +10,66 @@ An up-do-date matrix is also available on: http://linux-meson.com
This matrix concerns the actual source code version.
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| | S905 | S905X | S912 | A113X | S905X2 | S922X | S905X3 |
-| | | S805X | S905D | | S905D2 | A311D | S905D3 |
-| | | | | | S905Y2 | | |
-+===============================+===========+==============+==============+============+============+=============+==============+
-| Boards | Odroid-C2 | P212 | Khadas VIM2 | S400 | U200 | Odroid-N2 | SEI610 |
-| | Nanopi-K2 | Khadas-VIM | Libretech-PC | | SEI510 | Khadas-VIM3 | Khadas-VIM3L |
-| | P200 | LibreTech-CC | | | | | Odroid-C4 |
-| | P201 | LibreTech-AC | | | | | |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| UART | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Pinctrl/GPIO | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Clock Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| PWM | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Reset Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Infrared Decoder | No | No | No | No | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Ethernet | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Multi-core | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Fuse access | **Yes** | **Yes** |**Yes** |**Yes** |**Yes** |**Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| SPI (FC) | **Yes** | **Yes** | **Yes** | **Yes** |**Yes** | **Yes** | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| SPI (CC) | No | No | No | No | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| I2C | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| USB | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| USB OTG | No | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| eMMC | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| SDCard | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| NAND | No | No | No | No | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| ADC | **Yes** | **Yes** | **Yes** | No | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| CVBS Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| HDMI Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| CEC | No | No | No | *N/A* | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| Thermal Sensor | No | No | No | No | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| LCD/LVDS Output | No | *N/A* | No | No | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| MIPI DSI Output | *N/A* | *N/A* | *N/A* | No | No | No | No |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
-| SoC (version) information | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
-+-------------------------------+-----------+--------------+--------------+------------+------------+-------------+--------------+
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| | S905 | S905X | S912 | A113X | S905X2 | S922X | S905X3 |
+| | | S805X | S905D | | S905D2 | A311D | S905D3 |
+| | | | | | S905Y2 | | |
++===============================+===========+=================+==============+============+============+=============+==============+
+| Boards | Odroid-C2 | P212 | Khadas VIM2 | S400 | U200 | Odroid-N2 | SEI610 |
+| | Nanopi-K2 | Khadas-VIM | Libretech-PC | | SEI510 | Khadas-VIM3 | Khadas-VIM3L |
+| | P200 | LibreTech-CC v1 | WeTek Core2 | | | GT-King/Pro | Odroid-C4 |
+| | P201 | LibreTech-AC v2 | | | | | |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| UART | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Pinctrl/GPIO | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Clock Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| PWM | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Reset Control | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Infrared Decoder | No | No | No | No | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Ethernet | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Multi-core | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Fuse access | **Yes** | **Yes** |**Yes** |**Yes** |**Yes** |**Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| SPI (FC) | **Yes** | **Yes** | **Yes** | **Yes** |**Yes** | **Yes** | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| SPI (CC) | No | No | No | No | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| I2C | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| USB | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| USB OTG | No | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| eMMC | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| SDCard | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| NAND | No | No | No | No | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| ADC | **Yes** | **Yes** | **Yes** | No | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| CVBS Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| HDMI Output | **Yes** | **Yes** | **Yes** | *N/A* | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| CEC | No | No | No | *N/A* | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| Thermal Sensor | No | No | No | No | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| LCD/LVDS Output | No | *N/A* | No | No | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| MIPI DSI Output | *N/A* | *N/A* | *N/A* | No | No | No | No |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
+| SoC (version) information | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** | **Yes** |
++-------------------------------+-----------+-----------------+--------------+------------+------------+-------------+--------------+
Board Documentation
-------------------
@@ -77,6 +77,8 @@ Board Documentation
.. toctree::
:maxdepth: 1
+ beelink-gtking
+ beelink-gtkingpro
khadas-vim2
khadas-vim3l
khadas-vim3
@@ -95,4 +97,5 @@ Board Documentation
sei510
sei610
u200
+ wetek-core2
w400
diff --git a/doc/board/amlogic/libretech-cc.rst b/doc/board/amlogic/libretech-cc.rst
index f2e26cabf9..94c74c5a8b 100644
--- a/doc/board/amlogic/libretech-cc.rst
+++ b/doc/board/amlogic/libretech-cc.rst
@@ -1,11 +1,13 @@
.. SPDX-License-Identifier: GPL-2.0+
-U-Boot for LibreTech CC
-=======================
+U-Boot for LibreTech CCs
+========================
LibreTech CC is a single board computer manufactured by Libre Technology
with the following specifications:
+V1:
+
- Amlogic S905X ARM Cortex-A53 quad-core SoC @ 1.5GHz
- ARM Mali 450 GPU
- 2GB DDR3 SDRAM
@@ -15,6 +17,12 @@ with the following specifications:
- 4 x USB 2.0 Host
- eMMC, microSD
- Infrared receiver
+ - Jack for CVBS and Audio
+
+V2:
+
+ - Added SPI NOR
+ - Removed Jack
Schematics are available on the manufacturer website.
@@ -27,6 +35,8 @@ U-Boot compilation
$ make libretech-cc_defconfig
$ make
+Use libretech-cc_v2_defconfig for v2.
+
Image creation
--------------
@@ -41,7 +51,8 @@ bootloaders:
* acs.bin: built from vendor u-boot source
These binaries and the tools required below have been collected and prebuilt
-for convenience at <https://github.com/BayLibre/u-boot/releases/>
+for convenience at <https://github.com/BayLibre/u-boot/releases/>. These
+apply to both v1 and v2.
Download and extract the libretech-cc release from there, and set FIPDIR to
point to the `fip` subdirectory.
diff --git a/doc/board/amlogic/wetek-core2.rst b/doc/board/amlogic/wetek-core2.rst
new file mode 100644
index 0000000000..1012079ded
--- /dev/null
+++ b/doc/board/amlogic/wetek-core2.rst
@@ -0,0 +1,96 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+U-Boot for WeTek Core2
+======================
+
+WeTek Core2 is an Android STB based on the Q200 reference design with
+the following specifications:
+
+ - Amlogic S912 ARM Cortex-A53 octo-core SoC @ 1.5GHz
+ - ARM Mali T820 GPU
+ - 3GB DDR4 SDRAM
+ - 10/100 Realtek RTL8152 Ethernet (internal USB)
+ - HDMI 2.0 4K/60Hz display
+ - 2x USB 2.0 Host, 1x USB 2.0 OTG (internal)
+ - 32GB eMMC
+ - microSD
+ - SDIO Wifi Module, Bluetooth
+ - Two channel IR receiver
+
+U-Boot compilation
+------------------
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=aarch64-none-elf-
+ $ make wetek-core2_defconfig
+ $ make
+
+Image creation
+--------------
+
+Amlogic does not provide sources for the firmware or the tools needed
+to create the bootloader image, and WeTek has not publicly shared the
+precompiled FIP binaries. However the public Khadas VIM2 sources also
+work with the Core2 box so we can use the Khadas git tree:
+
+.. code-block:: bash
+
+ $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
+ $ wget https://releases.linaro.org/archive/13.11/components/toolchain/binaries/gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
+ $ tar xvfJ gcc-linaro-aarch64-none-elf-4.8-2013.11_linux.tar.xz
+ $ tar xvfJ gcc-linaro-arm-none-eabi-4.8-2013.11_linux.tar.xz
+ $ export PATH=$PWD/gcc-linaro-aarch64-none-elf-4.8-2013.11_linux/bin:$PWD/gcc-linaro-arm-none-eabi-4.8-2013.11_linux/bin:$PATH
+ $ git clone https://github.com/khadas/u-boot -b khadas-vim-v2015.01 vim-u-boot
+ $ cd vim-u-boot
+ $ make kvim2_defconfig
+ $ make
+ $ export FIPDIR=$PWD/fip
+
+Go back to mainline U-Boot source tree then:
+
+.. code-block:: bash
+
+ $ mkdir fip
+ $ cp $FIPDIR/gxl/bl2.bin fip/
+ $ cp $FIPDIR/gxl/acs.bin fip/
+ $ cp $FIPDIR/gxl/bl21.bin fip/
+ $ cp $FIPDIR/gxl/bl30.bin fip/
+ $ cp $FIPDIR/gxl/bl301.bin fip/
+ $ cp $FIPDIR/gxl/bl31.img fip/
+ $ cp u-boot.bin fip/bl33.bin
+ $ $FIPDIR/blx_fix.sh \
+ fip/bl30.bin \
+ fip/zero_tmp \
+ fip/bl30_zero.bin \
+ fip/bl301.bin \
+ fip/bl301_zero.bin \
+ fip/bl30_new.bin \
+ bl30
+ $ python $FIPDIR/acs_tool.pyc fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
+ $ $FIPDIR/blx_fix.sh \
+ fip/bl2_acs.bin \
+ fip/zero_tmp \
+ fip/bl2_zero.bin \
+ fip/bl21.bin \
+ fip/bl21_zero.bin \
+ fip/bl2_new.bin \
+ bl2
+ $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl30_new.bin
+ $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl31.img
+ $ $FIPDIR/gxl/aml_encrypt_gxl --bl3enc --input fip/bl33.bin
+ $ $FIPDIR/gxl/aml_encrypt_gxl --bl2sig --input fip/bl2_new.bin --output fip/bl2.n.bin.sig
+ $ $FIPDIR/gxl/aml_encrypt_gxl --bootmk \
+ --output fip/u-boot.bin \
+ --bl2 fip/bl2.n.bin.sig \
+ --bl30 fip/bl30_new.bin.enc \
+ --bl31 fip/bl31.img.enc \
+ --bl33 fip/bl33.bin.enc
+
+then write the image to SD with:
+
+.. code-block:: bash
+
+ $ DEV=/dev/your_sd_device
+ $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
+ $ dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
diff --git a/doc/board/emulation/qemu-riscv.rst b/doc/board/emulation/qemu-riscv.rst
index 3acd40630e..4b8e104a21 100644
--- a/doc/board/emulation/qemu-riscv.rst
+++ b/doc/board/emulation/qemu-riscv.rst
@@ -73,7 +73,7 @@ supported by U-Boot. Clone the OpenSBI repository and run the following command.
git clone https://github.com/riscv/opensbi.git
cd opensbi
- make PLATFORM=qemu/virt
+ make PLATFORM=generic
See the OpenSBI documentation for full details:
https://github.com/riscv/opensbi/blob/master/docs/platform/qemu_virt.md
diff --git a/doc/board/freescale/b4860qds.rst b/doc/board/freescale/b4860qds.rst
index 37d7d08b09..de14d857b9 100644
--- a/doc/board/freescale/b4860qds.rst
+++ b/doc/board/freescale/b4860qds.rst
@@ -134,7 +134,7 @@ B4860QDS Default Settings
-------------------------
Switch Settings
----------------
+^^^^^^^^^^^^^^^
.. code-block:: none
@@ -167,7 +167,7 @@ B4420QDS Default Settings
-------------------------
Switch Settings
----------------
+^^^^^^^^^^^^^^^
.. code-block:: none
diff --git a/doc/board/freescale/imx8mm_evk.rst b/doc/board/freescale/imx8mm_evk.rst
index f75190227c..a9ccdb7850 100644
--- a/doc/board/freescale/imx8mm_evk.rst
+++ b/doc/board/freescale/imx8mm_evk.rst
@@ -18,7 +18,7 @@ Get and Build the ARM Trusted firmware
Note: builddir is U-Boot build directory (source directory for in-tree builds)
Get ATF from: https://source.codeaurora.org/external/imx/imx-atf
-branch: imx_4.19.35_1.0.0
+branch: imx_5.4.47_2.2.0
.. code-block:: bash
@@ -30,10 +30,10 @@ Get the ddr firmware
.. code-block:: bash
- $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.0.bin
- $ chmod +x firmware-imx-8.0.bin
- $ ./firmware-imx-8.0
- $ cp firmware-imx-8.0/firmware/ddr/synopsys/lpddr4*.bin $(builddir)
+ $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin
+ $ chmod +x firmware-imx-8.9.bin
+ $ ./firmware-imx-8.9
+ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4*.bin $(builddir)
Build U-Boot
------------
diff --git a/doc/board/freescale/imx8mn_evk.rst b/doc/board/freescale/imx8mn_evk.rst
index c3e92cecee..375e0bb761 100644
--- a/doc/board/freescale/imx8mn_evk.rst
+++ b/doc/board/freescale/imx8mn_evk.rst
@@ -18,7 +18,7 @@ Get and Build the ARM Trusted firmware
Note: srctree is U-Boot source directory
Get ATF from: https://source.codeaurora.org/external/imx/imx-atf
-branch: imx_4.19.35_1.1.0
+branch: imx_5.4.47_2.2.0
.. code-block:: bash
@@ -30,10 +30,10 @@ Get the ddr firmware
.. code-block:: bash
- $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.5.bin
- $ chmod +x firmware-imx-8.5.bin
- $ ./firmware-imx-8.5
- $ cp firmware-imx-8.5/firmware/ddr/synopsys/ddr4*.bin $(srctree)
+ $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin
+ $ chmod +x firmware-imx-8.9.bin
+ $ ./firmware-imx-8.9
+ $ cp firmware-imx-8.9/firmware/ddr/synopsys/ddr4*.bin $(srctree)
Build U-Boot
------------
diff --git a/doc/board/freescale/imx8mp_evk.rst b/doc/board/freescale/imx8mp_evk.rst
index 96df6d470f..ccffcf7257 100644
--- a/doc/board/freescale/imx8mp_evk.rst
+++ b/doc/board/freescale/imx8mp_evk.rst
@@ -18,7 +18,7 @@ Get and Build the ARM Trusted firmware
Note: $(srctree) is the U-Boot source directory
Get ATF from: https://source.codeaurora.org/external/imx/imx-atf
-branch: imx_5.4.3_2.0.0
+branch: imx_5.4.47_2.2.0
.. code-block:: bash
@@ -30,13 +30,13 @@ Get the ddr firmware
.. code-block:: bash
- $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.7.bin
- $ chmod +x firmware-imx-8.7.bin
- $ ./firmware-imx-8.7.bin
- $ cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem_201904.bin $(srctree)/lpddr4_pmu_train_1d_dmem.bin
- $ cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem_201904.bin $(srctree)/lpddr4_pmu_train_1d_imem.bin
- $ cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem_201904.bin $(srctree)/lpddr4_pmu_train_2d_dmem.bin
- $ cp firmware-imx-8.7/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem_201904.bin $(srctree)/lpddr4_pmu_train_2d_imem.bin
+ $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin
+ $ chmod +x firmware-imx-8.9.bin
+ $ ./firmware-imx-8.9.bin
+ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4_pmu_train_1d_dmem_201904.bin $(srctree)/lpddr4_pmu_train_1d_dmem.bin
+ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4_pmu_train_1d_imem_201904.bin $(srctree)/lpddr4_pmu_train_1d_imem.bin
+ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4_pmu_train_2d_dmem_201904.bin $(srctree)/lpddr4_pmu_train_2d_dmem.bin
+ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4_pmu_train_2d_imem_201904.bin $(srctree)/lpddr4_pmu_train_2d_imem.bin
Build U-Boot
------------
diff --git a/doc/board/freescale/imx8mq_evk.rst b/doc/board/freescale/imx8mq_evk.rst
index 0a64ecc5ba..c269fdebe3 100644
--- a/doc/board/freescale/imx8mq_evk.rst
+++ b/doc/board/freescale/imx8mq_evk.rst
@@ -18,7 +18,7 @@ Get and Build the ARM Trusted firmware
Note: srctree is U-Boot source directory
Get ATF from: https://source.codeaurora.org/external/imx/imx-atf
-branch: imx_4.19.35_1.0.0
+branch: imx_5.4.47_2.2.0
.. code-block:: bash
@@ -30,11 +30,11 @@ Get the ddr and hdmi firmware
.. code-block:: bash
- $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.9.bin
- $ chmod +x firmware-imx-7.9.bin
- $ ./firmware-imx-7.9.bin
- $ cp firmware-imx-7.9/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(builddir)
- $ cp firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(builddir)
+ $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-8.9.bin
+ $ chmod +x firmware-imx-8.9.bin
+ $ ./firmware-imx-8.9.bin
+ $ cp firmware-imx-8.9/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(builddir)
+ $ cp firmware-imx-8.9/firmware/ddr/synopsys/lpddr4*.bin $(builddir)
Build U-Boot
------------
diff --git a/doc/board/index.rst b/doc/board/index.rst
index 915f1be8a5..08c167b6b5 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -17,6 +17,7 @@ Board-specific doc
google/index
intel/index
kontron/index
+ microchip/index
renesas/index
rockchip/index
sifive/index
diff --git a/doc/board/microchip/index.rst b/doc/board/microchip/index.rst
new file mode 100644
index 0000000000..affc5a9e01
--- /dev/null
+++ b/doc/board/microchip/index.rst
@@ -0,0 +1,9 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Microchip
+=========
+
+.. toctree::
+ :maxdepth: 2
+
+ mpfs_icicle
diff --git a/doc/board/microchip/mpfs_icicle.rst b/doc/board/microchip/mpfs_icicle.rst
new file mode 100644
index 0000000000..7489761501
--- /dev/null
+++ b/doc/board/microchip/mpfs_icicle.rst
@@ -0,0 +1,810 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Microchip PolarFire SoC Icicle Kit
+==================================
+
+RISC-V PolarFire SoC
+--------------------
+The PolarFire SoC is the 4+1 64-bit RISC-V SoC from Microchip.
+
+The Icicle Kit development platform is based on PolarFire SoC and capable
+of running Linux.
+
+Mainline support
+----------------
+The support for following drivers are already enabled:
+
+1. NS16550 UART Driver.
+2. Microchip Clock Driver.
+3. Cadence MACB ethernet driver for networking support.
+4. Cadence MMC Driver for eMMC/SD support.
+
+Booting from eMMC using HSS
+---------------------------
+
+Building U-Boot
+---------------
+
+1. Add the RISC-V toolchain to your PATH.
+2. Setup ARCH & cross compilation environment variable:
+
+.. code-block:: none
+
+ export CROSS_COMPILE=<riscv64 toolchain prefix>
+
+3. make microchip_mpfs_icicle_defconfig
+4. make
+
+Flashing
+--------
+
+The current U-Boot port is supported in S-mode only and loaded from DRAM.
+
+A prior stage M-mode firmware/bootloader (e.g HSS with OpenSBI) is required to
+boot the u-boot.bin in S-mode.
+
+Currently, the u-boot.bin is used as a payload of the HSS firmware (Microchip
+boot-flow) and OpenSBI generic platform fw_payload.bin (with u-boot.bin embedded)
+as HSS payload (Custom boot-flow)
+
+Microchip boot-flow
+-------------------
+HSS with OpenSBI (M-Mode) -> U-Boot (S-Mode) -> Linux (S-Mode)
+
+Build the HSS (Hart Software Services) - Microchip boot-flow
+------------------------------------------------------------
+(Note: HSS git repo is at https://github.com/polarfire-soc/hart-software-services)
+
+1. Configure
+
+.. code-block:: none
+
+ make BOARD=icicle-kit-es config
+
+Alternatively, copy the default config for Microchip boot-flow.
+
+.. code-block:: none
+
+ cp boards/icicle-kit-es/def_config .config
+
+2. make BOARD=icicle-kit-es
+3. In the Default subdirectory, the standard build will create hss.elf and
+ various binary formats (hss.hex and hss.bin).
+
+The FPGA design will use the hss.hex or hss.bin.
+
+FPGA design with HSS programming file
+-------------------------------------
+https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/boards/mpfs-icicle-kit-es/updating-icicle-kit/updating-icicle-kit-design-and-linux.md
+
+The HSS firmware runs from the PolarFire SoC eNVM on reset.
+
+Creating the HSS payload - Microchip boot-flow
+----------------------------------------------
+1. You will be creating a payload from `u-boot-dtb.bin`.
+ Copy this file to the HSS/tools/hss-payload-generator/test directory.
+2. Go to hss-payload-generator source directory.
+
+.. code-block:: none
+
+ cd hart-software-services/tools/hss-payload-generator
+
+3. Edit test/uboot.yaml file for hart entry points and correct name of the binary file.
+
+ hart-entry-points: {u54_1: '0x80200000', u54_2: '0x80200000', u54_3: '0x80200000', u54_4: '0x80200000'}
+
+ payloads:
+ test/u-boot-dtb.bin: {exec-addr: '0x80200000', owner-hart: u54_1, secondary-hart: u54_2, secondary-hart: u54_3, secondary-hart: u54_4, priv-mode: prv_s}
+
+4. Generate payload
+
+.. code-block:: none
+
+ ./hss-payload-generator -c test/uboot.yaml payload.bin
+
+Once the payload binary is generated, it should be copied to the eMMC.
+
+Please refer to HSS documenation to build the HSS firmware for payload.
+(Note: HSS git repo is at https://github.com/polarfire-soc/hart-software-services/blob/master/tools/hss-payload-generator/README.md)
+
+Custom boot-flow
+----------------
+HSS without OpenSBI (M-Mode) -> OpenSBI (M-Mode) -> U-Boot (S-Mode) -> Linux (S-Mode)
+
+Build OpenSBI
+-------------
+
+1. Get the OpenSBI source
+
+.. code-block:: none
+
+ git clone https://github.com/riscv/opensbi.git
+ cd opensbi
+
+2. Build
+
+.. code-block:: none
+
+ make PLATFORM=generic FW_PAYLOAD_PATH=<u-boot-directory>/u-boot.bin
+ FW_FDT_PATH=<u-boot-directory>/arch/riscv/dts/microchip-mpfs-icicle-kit-.dtb
+
+3. Output "fw_payload.bin" file available at
+ "<opensbi-directory>/build/platform/generic/firmware/fw_payload.bin"
+
+Build the HSS (Hart Software Services)- Custom boot-flow
+--------------------------------------------------------
+(Note: HSS git repo is at https://github.com/polarfire-soc/hart-software-services)
+
+1. Configure
+
+.. code-block:: none
+
+ make BOARD=icicle-kit-es config
+
+Alternatively, copy the default custom config for Custom boot-flow.
+
+.. code-block:: none
+
+ cp boards/icicle-kit-es/def_config_custom .config
+
+2. make BOARD=icicle-kit-es
+3. In the Default subdirectory, the standard build will create hss.elf and
+ various binary formats (hss.hex and hss.bin).
+
+The FPGA design will use the hss.hex or hss.bin.
+
+Creating the HSS payload - Custom boot-flow
+-------------------------------------------
+1. You will be creating a payload from `fw_payload.bin`.
+ Copy this file to the HSS/tools/hss-payload-generator/test directory.
+2. Go to hss-payload-generator source directory.
+
+.. code-block:: none
+
+ cd hart-software-services/tools/hss-payload-generator
+
+3. Edit test/uboot.yaml file for hart entry points and correct name of the binary file.
+
+ hart-entry-points: {u54_1: '0x80000000', u54_2: '0x80000000', u54_3: '0x80000000', u54_4: '0x80000000'}
+
+ payloads:
+ test/fw_payload.bin: {exec-addr: '0x80000000', owner-hart: u54_1, secondary-hart: u54_2, secondary-hart: u54_3, secondary-hart: u54_4, priv-mode: prv_m}
+
+4. Generate payload
+
+.. code-block:: none
+
+ ./hss-payload-generator -c test/uboot.yaml payload.bin
+
+Once the payload binary is generated, it should be copied to the eMMC.
+
+Please refer to HSS documenation to build the HSS firmware for payload.
+(Note: HSS git repo is at https://github.com/polarfire-soc/hart-software-services/blob/master/tools/hss-payload-generator/README.md
+and also refer the HSS payload generator at https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/software-development/hss-payloads.md)
+
+eMMC
+----
+Program eMMC with payload binary is explained in the PolarFire SoC documentation.
+(Note: PolarFire SoC Documentation git repo is at https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/boards/mpfs-icicle-kit-es/updating-icicle-kit/updating-icicle-kit-design-and-linux.md#eMMC)
+
+Once the payload image is copied to the eMMC, press CTRL+C in the HSS command
+line interface, then type 'boot' and enter to boot the newly copied image.
+
+.. code-block:: none
+
+ sudo dd if=<payload_binary> of=/dev/sdX bs=512
+
+GUID type
+---------
+The HSS always picks up HSS payload from a GPT partition with
+GIUD type "21686148-6449-6E6F-744E-656564454649" or sector '0' of the eMMC if no
+GPT partition.
+
+Booting
+-------
+You should see the U-Boot prompt on UART0.
+
+Sample boot log from MPFS Icicle Kit
+------------------------------------
+
+.. code-block:: none
+
+ U-Boot 2021.01-00314-g7303332537-dirty (Jan 14 2021 - 10:09:43 +0530)
+
+ CPU: rv64imafdc
+ Model: Microchip MPFS Icicle Kit
+ DRAM: 1 GiB
+ MMC: sdhc@20008000: 0
+ In: serial@20100000
+ Out: serial@20100000
+ Err: serial@20100000
+ Net: eth0: ethernet@20112000
+ Hit any key to stop autoboot: 0
+
+Now you can configure your networking, tftp server and use tftp boot method to
+load uImage (with initramfs).
+
+.. code-block:: none
+
+ RISC-V # setenv kernel_addr_r 0x80200000
+ RISC-V # setenv fdt_addr_r 0x82200000
+
+ RISC-V # setenv ipaddr 192.168.1.5
+ RISC-V # setenv netmask 255.255.255.0
+ RISC-V # setenv serverip 192.168.1.3
+ RISC-V # setenv gateway 192.168.1.1
+
+ RISC-V # tftpboot ${kernel_addr_r} uImage
+ ethernet@20112000: PHY present at 9
+ ethernet@20112000: Starting autonegotiation...
+ ethernet@20112000: Autonegotiation complete
+ ethernet@20112000: link up, 1000Mbps full-duplex (lpa: 0x7800)
+ Using ethernet@20112000 device
+ TFTP from server 192.168.1.3; our IP address is 192.168.1.5
+ Filename 'uImage'.
+ Load address: 0x80200000
+ Loading: #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ #################################################################
+ ############
+ 6.4 MiB/s
+ done
+ Bytes transferred = 14482480 (dcfc30 hex)
+
+ RISC-V # tftpboot ${fdt_addr_r} microchip-mpfs-icicle-kit.dtb
+ ethernet@20112000: PHY present at 9
+ ethernet@20112000: Starting autonegotiation...
+ ethernet@20112000: Autonegotiation complete
+ ethernet@20112000: link up, 1000Mbps full-duplex (lpa: 0x7800)
+ Using ethernet@20112000 device
+ TFTP from server 192.168.1.3; our IP address is 192.168.1.5
+ Filename 'microchip-mpfs-icicle-kit.dtb'.
+ Load address: 0x82200000
+ Loading: #
+ 2.5 MiB/s
+ done
+ Bytes transferred = 10282 (282a hex)
+
+ RISC-V # bootm ${kernel_addr_r} - ${fdt_addr_r}
+ ## Booting kernel from Legacy Image at 80200000 ...
+ Image Name: Linux
+ Image Type: RISC-V Linux Kernel Image (uncompressed)
+ Data Size: 14482416 Bytes = 13.8 MiB
+ Load Address: 80200000
+ Entry Point: 80200000
+ Verifying Checksum ... OK
+ ## Flattened Device Tree blob at 82200000
+ Booting using the fdt blob at 0x82200000
+ Loading Kernel Image
+ Using Device Tree in place at 000000008fffa000, end 000000008ffff829 ... OK
+
+ Starting kernel ...
+
+ [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
+ [ 0.000000] Linux version 5.6.17 (padmarao@padmarao-VirtualBox) (gcc version 7.2.0 (GCC)) #2 SMP Tue Jun 16 21:27:50 IST 2020
+ [ 0.000000] initrd not found or empty - disabling initrd
+ [ 0.000000] Zone ranges:
+ [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
+ [ 0.000000] Normal empty
+ [ 0.000000] Movable zone start for each node
+ [ 0.000000] Early memory node ranges
+ [ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
+ [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
+ [ 0.000000] software IO TLB: mapped [mem 0xbb1f5000-0xbf1f5000] (64MB)
+ [ 0.000000] elf_hwcap is 0x112d
+ [ 0.000000] percpu: Embedded 14 pages/cpu s24856 r0 d32488 u57344
+ [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055
+ [ 0.000000] Kernel command line: console=ttyS0,115200n8
+ [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
+ [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
+ [ 0.000000] Sorting __ex_table...
+ [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+ [ 0.000000] Memory: 950308K/1046528K available (3289K kernel code, 212K rwdata, 900K rodata, 9476K init, 250K bss, 96220K reserved, 0K cma-reserved)
+ [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
+ [ 0.000000] rcu: Hierarchical RCU implementation.
+ [ 0.000000] rcu: RCU event tracing is enabled.
+ [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
+ [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
+ [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
+ [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
+ [ 0.000000] plic: mapped 186 interrupts with 4 handlers for 9 contexts.
+ [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [1]
+ [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
+ [ 0.000015] sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
+ [ 0.000311] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
+ [ 0.000349] pid_max: default: 32768 minimum: 301
+ [ 0.000846] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
+ [ 0.000964] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
+ [ 0.005630] rcu: Hierarchical SRCU implementation.
+ [ 0.006901] smp: Bringing up secondary CPUs ...
+ [ 0.012545] smp: Brought up 1 node, 4 CPUs
+ [ 0.014431] devtmpfs: initialized
+ [ 0.020526] random: get_random_bytes called from setup_net+0x36/0x192 with crng_init=0
+ [ 0.020928] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
+ [ 0.020999] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
+ [ 0.022768] NET: Registered protocol family 16
+ [ 0.035478] microchip-pfsoc-clkcfg 20002000.clkcfg: Registered PFSOC core clocks
+ [ 0.048429] SCSI subsystem initialized
+ [ 0.049694] pps_core: LinuxPPS API ver. 1 registered
+ [ 0.049719] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
+ [ 0.049780] PTP clock support registered
+ [ 0.051781] clocksource: Switched to clocksource riscv_clocksource
+ [ 0.055326] NET: Registered protocol family 2
+ [ 0.056922] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
+ [ 0.057053] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
+ [ 0.057648] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
+ [ 0.058579] TCP: Hash tables configured (established 8192 bind 8192)
+ [ 0.059648] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
+ [ 0.059837] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
+ [ 0.060707] NET: Registered protocol family 1
+ [ 0.266229] workingset: timestamp_bits=62 max_order=18 bucket_order=0
+ [ 0.287107] io scheduler mq-deadline registered
+ [ 0.287140] io scheduler kyber registered
+ [ 0.429601] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
+ [ 0.433979] printk: console [ttyS0] disabled
+ [ 0.434154] 20000000.serial: ttyS0 at MMIO 0x20000000 (irq = 18, base_baud = 9375000) is a 16550A
+ [ 0.928039] printk: console [ttyS0] enabled
+ [ 0.939804] libphy: Fixed MDIO Bus: probed
+ [ 0.948702] libphy: MACB_mii_bus: probed
+ [ 0.993698] macb 20112000.ethernet eth0: Cadence GEM rev 0x0107010c at 0x20112000 irq 21 (56:34:12:00:fc:00)
+ [ 1.006751] mousedev: PS/2 mouse device common for all mice
+ [ 1.013803] i2c /dev entries driver
+ [ 1.019451] sdhci: Secure Digital Host Controller Interface driver
+ [ 1.027242] sdhci: Copyright(c) Pierre Ossman
+ [ 1.032731] sdhci-pltfm: SDHCI platform and OF driver helper
+ [ 1.091826] mmc0: SDHCI controller on 20008000.sdhc [20008000.sdhc] using ADMA 64-bit
+ [ 1.102738] NET: Registered protocol family 17
+ [ 1.170326] Freeing unused kernel memory: 9476K
+ [ 1.176067] This architecture does not have kernel memory protection.
+ [ 1.184157] Run /init as init process
+ Starting logging: OK
+ Starting mdev...
+ /etc/init.d/S10mdev: line 21: can't create /proc/sys/kernel/hotplug: nonexiste[ 1.331981] mmc0: mmc_select_hs200 failed, error -74
+ nt directory
+ [ 1.355011] mmc0: new MMC card at address 0001
+ [ 1.363981] mmcblk0: mmc0:0001 DG4008 7.28 GiB
+ [ 1.372248] mmcblk0boot0: mmc0:0001 DG4008 partition 1 4.00 MiB
+ [ 1.382292] mmcblk0boot1: mmc0:0001 DG4008 partition 2 4.00 MiB
+ [ 1.390265] mmcblk0rpmb: mmc0:0001 DG4008 partition 3 4.00 MiB, chardev (251:0)
+ [ 1.425234] GPT:Primary header thinks Alt. header is not at the end of the disk.
+ [ 1.434656] GPT:2255809 != 15273599
+ [ 1.439038] GPT:Alternate GPT header not at the end of the disk.
+ [ 1.446671] GPT:2255809 != 15273599
+ [ 1.451048] GPT: Use GNU Parted to correct GPT errors.
+ [ 1.457755] mmcblk0: p1 p2 p3
+ sort: /sys/devices/platform/Fixed: No such file or directory
+ modprobe: can't change directory to '/lib/modules': No such file or directory
+ Initializing random number generator... [ 2.830198] random: dd: uninitialized urandom read (512 bytes read)
+ done.
+ Starting network...
+ [ 3.061867] macb 20112000.ethernet eth0: PHY [20112000.ethernet-ffffffff:09] driver [Vitesse VSC8662] (irq=POLL)
+ [ 3.074674] macb 20112000.ethernet eth0: configuring for phy/sgmii link mode
+ [ 3.084263] pps pps0: new PPS source ptp0
+ [ 3.089710] macb 20112000.ethernet: gem-ptp-timer ptp clock registered.
+ udhcpc (v1.24.2) started
+ Sending discover...
+ Sending discover...
+ [ 6.380169] macb 20112000.ethernet eth0: Link is Up - 1Gbps/Full - flow control tx
+ Sending discover...
+ Sending select for 192.168.1.2...
+ Lease of 192.168.1.2 obtained, lease time 86400
+ deleting routers
+ adding dns 192.168.1.1
+ Starting dropbear sshd: [ 11.385619] random: dropbear: uninitialized urandom read (32 bytes read)
+ OK
+
+ Welcome to Buildroot
+ buildroot login: root
+ Password:
+ #
+
+Booting U-Boot and Linux from eMMC
+----------------------------------
+
+FPGA design with HSS programming file and Linux Image
+-----------------------------------------------------
+https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/boards/mpfs-icicle-kit-es/updating-icicle-kit/updating-icicle-kit-design-and-linux.md
+
+The HSS firmware runs from the PolarFire SoC eNVM on reset.
+
+eMMC
+----
+Program eMMC with payload binary and Linux image is explained in the
+PolarFire SoC documentation.
+The payload binary should be copied to partition 2 of the eMMC.
+
+(Note: PolarFire SoC Documentation git repo is at https://github.com/polarfire-soc/polarfire-soc-documentation/blob/master/boards/mpfs-icicle-kit-es/updating-icicle-kit/updating-icicle-kit-design-and-linux.md#eMMC)
+
+Once the Linux image and payload binary is copied to the eMMC, press CTRL+C
+in the HSS command line interface, then type 'boot' and enter to boot the newly
+copied payload and Linux image.
+
+.. code-block:: none
+
+ zcat <linux-image>.wic.gz | sudo dd of=/dev/sdX bs=4096 iflag=fullblock oflag=direct conv=fsync status=progress
+
+ sudo dd if=<payload_binary> of=/dev/sdX2 bs=512
+
+You should see the U-Boot prompt on UART0.
+
+GUID type
+---------
+The HSS always picks up the HSS payload from a GPT partition with
+GIUD type "21686148-6449-6E6F-744E-656564454649" or sector '0' of the eMMC if no
+GPT partition.
+
+Sample boot log from MPFS Icicle Kit
+------------------------------------
+
+.. code-block:: none
+
+ U-Boot 2021.01-00314-g7303332537-dirty (Jan 14 2021 - 10:09:43 +0530)
+
+ CPU: rv64imafdc
+ Model: Microchip MPFS Icicle Kit
+ DRAM: 1 GiB
+ MMC: sdhc@20008000: 0
+ In: serial@20100000
+ Out: serial@20100000
+ Err: serial@20100000
+ Net: eth0: ethernet@20112000
+ Hit any key to stop autoboot: 0
+
+ RISC-V # mmc info
+ Device: sdhc@20008000
+ Manufacturer ID: 45
+ OEM: 100
+ Name: DG400
+ Bus Speed: 52000000
+ Mode: MMC High Speed (52MHz)
+ Rd Block Len: 512
+ MMC version 5.1
+ High Capacity: Yes
+ Capacity: 7.3 GiB
+ Bus Width: 4-bit
+ Erase Group Size: 512 KiB
+ HC WP Group Size: 8 MiB
+ User Capacity: 7.3 GiB WRREL
+ Boot Capacity: 4 MiB ENH
+ RPMB Capacity: 4 MiB ENH
+
+ RISC-V # mmc part
+ Partition Map for MMC device 0 -- Partition Type: EFI
+
+ Part Start LBA End LBA Name
+ Attributes
+ Type GUID
+ Partition GUID
+ 1 0x00002000 0x0000b031 "boot"
+ attrs: 0x0000000000000004
+ type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
+ guid: 99ff6a94-f2e7-44dd-a7df-f3a2da106ef9
+ 2 0x0000b032 0x0000f031 "primary"
+ attrs: 0x0000000000000000
+ type: 21686148-6449-6e6f-744e-656564454649
+ guid: 12006052-e64b-4423-beb0-b956ea00f1ba
+ 3 0x00010000 0x00226b9f "root"
+ attrs: 0x0000000000000000
+ type: 0fc63daf-8483-4772-8e79-3d69d8477de4
+ guid: dd2c5619-2272-4c3c-8dc2-e21942e17ce6
+
+ RISC-V # load mmc 0 ${ramdisk_addr_r} fitimage
+ RISC-V # bootm ${ramdisk_addr_r}
+ ## Loading kernel from FIT Image at 88300000 ...
+ Using 'conf@microchip_icicle-kit-es-a000-microchip.dtb' configuration
+ Trying 'kernel@1' kernel subimage
+ Description: Linux kernel
+ Type: Kernel Image
+ Compression: gzip compressed
+ Data Start: 0x883000fc
+ Data Size: 3574555 Bytes = 3.4 MiB
+ Architecture: RISC-V
+ OS: Linux
+ Load Address: 0x80200000
+ Entry Point: 0x80200000
+ Hash algo: sha256
+ Hash value: 21f18d72cf2f0a7192220abb577ad25c77c26960052d779aa02bf55dbf0a6403
+ Verifying Hash Integrity ... sha256+ OK
+ ## Loading fdt from FIT Image at 88300000 ...
+ Using 'conf@microchip_icicle-kit-es-a000-microchip.dtb' configuration
+ Trying 'fdt@microchip_icicle-kit-es-a000-microchip.dtb' fdt subimage
+ Description: Flattened Device Tree blob
+ Type: Flat Device Tree
+ Compression: uncompressed
+ Data Start: 0x88668d44
+ Data Size: 9760 Bytes = 9.5 KiB
+ Architecture: RISC-V
+ Load Address: 0x82200000
+ Hash algo: sha256
+ Hash value: 5c3a9f30d41b6b8e53b47916e1f339b3a4d454006554d1f7e1f552ed62409f4b
+ Verifying Hash Integrity ... sha256+ OK
+ Loading fdt from 0x88668d48 to 0x82200000
+ Booting using the fdt blob at 0x82200000
+ Uncompressing Kernel Image
+ Loading Device Tree to 000000008fffa000, end 000000008ffff61f ... OK
+
+ Starting kernel ...
+
+ [ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
+ [ 0.000000] Linux version 5.6.16 (oe-user@oe-host) (gcc version 9.3.0 (GCC)) #1 SMP Fri Oct 9 11:49:47 UTC 2020
+ [ 0.000000] earlycon: sbi0 at I/O port 0x0 (options '')
+ [ 0.000000] printk: bootconsole [sbi0] enabled
+ [ 0.000000] Zone ranges:
+ [ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
+ [ 0.000000] Normal empty
+ [ 0.000000] Movable zone start for each node
+ [ 0.000000] Early memory node ranges
+ [ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
+ [ 0.000000] Zeroed struct page in unavailable ranges: 512 pages
+ [ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
+ [ 0.000000] software IO TLB: mapped [mem 0xb9e00000-0xbde00000] (64MB)
+ [ 0.000000] CPU with hartid=0 is not available
+ [ 0.000000] CPU with hartid=0 is not available
+ [ 0.000000] elf_hwcap is 0x112d
+ [ 0.000000] percpu: Embedded 17 pages/cpu s29784 r8192 d31656 u69632
+ [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055
+ [ 0.000000] Kernel command line: earlycon=sbi root=/dev/mmcblk0p3 rootwait console=ttyS0,115200n8 uio_pdrv_genirq.of_id=generic-uio
+ [ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
+ [ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
+ [ 0.000000] Sorting __ex_table...
+ [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+ [ 0.000000] Memory: 941440K/1046528K available (4118K kernel code, 280K rwdata, 1687K rodata, 169K init, 273K bss, 105088K reserved, 0K cma-reserved)
+ [ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
+ [ 0.000000] rcu: Hierarchical RCU implementation.
+ [ 0.000000] rcu: RCU event tracing is enabled.
+ [ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=5 to nr_cpu_ids=4.
+ [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
+ [ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
+ [ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
+ [ 0.000000] plic: mapped 53 interrupts with 4 handlers for 9 contexts.
+ [ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [1]
+ [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
+ [ 0.000015] sched_clock: 64 bits at 1000kHz, resolution 1000ns, wraps every 2199023255500ns
+ [ 0.008679] Console: colour dummy device 80x25
+ [ 0.013112] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
+ [ 0.023368] pid_max: default: 32768 minimum: 301
+ [ 0.028314] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
+ [ 0.035766] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
+ [ 0.047099] rcu: Hierarchical SRCU implementation.
+ [ 0.052813] smp: Bringing up secondary CPUs ...
+ [ 0.061581] smp: Brought up 1 node, 4 CPUs
+ [ 0.067069] devtmpfs: initialized
+ [ 0.073621] random: get_random_u32 called from bucket_table_alloc.isra.0+0x4e/0x150 with crng_init=0
+ [ 0.074409] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
+ [ 0.093399] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
+ [ 0.101879] NET: Registered protocol family 16
+ [ 0.110336] microchip-pfsoc-clkcfg 20002000.clkcfg: Registered PFSOC core clocks
+ [ 0.132717] usbcore: registered new interface driver usbfs
+ [ 0.138225] usbcore: registered new interface driver hub
+ [ 0.143813] usbcore: registered new device driver usb
+ [ 0.148939] pps_core: LinuxPPS API ver. 1 registered
+ [ 0.153929] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
+ [ 0.163071] PTP clock support registered
+ [ 0.168521] clocksource: Switched to clocksource riscv_clocksource
+ [ 0.174927] VFS: Disk quotas dquot_6.6.0
+ [ 0.179016] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
+ [ 0.205536] NET: Registered protocol family 2
+ [ 0.210944] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
+ [ 0.219393] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
+ [ 0.227497] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
+ [ 0.235440] TCP: Hash tables configured (established 8192 bind 8192)
+ [ 0.242537] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
+ [ 0.249285] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
+ [ 0.256690] NET: Registered protocol family 1
+ [ 0.262585] workingset: timestamp_bits=62 max_order=18 bucket_order=0
+ [ 0.281036] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
+ [ 0.288481] io scheduler mq-deadline registered
+ [ 0.292983] io scheduler kyber registered
+ [ 0.298895] microsemi,mss-gpio 20122000.gpio: Microsemi MSS GPIO registered 32 GPIOs
+ [ 0.453723] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
+ [ 0.462911] printk: console [ttyS0] disabled
+ [ 0.467216] 20100000.serial: ttyS0 at MMIO 0x20100000 (irq = 12, base_baud = 9375000) is a 16550A
+ [ 0.476201] printk: console [ttyS0] enabled
+ [ 0.476201] printk: console [ttyS0] enabled
+ [ 0.484576] printk: bootconsole [sbi0] disabled
+ [ 0.484576] printk: bootconsole [sbi0] disabled
+ [ 0.494920] 20102000.serial: ttyS1 at MMIO 0x20102000 (irq = 13, base_baud = 9375000) is a 16550A
+ [ 0.505068] 20104000.serial: ttyS2 at MMIO 0x20104000 (irq = 14, base_baud = 9375000) is a 16550A
+ [ 0.533336] loop: module loaded
+ [ 0.572284] Rounding down aligned max_sectors from 4294967295 to 4294967288
+ [ 0.580000] db_root: cannot open: /etc/target
+ [ 0.585413] libphy: Fixed MDIO Bus: probed
+ [ 0.591526] libphy: MACB_mii_bus: probed
+ [ 0.598060] macb 20112000.ethernet eth0: Cadence GEM rev 0x0107010c at 0x20112000 irq 17 (56:34:12:00:fc:00)
+ [ 0.608352] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
+ [ 0.615001] ehci-platform: EHCI generic platform driver
+ [ 0.620446] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
+ [ 0.626632] ohci-platform: OHCI generic platform driver
+ [ 0.632326] usbcore: registered new interface driver cdc_acm
+ [ 0.637996] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
+ [ 0.646459] i2c /dev entries driver
+ [ 0.650852] microsemi-mss-i2c 2010b000.i2c: Microsemi I2C Probe Complete
+ [ 0.658010] sdhci: Secure Digital Host Controller Interface driver
+ [ 0.664326] sdhci: Copyright(c) Pierre Ossman
+ [ 0.668754] sdhci-pltfm: SDHCI platform and OF driver helper
+ [ 0.706845] mmc0: SDHCI controller on 20008000.sdhc [20008000.sdhc] using ADMA 64-bit
+ [ 0.715052] usbcore: registered new interface driver usbhid
+ [ 0.720722] usbhid: USB HID core driver
+ [ 0.725174] pac193x 0-0010: Chip revision: 0x03
+ [ 0.733339] pac193x 0-0010: :pac193x_prep_iio_channels: Channel 0 active
+ [ 0.740127] pac193x 0-0010: :pac193x_prep_iio_channels: Channel 1 active
+ [ 0.746881] pac193x 0-0010: :pac193x_prep_iio_channels: Channel 2 active
+ [ 0.753686] pac193x 0-0010: :pac193x_prep_iio_channels: Channel 3 active
+ [ 0.760495] pac193x 0-0010: :pac193x_prep_iio_channels: Active chip channels: 25
+ [ 0.778006] NET: Registered protocol family 10
+ [ 0.784929] Segment Routing with IPv6
+ [ 0.788875] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
+ [ 0.795743] NET: Registered protocol family 17
+ [ 0.801191] hctosys: unable to open rtc device (rtc0)
+ [ 0.807774] Waiting for root device /dev/mmcblk0p3...
+ [ 0.858506] mmc0: mmc_select_hs200 failed, error -74
+ [ 0.865764] mmc0: new MMC card at address 0001
+ [ 0.872564] mmcblk0: mmc0:0001 DG4008 7.28 GiB
+ [ 0.878777] mmcblk0boot0: mmc0:0001 DG4008 partition 1 4.00 MiB
+ [ 0.886182] mmcblk0boot1: mmc0:0001 DG4008 partition 2 4.00 MiB
+ [ 0.892633] mmcblk0rpmb: mmc0:0001 DG4008 partition 3 4.00 MiB, chardev (247:0)
+ [ 0.919029] GPT:Primary header thinks Alt. header is not at the end of the disk.
+ [ 0.926448] GPT:2255841 != 15273599
+ [ 0.930019] GPT:Alternate GPT header not at the end of the disk.
+ [ 0.936029] GPT:2255841 != 15273599
+ [ 0.939583] GPT: Use GNU Parted to correct GPT errors.
+ [ 0.944800] mmcblk0: p1 p2 p3
+ [ 0.966696] EXT4-fs (mmcblk0p3): INFO: recovery required on readonly filesystem
+ [ 0.974105] EXT4-fs (mmcblk0p3): write access will be enabled during recovery
+ [ 1.052362] random: fast init done
+ [ 1.057961] EXT4-fs (mmcblk0p3): recovery complete
+ [ 1.065734] EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
+ [ 1.074002] VFS: Mounted root (ext4 filesystem) readonly on device 179:3.
+ [ 1.081654] Freeing unused kernel memory: 168K
+ [ 1.086108] This architecture does not have kernel memory protection.
+ [ 1.092629] Run /sbin/init as init process
+ [ 1.702217] systemd[1]: System time before build time, advancing clock.
+ [ 1.754192] systemd[1]: systemd 244.3+ running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR -SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
+ [ 1.776361] systemd[1]: Detected architecture riscv64.
+
+ Welcome to OpenEmbedded nodistro.0!
+
+ [ 1.829651] systemd[1]: Set hostname to <icicle-kit-es>.
+ [ 2.648597] random: systemd: uninitialized urandom read (16 bytes read)
+ [ 2.657485] systemd[1]: Created slice system-getty.slice.
+ [ OK ] Created slice system-getty.slice.
+ [ 2.698779] random: systemd: uninitialized urandom read (16 bytes read)
+ [ 2.706317] systemd[1]: Created slice system-serial\x2dgetty.slice.
+ [ OK ] Created slice system-serial\x2dgetty.slice.
+ [ 2.748716] random: systemd: uninitialized urandom read (16 bytes read)
+ [ 2.756098] systemd[1]: Created slice User and Session Slice.
+ [ OK ] Created slice User and Session Slice.
+ [ 2.789065] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
+ [ OK ] Started Dispatch Password …ts to Console Directory Watch.
+ [ 2.828974] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
+ [ OK ] Started Forward Password R…uests to Wall Directory Watch.
+ [ 2.869009] systemd[1]: Reached target Paths.
+ [ OK ] Reached target Paths.
+ [ 2.898808] systemd[1]: Reached target Remote File Systems.
+ [ OK ] Reached target Remote File Systems.
+ [ 2.938771] systemd[1]: Reached target Slices.
+ [ OK ] Reached target Slices.
+ [ 2.968754] systemd[1]: Reached target Swap.
+ [ OK ] Reached target Swap.
+ [ 2.999283] systemd[1]: Listening on initctl Compatibility Named Pipe.
+ [ OK ] Listening on initctl Compatibility Named Pipe.
+ [ 3.060458] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.
+ [ 3.069826] systemd[1]: Listening on Journal Socket (/dev/log).
+ [ OK ] Listening on Journal Socket (/dev/log).
+ [ 3.109601] systemd[1]: Listening on Journal Socket.
+ [ OK ] Listening on Journal Socket.
+ [ 3.149868] systemd[1]: Listening on Network Service Netlink Socket.
+ [ OK ] Listening on Network Service Netlink Socket.
+ [ 3.189419] systemd[1]: Listening on udev Control Socket.
+ [ OK ] Listening on udev Control Socket.
+ [ 3.229179] systemd[1]: Listening on udev Kernel Socket.
+ [ OK ] Listening on udev Kernel Socket.
+ [ 3.269520] systemd[1]: Condition check resulted in Huge Pages File System being skipped.
+ [ 3.278477] systemd[1]: Condition check resulted in POSIX Message Queue File System being skipped.
+ [ 3.288200] systemd[1]: Condition check resulted in Kernel Debug File System being skipped.
+ [ 3.302570] systemd[1]: Mounting Temporary Directory (/tmp)...
+ Mounting Temporary Directory (/tmp)...
+ [ 3.339226] systemd[1]: Condition check resulted in Create list of static device nodes for the current kernel being skipped.
+ [ 3.355883] systemd[1]: Starting File System Check on Root Device...
+ Starting File System Check on Root Device...
+ [ 3.407220] systemd[1]: Starting Journal Service...
+ Starting Journal Service...
+ [ 3.422441] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.
+ [ 3.431770] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
+ [ 3.446415] systemd[1]: Mounting Kernel Configuration File System...
+ Mounting Kernel Configuration File System...
+ [ 3.458983] systemd[1]: Starting Apply Kernel Variables...
+ Starting Apply Kernel Variables...
+ [ 3.471368] systemd[1]: Starting udev Coldplug all Devices...
+ Starting udev Coldplug all Devices...
+ [ 3.491071] systemd[1]: Mounted Temporary Directory (/tmp).
+ [ OK 3.498114] systemd[1]: Mounted Kernel Configuration File System.
+ 0m] Mounted Temporary Directory (/tmp).
+ [ OK ] Mounted Kernel Configuration File System.
+ [ 3.550853] systemd[1]: Started Apply Kernel Variables.
+ [ OK 3.557535] systemd[1]: Started Journal Service.
+ 0m] Started Apply Kernel Variables.
+ [ OK ] Started Journal Service.
+ [ OK ] Started udev Coldplug all Devices.
+ [ OK ] Started File System Check on Root Device.
+ Starting Remount Root and Kernel File Systems...
+ [ 8.133469] EXT4-fs (mmcblk0p3): re-mounted. Opts: (null)
+ [ OK ] Started Remount Root and Kernel File Systems.
+ Starting Flush Journal to Persistent Storage...
+ [ 8.215327] systemd-journald[77]: Received client request to flush runtime journal.
+ Starting Create Static Device Nodes in /dev...
+ [ OK ] Started Flush Journal to Persistent Storage.
+ [ OK ] Started Create Static Device Nodes in /dev.
+ [ OK ] Reached target Local File Systems (Pre).
+ Mounting /var/volatile...
+ Starting udev Kernel Device Manager...
+ [ OK ] Mounted /var/volatile.
+ Starting Load/Save Random Seed...
+ [ OK ] Reached target Local File Systems.
+ Starting Create Volatile Files and Directories...
+ [ OK ] Started udev Kernel Device Manager.
+ [ OK ] Started Create Volatile Files and Directories.
+ Starting Network Time Synchronization...
+ Starting Update UTMP about System Boot/Shutdown...
+ [ OK ] Started Update UTMP about System Boot/Shutdown.
+ [ OK ] Started Network Time Synchronization.
+ [ 11.618575] random: crng init done
+ [ 11.622007] random: 7 urandom warning(s) missed due to ratelimiting
+ [ OK ] Started Load/Save Random Seed.
+ [ OK ] Reached target System Initialization.
+ [ OK ] Started Daily Cleanup of Temporary Directories.
+ [ OK ] Reached target System Time Set.
+ [ OK ] Reached target System Time Synchronized.
+ [ OK ] Reached target Timers.
+ [ OK ] Listening on D-Bus System Message Bus Socket.
+ [ OK ] Listening on dropbear.socket.
+ [ OK ] Reached target Sockets.
+ [ OK ] Reached target Basic System.
+ [ OK ] Started D-Bus System Message Bus.
+ Starting IPv6 Packet Filtering Framework...
+ Starting IPv4 Packet Filtering Framework...
+ Starting Login Service...
+ [ OK ] Started IPv6 Packet Filtering Framework.
+ [ OK ] Started IPv4 Packet Filtering Framework.
+ [ OK ] Reached target Network (Pre).
+ Starting Network Service...
+ [ OK ] Started Login Service.
+ [ 12.602455] macb 20112000.ethernet eth0: PHY [20112000.ethernet-ffffffff:09] driver [Vitesse VSC8662] (irq=POLL)
+ [ 12.612795] macb 20112000.ethernet eth0: configuring for phy/sgmii link mode
+ [ 12.622153] pps pps0: new PPS source ptp0
+ [ OK 12.626725] macb 20112000.ethernet: gem-ptp-timer ptp clock registered.
+ 0m] Started Network Service.
+ Starting Network Name Resolution...
+ [ OK ] Started Network Name Resolution.
+ [ OK ] Reached target Network.
+ [ OK ] Reached target Host and Network Name Lookups.
+ [ OK ] Started Collectd.
+ [ OK ] Started Collectd.
+ Starting Permit User Sessions...
+ [ OK ] Started Permit User Sessions.
+ [ OK ] Started Getty on tty1.
+ [ OK ] Started Serial Getty on ttyS0.
+ [ OK ] Reached target Login Prompts.
+ [ OK ] Reached target Multi-User System.
+ Starting Update UTMP about System Runlevel Changes...
+ [ OK ] Started Update UTMP about System Runlevel Changes.
+
+ OpenEmbedded nodistro.0 icicle-kit-es ttyS0
+
+ icicle-kit-es login: [ 15.795564] macb 20112000.ethernet eth0: Link is Up - 1Gbps/Full - flow control tx
+ [ 15.803306] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
+
+ icicle-kit-es login: root
+ root@icicle-kit-es:~#
diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst
index 1ce9ab14f5..4e4c852ff3 100644
--- a/doc/board/sifive/fu540.rst
+++ b/doc/board/sifive/fu540.rst
@@ -12,6 +12,7 @@ of running Linux.
Mainline support
----------------
+
The support for following drivers are already enabled:
1. SiFive UART Driver.
@@ -24,7 +25,7 @@ Booting from MMC using FSBL
---------------------------
Building
---------
+~~~~~~~~
1. Add the RISC-V toolchain to your PATH.
2. Setup ARCH & cross compilation environment variable:
@@ -37,7 +38,7 @@ Building
4. make
Flashing
---------
+~~~~~~~~
The current U-Boot port is supported in S-mode only and loaded from DRAM.
@@ -63,11 +64,12 @@ copied to the first partition of the sdcard.
sudo dd if=<prior_stage_firmware_binary> of=/dev/disk2s1 bs=1024
Booting
--------
+~~~~~~~
+
Once you plugin the sdcard and power up, you should see the U-Boot prompt.
Sample boot log from HiFive Unleashed board
--------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: none
@@ -417,7 +419,7 @@ Booting from MMC using U-Boot SPL
---------------------------------
Building
---------
+~~~~~~~~
Before building U-Boot SPL, OpenSBI must be built first. OpenSBI can be
cloned and built for FU540 as below:
@@ -441,7 +443,7 @@ This will generate spl/u-boot-spl.bin and FIT image (u-boot.itb)
Flashing
---------
+~~~~~~~~
ZSBL loads the U-Boot SPL (u-boot-spl.bin) from a partition with GUID type
5B193300-FC78-40CD-8002-E86C45580B47
@@ -471,11 +473,12 @@ Program the SD card
sudo dd if=u-boot.itb of=/dev/sda seek=2082
Booting
--------
+~~~~~~~
+
Once you plugin the sdcard and power up, you should see the U-Boot prompt.
Sample boot log from HiFive Unleashed board
--------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: none
diff --git a/doc/board/sipeed/maix.rst b/doc/board/sipeed/maix.rst
index 92f2d112a9..bf945b3458 100644
--- a/doc/board/sipeed/maix.rst
+++ b/doc/board/sipeed/maix.rst
@@ -70,6 +70,7 @@ console shall be opened immediately. Boot output should look like the following:
U-Boot 2020.04-rc2-00087-g2221cc09c1-dirty (Feb 28 2020 - 13:53:09 -0500)
DRAM: 8 MiB
+ MMC: spi@53000000:slot@0: 0
In: serial@38000000
Out: serial@38000000
Err: serial@38000000
@@ -118,14 +119,115 @@ The value of FW_PAYLOAD_OFFSET must match CONFIG_SYS_TEXT_BASE - 0x80000000.
The file to flash is build/platform/kendryte/k210/firmware/fw_payload.bin.
+Booting
+^^^^^^^
+
+The default boot process is to load and boot the files ``/uImage`` and
+``/k210.dtb`` off of the first partition of the MMC. For Linux, this will result
+in an output like
+
+.. code-block:: none
+
+ U-Boot 2020.10-00691-gd1d651d988-dirty (Oct 16 2020 - 17:05:24 -0400)
+
+ DRAM: 8 MiB
+ MMC: spi@53000000:slot@0: 0
+ Loading Environment from SPIFlash... SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
+ OK
+ In: serial@38000000
+ Out: serial@38000000
+ Err: serial@38000000
+ Hit any key to stop autoboot: 0
+ 1827380 bytes read in 1044 ms (1.7 MiB/s)
+ 13428 bytes read in 10 ms (1.3 MiB/s)
+ ## Booting kernel from Legacy Image at 80060000 ...
+ Image Name: linux
+ Image Type: RISC-V Linux Kernel Image (uncompressed)
+ Data Size: 1827316 Bytes = 1.7 MiB
+ Load Address: 80000000
+ Entry Point: 80000000
+ Verifying Checksum ... OK
+ ## Flattened Device Tree blob at 80400000
+ Booting using the fdt blob at 0x80400000
+ Loading Kernel Image
+ Loading Device Tree to 00000000803f9000, end 00000000803ff473 ... OK
+
+ Starting kernel ...
+
+ [ 0.000000] Linux version 5.9.0-00021-g6dcc2f0814c6-dirty (sean@godwin) (riscv64-linux-gnu-gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.35) #34 SMP Fri Oct 16 14:40:57 EDT 2020
+ [ 0.000000] earlycon: sifive0 at MMIO 0x0000000038000000 (options '115200n8')
+ [ 0.000000] printk: bootconsole [sifive0] enabled
+ [ 0.000000] Zone ranges:
+ [ 0.000000] DMA32 [mem 0x0000000080000000-0x00000000807fffff]
+ [ 0.000000] Normal empty
+ [ 0.000000] Movable zone start for each node
+ [ 0.000000] Early memory node ranges
+ [ 0.000000] node 0: [mem 0x0000000080000000-0x00000000807fffff]
+ [ 0.000000] Initmem setup node 0 [mem 0x0000000080000000-0x00000000807fffff]
+ [ 0.000000] riscv: ISA extensions acdfgim
+ [ 0.000000] riscv: ELF capabilities acdfim
+ [ 0.000000] percpu: max_distance=0x18000 too large for vmalloc space 0x0
+ [ 0.000000] percpu: Embedded 12 pages/cpu s18848 r0 d30304 u49152
+ [ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 2020
+ [ 0.000000] Kernel command line: earlycon console=ttySIF0
+ [ 0.000000] Dentry cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
+ [ 0.000000] Inode-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+ [ 0.000000] Sorting __ex_table...
+ [ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
+ [ 0.000000] Memory: 6004K/8192K available (1139K kernel code, 126K rwdata, 198K rodata, 90K init, 81K bss, 2188K reserved, 0K cma-reserved)
+ [ 0.000000] rcu: Hierarchical RCU implementation.
+ [ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
+ [ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
+ [ 0.000000] riscv-intc: 64 local interrupts mapped
+ [ 0.000000] plic: interrupt-controller@C000000: mapped 65 interrupts with 2 handlers for 2 contexts.
+ [ 0.000000] random: get_random_bytes called from 0x00000000800019a8 with crng_init=0
+ [ 0.000000] k210-clk: clock-controller
+ [ 0.000000] k210-clk: clock-controller: fixed-rate 26 MHz osc base clock
+ [ 0.000000] clint: clint@2000000: timer running at 7800000 Hz
+ [ 0.000000] clocksource: clint_clocksource: mask: 0xffffffffffffffff max_cycles: 0x3990be68b, max_idle_ns: 881590404272 ns
+ [ 0.000014] sched_clock: 64 bits at 7MHz, resolution 128ns, wraps every 4398046511054ns
+ [ 0.008450] Console: colour dummy device 80x25
+ [ 0.012494] Calibrating delay loop (skipped), value calculated using timer frequency.. 15.60 BogoMIPS (lpj=31200)
+ [ 0.022693] pid_max: default: 4096 minimum: 301
+ [ 0.027352] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+ [ 0.034428] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
+ [ 0.045099] rcu: Hierarchical SRCU implementation.
+ [ 0.050048] smp: Bringing up secondary CPUs ...
+ [ 0.055417] smp: Brought up 1 node, 2 CPUs
+ [ 0.059602] devtmpfs: initialized
+ [ 0.082796] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
+ [ 0.091820] futex hash table entries: 16 (order: -2, 1024 bytes, linear)
+ [ 0.098507] pinctrl core: initialized pinctrl subsystem
+ [ 0.140938] clocksource: Switched to clocksource clint_clocksource
+ [ 0.247216] workingset: timestamp_bits=62 max_order=11 bucket_order=0
+ [ 0.277392] k210-fpioa 502b0000.pinmux: K210 FPIOA pin controller
+ [ 0.291724] k210-sysctl 50440000.syscon: K210 system controller
+ [ 0.305317] k210-rst 50440000.syscon:reset-controller: K210 reset controller
+ [ 0.313808] 38000000.serial: ttySIF0 at MMIO 0x38000000 (irq = 1, base_baud = 115200) is a SiFive UART v0
+ [ 0.322712] printk: console [ttySIF0] enabled
+ [ 0.322712] printk: console [ttySIF0] enabled
+ [ 0.331328] printk: bootconsole [sifive0] disabled
+ [ 0.331328] printk: bootconsole [sifive0] disabled
+ [ 0.353347] Freeing unused kernel memory: 88K
+ [ 0.357004] This architecture does not have kernel memory protection.
+ [ 0.363397] Run /init as init process
+
+Loading, Booting, and Storing Images
+------------------------------------
+
+.. _loading:
+
Loading Images
^^^^^^^^^^^^^^
-To load a kernel, transfer it over serial.
+Serial
+""""""
+
+Use the ``loady`` command to load images over serial.
.. code-block:: none
- => loady 80000000 1500000
+ => loady $loadaddr 1500000
## Switch baudrate to 1500000 bps and press ENTER ...
*** baud: 1500000
@@ -150,6 +252,61 @@ To load a kernel, transfer it over serial.
*** baud: 115200 ***
=>
+This command does not set ``$filesize``, so it may need to be set manually.
+
+SPI Flash
+"""""""""
+
+To load an image off of SPI flash, first set up a partition as described in
+:ref:`partitions`. Then, use ``mtd`` to load that partition
+
+.. code-block:: none
+
+ => sf probe
+ SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
+ => mtd read linux $loadaddr
+ Reading 2097152 byte(s) at offset 0x00000000
+
+This command does not set ``$filesize``, so it may need to be set manually.
+
+MMC
+"""
+
+The MMC device number is 0. To list partitions on the device, use ``part``:
+
+.. code-block:: none
+
+ => part list mmc 0
+
+ Partition Map for MMC device 0 -- Partition Type: EFI
+
+ Part Start LBA End LBA Name
+ Attributes
+ Type GUID
+ Partition GUID
+ 1 0x00000800 0x039effde "boot"
+ attrs: 0x0000000000000000
+ type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
+ guid: 96161f7d-7113-4cc7-9a24-08ab7fc5cb72
+
+To list files, use ``ls``:
+
+.. code-block:: none
+
+ => ls mmc 0:1
+ <DIR> 4096 .
+ <DIR> 4096 ..
+ <DIR> 16384 lost+found
+ 13428 k210.dtb
+ 1827380 uImage
+
+To load a file, use ``load``:
+
+.. code-block:: none
+
+ => load mmc 0:1 $loadaddr uImage
+ 1827380 bytes read in 1049 ms (1.7 MiB/s)
+
Running Programs
^^^^^^^^^^^^^^^^
@@ -160,20 +317,6 @@ To run a bare binary, use the ``go`` command:
.. code-block:: none
- => loady
- ## Ready for binary (ymodem) download to 0x80000000 at 115200 bps...
- C
- *** file: ./examples/standalone/hello_world.bin
- $ sz -vv ./examples/standalone/hello_world.bin
- Sending: hello_world.bin
- Bytes Sent: 4864 BPS:649
- Sending:
- Ymodem sectors/kbytes sent: 0/ 0k
- Transfer complete
-
- *** exit status: 0 ***
- (CAN) packets, 5 retries
- ## Total Size = 0x000012f8 = 4856 Bytes
=> go 80000000
## Starting application at 0x80000000 ...
Example expects ABI version 9
@@ -184,51 +327,127 @@ To run a bare binary, use the ``go`` command:
argv[1] = "<NULL>"
Hit any key to exit ...
+Note that this will only start a program on one hart. As-of this writing it is
+only possible to start a program on multiple harts using the ``bootm`` command.
+
Legacy Images
"""""""""""""
-To run legacy images, use the ``bootm`` command:
+To create a legacy image, use ``tools/mkimage``:
.. code-block:: none
- $ tools/mkimage -A riscv -O u-boot -T standalone -C none -a 80000000 -e 80000000 -d examples/standalone/hello_world.bin hello_world.img
- Image Name:
- Created: Thu Mar 5 12:04:10 2020
- Image Type: RISC-V U-Boot Standalone Program (uncompressed)
- Data Size: 4856 Bytes = 4.74 KiB = 0.00 MiB
+ $ tools/mkimage -A riscv -O linux -T kernel -C none -a 0x80000000 -e 0x80000000 -n linux -d ../linux-git/arch/riscv/boot/Image uImage
+ Image Name: linux
+ Created: Fri Oct 16 17:36:32 2020
+ Image Type: RISC-V Linux Kernel Image (uncompressed)
+ Data Size: 1827316 Bytes = 1784.49 KiB = 1.74 MiB
Load Address: 80000000
Entry Point: 80000000
- $ picocom -b 115200 /dev/ttyUSB0
- => loady
- ## Ready for binary (ymodem) download to 0x80000000 at 115200 bps...
- C
- *** file: hello_world.img
- $ sz -vv hello_world.img
- Sending: hello_world.img
- Bytes Sent: 4992 BPS:665
- Sending:
- Ymodem sectors/kbytes sent: 0/ 0k
- Transfer complete
+The ``bootm`` command also requires an FDT, even if the image doesn't require
+one. After loading the image to ``$loadaddr`` and the FDT to ``$fdt_addr_r``,
+boot with:
- *** exit status: 0 ***
- CAN) packets, 3 retries
- ## Total Size = 0x00001338 = 4920 Bytes
- => bootm
- ## Booting kernel from Legacy Image at 80000000 ...
- Image Name:
- Image Type: RISC-V U-Boot Standalone Program (uncompressed)
- Data Size: 4856 Bytes = 4.7 KiB
+.. code-block:: none
+
+ => bootm $loadaddr - $fdt_addr_r
+ ## Booting kernel from Legacy Image at 80060000 ...
+ Image Name: linux
+ Image Type: RISC-V Linux Kernel Image (uncompressed)
+ Data Size: 1827316 Bytes = 1.7 MiB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
- Loading Standalone Program
- Example expects ABI version 9
- Actual U-Boot ABI version 9
- Hello World
- argc = 0
- argv[0] = "<NULL>"
- Hit any key to exit ...
+ ## Flattened Device Tree blob at 80400000
+ Booting using the fdt blob at 0x80400000
+ Loading Kernel Image
+ Loading Device Tree to 00000000803f9000, end 00000000803ff473 ... OK
+
+ Starting kernel ...
+
+The FDT is verified after the kernel is relocated, so it must be loaded high
+enough so that it won't be overwritten. The default values for ``$loadaddr``
+and ``$fdt_addr_r`` should provide ample headroom for most use-cases.
+
+Flashing Images
+^^^^^^^^^^^^^^^
+
+SPI Flash
+"""""""""
+
+To flash data to SPI flash, first load it using one of the methods in
+:ref:`loading`. Addiotionally, create some partitions as described in
+:ref:`partitions`. Then use the ``mtd`` command:
+
+.. code-block:: none
+
+ => sf probe
+ SF: Detected w25q128fw with page size 256 Bytes, erase size 4 KiB, total 16 MiB
+ => mtd write linux $loadaddr 0 $filesize
+ Writing 2478162 byte(s) at offset 0x00000000
+
+Note that in order to write a bootable image, a header and tailer must be added.
+
+MMC
+"""
+
+MMC writes are unsupported for now.
+
+SPI Flash
+^^^^^^^^^
+
+Sipeed MAIX boards typically provide around 16 MiB of SPI NOR flash. U-Boot is
+stored in the first 1 MiB or so of this flash. U-Boot's environment is stored at
+the end of flash.
+
+.. _partitions:
+
+Partitions
+""""""""""
+
+There is no set data layout. The default partition layout only allocates
+partitions for U-Boot and its default environment
+
+.. code-block:: none
+
+ => mtd list
+ List of MTD devices:
+ * nor0
+ - type: NOR flash
+ - block size: 0x1000 bytes
+ - min I/O: 0x1 bytes
+ - 0x000000000000-0x000001000000 : "nor0"
+ - 0x000000000000-0x000000100000 : "u-boot"
+ - 0x000000fff000-0x000001000000 : "env"
+
+As an example, to allocate 2MiB for Linux and (almost) 13 MiB for other data,
+set the ``mtdparts`` like:
+
+.. code-block:: none
+
+ => env set mtdparts nor0:1M(u-boot),2M(linux),0xcff000(data),0x1000@0xfff000(env)
+ => mtd list
+ List of MTD devices:
+ * nor0
+ - type: NOR flash
+ - block size: 0x1000 bytes
+ - min I/O: 0x1 bytes
+ - 0x000000000000-0x000001000000 : "nor0"
+ - 0x000000000000-0x000000100000 : "u-boot"
+ - 0x000000100000-0x000000300000 : "linux"
+ - 0x000000300000-0x000000fff000 : "data"
+ - 0x000000fff000-0x000001000000 : "env"
+
+To make these changes permanent, save the environment:
+
+.. code-block:: none
+
+ => env save
+ Saving Environment to SPIFlash... Erasing SPI flash...Writing to SPI flash...done
+ OK
+
+U-Boot will always load the environment from the last 4 KiB of flash.
Pin Assignment
--------------
diff --git a/doc/board/st/stm32mp1.rst b/doc/board/st/stm32mp1.rst
index e74f7afdae..20f5c9e301 100644
--- a/doc/board/st/stm32mp1.rst
+++ b/doc/board/st/stm32mp1.rst
@@ -1,5 +1,5 @@
.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
-.. sectionauthor:: Patrick Delaunay <patrick.delaunay@st.com>
+.. sectionauthor:: Patrick Delaunay <patrick.delaunay@foss.st.com>
STM32MP15x boards
=================
diff --git a/doc/driver-model/bind.rst b/doc/driver-model/bind.rst
index e3e9cb4d3c..b19661b5fe 100644
--- a/doc/driver-model/bind.rst
+++ b/doc/driver-model/bind.rst
@@ -1,5 +1,5 @@
.. SPDX-License-Identifier: GPL-2.0+
-.. sectionauthor:: Patrice Chotard <patrice.chotard@st.com>
+.. sectionauthor:: Patrice Chotard <patrice.chotard@foss.st.com>
Binding/unbinding a driver
==========================
diff --git a/doc/uefi/uefi.rst b/doc/uefi/uefi.rst
index dc930d9240..5a67737c15 100644
--- a/doc/uefi/uefi.rst
+++ b/doc/uefi/uefi.rst
@@ -59,13 +59,10 @@ Below you find the output of an example session starting GRUB::
120832 bytes read in 7 ms (16.5 MiB/s)
=> bootefi ${kernel_addr_r} ${fdt_addr_r}
-The bootefi command uses the device, the file name, and the file size
-(environment variable 'filesize') of the most recently loaded file when setting
-up the binary for execution. So the UEFI binary should be loaded last.
-
-The environment variable 'bootargs' is passed as load options in the UEFI system
-table. The Linux kernel EFI stub uses the load options as command line
-arguments.
+When booting from a memory location it is unknown from which file it was loaded.
+Therefore the bootefi command uses the device path of the block device partition
+or the network adapter and the file name of the most recently loaded PE-COFF
+file when setting up the loaded image protocol.
Launching a UEFI binary from a FIT image
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/usage/base.rst b/doc/usage/base.rst
new file mode 100644
index 0000000000..db9cd4d978
--- /dev/null
+++ b/doc/usage/base.rst
@@ -0,0 +1,23 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+base command
+============
+
+Synopsis
+--------
+
+::
+
+ base [address]
+
+Description
+-----------
+
+The *base* command sets or displays the address offset used by the memory
+commands *cmp, cp, md, mdc, mm, ms, mw, mwc*.
+
+All other commands ignore the address defined by *base*.
+
+address
+ new base address as hexadecimal number. If no value is provided, the current
+ value is displayed.
diff --git a/doc/usage/fdt_overlays.rst b/doc/usage/fdt_overlays.rst
new file mode 100644
index 0000000000..ea39713434
--- /dev/null
+++ b/doc/usage/fdt_overlays.rst
@@ -0,0 +1,134 @@
+.. SPDX-License-Identifier: GPL-2.0+
+.. Copyright (c) 2017, Pantelis Antoniou <pantelis.antoniou@konsulko.com>
+
+Device Tree Overlays
+====================
+
+Overlay Syntax
+--------------
+
+Device-tree overlays require a slightly different syntax compared to traditional
+device-trees. Please refer to dt-object-internal.txt in the device-tree compiler
+sources for information regarding the internal format of overlays:
+https://git.kernel.org/pub/scm/utils/dtc/dtc.git/tree/Documentation/dt-object-internal.txt
+
+Building Overlays
+-----------------
+
+In a nutshell overlays provides a means to manipulate a symbol a previous
+device-tree or device-tree overlay has defined. It requires both the base
+device-tree and all the overlays to be compiled with the *-@* command line
+switch of the device-tree compiler so that symbol information is included.
+
+Note
+ Support for *-@* option can only be found in dtc version 1.4.4 or newer.
+ Only version 4.14 or higher of the Linux kernel includes a built in version
+ of dtc that meets this requirement.
+
+Building a binary device-tree overlay follows the same process as building a
+traditional binary device-tree. For example:
+
+**base.dts**
+
+::
+
+ /dts-v1/;
+ / {
+ foo: foonode {
+ foo-property;
+ };
+ };
+
+.. code-block:: console
+
+ $ dtc -@ -I dts -O dtb -o base.dtb base.dts
+
+**overlay.dts**
+
+::
+
+ /dts-v1/;
+ /plugin/;
+ / {
+ fragment@1 {
+ target = <&foo>;
+ __overlay__ {
+ overlay-1-property;
+ bar: barnode {
+ bar-property;
+ };
+ };
+ };
+ };
+
+.. code-block:: console
+
+ $ dtc -@ -I dts -O dtb -o overlay.dtbo overlay.dts
+
+Ways to Utilize Overlays in U-Boot
+----------------------------------
+
+There are two ways to apply overlays in U-Boot.
+
+* Include and define overlays within a FIT image and have overlays
+ automatically applied.
+
+* Manually load and apply overlays
+
+The remainder of this document will discuss using overlays via the manual
+approach. For information on using overlays as part of a FIT image please see:
+doc/uImage.FIT/overlay-fdt-boot.txt
+
+Manually Loading and Applying Overlays
+--------------------------------------
+
+1. Figure out where to place both the base device tree blob and the
+ overlay. Make sure you have enough space to grow the base tree without
+ overlapping anything.
+
+::
+
+ => setenv fdtaddr 0x87f00000
+ => setenv fdtovaddr 0x87fc0000
+
+2. Load the base binary device-tree and the binary device-tree overlay.
+
+::
+
+ => load ${devtype} ${bootpart} ${fdtaddr} ${bootdir}/base.dtb
+ => load ${devtype} ${bootpart} ${fdtovaddr} ${bootdir}/overlay.dtbo
+
+3. Set the base binary device-tree as the working fdt tree.
+
+::
+
+ => fdtaddr $fdtaddr
+
+4. Grow it enough so it can encompass all applied overlays
+
+::
+
+ => fdt resize 8192
+
+5. You are now ready to apply the overlay.
+
+::
+
+ => fdt apply $fdtovaddr
+
+6. Boot system like you would do with a traditional dtb.
+
+For bootm:
+
+::
+
+ => bootm ${kerneladdr} - ${fdtaddr}
+
+For bootz:
+
+::
+
+ => bootz ${kerneladdr} - ${fdtaddr}
+
+Please note that in case of an error, both the base and overlays are going
+to be invalidated, so keep copies to avoid reloading.
diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index fbb2c0481c..6def250766 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -2,7 +2,9 @@ Use U-Boot
==========
.. toctree::
+ :maxdepth: 1
+ fdt_overlays
netconsole
Shell commands
@@ -11,7 +13,9 @@ Shell commands
.. toctree::
:maxdepth: 1
+ base
bootefi
bootmenu
button
+ mbr
pstore
diff --git a/doc/usage/mbr.rst b/doc/usage/mbr.rst
new file mode 100644
index 0000000000..bddf2f612a
--- /dev/null
+++ b/doc/usage/mbr.rst
@@ -0,0 +1,94 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+mbr command
+===========
+
+Synopsis
+--------
+
+::
+
+ mbr verify [interface] [device no] [partition list]
+ mbr write [interface] [device no] [partition list]
+
+Description
+-----------
+
+The mbr command lets users create or verify the MBR (Master Boot Record)
+partition layout based on the provided text description. The partition
+layout is alternatively read from the 'mbr_parts' environment variable.
+This can be used in scripts to help system image flashing tools to ensure
+proper partition layout.
+
+The syntax of the text description of the partition list is similar to
+the one used by the 'gpt' command.
+
+Supported partition parameters are:
+
+* name (currently ignored)
+* start (partition start offset in bytes)
+* size (in bytes or '-' to expand it to the whole free area)
+* bootable (boolean flag)
+* id (MBR partition type)
+
+If one wants to create more than 4 partitions, an 'Extended' primary
+partition (with 0x05 ID) has to be explicitly provided as a one of the
+first 4 entries.
+
+Here is an example how to create a 6 partitions (3 on the 'extended
+volume'), some of the predefined sizes:
+
+::
+
+ => setenv mbr_parts 'name=boot,start=4M,size=128M,bootable,id=0x0e;
+ name=rootfs,size=3072M,id=0x83;
+ name=system-data,size=512M,id=0x83;
+ name=[ext],size=-,id=0x05;
+ name=user,size=-,id=0x83;
+ name=modules,size=100M,id=0x83;
+ name=ramdisk,size=8M,id=0x83'
+ => mbr write mmc 0
+
+To check if the layout on the MMC #0 storage device matches the provided
+text description one has to issue following command (assuming that
+mbr_parts environment variable is set):
+
+::
+
+ => mbr verify mmc 0
+
+The verify sub-command is especially useful in the system update scripts:
+
+::
+
+ => if mbr verify mmc 0; then
+ echo MBR layout needs to be updated
+ ...
+ fi
+
+The 'mbr write' command returns 0 on success write or 1 on failure.
+
+The 'mbr verify' returns 0 if the layout matches the one on the storage
+device or 1 if not.
+
+Configuration
+-------------
+
+To use the mbr command you must specify CONFIG_CMD_MBR=y.
+
+Return value
+------------
+
+The variable *$?* takes the following values
+
++---+------------------------------+
+| 0 | mbr write was succesful |
++---+------------------------------+
+| 1 | mbr write failed |
++---+------------------------------+
+| 0 | mbr verify was succesful |
++---+------------------------------+
+| 1 | mbr verify was not succesful |
++---+------------------------------+
+|-1 | invalid arguments |
++---+------------------------------+
diff --git a/doc/usage/pstore.rst b/doc/usage/pstore.rst
index 8c4e5274aa..1c8374513a 100644
--- a/doc/usage/pstore.rst
+++ b/doc/usage/pstore.rst
@@ -1,8 +1,17 @@
.. SPDX-License-Identifier: GPL-2.0+
-PStore command
+pstore command
==============
+Synopsis
+--------
+
+::
+
+ pstore set <addr> <len> [record-size] [console-size] [ftrace-size] [pmsg_size] [ecc-size]
+ pstore display [record-type] [nb]
+ pstore save <interface> <dev[:part]> <directory-path>
+
Design
------