summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2024-05-20 10:16:33 -0600
committerTom Rini <[email protected]>2024-05-20 10:16:33 -0600
commitd4781422d1268aa6deca3e49d2fb227e79c160b4 (patch)
tree420073c8a29a401a3908803000df6f54673e1731 /doc
parent85854bc3324edd0c81047780ee60033d056fd490 (diff)
parenta7f0154c412859323396111dd0c09dbafbc153cb (diff)
Merge tag 'v2024.07-rc3' into next
Prepare v2024.07-rc3
Diffstat (limited to 'doc')
-rw-r--r--doc/board/andestech/adp-ag101p.rst (renamed from doc/board/AndesTech/adp-ag101p.rst)0
-rw-r--r--doc/board/andestech/ae350.rst (renamed from doc/board/AndesTech/ae350.rst)0
-rw-r--r--doc/board/andestech/index.rst (renamed from doc/board/AndesTech/index.rst)0
-rw-r--r--doc/board/index.rst2
-rw-r--r--doc/board/starfive/index.rst3
-rw-r--r--doc/board/starfive/milk-v_mars_cm.rst193
-rw-r--r--doc/develop/codingstyle.rst8
-rw-r--r--doc/develop/release_cycle.rst2
-rw-r--r--doc/develop/tests_writing.rst1
-rw-r--r--doc/device-tree-bindings/clock/rockchip,rk3399-dmc.txt42
-rw-r--r--doc/sphinx/requirements.txt2
11 files changed, 205 insertions, 48 deletions
diff --git a/doc/board/AndesTech/adp-ag101p.rst b/doc/board/andestech/adp-ag101p.rst
index f867eeae3eb..f867eeae3eb 100644
--- a/doc/board/AndesTech/adp-ag101p.rst
+++ b/doc/board/andestech/adp-ag101p.rst
diff --git a/doc/board/AndesTech/ae350.rst b/doc/board/andestech/ae350.rst
index 99622fd3258..99622fd3258 100644
--- a/doc/board/AndesTech/ae350.rst
+++ b/doc/board/andestech/ae350.rst
diff --git a/doc/board/AndesTech/index.rst b/doc/board/andestech/index.rst
index cacc5791a91..cacc5791a91 100644
--- a/doc/board/AndesTech/index.rst
+++ b/doc/board/andestech/index.rst
diff --git a/doc/board/index.rst b/doc/board/index.rst
index 428faa810be..2340eeb0777 100644
--- a/doc/board/index.rst
+++ b/doc/board/index.rst
@@ -8,7 +8,7 @@ Board-specific doc
actions/index
advantech/index
- AndesTech/index
+ andestech/index
allwinner/index
amlogic/index
anbernic/index
diff --git a/doc/board/starfive/index.rst b/doc/board/starfive/index.rst
index 2762bf74c11..d369b986ccd 100644
--- a/doc/board/starfive/index.rst
+++ b/doc/board/starfive/index.rst
@@ -6,5 +6,6 @@ StarFive
.. toctree::
:maxdepth: 1
- milk-v_mars.rst
+ milk-v_mars
+ milk-v_mars_cm
visionfive2
diff --git a/doc/board/starfive/milk-v_mars_cm.rst b/doc/board/starfive/milk-v_mars_cm.rst
new file mode 100644
index 00000000000..b31de6043bb
--- /dev/null
+++ b/doc/board/starfive/milk-v_mars_cm.rst
@@ -0,0 +1,193 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+Milk-V Mars CM
+==============
+
+U-Boot for the Milk-V Mars CM uses the same U-Boot binaries as the VisionFive 2
+board. In U-Boot SPL the actual board is detected and the device-tree patched
+accordingly.
+
+The Milk-V Mars CM Lite comes without eMMC and needs a different pin muxing
+than the Milk-V Mars CM. The availability and size of the eMMC shows up in the
+serial number displayed by the *mac* command, e.g.
+MARC-V10-2340-D002E016-00000304. The number after the E is the MMC size. U-Boot
+takes a value of E000 as an indicator for the Lite version. Unfortunately the
+vendor has not set this value correctly on some Lite boards.
+
+Please, use CONFIG_STARFIVE_NO_EMMC=y if EEPROM data indicates eMMC is present
+on the Milk-V Mars CM Lite. Otherwise you will not be able to read from the
+SD-card.
+
+The serial number can be corrected using the *mac* command:
+
+.. code-block::
+
+ mac read_eeprom
+ mac product_id MARC-V10-2340-D002E000-00000304
+ mac write_eeprom
+
+.. note::
+
+ The *mac initialize* command overwrites the vendor string and the MAC
+ addresses. This is why it is avoided here.
+
+By default the EEPROM is write protected. The write protection may be overcome
+by connecting the "GND" and "EN" test pads on top of the module.
+
+Building
+~~~~~~~~
+
+1. Add the RISC-V toolchain to your PATH.
+2. Setup ARCH & cross compilation environment variable:
+
+.. code-block:: none
+
+ export CROSS_COMPILE=<riscv64 toolchain prefix>
+
+The M-mode software OpenSBI provides the supervisor binary interface (SBI) and
+is responsible for the switch to S-Mode. It is a prerequisite to build U-Boot.
+Support for the JH7110 was introduced in OpenSBI 1.2. It is recommended to use
+a current release.
+
+.. code-block:: console
+
+ git clone https://github.com/riscv/opensbi.git
+ cd opensbi
+ make PLATFORM=generic FW_TEXT_START=0x40000000
+
+(*FW_TEXT_START* is not needed anymore after OpenSBI patch d4d2582eef7a
+"firmware: remove FW_TEXT_START" which should appear in OpenSBI 1.5.)
+
+Now build the U-Boot SPL and U-Boot proper.
+
+.. code-block:: console
+
+ cd <U-Boot-dir>
+ make starfive_visionfive2_defconfig
+ make OPENSBI=$(opensbi_dir)/build/platform/generic/firmware/fw_dynamic.bin
+
+This will generate the U-Boot SPL image (spl/u-boot-spl.bin.normal.out) as well
+as the FIT image (u-boot.itb) with OpenSBI and U-Boot.
+
+Device-tree selection
+~~~~~~~~~~~~~~~~~~~~~
+
+Depending on the board version U-Boot sets variable $fdtfile to either
+starfive/jh7110-milkv-mars-cm.dtb (with eMMC storage) or
+starfive/jh7110-milkv-mars-cm-lite.dtb (without eMMC storage).
+
+To overrule this selection the variable can be set manually and saved in the
+environment
+
+::
+
+ env set fdtfile my_device-tree.dtb
+ env save
+
+or the configuration variable CONFIG_DEFAULT_FDT_FILE can be used to set to
+provide a default value.
+
+The variable *$fdtfile* is used in the boot process to automatically load
+a device-tree provided by the operating system. For details of the boot
+process refer to the :doc:`U-Boot Standard Boot <../../../develop/bootstd>`
+description.
+
+Boot source selection
+~~~~~~~~~~~~~~~~~~~~~
+
+The low speed connector nRPIBOOT line is used to switch the boot source.
+
+* If nRPIBOOT is connected to ground, the board boots from UART.
+* If nRPIBOOT is not connected, the board boots from SPI flash.
+
+Compute module boards typically have a switch or jumper for this line.
+
+Flashing a new U-Boot version
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+U-Boot SPL is provided as file spl/u-boot-spl.bin.normal.out. Main U-Boot is
+in file u-boot.itb.
+
+Assuming your new U-Boot version is on partition 1 of an SD-card you could
+install it to the SPI flash with:
+
+::
+
+ sf probe
+ load mmc 0:1 $kernel_addr_r u-boot-spl.bin.normal.out
+ sf update $kernel_addr_r 0 $filesize
+ load mmc 0:1 $kernel_addr_r u-boot.itb
+ sf update $kernel_addr_r 0x100000 $filesize
+
+For loading the files from a TFTP server refer to the dhcp and tftpboot
+commands.
+
+After updating U-Boot you may want to reboot and reset the environment to the
+default.
+
+::
+
+ env default -f -a
+ env save
+
+Booting from UART
+~~~~~~~~~~~~~~~~~
+
+For booting via UART U-Boot must be built with CONFIG_SPL_YMODEM_SUPPORT=y.
+
+With nRPIBOOT connected to ground for UART boot, power the board and upload
+u-boot-spl.bin.normal.out via XMODEM. Then upload u-boot.itb via YMODEM.
+
+The XMODEM implementation in the boot ROM is not fully specification compliant.
+It sends too many NAKs in a row. Tio is a terminal emulation that tolerates
+these faults.
+
+::
+
+ $ tio -b 115200 --databits 8 --flow none --stopbits 1 /dev/ttyUSB0
+ [08:14:54.700] tio v2.7
+ [08:14:54.700] Press ctrl-t q to quit
+ [08:14:54.701] Connected
+
+ (C)StarFive
+ CCC
+ (C)StarFive
+ CCCCCCCC
+
+Press *ctrl-t x* to initiate XMODEM-1K transfer.
+
+::
+
+ [08:15:14.778] Send file with XMODEM
+ [08:15:22.459] Sending file 'u-boot-spl.bin.normal.out'
+ [08:15:22.459] Press any key to abort transfer
+ ........................................................................
+ .......................................................................|
+ [08:15:22.459] Done
+
+ U-Boot SPL 2024.07-rc1-00075-gd6a4ab20097 (Apr 25 2024 - 16:32:10 +0200)
+ DDR version: dc2e84f0.
+ Trying to boot from UART
+ CC
+
+Press *ctrl-t y* to initiate YMODEM transfer.
+
+::
+
+ [08:15:50.331] Send file with YMODEM
+ [08:15:53.540] Sending file 'u-boot.itb'
+ [08:15:53.540] Press any key to abort transfer
+ ........................................................................
+ …
+ ...............|
+ [08:15:53.540] Done
+ Loaded 1040599 bytes
+
+
+ U-Boot 2024.07-rc1-00075-gd6a4ab20097 (Apr 25 2024 - 16:32:10 +0200)
+
+Booting from SPI flash
+~~~~~~~~~~~~~~~~~~~~~~
+
+With nRPIBOOT disconnected from ground for SPI boot, power up the board. You
+should see the U-Boot prompt on the serial console.
diff --git a/doc/develop/codingstyle.rst b/doc/develop/codingstyle.rst
index fa3cd6aec82..f6248cdcb1e 100644
--- a/doc/develop/codingstyle.rst
+++ b/doc/develop/codingstyle.rst
@@ -110,8 +110,9 @@ Include files
You should follow this ordering in U-Boot. In all cases, they should be listed
in alphabetical order. First comes headers which are located directly in our
-top-level include diretory. Second are headers within subdirectories, Finally
-directory-local includes should be listed. See this example:
+top-level include diretory. This excludes the common.h header file which is to
+be removed. Second are headers within subdirectories, Finally directory-local
+includes should be listed. See this example:
.. code-block:: C
@@ -128,6 +129,9 @@ For files that need to be compiled for the host (e.g. tools), you need to use
``#ifndef USE_HOSTCC`` to avoid including U-Boot specific include files. See
common/image.c for an example.
+If you encounter code which still uses <common.h> a patch to remove that and
+replace it with any required include files directly is much appreciated.
+
If your file uses driver model, include <dm.h> in the C file. Do not include
dm.h in a header file. Try to use forward declarations (e.g. ``struct
udevice``) instead.
diff --git a/doc/develop/release_cycle.rst b/doc/develop/release_cycle.rst
index 64757b4df18..383f4480c6e 100644
--- a/doc/develop/release_cycle.rst
+++ b/doc/develop/release_cycle.rst
@@ -71,7 +71,7 @@ For the next scheduled release, release candidates were made on::
* U-Boot v2024.07-rc2 was released on Mon 06 May 2024.
-.. * U-Boot v2024.07-rc3 was released on Mon 20 May 2024.
+* U-Boot v2024.07-rc3 was released on Mon 20 May 2024.
.. * U-Boot v2024.07-rc4 was released on Mon 03 June 2024.
diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst
index 44b544fa78b..bb1145da268 100644
--- a/doc/develop/tests_writing.rst
+++ b/doc/develop/tests_writing.rst
@@ -281,6 +281,7 @@ new one of those, you should add a new suite.
Create a new file in test/ or a subdirectory and define a macro to register the
suite. For example::
+ #include <common.h>
#include <console.h>
#include <mapmem.h>
#include <dm/test.h>
diff --git a/doc/device-tree-bindings/clock/rockchip,rk3399-dmc.txt b/doc/device-tree-bindings/clock/rockchip,rk3399-dmc.txt
deleted file mode 100644
index 4a56f78f555..00000000000
--- a/doc/device-tree-bindings/clock/rockchip,rk3399-dmc.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Rockchip Dynamic Memory Controller Driver
-Required properties:
-- compatible: "rockchip,rk3399-dmc", "syscon"
-- rockchip,cru: this driver should access cru regs, so need get cru here
-- rockchip,pmucru: this driver should access pmucru regs, so need get pmucru here
-- rockchip,pmugrf: this driver should access pmugrf regs, so need get pmugrf here
-- rockchip,pmusgrf: this driver should access pmusgrf regs, so need get pmusgrf here
-- rockchip,cic: this driver should access cic regs, so need get cic here
-- reg: dynamic ram protocol controller(PCTL) address, PHY Independent(PI) address, phy controller(PHYCTL) address and memory schedule(MSCH) address
-- clock: must include clock specifiers corresponding to entries in the clock-names property.
- Must contain
- dmc_clk: for ddr working frequency
-- rockchip,sdram-params: SDRAM parameters, including all the information by ddr driver:
- Must contain
- Genarate by vendor tool and adjust for U-Boot dtsi.
-
-Example:
- dmc: dmc {
- bootph-all;
- compatible = "rockchip,rk3399-dmc";
- devfreq-events = <&dfi>;
- interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH 0>;
- clocks = <&cru SCLK_DDRCLK>;
- clock-names = "dmc_clk";
- reg = <0x0 0xffa80000 0x0 0x0800
- 0x0 0xffa80800 0x0 0x1800
- 0x0 0xffa82000 0x0 0x2000
- 0x0 0xffa84000 0x0 0x1000
- 0x0 0xffa88000 0x0 0x0800
- 0x0 0xffa88800 0x0 0x1800
- 0x0 0xffa8a000 0x0 0x2000
- 0x0 0xffa8c000 0x0 0x1000>;
- };
-
- &dmc {
- rockchip,sdram-params = <
- 0x2
- 0xa
- 0x3
- ...
- >;
- };
diff --git a/doc/sphinx/requirements.txt b/doc/sphinx/requirements.txt
index 5b4df36804b..426f41e1a02 100644
--- a/doc/sphinx/requirements.txt
+++ b/doc/sphinx/requirements.txt
@@ -5,7 +5,7 @@ charset-normalizer==3.3.2
docutils==0.20.1
idna==3.7
imagesize==1.4.1
-Jinja2==3.1.3
+Jinja2==3.1.4
MarkupSafe==2.1.3
packaging==23.2
Pygments==2.17.2