From 38ac6a1bb3065ce34fa98d6584aa2b2ebf92a1e7 Mon Sep 17 00:00:00 2001 From: dillon min Date: Fri, 9 Apr 2021 15:28:46 +0800 Subject: board: Add rt-thread art-pi board support All these files are add for support rt-thread art-pi board - add board/st/stm32h750-art-pi, defconfig, header support for u-boot for more information about art-pi, please goto: https://art-pi.gitee.io/website/ Signed-off-by: dillon min Reviewed-by: Patrice Chotard --- board/st/stm32h750-art-pi/Kconfig | 19 +++++++++ board/st/stm32h750-art-pi/MAINTAINERS | 7 ++++ board/st/stm32h750-art-pi/Makefile | 6 +++ board/st/stm32h750-art-pi/stm32h750-art-pi.c | 58 ++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 board/st/stm32h750-art-pi/Kconfig create mode 100644 board/st/stm32h750-art-pi/MAINTAINERS create mode 100644 board/st/stm32h750-art-pi/Makefile create mode 100644 board/st/stm32h750-art-pi/stm32h750-art-pi.c (limited to 'board/st') diff --git a/board/st/stm32h750-art-pi/Kconfig b/board/st/stm32h750-art-pi/Kconfig new file mode 100644 index 0000000000..c31b9849fd --- /dev/null +++ b/board/st/stm32h750-art-pi/Kconfig @@ -0,0 +1,19 @@ +if TARGET_STM32H750_ART_PI + +config SYS_BOARD + string + default "stm32h750-art-pi" + +config SYS_VENDOR + string + default "st" + +config SYS_SOC + string + default "stm32h7" + +config SYS_CONFIG_NAME + string + default "stm32h750-art-pi" + +endif diff --git a/board/st/stm32h750-art-pi/MAINTAINERS b/board/st/stm32h750-art-pi/MAINTAINERS new file mode 100644 index 0000000000..9578833068 --- /dev/null +++ b/board/st/stm32h750-art-pi/MAINTAINERS @@ -0,0 +1,7 @@ +STM32H750 ART PI BOARD +M: Dillon Min +S: Maintained +F: board/st/stm32h750-art-pi +F: include/configs/stm32h750-art-pi.h +F: configs/stm32h750-art-pi_defconfig +F: arch/arm/dts/stm32h7* diff --git a/board/st/stm32h750-art-pi/Makefile b/board/st/stm32h750-art-pi/Makefile new file mode 100644 index 0000000000..a06de87526 --- /dev/null +++ b/board/st/stm32h750-art-pi/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2021, RT-Thread - All Rights Reserved +# Author(s): Dillon Min, for RT-Thread. + +obj-y := stm32h750-art-pi.o diff --git a/board/st/stm32h750-art-pi/stm32h750-art-pi.c b/board/st/stm32h750-art-pi/stm32h750-art-pi.c new file mode 100644 index 0000000000..5785b2e575 --- /dev/null +++ b/board/st/stm32h750-art-pi/stm32h750-art-pi.c @@ -0,0 +1,58 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2021, STMicroelectronics - All Rights Reserved + * Author(s): Dillon Min + */ + +#include +#include +#include +#include +#include + +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) +{ + struct udevice *dev; + int ret; + + ret = uclass_get_device(UCLASS_RAM, 0, &dev); + if (ret) { + debug("DRAM init failed: %d\n", ret); + return ret; + } + + if (fdtdec_setup_mem_size_base() != 0) + ret = -EINVAL; + + return ret; +} + +int dram_init_banksize(void) +{ + fdtdec_setup_memory_banksize(); + + return 0; +} + +int board_early_init_f(void) +{ + return 0; +} + +u32 get_board_rev(void) +{ + return 0; +} + +int board_late_init(void) +{ + return 0; +} + +int board_init(void) +{ + gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; + return 0; +} -- cgit v1.2.3