[PATCH V3] arm: add initial support for the Phytium Pomelo Board

Tom Rini trini at konsulko.com
Mon Aug 23 17:33:35 CEST 2021


On Mon, Aug 23, 2021 at 03:32:01PM +0800, nicholas_zheng at outlook.com wrote:
> From: weichangzheng <nicholas_zheng at outlook.com>
> 
> This adds platform code and the device tree for the Phytium Pomelo Board.
> The initial support comprises the UART and the PCIE.
> 
> Signed-off-by: weichangzheng <nicholas_zheng at outlook.com>
> Changes since v1:
> 	updated to DT
> Changes since v2:
> 	Modify some explicit types and macro
[snip]
> diff --git a/arch/arm/dts/phytium-pomelo.dts b/arch/arm/dts/phytium-pomelo.dts
> new file mode 100644
[snip]
> diff --git a/board/phytium/pomelo/MAINTAINERS b/board/phytium/pomelo/MAINTAINERS
> new file mode 100644
> index 0000000000..950449392b
> --- /dev/null
> +++ b/board/phytium/pomelo/MAINTAINERS
> @@ -0,0 +1,8 @@
> +POMELO BOARD
> +M:	lixinde <lixinde at phytium.com.cn>
> +M:	weichangzheng <weichangzheng at phytium.com.cn>
> +S:	Maintained
> +F:	board/phytium/pomelo/*
> +F:	include/configs/pomelo.h
> +F:	configs/pomelo_defconfig

DTS file needs to be listed as well here.

> +/* PCIE */
> +#define PARAMETER_PCIE_MAGIC		0x54460011
> +#define CONFIG_INDEPENDENT_TREE		0x0

Don't use CONFIG for non-Kconfig items.  Try CFG instead.

> diff --git a/include/configs/pomelo.h b/include/configs/pomelo.h
> new file mode 100644
> index 0000000000..d0931c1403
> --- /dev/null
> +++ b/include/configs/pomelo.h
> @@ -0,0 +1,33 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright (C) 2021
> + * lixinde         <lixinde at phytium.com.cn>
> + * weichangzheng   <weichangzheng at phytium.com.cn>
> + */
> +
> +#ifndef __POMELO_CONFIG_H__
> +#define __POMELO_CONFIG_H__
> +
> +/* SDRAM Bank #1 start address */
> +#define PHYS_SDRAM_1			0x80000000
> +#define PHYS_SDRAM_1_SIZE		0x7B000000
> +#define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
> +#define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x10000000)

Please use values directly, rather than defining PHYS_SDRAM_1/etc, and
use get_ram_size(CONFIG_SYS_SDRAM_BASE, SZ_xx) to set gd->ram_size.

> +/* SIZE of malloc pool */
> +#define CONFIG_SYS_MALLOC_LEN		(1 * 1024 * 1024  + CONFIG_ENV_SIZE)

Use something from <linux/sizes.h> and just round up slightly to include
environment as well.

> +#define CONFIG_SYS_INIT_SP_ADDR		(0x29800000 + 0x1a000)
> +
> +/* PCI CONFIG */
> +#define CONFIG_SYS_PCI_64BIT		1
> +
> +/*BOOT*/
> +#define CONFIG_SYS_BOOTM_LEN		(60 * 1024 * 1024)
> +
> +#define CONFIG_EXTRA_ENV_SETTINGS	\
> +	"load_kernel=ext4load scsi 0:1 0x90100000 uImage\0"	\
> +	"load_fdt=ext4load scsi 0:1 0x95000000 ft-d2000.dtb\0"\
> +	"boot_os=bootm 0x90100000 -:- 0x95000000\0"	\
> +	"distro_bootcmd=run load_kernel; run boot_fdt; run boot_os"

You cannot define distro_bootcmd directly, you need too fill in the
hooks and use <config_distro_bootcmd.h>.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210823/1a6b6ede/attachment.sig>


More information about the U-Boot mailing list