[U-Boot] [PATCH 6/6] ARM64: HiKey: hi6220: Add u-boot support for the 96boards CE HiKey board.

Simon Glass sjg at chromium.org
Mon Jul 6 18:39:27 CEST 2015


Hi Peter,

On 6 July 2015 at 05:50, Peter Griffin <peter.griffin at linaro.org> wrote:
> Hi Simon,
>
>> >
>> > It has been tested with Arm Trusted Firmware running u-boot as the BL33
>> > executable.
>>
>> Are there instructions somewhere on how to do this? Perhaps add a
>> README with details or a few links?
>
>
> There are some slightly old instructions here
> http://people.linaro.org/~peter.griffin/hikey/hikey-u-boot-release_r1/u-boot-readme.txt
>
>>
>>
>> Are there instructions somewhere on how to do this? Perhaps add a
>> README with details or a few links?
>
>
> Yes good idea, I will include a README with the v2 patchset which includes
> some of this info.
>
>>
>>
>> >
>> > Notes:
>> >
>> > eMMC has been tested with basic reading of eMMC partition intto DDR. I
>> > have not
>> > tested writing / erasing. I suspect due to lack of clock control it
>> > won't be
>> > running in the most performant high speed mode.
>> >
>> > SD card slot has been tested for reading and booting kernels into DDR.
>> > It is also currently used for saving the u-boot enviroment.
>> >
>> > USB has been tested with ASIX networking adapter to tftpboot kernels
>> > into DDR. USB mass storage device enumeration doesn't currently work for
>> > an unkown reason.
>> >
>> > GPIO has been tested using gpio toggle GPIO4_1-3 to flash LEDs.
>> >
>> > Basic SoC datasheet can be found here: -
>> > https://github.com/96boards/documentation/blob/master/hikey/
>> > Hi6220V100_Multi-Mode_Application_Processor_Function_Description.pdf
>> >
>> > Board schematic can be found here: -
>> > https://github.com/96boards/documentation/blob/master/hikey/
>> > 96Boards-Hikey-Rev-A1.pdf
>> >
>> > Signed-off-by: Peter Griffin <peter.griffin at linaro.org>
>> > ---
>> >  arch/arm/Kconfig                |   5 +
>> >  board/96boards/hikey64/Kconfig  |  12 ++
>> >  board/96boards/hikey64/Makefile |   8 +
>> >  board/96boards/hikey64/hikey.c  | 439
>> > ++++++++++++++++++++++++++++++++++++++++
>> >  configs/hikey_aemv8a_defconfig  |   5 +
>> >  include/configs/hikey_aemv8a.h  | 187 +++++++++++++++++
>> >  6 files changed, 656 insertions(+)
>> >  create mode 100644 board/96boards/hikey64/Kconfig
>> >  create mode 100644 board/96boards/hikey64/Makefile
>> >  create mode 100644 board/96boards/hikey64/hikey.c
>> >  create mode 100644 configs/hikey_aemv8a_defconfig
>> >  create mode 100644 include/configs/hikey_aemv8a.h
>> >
>> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
>> > index 7ed0e20..0b6de5d 100644
>> > --- a/arch/arm/Kconfig
>> > +++ b/arch/arm/Kconfig
>> > @@ -656,6 +656,10 @@ config TARGET_LS2085A_SIMU
>> >         select ARM64
>> >         select ARMV8_MULTIENTRY
>> >
>> > +config TARGET_96BOARDS_HIKEY
>> > +       bool "Support HiKey 96boards Consumer Edition Platform"
>> > +       select ARM64
>> > +
>> >  config TARGET_LS1021AQDS
>> >         bool "Support ls1021aqds"
>> >         select CPU_V7
>> > @@ -787,6 +791,7 @@ source "board/armadeus/apf27/Kconfig"
>> >  source "board/armltd/integrator/Kconfig"
>> >  source "board/armltd/vexpress/Kconfig"
>> >  source "board/armltd/vexpress64/Kconfig"
>> > +source "board/96boards/hikey64/Kconfig"
>> >  source "board/bachmann/ot1200/Kconfig"
>> >  source "board/balloon3/Kconfig"
>> >  source "board/barco/platinum/Kconfig"
>> > diff --git a/board/96boards/hikey64/Kconfig
>> > b/board/96boards/hikey64/Kconfig
>> > new file mode 100644
>> > index 0000000..eb1709b
>> > --- /dev/null
>> > +++ b/board/96boards/hikey64/Kconfig
>> > @@ -0,0 +1,12 @@
>> > +if TARGET_96BOARDS_HIKEY
>> > +
>> > +config SYS_BOARD
>> > +       default "hikey64"
>> > +
>> > +config SYS_VENDOR
>> > +       default "96boards"
>> > +
>> > +config SYS_CONFIG_NAME
>> > +       default "hikey_aemv8a"
>> > +
>> > +endif
>> > diff --git a/board/96boards/hikey64/Makefile
>> > b/board/96boards/hikey64/Makefile
>> > new file mode 100644
>> > index 0000000..d4ec8c7
>> > --- /dev/null
>> > +++ b/board/96boards/hikey64/Makefile
>> > @@ -0,0 +1,8 @@
>> > +#
>> > +# (C) Copyright 2000-2004
>> > +# Wolfgang Denk, DENX Software Engineering, wd at denx.de.
>> > +#
>> > +# SPDX-License-Identifier:     GPL-2.0+
>> > +#
>> > +
>> > +obj-y  := hikey.o
>> > diff --git a/board/96boards/hikey64/hikey.c
>> > b/board/96boards/hikey64/hikey.c
>> > new file mode 100644
>> > index 0000000..91e8e6b
>> > --- /dev/null
>> > +++ b/board/96boards/hikey64/hikey.c
>> > @@ -0,0 +1,439 @@
>> > +/*
>> > + * (C) Copyright 2015 Linaro
>> > + * Peter Griffin <peter.griffin at linaro.org>
>> > + *
>> > + * SPDX-License-Identifier:    GPL-2.0+
>> > + */
>> > +#include <common.h>
>> > +#include <dm.h>
>> > +#include <malloc.h>
>> > +#include <errno.h>
>> > +#include <netdev.h>
>> > +#include <asm/io.h>
>> > +#include <asm-generic/gpio.h>
>> > +#include <asm/arch/gpio.h>
>> > +#include <asm/arch/dwmmc.h>
>> > +#include <asm/arch/hi6220.h>
>> > +#include <asm/arch/hi6553.h>
>> > +
>> > +#ifdef CONFIG_DM_GPIO
>> > +static const struct hikey_gpio_platdata hi6220_gpio[] = {
>> > +       { 0, HI6220_GPIO0_BASE},
>> > +       { 1, HI6220_GPIO1_BASE},
>> > +       { 2, HI6220_GPIO2_BASE},
>> > +       { 3, HI6220_GPIO3_BASE},
>> > +       { 4, HI6220_GPIO4_BASE},
>> > +       { 5, HI6220_GPIO5_BASE},
>> > +       { 6, HI6220_GPIO6_BASE},
>> > +       { 7, HI6220_GPIO7_BASE},
>> > +       { 8, HI6220_GPIO8_BASE},
>> > +       { 9, HI6220_GPIO9_BASE},
>> > +       { 10, HI6220_GPIO10_BASE},
>> > +       { 11, HI6220_GPIO11_BASE},
>> > +       { 12, HI6220_GPIO12_BASE},
>> > +       { 13, HI6220_GPIO13_BASE},
>> > +       { 14, HI6220_GPIO14_BASE},
>> > +       { 15, HI6220_GPIO15_BASE},
>> > +       { 16, HI6220_GPIO16_BASE},
>> > +       { 17, HI6220_GPIO17_BASE},
>> > +       { 18, HI6220_GPIO18_BASE},
>> > +       { 19, HI6220_GPIO19_BASE},
>> > +
>> > +};
>> > +
>> > +U_BOOT_DEVICES(hi6220_gpios) = {
>> > +       { "gpio_hi6220", &hi6220_gpio[0] },
>> > +       { "gpio_hi6220", &hi6220_gpio[1] },
>> > +       { "gpio_hi6220", &hi6220_gpio[2] },
>> > +       { "gpio_hi6220", &hi6220_gpio[3] },
>> > +       { "gpio_hi6220", &hi6220_gpio[4] },
>> > +       { "gpio_hi6220", &hi6220_gpio[5] },
>> > +       { "gpio_hi6220", &hi6220_gpio[6] },
>> > +       { "gpio_hi6220", &hi6220_gpio[7] },
>> > +       { "gpio_hi6220", &hi6220_gpio[8] },
>> > +       { "gpio_hi6220", &hi6220_gpio[9] },
>> > +       { "gpio_hi6220", &hi6220_gpio[10] },
>> > +       { "gpio_hi6220", &hi6220_gpio[11] },
>> > +       { "gpio_hi6220", &hi6220_gpio[12] },
>> > +       { "gpio_hi6220", &hi6220_gpio[13] },
>> > +       { "gpio_hi6220", &hi6220_gpio[14] },
>> > +       { "gpio_hi6220", &hi6220_gpio[15] },
>> > +       { "gpio_hi6220", &hi6220_gpio[16] },
>> > +       { "gpio_hi6220", &hi6220_gpio[17] },
>> > +       { "gpio_hi6220", &hi6220_gpio[18] },
>> > +       { "gpio_hi6220", &hi6220_gpio[19] },
>> > +};
>> > +#endif
>>
>> Can we use device tree for this board? I have just received one so if
>> you don't have the time for this I could give it a try (once I figure
>> out how to get U-Boot onto the board).
>
>
> Do you mean using device tree for configuring u-boot? If so that would be a
> useful addition. If you want to do it then please do :-)

OK, I'll wait for your respin and then see if I can get it running.

>
>>
>>
>> Also, do you know anything about the SDRAM controller? I don't see
>> mention of it in the docs and we would need it to create an SPL for
>> this board.
>
>
> No I'm afraid not. The datasheet released so far is sadly rather sparse on
> details.
>
> There is some code in ATF for configuring ddr clocks which could be used
> as a reference though see arm-trusted-firmware/plat/hikey/pll.c.

Yes it looks like that has everything. Thanks for the pointer
(although I'm not sure I will have the energy to get to that!)

Regards,
Simon


More information about the U-Boot mailing list