diff options
author | 2023-10-10 14:33:42 +0000 | |
---|---|---|
committer | 2023-10-10 14:33:42 +0000 | |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /roms/u-boot/board/st/stm32f469-discovery | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'roms/u-boot/board/st/stm32f469-discovery')
4 files changed, 103 insertions, 0 deletions
diff --git a/roms/u-boot/board/st/stm32f469-discovery/Kconfig b/roms/u-boot/board/st/stm32f469-discovery/Kconfig new file mode 100644 index 000000000..de61b6f2f --- /dev/null +++ b/roms/u-boot/board/st/stm32f469-discovery/Kconfig @@ -0,0 +1,19 @@ +if TARGET_STM32F469_DISCOVERY + +config SYS_BOARD + string + default "stm32f469-discovery" + +config SYS_VENDOR + string + default "st" + +config SYS_SOC + string + default "stm32f4" + +config SYS_CONFIG_NAME + string + default "stm32f469-discovery" + +endif diff --git a/roms/u-boot/board/st/stm32f469-discovery/MAINTAINERS b/roms/u-boot/board/st/stm32f469-discovery/MAINTAINERS new file mode 100644 index 000000000..5a6a78b39 --- /dev/null +++ b/roms/u-boot/board/st/stm32f469-discovery/MAINTAINERS @@ -0,0 +1,6 @@ +STM32F469-DISCOVERY BOARD +M: Patrice Chotard <patrice.chotard@foss.st.com> +S: Maintained +F: board/st/stm32f469-discovery/ +F: include/configs/stm32f469-discovery.h +F: configs/stm32f469-discovery_defconfig diff --git a/roms/u-boot/board/st/stm32f469-discovery/Makefile b/roms/u-boot/board/st/stm32f469-discovery/Makefile new file mode 100644 index 000000000..45480b72c --- /dev/null +++ b/roms/u-boot/board/st/stm32f469-discovery/Makefile @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) STMicroelectronics SA 2017 +# Author(s): Patrice CHOTARD, <patrice.chotard@foss.st.com> for STMicroelectronics. + +obj-y := stm32f469-discovery.o diff --git a/roms/u-boot/board/st/stm32f469-discovery/stm32f469-discovery.c b/roms/u-boot/board/st/stm32f469-discovery/stm32f469-discovery.c new file mode 100644 index 000000000..c5df9b0d9 --- /dev/null +++ b/roms/u-boot/board/st/stm32f469-discovery/stm32f469-discovery.c @@ -0,0 +1,72 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) STMicroelectronics SA 2017 + * Author(s): Patrice CHOTARD, <patrice.chotard@foss.st.com> for STMicroelectronics. + */ + +#include <common.h> +#include <dm.h> +#include <env.h> +#include <init.h> +#include <log.h> +#include <asm/global_data.h> + +#include <asm/io.h> +#include <asm/arch/stm32.h> + +DECLARE_GLOBAL_DATA_PTR; + +int dram_init(void) +{ + int rv; + struct udevice *dev; + + rv = uclass_get_device(UCLASS_RAM, 0, &dev); + if (rv) { + debug("DRAM init failed: %d\n", rv); + return rv; + } + + if (fdtdec_setup_mem_size_base() != 0) + rv = -EINVAL; + + return rv; +} + +int dram_init_banksize(void) +{ + fdtdec_setup_memory_banksize(); + + return 0; +} + +u32 get_board_rev(void) +{ + return 0; +} + +int board_init(void) +{ + gd->bd->bi_boot_params = gd->bd->bi_dram[0].start + 0x100; + + return 0; +} + +#ifdef CONFIG_MISC_INIT_R +int misc_init_r(void) +{ + char serialno[25]; + u32 u_id_low, u_id_mid, u_id_high; + + if (!env_get("serial#")) { + u_id_low = readl(&STM32_U_ID->u_id_low); + u_id_mid = readl(&STM32_U_ID->u_id_mid); + u_id_high = readl(&STM32_U_ID->u_id_high); + sprintf(serialno, "%08x%08x%08x", + u_id_high, u_id_mid, u_id_low); + env_set("serial#", serialno); + } + + return 0; +} +#endif |