blob: 0fccc14b8073e045350666609622f353430999a3 [file] [log] [blame]
Heinrich Schuchardt991bf062023-11-11 02:36:37 +01001.. SPDX-License-Identifier: GPL-2.0-or-later
2
3Poplar board
4############
5
6Board Information
7=================
8
9Developed by HiSilicon, the board features the Hi3798C V200 with an
10integrated quad-core 64-bit ARM Cortex A53 processor and high
11performance Mali T720 GPU, making it capable of running any commercial
12set-top solution based on Linux or Android. Its high performance
13specification also supports a premium user experience with up to H.265
14HEVC decoding of 4K video at 60 frames per second.
15
16* SOC Hisilicon Hi3798CV200
17* CPU Quad-core ARM Cortex-A53 64 bit
18* DRAM DDR3/3L/4 SDRAM interface, maximum 32-bit data width 2 GB
19* USB Two USB 2.0 ports One USB 3.0 ports
20* CONSOLE USB-micro port for console support
21* ETHERNET 1 GBe Ethernet
22* PCIE One PCIe 2.0 interfaces
23* JTAG 8-Pin JTAG
24* EXPANSION INTERFACE Linaro 96Boards Low Speed Expansion slot
25* DIMENSION Standard 160×120 mm 96Boards Enterprice Edition form factor
26* WIFI 802.11AC 2*2 with Bluetooth
27* CONNECTORS One connector for Smart Card One connector for TSI
28
29Build instructions
30==================
31
32.. note::
33
34 U-Boot has a **strong** dependency with the l-loader and the ARM trusted
35 firmware repositories.
36
37The boot sequence is::
38
39 l-loader --> arm_trusted_firmware --> U-Boot
40
41U-Boot needs to be aware of the BL31 runtime location and size to avoid writing
42over it. Currently, BL31 is being placed below the kernel text offset (check
43poplar.c) but this could change in the future.
44
45The current version of U-Boot has been tested with
46
47- https://github.com/Linaro/poplar-l-loader.git::
48
49 commit f0988698dcc5c08bd0a8f50aa0457e138a5f438c
50 Author: Alex Elder <elder@linaro.org>
51 Date: Fri Jun 16 08:57:59 2017 -0500
52
53 l-loader: use external memory region definitions
54
55 The ARM Trusted Firmware code now has a header file that collects
56 all the definitions for the memory regions used for its boot stages.
57 Include that file where needed, and use the definitions found therein
58
59 Signed-off-by: Alex Elder <elder@linaro.org>
60
61- https://github.com/Linaro/poplar-arm-trusted-firmware.git::
62
63 commit 6ac42dd3be13c99aa8ce29a15073e2f19d935f68
64 Author: Alex Elder <elder@linaro.org>
65 Date: Fri Jun 16 09:24:50 2017 -0500
66
67 poplar: define memory regions in a separate file
68
69 Separate the definitions for memory regions used for the BL stage
70 images and FIP into a new file. The "l-loader" image uses knowledge
71 of the sizes and locations of these memory regions, and it can now
72 include this (external) header to get these definitions, rather than
73 having to make coordinated changes to both code bases.
74
75 The new file has a complete set of definitions (more than may be
76 required by one or the other user). It also includes a summary of
77 how the boot process works, and how it uses these regions.
78
79 It should now be relatively easy to adjust the sizes and locations
80 of these memory regions, or to add to them (e.g. for TEE).
81
82 Signed-off-by: Alex Elder <elder@linaro.org>
83
84
85Compile from source
86-------------------
87
88Get all the sources
89
90.. code-block:: bash
91
92 mkdir -p ~/poplar/src ~/poplar/bin
93 cd ~/poplar/src
94 git clone https://github.com/Linaro/poplar-l-loader.git l-loader
95 git clone https://github.com/Linaro/poplar-arm-trusted-firmware.git atf
96 git clone https://github.com/Linaro/poplar-U-Boot.git U-Boot
97
98Make sure you are using the correct branch on each one of these repositories.
99The definition of "correct" might change over time (at this moment in time this
100would be the "latest" branch).
101
102Compile U-Boot
103~~~~~~~~~~~~~~
104
105Prerequisite:
106
107.. code-block:: bash
108
109 sudo apt-get install device-tree-compiler
110
111.. code-block:: bash
112
113 cd ~/poplar/src/U-Boot
114 make CROSS_COMPILE=aarch64-linux-gnu- poplar_defconfig
115 make CROSS_COMPILE=aarch64-linux-gnu-
116 cp U-Boot.bin ~/poplar/bin
117
118Compile ARM Trusted Firmware (ATF)
119~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
120
121.. code-block:: bash
122
123 cd ~/poplar/src/atf
124 make CROSS_COMPILE=aarch64-linux-gnu- all fip \
125 SPD=none BL33=~/poplar/bin/U-Boot.bin DEBUG=1 PLAT=poplar
126
127Copy resulting binaries
128
129.. code-block:: bash
130
131 cp build/hi3798cv200/debug/bl1.bin ~/poplar/src/l-loader/atf/
132 cp build/hi3798cv200/debug/fip.bin ~/poplar/src/l-loader/atf/
133
134Compile l-loader
135~~~~~~~~~~~~~~~~
136
137.. code-block:: bash
138
139 cd ~/poplar/src/l-loader
140 make clean
141 make CROSS_COMPILE=arm-linux-gnueabi-
142
143Due to BootROM requiremets, rename l-loader.bin to fastboot.bin:
144
145.. code-block:: bash
146
147 cp l-loader.bin ~/poplar/bin/fastboot.bin
148
149Flash instructions
150==================
151
152Two methods:
153
154Using USB debrick support
155 Copy fastboot.bin to a FAT partition on the USB drive and reboot the
156 poplar board while pressing S3(usb_boot).
157
158 The system will execute the new U-Boot and boot into a shell which you
159 can then use to write to eMMC.
160
161Using U-BOOT from shell
162 1) using AXIS usb ethernet dongle and tftp
163 2) using FAT formated USB drive
164
165Flash using TFTP (USB ethernet dongle)
166--------------------------------------
167
168Plug a USB AXIS ethernet dongle on any of the USB2 ports on the Poplar board.
169Copy fastboot.bin to your tftp server.
170In U-Boot make sure your network is properly setup.
171
172Then::
173
174 => tftp 0x30000000 fastboot.bin
175 starting USB...
176 USB0: USB EHCI 1.00
177 scanning bus 0 for devices... 1 USB Device(s) found
178 USB1: USB EHCI 1.00
179 scanning bus 1 for devices... 3 USB Device(s) found
180 scanning usb for storage devices... 0 Storage Device(s) found
181 scanning usb for ethernet devices... 1 Ethernet Device(s) found
182 Waiting for Ethernet connection... done.
183 Using asx0 device
184 TFTP from server 192.168.1.4; our IP address is 192.168.1.10
185 Filename 'poplar/fastboot.bin'.
186 Load address: 0x30000000
187 Loading: #################################################################
188 #################################################################
189 ###############################################################
190 2 MiB/s
191 done
192 Bytes transferred = 983040 (f0000 hex)
193
194 => mmc write 0x30000000 0 0x780
195
196 MMC write: dev # 0, block # 0, count 1920 ... 1920 blocks written: OK
197 => reset
198
199Flash using USB FAT drive
200-------------------------
201
202Copy fastboot.bin to any partition on a FAT32 formated usb flash drive.
203Enter the uboot prompt::
204
205 => fatls usb 0:2
206 983040 fastboot.bin
207
208 1 file(s), 0 dir(s)
209
210 => fatload usb 0:2 0x30000000 fastboot.bin
211 reading fastboot.bin
212 983040 bytes read in 44 ms (21.3 MiB/s)
213
214 => mmc write 0x30000000 0 0x780
215
216 MMC write: dev # 0, block # 0, count 1920 ... 1920 blocks written: OK
217
218Boot trace
219==========
220
221::
222
223 Bootrom start
224 Boot Media: eMMC
225 Decrypt auxiliary code ...OK
226
227 lsadc voltage min: 000000FE, max: 000000FF, aver: 000000FE, index: 00000000
228
229 Entry boot auxiliary code
230
231 Auxiliary code - v1.00
232 DDR code - V1.1.2 20160205
233 Build: Mar 24 2016 - 17:09:44
234 Reg Version: v134
235 Reg Time: 2016/03/18 09:44:55
236 Reg Name: hi3798cv2dmb_hi3798cv200_ddr3_2gbyte_8bitx4_4layers.reg
237
238 Boot auxiliary code success
239 Bootrom success
240
241 LOADER: Switched to aarch64 mode
242 LOADER: Entering ARM TRUSTED FIRMWARE
243 LOADER: CPU0 executes at 0x000ce000
244
245 INFO: BL1: 0xe1000 - 0xe7000 [size = 24576]
246 NOTICE: Booting Trusted Firmware
247 NOTICE: BL1: v1.3(debug):v1.3-372-g1ba9c60
248 NOTICE: BL1: Built : 17:51:33, Apr 30 2017
249 INFO: BL1: RAM 0xe1000 - 0xe7000
250 INFO: BL1: Loading BL2
251 INFO: Loading image id=1 at address 0xe9000
252 INFO: Image id=1 loaded at address 0xe9000, size = 0x5008
253 NOTICE: BL1: Booting BL2
254 INFO: Entry point address = 0xe9000
255 INFO: SPSR = 0x3c5
256 NOTICE: BL2: v1.3(debug):v1.3-372-g1ba9c60
257 NOTICE: BL2: Built : 17:51:33, Apr 30 2017
258 INFO: BL2: Loading BL31
259 INFO: Loading image id=3 at address 0x129000
260 INFO: Image id=3 loaded at address 0x129000, size = 0x8038
261 INFO: BL2: Loading BL33
262 INFO: Loading image id=5 at address 0x37000000
263 INFO: Image id=5 loaded at address 0x37000000, size = 0x58f17
264 NOTICE: BL1: Booting BL31
265 INFO: Entry point address = 0x129000
266 INFO: SPSR = 0x3cd
267 INFO: Boot bl33 from 0x37000000 for 364311 Bytes
268 NOTICE: BL31: v1.3(debug):v1.3-372-g1ba9c60
269 NOTICE: BL31: Built : 17:51:33, Apr 30 2017
270 INFO: BL31: Initializing runtime services
271 INFO: BL31: Preparing for EL3 exit to normal world
272 INFO: Entry point address = 0x37000000
273 INFO: SPSR = 0x3c9
274
275 U-Boot 2017.05-rc2-00130-gd2255b0 (Apr 30 2017 - 17:51:28 +0200)poplar
276
277 Model: HiSilicon Poplar Development Board
278 BOARD: Hisilicon HI3798cv200 Poplar
279 DRAM: 1 GiB
280 MMC: Hisilicon DWMMC: 0
281 In: serial@f8b00000
282 Out: serial@f8b00000
283 Err: serial@f8b00000
284 Net: Net Initialization Skipped
285 No ethernet found.
286
287 Hit any key to stop autoboot: 0
288 starting USB...
289 USB0: USB EHCI 1.00
290 scanning bus 0 for devices... 1 USB Device(s) found
291 USB1: USB EHCI 1.00
292 scanning bus 1 for devices... 4 USB Device(s) found
293 scanning usb for storage devices... 1 Storage Device(s) found
294 scanning usb for ethernet devices... 1 Ethernet Device(s) found
295
296 USB device 0:
297 Device 0: Vendor: SanDisk Rev: 1.00 Prod: Cruzer Blade
298 Type: Removable Hard Disk
299 Capacity: 7632.0 MB = 7.4 GB (15630336 x 512)
300 ... is now current device
301 Scanning usb 0:1...
302 =>