Re: [U-Boot] [PATCH 5/5] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
On 05/04/2017 03:59 PM, Daniel Thompson wrote: On 04/05/17 14:47, Jorge Ramirez-Ortiz wrote: diff --git a/include/configs/poplar.h b/include/configs/poplar.h new file mode 100644 index 000..fb0ca19 --- /dev/null +++ b/include/configs/poplar.h @@ -0,0 +1,113 @@ +/* + * (C) Copyright 2017 Linaro + * + * Jorge Ramirez-Ortiz+ * + * Configuration for Poplar 96boards CE. Parts were derived from other ARM + * configurations. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _POPLAR_H_ +#define _POPLAR_H_ + +#include + +/* network config */ +#define CONFIG_NET_MULTI1 +#define CONFIG_PHY_GIGE1 +#define CONFIG_ARP_TIMEOUT50L +#define CONFIG_NET_RETRY_COUNT 50 +#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN 1 +#define CONFIG_SYS_RX_ETH_BUFFER16 +#define CONFIG_NET_RANDOM_ETHADDR + +/* memory */ +#define PHYS_SDRAM_10x +#define PHYS_SDRAM_1_SIZE0x4000 +#define CONFIG_NR_DRAM_BANKS4 +#define DRAM_BANK_SIZE0x1000 + +/* sys */ +#define CONFIG_SYS_BOOTM_LEN 0x140 +#define CONFIG_SYS_INIT_RAM_SIZE0x10 +#define CONFIG_SYS_SDRAM_BASEPHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR(PHYS_SDRAM_1 + 0x20) +#define CONFIG_SYS_LOAD_ADDR(PHYS_SDRAM_1 + 0x80) +#define CONFIG_SYS_MALLOC_LEN(PHYS_SDRAM_1 + SZ_8M) + +/* must match bl33.bin load address */ +#define CONFIG_SYS_TEXT_BASE0x3700 + +/* generic gimer */ +#define COUNTER_FREQUENCY1900 + +/* generic interrupt controller definitions */ +#define GICD_BASE0xF1001000 +#define GICC_BASE0xF1002000 + +/* serial port PL010/PL011 */ +#define CONFIG_PL01X_SERIAL + +/* USB configuration */ +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS3 +#define CONFIG_USB_MAX_CONTROLLER_COUNT2 +#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_ASIX + +/* SD/MMC configuration */ +#define CONFIG_BOUNCE_BUFFER +/* + * Initial environment variables + */ + +#define CONFIG_NETMASK255.255.255.0 +#define CONFIG_SERVERIP192.168.1.4 +#define CONFIG_GATEWAYIP192.168.1.1 + +#define BOOT_TARGET_DEVICES(func) \ +func(USB, usb, 0)\ +func(MMC, mmc, 0) \ +func(DHCP, dhcp, na) + +#ifndef CONFIG_SPL_BUILD +#include +#include +#endif + + +#define CONFIG_EXTRA_ENV_SETTINGS\ +"loader_mmc_blknum=0x0\0"\ +"loader_mmc_nblks=0x780\0"\ +"env_mmc_blknum=0xF\0"\ Shouldn't this be 0x780 (i.e. a blknum rather than bytes) yes! + "env_mmc_nblks=0x80\0"\ +"kernel_addr_r=0x3000\0"\ +"pxefile_addr_r=0x3200\0"\ +"scriptaddr=0x3200\0"\ +"fdt_addr_r=0x3220\0"\ +"ramdisk_addr_r=0x3240\0"\ +BOOTENV + + +/* Command line configuration */ +#define CONFIG_ENV_IS_IN_MMC1 +#define CONFIG_SYS_MMC_ENV_DEV0 +#define CONFIG_ENV_OFFSET0xF /* env_mmc_blknum */ +#define CONFIG_ENV_SIZE0x1 /* env_mmc_nblks bytes */ Possibly express these are (0x780 * 512) to make absolutely explicit the relationship to the blknum/nblks values? OK. +#define CONFIG_CMD_ENV +#define CONFIG_FAT_WRITE +#define CONFIG_ENV_VARS_UBOOT_CONFIG + +/* Monitor Command Prompt */ +#define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_CBSIZE512 +#define CONFIG_SYS_MAXARGS64 +#define CONFIG_SYS_PBSIZE(CONFIG_SYS_CBSIZE + \ +sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE + +#endif /* _POPLAR_H_ */ ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
On 05/05/2017 04:32 PM, Tom Rini wrote: On Thu, May 04, 2017 at 03:47:10PM +0200, Jorge Ramirez-Ortiz wrote: [snip] + > mkdir -p ~/poplar/src ~/poplar/bin + > cd ~/poplar/src + > git clone ssh://g...@dev-private-git.linaro.org/aspen/staging/l-loader.git l-loader + > git clone ssh://g...@dev-private-git.linaro.org/aspen/staging/arm-trusted-firmware.git atf + > git clone ssh://g...@dev-private-git.linaro.org/aspen/staging/u-boot.git u-boot + > git clone ssh://g...@dev-private-git.linaro.org/aspen/tools.git These are private repositories, no one else can clone from them. Please push this somewhere public. ACK +int dram_init(void) +{ + gd->ram_size = PHYS_SDRAM_1_SIZE; Please use get_ram_size(...) here. Thanks! yeah, much nicer. thanks! ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
On Thu, May 04, 2017 at 03:47:10PM +0200, Jorge Ramirez-Ortiz wrote: [snip] > + > mkdir -p ~/poplar/src ~/poplar/bin > + > cd ~/poplar/src > + > git clone > ssh://g...@dev-private-git.linaro.org/aspen/staging/l-loader.git l-loader > + > git clone > ssh://g...@dev-private-git.linaro.org/aspen/staging/arm-trusted-firmware.git > atf > + > git clone ssh://g...@dev-private-git.linaro.org/aspen/staging/u-boot.git > u-boot > + > git clone ssh://g...@dev-private-git.linaro.org/aspen/tools.git These are private repositories, no one else can clone from them. Please push this somewhere public. > +int dram_init(void) > +{ > + gd->ram_size = PHYS_SDRAM_1_SIZE; Please use get_ram_size(...) here. Thanks! -- Tom signature.asc Description: Digital signature ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
Re: [U-Boot] [PATCH 5/5] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
On 04/05/17 14:47, Jorge Ramirez-Ortiz wrote: diff --git a/include/configs/poplar.h b/include/configs/poplar.h new file mode 100644 index 000..fb0ca19 --- /dev/null +++ b/include/configs/poplar.h @@ -0,0 +1,113 @@ +/* + * (C) Copyright 2017 Linaro + * + * Jorge Ramirez-Ortiz+ * + * Configuration for Poplar 96boards CE. Parts were derived from other ARM + * configurations. + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _POPLAR_H_ +#define _POPLAR_H_ + +#include + +/* network config */ +#define CONFIG_NET_MULTI 1 +#define CONFIG_PHY_GIGE1 +#define CONFIG_ARP_TIMEOUT 50L +#define CONFIG_NET_RETRY_COUNT 50 +#define CONFIG_SYS_FAULT_ECHO_LINK_DOWN1 +#define CONFIG_SYS_RX_ETH_BUFFER 16 +#define CONFIG_NET_RANDOM_ETHADDR + +/* memory */ +#define PHYS_SDRAM_1 0x +#define PHYS_SDRAM_1_SIZE 0x4000 +#define CONFIG_NR_DRAM_BANKS 4 +#define DRAM_BANK_SIZE 0x1000 + +/* sys */ +#define CONFIG_SYS_BOOTM_LEN 0x140 +#define CONFIG_SYS_INIT_RAM_SIZE 0x10 +#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 +#define CONFIG_SYS_INIT_SP_ADDR(PHYS_SDRAM_1 + 0x20) +#define CONFIG_SYS_LOAD_ADDR (PHYS_SDRAM_1 + 0x80) +#define CONFIG_SYS_MALLOC_LEN (PHYS_SDRAM_1 + SZ_8M) + +/* must match bl33.bin load address */ +#define CONFIG_SYS_TEXT_BASE 0x3700 + +/* generic gimer */ +#define COUNTER_FREQUENCY 1900 + +/* generic interrupt controller definitions */ +#define GICD_BASE 0xF1001000 +#define GICC_BASE 0xF1002000 + +/* serial port PL010/PL011 */ +#define CONFIG_PL01X_SERIAL + +/* USB configuration */ +#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 3 +#define CONFIG_USB_MAX_CONTROLLER_COUNT2 +#define CONFIG_SYS_USB_EVENT_POLL +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_ASIX + +/* SD/MMC configuration */ +#define CONFIG_BOUNCE_BUFFER +/* + * Initial environment variables + */ + +#define CONFIG_NETMASK 255.255.255.0 +#define CONFIG_SERVERIP192.168.1.4 +#define CONFIG_GATEWAYIP 192.168.1.1 + +#define BOOT_TARGET_DEVICES(func) \ + func(USB, usb, 0) \ + func(MMC, mmc, 0) \ + func(DHCP, dhcp, na) + +#ifndef CONFIG_SPL_BUILD +#include +#include +#endif + + +#define CONFIG_EXTRA_ENV_SETTINGS \ + "loader_mmc_blknum=0x0\0" \ + "loader_mmc_nblks=0x780\0"\ + "env_mmc_blknum=0xF\0"\ Shouldn't this be 0x780 (i.e. a blknum rather than bytes) + "env_mmc_nblks=0x80\0"\ + "kernel_addr_r=0x3000\0" \ + "pxefile_addr_r=0x3200\0" \ + "scriptaddr=0x3200\0" \ + "fdt_addr_r=0x3220\0" \ + "ramdisk_addr_r=0x3240\0" \ + BOOTENV + + +/* Command line configuration */ +#define CONFIG_ENV_IS_IN_MMC 1 +#define CONFIG_SYS_MMC_ENV_DEV 0 +#define CONFIG_ENV_OFFSET 0xF /* env_mmc_blknum */ +#define CONFIG_ENV_SIZE0x1 /* env_mmc_nblks bytes */ Possibly express these are (0x780 * 512) to make absolutely explicit the relationship to the blknum/nblks values? +#define CONFIG_CMD_ENV +#define CONFIG_FAT_WRITE +#define CONFIG_ENV_VARS_UBOOT_CONFIG + +/* Monitor Command Prompt */ +#define CONFIG_CMDLINE_EDITING +#define CONFIG_SYS_LONGHELP +#define CONFIG_SYS_CBSIZE 512 +#define CONFIG_SYS_MAXARGS 64 +#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ + sizeof(CONFIG_SYS_PROMPT) + 16) +#define CONFIG_SYS_BARGSIZECONFIG_SYS_CBSIZE + +#endif /* _POPLAR_H_ */ ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH 5/5] ARM64: poplar: hi3798cv200: u-boot support for Poplar 96Boards
This port adds support for: 1) Serial 2) eMMC 3) USB It has been tested with ARM TRUSTED FIRMWARE running u-boot as the BL33 executable [see board's README] eMMC has been tested for reading and booting the loader[1] and linux kernels as well as saving the u-boot environment. USB has been tested with ASIX networking adapter and SanDisk 7.4GB drive. PSCI has been tested via the reset call. The firwmare upgrade process has been tested via TFTP and USB FAT filesystem containing the fastboot.bin image in one of the partitions. Signed-off-by: Jorge Ramirez-Ortiz--- arch/arm/Kconfig | 11 ++ arch/arm/include/asm/arch-hi3798cv200/dwmmc.h | 13 ++ board/hisilicon/poplar/Kconfig| 15 ++ board/hisilicon/poplar/MAINTAINERS| 6 + board/hisilicon/poplar/Makefile | 7 + board/hisilicon/poplar/README | 232 ++ board/hisilicon/poplar/poplar.c | 88 ++ configs/poplar_defconfig | 25 +++ include/configs/poplar.h | 113 + 9 files changed, 510 insertions(+) create mode 100644 arch/arm/include/asm/arch-hi3798cv200/dwmmc.h create mode 100644 board/hisilicon/poplar/Kconfig create mode 100644 board/hisilicon/poplar/MAINTAINERS create mode 100644 board/hisilicon/poplar/Makefile create mode 100644 board/hisilicon/poplar/README create mode 100644 board/hisilicon/poplar/poplar.c create mode 100644 configs/poplar_defconfig create mode 100644 include/configs/poplar.h diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 1df6b36..d4eba7c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -816,6 +816,16 @@ config TARGET_HIKEY Support for HiKey 96boards platform. It features a HI6220 SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM. +config TARGET_POPLAR + bool "Support Poplar 96boards Enterprise Edition Platform" + select ARM64 + select DM + select DM_SERIAL + select OF_CONTROL + help + Support for Poplar 96boards platform. It features a HI3798cv200 + SoC, with 4xA53 CPU, MaliT720 GPU, and 1GB RAM. + config TARGET_LS1012AQDS bool "Support ls1012aqds" select ARCH_LS1012A @@ -1145,6 +1155,7 @@ source "board/grinn/chiliboard/Kconfig" source "board/gumstix/pepper/Kconfig" source "board/h2200/Kconfig" source "board/hisilicon/hikey/Kconfig" +source "board/hisilicon/poplar/Kconfig" source "board/imx31_phycore/Kconfig" source "board/isee/igep0033/Kconfig" source "board/olimex/mx23_olinuxino/Kconfig" diff --git a/arch/arm/include/asm/arch-hi3798cv200/dwmmc.h b/arch/arm/include/asm/arch-hi3798cv200/dwmmc.h new file mode 100644 index 000..1060d94 --- /dev/null +++ b/arch/arm/include/asm/arch-hi3798cv200/dwmmc.h @@ -0,0 +1,13 @@ +/* + * (C) Copyright 2017 Linaro + * Jorge Ramirez-Ortiz + * + * SPDX-License-Identifier:GPL-2.0+ + */ + +#ifndef _HI3798cv200_DWMMC_H_ +#define _HI3798cv200_DWMMC_H_ + +int hi6220_dwmci_add_port(int index, u32 regbase, int bus_width); + +#endif /* _HI3798cv200_DWMMC_H_ */ diff --git a/board/hisilicon/poplar/Kconfig b/board/hisilicon/poplar/Kconfig new file mode 100644 index 000..3397295 --- /dev/null +++ b/board/hisilicon/poplar/Kconfig @@ -0,0 +1,15 @@ +if TARGET_POPLAR + +config SYS_BOARD + default "poplar" + +config SYS_VENDOR + default "hisilicon" + +config SYS_SOC + default "hi3798cv200" + +config SYS_CONFIG_NAME + default "poplar" + +endif diff --git a/board/hisilicon/poplar/MAINTAINERS b/board/hisilicon/poplar/MAINTAINERS new file mode 100644 index 000..0cc01c8 --- /dev/null +++ b/board/hisilicon/poplar/MAINTAINERS @@ -0,0 +1,6 @@ +Poplar BOARD +M: Jorge Ramirez-Ortiz +S: Maintained +F: board/hisilicon/poplar +F: include/configs/poplar.h +F: configs/poplar_defconfig diff --git a/board/hisilicon/poplar/Makefile b/board/hisilicon/poplar/Makefile new file mode 100644 index 000..101545d --- /dev/null +++ b/board/hisilicon/poplar/Makefile @@ -0,0 +1,7 @@ +# +# (C) Copyright 2017 Linaro +# Jorge Ramirez-Ortiz +# +# SPDX-License-Identifier: GPL-2.0+ +# +obj-y := poplar.o diff --git a/board/hisilicon/poplar/README b/board/hisilicon/poplar/README new file mode 100644 index 000..015eef6 --- /dev/null +++ b/board/hisilicon/poplar/README @@ -0,0 +1,232 @@ + + Board Information + + +Developed by HiSilicon, the board features the Hi3798C V200 with an +integrated quad-core 64-bit ARM Cortex A53 processor and high +performance Mali T720 GPU, making it capable of running any commercial +set-top solution based on Linux