294740ae70f38ae98c9337a0b3994b235a1d2452
[openwrt/staging/stintel.git] /
1 From 3fed02d930597c53f1c8500aff14581bb87a1e3d Mon Sep 17 00:00:00 2001
2 From: Weijie Gao <weijie.gao@mediatek.com>
3 Date: Fri, 20 May 2022 11:22:31 +0800
4 Subject: [PATCH 07/25] doc: mediatek: add documentation for mt7621 reference
5 boards
6
7 The MT7621 requires external binary blob being executed during u-boot's
8 boot-up flow. It's necessary to provide a guide here for users to correctly
9 build the u-boot.
10
11 Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
12 Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
13 ---
14 doc/board/index.rst | 1 +
15 doc/board/mediatek/index.rst | 9 +++++++
16 doc/board/mediatek/mt7621.rst | 48 +++++++++++++++++++++++++++++++++++
17 3 files changed, 58 insertions(+)
18 create mode 100644 doc/board/mediatek/index.rst
19 create mode 100644 doc/board/mediatek/mt7621.rst
20
21 diff --git a/doc/board/index.rst b/doc/board/index.rst
22 index f90a9cad45..01b99f9cf5 100644
23 --- a/doc/board/index.rst
24 +++ b/doc/board/index.rst
25 @@ -23,6 +23,7 @@ Board-specific doc
26 highbank/index
27 intel/index
28 kontron/index
29 + mediatek/index
30 microchip/index
31 nokia/index
32 nxp/index
33 diff --git a/doc/board/mediatek/index.rst b/doc/board/mediatek/index.rst
34 new file mode 100644
35 index 0000000000..38cd8cb5b2
36 --- /dev/null
37 +++ b/doc/board/mediatek/index.rst
38 @@ -0,0 +1,9 @@
39 +.. SPDX-License-Identifier: GPL-2.0+
40 +
41 +Mediatek
42 +=========
43 +
44 +.. toctree::
45 + :maxdepth: 2
46 +
47 + mt7621
48 diff --git a/doc/board/mediatek/mt7621.rst b/doc/board/mediatek/mt7621.rst
49 new file mode 100644
50 index 0000000000..1662255546
51 --- /dev/null
52 +++ b/doc/board/mediatek/mt7621.rst
53 @@ -0,0 +1,48 @@
54 +.. SPDX-License-Identifier: GPL-2.0
55 +
56 +mt7621_rfb/mt7621_nand_rfb
57 +==========================
58 +
59 +U-Boot for the MediaTek MT7621 boards
60 +
61 +Quick Start
62 +-----------
63 +
64 +- Get the DDR initialization binary blob
65 +- Configure CPU and DDR parameters
66 +- Build U-Boot
67 +
68 +Get the DDR initialization binary blob
69 +--------------------------------------
70 +
71 +Download one from:
72 + - https://raw.githubusercontent.com/mtk-openwrt/mt7621-lowlevel-preloader/master/mt7621_stage_sram.bin
73 + - https://raw.githubusercontent.com/mtk-openwrt/mt7621-lowlevel-preloader/master/mt7621_stage_sram_noprint.bin
74 +
75 +mt7621_stage_sram_noprint.bin has removed all output logs. To use this one,
76 +download and rename it to mt7621_stage_sram.bin
77 +
78 +Put the binary blob to the u-boot build directory.
79 +
80 +Configure CPU and DDR parameters
81 +--------------------------------
82 +
83 +menuconfig > MIPS architecture > MediaTek MIPS platforms > CPU & DDR configuration
84 +
85 +Select the correct DDR timing parameters for your board. The size shown here
86 +must match the DDR size of you board.
87 +
88 +The frequency of CPU and DDR can also be adjusted.
89 +
90 +Build U-Boot
91 +------------
92 +
93 +.. code-block:: bash
94 +
95 + $ export CROSS_COMPILE=mipsel-linux-
96 + $ make O=build mt7621_rfb_defconfig # or mt7621_nand_rfb_defconfig
97 + $ cp mt7621_stage_sram.bin ./build/mt7621_stage_sram.bin
98 + $ # or cp mt7621_stage_sram_noprint.bin ./build/mt7621_stage_sram.bin
99 + $ make O=build
100 +
101 +Burn the u-boot-mt7621.bin to the SPI-NOR or NAND flash.
102 --
103 2.36.1
104