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 <dillon.minfei@gmail.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
This commit is contained in:
dillon min 2021-04-09 15:28:46 +08:00 committed by Patrice Chotard
parent 1f0305e0d0
commit 38ac6a1bb3
7 changed files with 193 additions and 0 deletions

View File

@ -6,7 +6,11 @@ config TARGET_STM32H743_DISCO
config TARGET_STM32H743_EVAL
bool "STM32H743 Evaluation board"
config TARGET_STM32H750_ART_PI
bool "STM32H750 ART Pi board"
source "board/st/stm32h743-eval/Kconfig"
source "board/st/stm32h743-disco/Kconfig"
source "board/st/stm32h750-art-pi/Kconfig"
endif

View File

@ -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

View File

@ -0,0 +1,7 @@
STM32H750 ART PI BOARD
M: Dillon Min <dillon.minfei@gmail.com>
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*

View File

@ -0,0 +1,6 @@
# SPDX-License-Identifier: GPL-2.0+
#
# Copyright (C) 2021, RT-Thread - All Rights Reserved
# Author(s): Dillon Min, <dillon.minfei@gmail.com> for RT-Thread.
obj-y := stm32h750-art-pi.o

View File

@ -0,0 +1,58 @@
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (C) 2021, STMicroelectronics - All Rights Reserved
* Author(s): Dillon Min <dillon.minfei@gmail.com>
*/
#include <common.h>
#include <dm.h>
#include <init.h>
#include <log.h>
#include <asm/global_data.h>
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;
}

View File

@ -0,0 +1,51 @@
CONFIG_ARM=y
CONFIG_ARCH_STM32=y
CONFIG_SYS_TEXT_BASE=0x90000000
CONFIG_SYS_MALLOC_F_LEN=0xF00
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x2000
CONFIG_STM32H7=y
CONFIG_TARGET_STM32H750_ART_PI=y
CONFIG_DEFAULT_DEVICE_TREE="stm32h750i-art-pi"
CONFIG_DISTRO_DEFAULTS=y
CONFIG_BOOTDELAY=3
CONFIG_AUTOBOOT_KEYED=y
CONFIG_AUTOBOOT_PROMPT="Hit SPACE in %d seconds to stop autoboot.\n"
CONFIG_AUTOBOOT_STOP_STR=" "
# CONFIG_USE_BOOTCOMMAND is not set
CONFIG_DEFAULT_FDT_FILE="stm32h750i-art-pi"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_BOARD_EARLY_INIT_F=y
CONFIG_BOARD_LATE_INIT=y
CONFIG_SYS_PROMPT="U-Boot > "
CONFIG_CMD_GPT=y
CONFIG_CMD_MMC=y
# CONFIG_CMD_SETEXPR is not set
CONFIG_CMD_CACHE=y
CONFIG_CMD_TIMER=y
CONFIG_CMD_EXT4_WRITE=y
# CONFIG_ISO_PARTITION is not set
CONFIG_OF_CONTROL=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
# CONFIG_NET is not set
CONFIG_DM_MMC=y
CONFIG_STM32_SDMMC2=y
# CONFIG_PINCTRL_FULL is not set
CONFIG_OF_LIBFDT_OVERLAY=y
CONFIG_BAUDRATE=2000000
CONFIG_USE_BOOTARGS=y
CONFIG_BOOTARGS="console=ttySTM0,2000000 root=/dev/ram loglevel=8"
CONFIG_BOOTCOMMAND="bootm 90080000"
CONFIG_REQUIRE_SERIAL_CONSOLE=y
CONFIG_SERIAL_PRESENT=y
CONFIG_DM_SERIAL=y
CONFIG_STM32_SERIAL=y
CONFIG_FIT=y
CONFIG_FIT_EXTERNAL_OFFSET=0x0
CONFIG_FIT_ENABLE_SHA256_SUPPORT=y
CONFIG_FIT_FULL_CHECK=y
CONFIG_FIT_PRINT=y
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_SUPPORT_RAW_INITRD=y
CONFIG_USE_BOOTCOMMAND=y
CONFIG_DM_DMA=y

View File

@ -0,0 +1,48 @@
/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2021, STMicroelectronics - All Rights Reserved
* Author(s): Dillon Min <dillon.minfei@gmail.com>
*/
#ifndef __CONFIG_H
#define __CONFIG_H
#include <config.h>
#include <linux/sizes.h>
/* For booting Linux, use the first 16MB of memory */
#define CONFIG_SYS_BOOTMAPSZ (SZ_16M + SZ_8M)
#define CONFIG_SYS_FLASH_BASE 0x90000000
#define CONFIG_SYS_INIT_SP_ADDR 0x24040000
/*
* Configuration of the external SDRAM memory
*/
#define CONFIG_SYS_LOAD_ADDR 0xC1800000
#define CONFIG_LOADADDR 0xC1800000
#define CONFIG_SYS_HZ_CLOCK 1000000
#define CONFIG_CMDLINE_TAG
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_INITRD_TAG
#define CONFIG_REVISION_TAG
#define CONFIG_SYS_MAXARGS 16
#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024)
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0)
#include <config_distro_bootcmd.h>
#define CONFIG_EXTRA_ENV_SETTINGS \
"kernel_addr_r=0xC0008000\0" \
"fdtfile=stm32h750i-art-pi.dtb\0" \
"fdt_addr_r=0xC0408000\0" \
"scriptaddr=0xC0418000\0" \
"pxefile_addr_r=0xC0428000\0" \
"ramdisk_addr_r=0xC0438000\0" \
BOOTENV
#endif /* __CONFIG_H */