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