Commit c0cdd5adc81d4b5cd0c870fe58c863ab37fd7f89
Committed by
Tom Rini
1 parent
d95faab201
Exists in
smarc_8mq_lf_v2020.04
and in
17 other branches
board: stm32: add stm32f469-discovery board support
This board offers : _ STM32F469NIH6 microcontroller featuring 2 Mbytes of Flash memory and 324 Kbytes of RAM in BGA216 package _ On-board ST-LINK/V2-1 SWD debugger, supporting USB reenumeration capability: _ Mbed-enabled (mbed.org) _ USB functions: USB virtual COM port, mass storage, debug port _ 4 inches 800x480 pixel TFT color LCD with MIPI DSI interface and capacitive touch screen _ SAI Audio DAC, with a stereo headphone output jack _ 3 MEMS microphones _ MicroSD card connector _ I2C extension connector _ 4Mx32bit SDRAM _ 128-Mbit Quad-SPI NOR Flash _ Reset and wake-up buttons _ 4 color user LEDs _ USB OTG FS with Micro-AB connector _ Three power supply options: _ Expansion connectors and Arduino™ UNO V3 connectors Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Showing 7 changed files with 221 additions and 0 deletions Side-by-side Diff
arch/arm/mach-stm32/stm32f4/Kconfig
board/st/stm32f469-discovery/Kconfig
1 | +if TARGET_STM32F469_DISCOVERY | |
2 | + | |
3 | +config SYS_BOARD | |
4 | + string | |
5 | + default "stm32f469-discovery" | |
6 | + | |
7 | +config SYS_VENDOR | |
8 | + string | |
9 | + default "st" | |
10 | + | |
11 | +config SYS_SOC | |
12 | + string | |
13 | + default "stm32f4" | |
14 | + | |
15 | +config SYS_CONFIG_NAME | |
16 | + string | |
17 | + default "stm32f469-discovery" | |
18 | + | |
19 | +endif |
board/st/stm32f469-discovery/MAINTAINERS
board/st/stm32f469-discovery/Makefile
board/st/stm32f469-discovery/stm32f469-discovery.c
1 | +/* | |
2 | + * Copyright (C) STMicroelectronics SA 2017 | |
3 | + * Author(s): Patrice CHOTARD, <patrice.chotard@st.com> for STMicroelectronics. | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + */ | |
7 | + | |
8 | +#include <common.h> | |
9 | +#include <dm.h> | |
10 | + | |
11 | +#include <asm/io.h> | |
12 | +#include <asm/arch/stm32.h> | |
13 | + | |
14 | +DECLARE_GLOBAL_DATA_PTR; | |
15 | + | |
16 | +int dram_init(void) | |
17 | +{ | |
18 | + int rv; | |
19 | + struct udevice *dev; | |
20 | + | |
21 | + rv = uclass_get_device(UCLASS_RAM, 0, &dev); | |
22 | + if (rv) { | |
23 | + debug("DRAM init failed: %d\n", rv); | |
24 | + return rv; | |
25 | + } | |
26 | + | |
27 | + if (fdtdec_setup_memory_size() != 0) | |
28 | + rv = -EINVAL; | |
29 | + | |
30 | + return rv; | |
31 | +} | |
32 | + | |
33 | +int dram_init_banksize(void) | |
34 | +{ | |
35 | + fdtdec_setup_memory_banksize(); | |
36 | + | |
37 | + return 0; | |
38 | +} | |
39 | + | |
40 | +u32 get_board_rev(void) | |
41 | +{ | |
42 | + return 0; | |
43 | +} | |
44 | + | |
45 | +int board_early_init_f(void) | |
46 | +{ | |
47 | + return 0; | |
48 | +} | |
49 | + | |
50 | +int board_init(void) | |
51 | +{ | |
52 | + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100; | |
53 | + | |
54 | + return 0; | |
55 | +} | |
56 | + | |
57 | +#ifdef CONFIG_MISC_INIT_R | |
58 | +int misc_init_r(void) | |
59 | +{ | |
60 | + char serialno[25]; | |
61 | + u32 u_id_low, u_id_mid, u_id_high; | |
62 | + | |
63 | + if (!env_get("serial#")) { | |
64 | + u_id_low = readl(&STM32_U_ID->u_id_low); | |
65 | + u_id_mid = readl(&STM32_U_ID->u_id_mid); | |
66 | + u_id_high = readl(&STM32_U_ID->u_id_high); | |
67 | + sprintf(serialno, "%08x%08x%08x", | |
68 | + u_id_high, u_id_mid, u_id_low); | |
69 | + env_set("serial#", serialno); | |
70 | + } | |
71 | + | |
72 | + return 0; | |
73 | +} | |
74 | +#endif |
configs/stm32f469-discovery_defconfig
1 | +CONFIG_ARM=y | |
2 | +CONFIG_STM32=y | |
3 | +CONFIG_SYS_MALLOC_F_LEN=0xF00 | |
4 | +CONFIG_STM32F4=y | |
5 | +CONFIG_TARGET_STM32F469_DISCOVERY=y | |
6 | +CONFIG_DEFAULT_DEVICE_TREE="stm32f469-disco" | |
7 | +CONFIG_BOOTDELAY=3 | |
8 | +# CONFIG_DISPLAY_CPUINFO is not set | |
9 | +CONFIG_BOARD_EARLY_INIT_F=y | |
10 | +CONFIG_HUSH_PARSER=y | |
11 | +CONFIG_SYS_PROMPT="U-Boot > " | |
12 | +CONFIG_CMD_BOOTZ=y | |
13 | +# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set | |
14 | +CONFIG_CMD_IMLS=y | |
15 | +CONFIG_CMD_GPT=y | |
16 | +# CONFIG_RANDOM_UUID is not set | |
17 | +CONFIG_CMD_MMC=y | |
18 | +# CONFIG_CMD_SETEXPR is not set | |
19 | +CONFIG_CMD_CACHE=y | |
20 | +CONFIG_CMD_TIMER=y | |
21 | +CONFIG_CMD_EXT2=y | |
22 | +CONFIG_CMD_EXT4=y | |
23 | +CONFIG_CMD_FAT=y | |
24 | +CONFIG_CMD_FS_GENERIC=y | |
25 | +# CONFIG_DOS_PARTITION is not set | |
26 | +CONFIG_OF_CONTROL=y | |
27 | +CONFIG_OF_EMBED=y | |
28 | +# CONFIG_BLK is not set | |
29 | +CONFIG_CLK=y | |
30 | +CONFIG_DM_GPIO=y | |
31 | +CONFIG_MISC=y | |
32 | +CONFIG_STM32_RCC=y | |
33 | +CONFIG_DM_MMC=y | |
34 | +CONFIG_ARM_PL180_MMCI=y | |
35 | +CONFIG_MTD_NOR_FLASH=y | |
36 | +CONFIG_PINCTRL=y | |
37 | +CONFIG_PINCTRL_STM32=y | |
38 | +CONFIG_RAM=y | |
39 | +CONFIG_STM32_SDRAM=y | |
40 | +CONFIG_DM_RESET=y | |
41 | +CONFIG_STM32_RESET=y | |
42 | +CONFIG_STM32X7_SERIAL=y |
include/configs/stm32f469-discovery.h
1 | +/* | |
2 | + * Copyright (C) STMicroelectronics SA 2017 | |
3 | + * Author(s): Patrice CHOTARD, <patrice.chotard@st.com> for STMicroelectronics. | |
4 | + * | |
5 | + * SPDX-License-Identifier: GPL-2.0+ | |
6 | + */ | |
7 | + | |
8 | +#ifndef __CONFIG_H | |
9 | +#define __CONFIG_H | |
10 | + | |
11 | +#define CONFIG_STM32F4DISCOVERY | |
12 | + | |
13 | +#define CONFIG_MISC_INIT_R | |
14 | + | |
15 | +#define CONFIG_SYS_FLASH_BASE 0x08000000 | |
16 | + | |
17 | +#define CONFIG_SYS_INIT_SP_ADDR 0x10010000 | |
18 | +#define CONFIG_SYS_TEXT_BASE 0x08000000 | |
19 | + | |
20 | +#define CONFIG_SYS_ICACHE_OFF | |
21 | +#define CONFIG_SYS_DCACHE_OFF | |
22 | + | |
23 | +/* | |
24 | + * Configuration of the external SDRAM memory | |
25 | + */ | |
26 | +#define CONFIG_NR_DRAM_BANKS 1 | |
27 | +#define CONFIG_SYS_RAM_FREQ_DIV 2 | |
28 | +#define CONFIG_SYS_RAM_BASE 0x00000000 | |
29 | +#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_RAM_BASE | |
30 | +#define CONFIG_SYS_LOAD_ADDR 0x00400000 | |
31 | +#define CONFIG_LOADADDR 0x00400000 | |
32 | + | |
33 | +#define CONFIG_SYS_MAX_FLASH_SECT 12 | |
34 | +#define CONFIG_SYS_MAX_FLASH_BANKS 2 | |
35 | + | |
36 | +#define CONFIG_ENV_OFFSET (256 << 10) | |
37 | +#define CONFIG_ENV_SECT_SIZE (128 << 10) | |
38 | +#define CONFIG_ENV_SIZE (8 << 10) | |
39 | + | |
40 | +#define CONFIG_STM32_FLASH | |
41 | + | |
42 | +#define CONFIG_STM32_HSE_HZ 8000000 | |
43 | +#define CONFIG_SYS_CLK_FREQ 180000000 /* 180 MHz */ | |
44 | +#define CONFIG_SYS_HZ_CLOCK 1000000 /* Timer is clocked at 1MHz */ | |
45 | + | |
46 | +#define CONFIG_CMDLINE_TAG | |
47 | +#define CONFIG_SETUP_MEMORY_TAGS | |
48 | +#define CONFIG_INITRD_TAG | |
49 | +#define CONFIG_REVISION_TAG | |
50 | + | |
51 | +#define CONFIG_SYS_CBSIZE 1024 | |
52 | + | |
53 | +#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) | |
54 | + | |
55 | +#define CONFIG_BOOTCOMMAND \ | |
56 | + "run boot_sd" | |
57 | + | |
58 | +#define CONFIG_EXTRA_ENV_SETTINGS \ | |
59 | + "boot_sd=mmc dev 0;fatload mmc 0 0x00700000 stm32f469-disco.dtb; fatload mmc 0 0x00008000 zImage; icache off; bootz 0x00008000 - 0x00700000" | |
60 | + | |
61 | +/* | |
62 | + * Command line configuration. | |
63 | + */ | |
64 | +#define CONFIG_SYS_LONGHELP | |
65 | +#define CONFIG_AUTO_COMPLETE | |
66 | +#define CONFIG_CMDLINE_EDITING | |
67 | + | |
68 | +#endif /* __CONFIG_H */ |