hikey
Subsystems (3)
cover hikey
Hi folks,
This patchset start the conversion of the hikey U-Boot port over to being DT enabled. As more DT lands in the upstream kernel the plan is to convert more drivers in U-Boot to use it. Currently only serial driver is using DT, and the other drivers still use platform data.
It also updates and simplifies the README, including updating the mcuimage.bin location which leads to the additional a53 cores not coming online correctly if using an outdated binary.
Additionally I've added myself as MAINTAINER of the hikey U-Boot port.
regards,
Peter.
Peter Griffin (7):
ARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.
MAINTAINERS: Add myself as maintainer for hikey
ARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.
ARM: hisilicon: hikey: Implement reset_cpu() for hikey.
ARM: hisilicon: hikey: dts: Add pl011 additional clock binding.
ARM: hisilicon: hikey: Align memory node with upstream kernel
ARM: hikey: Simplify README instructions.
MAINTAINERS | 6 + arch/arm/Kconfig | 1 + arch/arm/dts/Makefile | 2 + arch/arm/dts/hi6220-hikey.dts | 41 ++++++ arch/arm/dts/hi6220.dtsi | 218 +++++++++++++++++++++++++++++++ board/hisilicon/hikey/MAINTAINERS | 6 + board/hisilicon/hikey/README | 95 +++++++------- board/hisilicon/hikey/hikey.c | 37 +++++- configs/hikey_defconfig | 1 + include/configs/hikey.h | 2 +- include/dt-bindings/clock/hi6220-clock.h | 173 ++++++++++++++++++++++++ 11 files changed, 532 insertions(+), 50 deletions(-) create mode 100644 arch/arm/dts/hi6220-hikey.dts create mode 100644 arch/arm/dts/hi6220.dtsi create mode 100644 board/hisilicon/hikey/MAINTAINERS create mode 100644 include/dt-bindings/clock/hi6220-clock.h
Signature · 1 line
1.9.1
PATCH 1/7 ARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.
Import the upstream kernel dts into U-Boot. Currently only serial is supported, but a lot more DT changes are queued for v4.7.
--- arch/arm/dts/hi6220-hikey.dts | 41 ++++++ arch/arm/dts/hi6220.dtsi | 213 +++++++++++++++++++++++++++++++ include/dt-bindings/clock/hi6220-clock.h | 173 +++++++++++++++++++++++++ 3 files changed, 427 insertions(+) create mode 100644 arch/arm/dts/hi6220-hikey.dts create mode 100644 arch/arm/dts/hi6220.dtsi create mode 100644 include/dt-bindings/clock/hi6220-clock.h
arch/arm/dts/hi6220-hikey.dts new file +41 -0
@@ -0,0 +1,41 @@ +/* + * dts file for Hisilicon HiKey Development Board + * + * Copyright (C) 2015, Hisilicon Ltd. + * + */ + +/dts-v1/; + +/*Reserved 1MB memory for MCU*/ +/memreserve/ 0x05e00000 0x00100000; + +#include "hi6220.dtsi" + +/ { + model = "HiKey Development Board"; + compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220"; + + aliases { + serial0 = &uart0; /* On board UART0 */ + serial1 = &uart1; /* BT UART */ + serial2 = &uart2; /* LS Expansion UART0 */ + serial3 = &uart3; /* LS Expansion UART1 */ + }; + + chosen { + stdout-path = "serial3:115200n8"; + }; + + memory at 0 { + device_type = "memory"; + reg = <0x0 0x0 0x0 0x40000000>; + }; +}; + +&uart2 { + label = "LS-UART0"; +}; +&uart3 { + label = "LS-UART1"; +};
arch/arm/dts/hi6220.dtsi new file +213 -0
213 lines not on this page · raw message
include/dt-bindings/clock/hi6220-clock.h new file +173 -0
173 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH 1/7 ARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.
Quoted 5 lines · Peter Griffin
Import the upstream kernel dts into U-Boot. Currently only serial is supported, but a lot more DT changes are queued for v4.7.
Signed-off-by Peter Griffin <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/d938eabf/attachment-0001.sig>
PATCH 1/7 ARM: hisilicon: hikey: Add hikey & hi6220 dts from v4.6-rc3.
In reply to Peter GriffinQuoted 6 lines · Peter Griffin
Import the upstream kernel dts into U-Boot. Currently only serial is supported, but a lot more DT changes are queued for v4.7.
Signed-off-by Peter Griffin <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/685bd478/attachment.sig>
PATCH 2/7 MAINTAINERS: Add myself as maintainer for hikey
In reply to Peter GriffinThis patch adds myself as maintainer for the hikey U-Boot port.
--- MAINTAINERS | 6 ++++++ board/hisilicon/hikey/MAINTAINERS | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 board/hisilicon/hikey/MAINTAINERS
MAINTAINERS +6 -0
@@ -93,6 +93,12 @@ F: arch/arm/include/asm/arch-mx*/ F: arch/arm/include/asm/arch-vf610/ F: arch/arm/include/asm/imx-common/ +ARM HISILICON +M: Peter Griffin <[email protected]> +S: Maintained +F: arch/arm/cpu/armv8/hisilicon +F: arm/include/asm/arch-hi6220/ + ARM MARVELL KIRKWOOD ARMADA-XP ARMADA-38X M: Prafulla Wadaskar <[email protected]> M: Luka Perkov <[email protected]>
board/hisilicon/hikey/MAINTAINERS new file +6 -0
@@ -0,0 +1,6 @@ +HIKEY BOARD +M: Peter Griffin <[email protected]> +S: Maintained +F: board/hisilicon/hikey +F: include/configs/hikey.h +F: configs/hikey_defconfig
Signature · 1 line
1.9.1
PATCH 2/7 MAINTAINERS: Add myself as maintainer for hikey
Quoted 4 lines · Peter Griffin
This patch adds myself as maintainer for the hikey U-Boot port.
Signed-off-by Peter Griffin <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/83df45a4/attachment-0001.sig>
PATCH 2/7 MAINTAINERS: Add myself as maintainer for hikey
In reply to Peter GriffinQuoted 5 lines · Peter Griffin
This patch adds myself as maintainer for the hikey U-Boot port.
Signed-off-by Peter Griffin <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/516aacfa/attachment.sig>
PATCH 3/7 ARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.
In reply to Peter GriffinCurrently only the serial pl01x driver is using DT, and the other drivers still use platform data but as more DT lands in the upstream kernel the aim is to migrate the other drivers over to DT as well to have a fully DT configured hikey u-boot.
--- arch/arm/Kconfig | 1 + arch/arm/dts/Makefile | 2 ++ board/hisilicon/hikey/hikey.c | 3 +++ configs/hikey_defconfig | 1 + 4 files changed, 7 insertions(+)
arch/arm/Kconfig +1 -0
@@ -668,6 +668,7 @@ config TARGET_HIKEY select DM select DM_GPIO select DM_SERIAL + select OF_CONTROL help Support for HiKey 96boards platform. It features a HI6220 SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM.
arch/arm/dts/Makefile +2 -0
@@ -11,6 +11,8 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ exynos4412-trats2.dtb \ exynos4412-odroid.dtb +dtb-$(CONFIG_TARGET_HIKEY) += hi6220-hikey.dtb + dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-spring.dtb \
board/hisilicon/hikey/hikey.c +3 -0
@@ -71,6 +71,8 @@ U_BOOT_DEVICES(hi6220_gpios) = {DECLARE_GLOBAL_DATA_PTR ; +#if !CONFIG_IS_ENABLED (OF_CONTROL ) +static const struct pl01x_serial_platdata serial_platdata = { #if CONFIG_CONS_INDEX == 1 .base = HI6220_UART0_BASE,
@@ -87,6 +89,7 @@ U_BOOT_DEVICE(hikey_seriala) = { .name = "serial_pl01x", .platdata = &serial_platdata, }; +#endif static struct mm_region hikey_mem_map[] = { {
configs/hikey_defconfig +1 -0
@@ -3,3 +3,4 @@ CONFIG_SYS_MALLOC_F_LEN=0x2000 # CONFIG_CMD_IMLS is not set CONFIG_CMD_GPIO=y CONFIG_OF_LIBFDT=y +CONFIG_DEFAULT_DEVICE_TREE="hi6220-hikey"
Signature · 1 line
1.9.1
PATCH 3/7 ARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.
Quoted 7 lines · Peter Griffin
Currently only the serial pl01x driver is using DT, and the other drivers still use platform data but as more DT lands in the upstream kernel the aim is to migrate the other drivers over to DT as well to have a fully DT configured hikey u-boot.
Signed-off-by Peter Griffin <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/3ff948f2/attachment-0001.sig>
PATCH 3/7 ARM: hisilicon: hikey: Enable OF_CONTROL for hikey board.
In reply to Peter GriffinQuoted 8 lines · Peter Griffin
Currently only the serial pl01x driver is using DT, and the other drivers still use platform data but as more DT lands in the upstream kernel the aim is to migrate the other drivers over to DT as well to have a fully DT configured hikey u-boot.
Signed-off-by Peter Griffin <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/808c33b1/attachment.sig>
PATCH 4/7 ARM: hisilicon: hikey: Implement reset_cpu() for hikey.
In reply to Peter GriffinThis allows the reset command to reset the board from u-boot.
=> reset
resetting ...
INFO: BL1: 0xf9810000 - 0xf9818000 [size = 32768] NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(debug):7fb9b0e NOTICE: BL1: Built : 17:06:41, Apr 19 2016
--- board/hisilicon/hikey/hikey.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
board/hisilicon/hikey/hikey.c +2 -2
@@ -414,8 +414,8 @@ void dram_init_banksize(void) gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; } -/* Use the Watchdog to cause reset */ void reset_cpu (ulong addr) { -/* TODO program the watchdog */ +writel (0x48698284 , &ao_sc->stat0); +wfi (); }
Signature · 1 line
1.9.1
PATCH 4/7 ARM: hisilicon: hikey: Implement reset_cpu() for hikey.
Quoted 11 lines · Peter Griffin
This allows the reset command to reset the board from u-boot.
=> reset
resetting ...INFO: BL1: 0xf9810000 - 0xf9818000 [size = 32768] NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(debug):7fb9b0e NOTICE: BL1: Built : 17:06:41, Apr 19 2016Signed-off-by Peter Griffin <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/d1bf11f2/attachment.sig>
PATCH 4/7 ARM: hisilicon: hikey: Implement reset_cpu() for hikey.
In reply to Peter GriffinQuoted 5 lines · Peter Griffin
This allows the reset command to reset the board from u-boot.
=> reset
resetting ...
Quoted 7 lines
INFO: BL1: 0xf9810000 - 0xf9818000 [size = 32768] NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.1(debug):7fb9b0e NOTICE: BL1: Built : 17:06:41, Apr 19 2016Signed-off-by Peter Griffin <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/22a82223/attachment.sig>
PATCH 5/7 ARM: hisilicon: hikey: dts: Add pl011 additional clock binding.
In reply to Peter GriffinThis is a binding which only exists in U-Boot, but is required to get working serial in U-Boot.
--- arch/arm/dts/hi6220.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm/dts/hi6220.dtsi +5 -0
@@ -166,6 +166,7 @@ compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xf8015000 0x0 0x1000>; interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>; + clock = <19200000>; clocks = <&ao_ctrl HI6220_UART0_PCLK>, <&ao_ctrl HI6220_UART0_PCLK>; clock-names = "uartclk", "apb_pclk";
@@ -175,6 +176,7 @@ compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xf7111000 0x0 0x1000>; interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>; + clock = <19200000>; clocks = <&sys_ctrl HI6220_UART1_PCLK>, <&sys_ctrl HI6220_UART1_PCLK>; clock-names = "uartclk", "apb_pclk";
@@ -185,6 +187,7 @@ compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xf7112000 0x0 0x1000>; interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; + clock = <19200000>; clocks = <&sys_ctrl HI6220_UART2_PCLK>, <&sys_ctrl HI6220_UART2_PCLK>; clock-names = "uartclk", "apb_pclk";
@@ -195,6 +198,7 @@ compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xf7113000 0x0 0x1000>; interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>; + clock = <19200000>; clocks = <&sys_ctrl HI6220_UART3_PCLK>, <&sys_ctrl HI6220_UART3_PCLK>; clock-names = "uartclk", "apb_pclk";
@@ -204,6 +208,7 @@ compatible = "arm,pl011", "arm,primecell"; reg = <0x0 0xf7114000 0x0 0x1000>; interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>; + clock = <19200000>; clocks = <&sys_ctrl HI6220_UART4_PCLK>, <&sys_ctrl HI6220_UART4_PCLK>; clock-names = "uartclk", "apb_pclk";
Signature · 1 line
1.9.1
PATCH 5/7 ARM: hisilicon: hikey: dts: Add pl011 additional clock binding.
Quoted 4 lines · Peter Griffin
This is a binding which only exists in U-Boot, but is required to get working serial in U-Boot.
Signed-off-by Peter Griffin <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/a050e0ac/attachment.sig>
PATCH 5/7 ARM: hisilicon: hikey: dts: Add pl011 additional clock binding.
In reply to Peter GriffinQuoted 5 lines · Peter Griffin
This is a binding which only exists in U-Boot, but is required to get working serial in U-Boot.
Signed-off-by Peter Griffin <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/3aca49f6/attachment.sig>
PATCH 6/7 ARM: hisilicon: hikey: Align memory node with upstream kernel
In reply to Peter GriffinThe memory node gets automatically generated by U-Boot in arch_fixup_fdt(), before passing control to the kernel using U-Boots representation of the dram banks.
However the upstream kernel uses the memory node to carve-out regions of RAM for various purposes. To make this work without changing arch_fixup_fdt() which will effect many platforms we replicate the upstream memory node layout using the dram banks.
--- board/hisilicon/hikey/hikey.c | 30 +++++++++++++++++++++++++++++- include/configs/hikey.h | 2 +- 2 files changed, 30 insertions(+), 2 deletions(-)
board/hisilicon/hikey/hikey.c +29 -1
@@ -410,8 +410,36 @@ int dram_init(void)void dram_init_banksize (void ) { +/* +* Reserve regions below from DT memory node (which gets generated +* by U-Boot from the dram banks in arch_fixup_fdt() before booting +* the kernel. This will then match the kernel hikey dts memory node. +* +* 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using +* 0x05f0,1000 - 0x05f0,1fff: Reboot reason +* 0x06df,f000 - 0x06df,ffff: Mailbox message data +* 0x0740,f000 - 0x0740,ffff: MCU firmware section +* 0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer +* 0x3e00,0000 - 0x3fff,ffff: OP-TEE +*/ + gd->bd->bi_dram[0 ].start =PHYS_SDRAM_1 ; - gd->bd->bi_dram[0 ].size =PHYS_SDRAM_1_SIZE ; + gd->bd->bi_dram[0 ].size =0x05e00000 ; + + gd->bd->bi_dram[1 ].start =0x05f00000 ; + gd->bd->bi_dram[1 ].size =0x00001000 ; + + gd->bd->bi_dram[2 ].start =0x05f02000 ; + gd->bd->bi_dram[2 ].size =0x00efd000 ; + + gd->bd->bi_dram[3 ].start =0x06e00000 ; + gd->bd->bi_dram[3 ].size =0x0060f000 ; + + gd->bd->bi_dram[4 ].start =0x07410000 ; + gd->bd->bi_dram[4 ].size =0x1aaf0000 ; + + gd->bd->bi_dram[5 ].start =0x22000000 ; + gd->bd->bi_dram[5 ].size =0x1c000000 ; }void reset_cpu (ulong addr)
include/configs/hikey.h +1 -1
@@ -33,7 +33,7 @@/* CONFIG_SYS_TEXT_BASE needs to align with where ATF loads bl33.bin */ #define CONFIG_SYS_TEXT_BASE 0x35000000 -#define CONFIG_NR_DRAM_BANKS 1 +#define CONFIG_NR_DRAM_BANKS 6#define PHYS_SDRAM_1 0x00000000/* 1008 MB (the last 16Mb are secured for TrustZone by ATF*/
Signature · 1 line
1.9.1
PATCH 6/7 ARM: hisilicon: hikey: Align memory node with upstream kernel
Quoted 11 lines · Peter Griffin
The memory node gets automatically generated by U-Boot in
arch_fixup_fdt(), before passing control to the kernel using U-Boots representation of the dram banks.However the upstream kernel uses the memory node to carve-out regions of RAM for various purposes. To make this work without changing
arch_fixup_fdt()which will effect many platforms we replicate the upstream memory node layout using the dram banks.Signed-off-by Peter Griffin <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/dc0ac615/attachment.sig>
PATCH 6/7 ARM: hisilicon: hikey: Align memory node with upstream kernel
In reply to Peter GriffinQuoted 4 lines · Peter Griffin
The memory node gets automatically generated by U-Boot in
arch_fixup_fdt(), before passing control to the kernel using U-Boots representation of the dram banks.
Quoted 8 lines
However the upstream kernel uses the memory node to carve-out regions of RAM for various purposes. To make this work without changing
arch_fixup_fdt()which will effect many platforms we replicate the upstream memory node layout using the dram banks.Signed-off-by Peter Griffin <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/bd17afc3/attachment.sig>
PATCH 7/7 ARM: hikey: Simplify README instructions.
In reply to Peter GriffinThis patch updates and simplifies the hikey README. The old instructions were hard to follow, and convoluted.
This patch also updates the link to the mcuimage.bin which was outdated.
Using an outdated mcuimage.bin results in the additional a53 cores not coming online when the kernel issues PSCI requests to arm trusted firmware (ATF).
--- board/hisilicon/hikey/README | 95 +++++++++++++++++++++++--------------------- 1 file changed, 49 insertions(+), 46 deletions(-)
board/hisilicon/hikey/README +49 -46
@@ -22,50 +22,55 @@ Currently the u-boot port supports: - * SD card * GPIO -Compile u-boot -============== +The HiKey U-Boot port has been tested with l-loader, booting ATF, which then boots +U-Boot as the bl33.bin executable. - > mkdir -p ./aarch64/bin - > cd ./aarch64 - > git clone http://git.denx.de/u-boot.git - > make CROSS_COMPILE=aarch64-linux-gnu- hikey_config - > make CROSS_COMPILE=aarch64-linux-gnu- - > cp u-boot.bin ./aarch64/bin/u-boot-hikey.bin +Compile from source +=================== -ARM Trusted Firmware (ATF) & l-loader -===================================== +First get all the sources -This u-boot port has been tested with l-loader, booting ATF, which then boots -u-boot as the bl33.bin executable. + > mkdir -p ~/hikey/src ~/hikey/bin + > cd ~/hikey/src + > git clone https://github.com/96boards/edk2.git + > git clone https://github.com/96boards/arm-trusted-firmware.git + > git clone https://github.com/96boards/l-loader.git + > git clone https://github.com/96boards/burn-boot.git -Get the BL30 mcu binary. - > wget -P aarch64/bin https://builds.96boards.org/releases/hikey/linaro/binaries/15.05/mcuimage.bin +Get the BL30 mcuimage.bin binary. It is shipped as part of the UEFI source. +The latest version can be obtained from the edk2 repo. -1. Get ATF source code - > cd ./aarch64 - > git clone https://github.com/96boards/arm-trusted-firmware.git - > cd ./arm-trusted-firmware + > cp edk2/HisiPkg/HiKeyPkg/NonFree/mcuimage.bin ~/hikey/bin/ -2. Compile ATF, I use the build-tf.mak in the directory with this README, and copy it to ATF directory - > cp ../u-boot/board/hisilicon/hikey/build-tf.mak . - > make -f build-tf.mak build +Get nvme.img binary (check this link is still the latest) + > wget -P ~/hikey/bin https://builds.96boards.org/releases/reference-platform/debian/hikey/16.03/bootloader/nvme.img -3. Get l-loader - > cd ../ - > git clone https://github.com/96boards/l-loader.git - > cd ./l-loader +Compile U-Boot +============== -4. Make sym links to ATF bl1 / fip binaries - > ln -s ../bin/bl1-hikey.bin bl1.bin - > ln -s ../bin/fip-hikey.bin fip.bin + > cd ~/hikey/src/u-boot + > make CROSS_COMPILE=aarch64-linux-gnu- hikey_config + > make CROSS_COMPILE=aarch64-linux-gnu- + > cp u-boot.bin ~/hikey/bin + +Compile ARM Trusted Firmware (ATF) +================================== + + > cd ~/hikey/src/atf + > make CROSS_COMPILE=aarch64-linux-gnu- all fip \ + BL30=~/hikey/bin/mcuimage.bin \ + BL33=~/hikey/bin/u-boot.bin DEBUG=1 PLAT=hikey - > arm-linux-gnueabihf-gcc -c -o start.o start.S - > arm-linux-gnueabihf-gcc -c -o debug.o debug.S - > arm-linux-gnueabihf-ld -Bstatic -Tl-loader.lds -Ttext 0xf9800800 start.o debug.o -o loader - > arm-linux-gnueabihf-objcopy -O binary loader temp - > python gen_loader.py -o ../bin/l-loader.bin --img_loader=temp --img_bl1=bl1.bin - > sudo bash -x generate_ptable.sh - > python gen_loader.py -o ../bin/ptable.img --img_prm_ptable=./prm_ptable.img --img_sec_ptable=./sec_ptable.img +Copy resulting binaries + > cp build/hikey/debug/bl1.bin ~/hikey/bin + > cp build/hikey/debug/fip.bin ~/hikey/bin + +Compile l-loader +=============== + > cd ~/hikey/l-loader + > make BL1=~/hikey/bin/bl1.bin all + > cp *.img ~/hikey/bin + > cp l-loader.bin ~/hikey.bin These instructions are adapted from https://github.com/96boards/documentation/wiki/HiKeyUEFI
@@ -74,15 +79,12 @@ FLASHING ======== 1. Connect the second jumper on J15 BOOT SEL, to go into recovery mode and flash l-loader.bin with -fastboot using the hisi-idt.py utility. - - > cd ../ - > git clone https://github.com/96boards/burn-boot.git +the hisi-idt.py utility. The command below assumes HiKey enumerated as the first USB serial port - > sudo ./burn-boot/hisi-idt.py -d /dev/ttyUSB0 --img1=./bin/l-loader.bin + > sudo ~/hikey/burn_boot/hisi-idt.py -d /dev/ttyUSB0 --img1=~/hikey/bin/l-loader.bin -2. Once LED 0 comes on solid, it should be detected as a fastboot device by plugging a USB A to mini B +2. Once LED 0 comes on solid, HiKey board should be detected as a fastboot device by plugging a USB A to mini B cable from your PC to the USB OTG port of HiKey (on some boards I've found this to be unreliable). > sudo fastboot devices
@@ -90,10 +92,10 @@ The command below assumes HiKey enumerated as the first USB serial port 0123456789ABCDEF fastboot 3. Flash the images - > wget -P aarch64/bin wget https://builds.96boards.org/releases/hikey/linaro/binaries/latest/nvme.img - > sudo fastboot flash ptable ./bin/ptable.img - > sudo fastboot flash fastboot ./bin/fip-hikey.bin - > sudo fastboot flash nvme ./bin/nvme.img + + > sudo fastboot flash ptable ~/hikey/bin/ptable.img + > sudo fastboot flash fastboot ~/hikey/bin/fip.bin + > sudo fastboot flash nvme ~/hikey/bin/nvme.img 4. Disconnect second jumper on J15 BOOT SEL, and reset the board and you will now (hopefully) have ATF, booting u-boot from eMMC. On 'new' boards I've had to do the
@@ -102,7 +104,8 @@ The command below assumes HiKey enumerated as the first USB serial port Note: To get USB host working, also disconnect the USB OTG cable used for flashing. Otherwise you will get 'dwc_otg_core_host_init: Timeout!' errors. -See working boot trace below: - +See working boot trace below (by default trace is now output to UART3 not UART0 on latest +ATF, U-Boot and Kernel sources): - debug EMMC boot: send RST_N . debug EMMC boot: start eMMC boot......
Signature · 1 line
1.9.1
PATCH 7/7 ARM: hikey: Simplify README instructions.
Quoted 10 lines · Peter Griffin
This patch updates and simplifies the hikey README. The old instructions were hard to follow, and convoluted.
This patch also updates the link to the mcuimage.bin which was outdated.
Using an outdated mcuimage.bin results in the additional a53 cores not coming online when the kernel issues PSCI requests to arm trusted firmware (ATF).
Signed-off-by Peter Griffin <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160421/f04e139f/attachment.sig>
PATCH 7/7 ARM: hikey: Simplify README instructions.
In reply to Peter GriffinQuoted 11 lines · Peter Griffin
This patch updates and simplifies the hikey README. The old instructions were hard to follow, and convoluted.
This patch also updates the link to the mcuimage.bin which was outdated.
Using an outdated mcuimage.bin results in the additional a53 cores not coming online when the kernel issues PSCI requests to arm trusted firmware (ATF).
Signed-off-by Peter Griffin <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160425/7c7dc79b/attachment.sig>