public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 7/8] ARM64: hikey: hi6220: Add u-boot support for the 96boards CE HiKey board.
Date: Thu, 30 Jul 2015 10:46:53 +0200	[thread overview]
Message-ID: <1438246013.3969.185.camel@collabora.co.uk> (raw)
In-Reply-To: <1438205976-11105-8-git-send-email-peter.griffin@linaro.org>

On Wed, 2015-07-29 at 22:39 +0100, Peter Griffin wrote:
> HiKey is the first 96boards consumer edition compliant board. It 
> features a hi6220
> SoC which has eight ARM A53 cpu's.
> 
> This initial port adds support for: -
> 1) Serial
> 2) eMMC / SD card
> 3) USB
> 4) GPIO
> 
> It has been tested with Arm Trusted Firmware running u-boot as the 
> BL33 executable.
> 
> Notes:
> 
> eMMC has been tested with basic reading of eMMC partition into DDR. I 
> have not
> tested writing / erasing. 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 configured to save the u-boot environment to the
> SD card.
> 
> USB has been tested with ASIX networking adapter to tftpboot kernels
> into DDR. On v2015.07-rc2 dhcp now works, and also USB mass storage
> are correctly enumerated.
> 
> GPIO has been tested using gpio toggle GPIO4_1-3 to flash the 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@linaro.org>
> -
> diff --git a/include/configs/hikey.h b/include/configs/hikey.h
> new file mode 100644
> index 0000000..6bb0b7d
> --- /dev/null
> +++ b/include/configs/hikey.h
> @@ -0,0 +1,159 @@
> 
> +/* SD/MMC configuration */
> +#define CONFIG_GENERIC_MMC
> +#define CONFIG_MMC
> +#define CONFIG_DWMMC
> +#define CONFIG_HIKEY_DWMMC
> +#define CONFIG_BOUNCE_BUFFER
> +#define CONFIG_CMD_MMC
> +
> +#define CONFIG_FS_EXT4

> +
> +/* Command line configuration */
> +#define CONFIG_MENU
> +#define CONFIG_CMD_CACHE
> +#define CONFIG_CMD_UNZIP
> +#define CONFIG_CMD_ENV
> +
> +#define CONFIG_MTD_PARTITIONS
> +
> +/* BOOTP options */
> +#define CONFIG_BOOTP_BOOTFILESIZE
> +
> +#include <config_distro_defaults.h>
> +
> +/* Initial environment variables */
> +
> +/*
> + * Defines where the kernel and FDT will be put in RAM
> + */
> +
> +#define CONFIG_EXTRA_ENV_SETTINGS	\
> +				"kernel_name=Image\0"	\
> +				"kernel_addr_r=0x00080000\0" \
> +				"fdt_name=hi6220-hikey.dtb\0" \
> +				"fdt_addr_r=0x02000000\0" \
> +				"fdt_high=0xffffffffffffffff\0" \
> +				"initrd_high=0xffffffffffffffff\0" \
> +
> +/* Assume we boot with root on the seventh partition of eMMC */
> +#define CONFIG_BOOTARGS	"console=ttyAMA0,115200n8 
> root=/dev/mmcblk0p9 rw"
> +
> +/* Copy the kernel and FDT to DRAM memory and boot */
> +#define CONFIG_BOOTCOMMAND	"usb start; dhcp;" \
> +				"tftp $kernel_addr_r $kernel_name;" 
> \
> +				"tftp $fdt_addr_r $fdt_name;" \
> +				"booti $kernel_addr_r - $fdt_addr_r"

Why not use config_distro_bootcmd.h to get a somewhat standard boot
sequence rather then hardcoding a tftp boot and a rootfs on a specific
mmc partition?


> +#define CONFIG_BOOTDELAY		2

This redefines the default in config_distro_defaults

> +
> +/* Preserve enviroment on sd card */
> +#define CONFIG_COMMAND_HISTORY
> +
> +#define CONFIG_ENV_SIZE			0x1000
> +#define CONFIG_ENV_IS_IN_FAT
> +#define FAT_ENV_INTERFACE               "mmc"
> +#define FAT_ENV_DEVICE_AND_PART         "1:1"
> +#define FAT_ENV_FILE                    "uboot.env"
> +#define CONFIG_FAT_WRITE
> +#define CONFIG_ENV_VARS_UBOOT_CONFIG
> +
> +/* Monitor Command Prompt */
> +#define CONFIG_SYS_CBSIZE		512	/* Console I/O 
> Buffer Size */
> +#define CONFIG_SYS_PBSIZE		(CONFIG_SYS_CBSIZE + \
> +					sizeof(CONFIG_SYS_PROMPT) + 
> 16)
> +#define CONFIG_SYS_HUSH_PARSER
> +#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
> +#define CONFIG_SYS_LONGHELP
> +#define CONFIG_CMDLINE_EDITING
> +#define CONFIG_SYS_MAXARGS		64	/* max command args 
> */
> +
> +#define CONFIG_SYS_NO_FLASH
> +
> +#endif /* __HIKEY_H */

-- 
Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Collabora Ltd.

  reply	other threads:[~2015-07-30  8:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-29 21:39 [U-Boot] [PATCH v3 0/8] Add support for hi6220 SoC and HiKey 96boards CE board Peter Griffin
2015-07-29 21:39 ` [U-Boot] [PATCH v3 1/8] usb: dwc2: Call board_usb_init() from usb_lowlevel_init() Peter Griffin
2015-07-29 23:36   ` Marek Vasut
2015-07-30  0:42     ` Tom Rini
2015-07-30  8:59       ` Marek Vasut
2015-07-29 21:39 ` [U-Boot] [PATCH v3 2/8] dm: gpio: hi6220: Add a hi6220 GPIO driver model driver Peter Griffin
2015-07-29 21:39 ` [U-Boot] [PATCH v3 3/8] ARM: hi6220: Add register and bitfield definition header files Peter Griffin
2015-07-29 21:39 ` [U-Boot] [PATCH v3 4/8] hisilicon: hi6220: Add a hi6220 pinmux driver Peter Griffin
2015-07-29 21:39 ` [U-Boot] [PATCH v3 5/8] pmic: pmic_hi6553: Add a driver for the hi6553 pmic found on hikey board Peter Griffin
2015-07-29 21:39 ` [U-Boot] [PATCH v3 6/8] mmc: hi6220_dw_mmc: Add hi6220 glue code for dw_mmc controller Peter Griffin
2015-07-29 21:39 ` [U-Boot] [PATCH v3 7/8] ARM64: hikey: hi6220: Add u-boot support for the 96boards CE HiKey board Peter Griffin
2015-07-30  8:46   ` Sjoerd Simons [this message]
2015-07-30 10:17     ` Peter Robinson
2015-07-30 17:49     ` Peter Griffin
2015-07-29 21:39 ` [U-Boot] [PATCH v3 8/8] ARM64: hikey: Add a README for this board Peter Griffin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438246013.3969.185.camel@collabora.co.uk \
    --to=sjoerd.simons@collabora.co.uk \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox