U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: Patrice CHOTARD <patrice.chotard@foss.st.com>
Cc: Dario Binacchi <dario.binacchi@amarulasolutions.com>,
	<u-boot@lists.denx.de>, <linux-amarula@amarulasolutions.com>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Jerome Forissier <jerome.forissier@linaro.org>,
	Patrick Delaunay <patrick.delaunay@foss.st.com>,
	Rasmus Villemoes <rasmus.villemoes@prevas.dk>,
	Sean Anderson <seanga2@gmail.com>, Tom Rini <trini@konsulko.com>,
	<uboot-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH 9/9] board: stm32: add stm32h747-discovery board support
Date: Mon, 9 Jun 2025 10:07:27 +0200	[thread overview]
Message-ID: <20250609100727.56d7de7b@wsk> (raw)
In-Reply-To: <316dd0c7-c7b8-407d-b34a-b5b90f056b94@foss.st.com>

[-- Attachment #1: Type: text/plain, Size: 8869 bytes --]

Hi Patrice,

> On 6/7/25 11:37, Dario Binacchi wrote:
> > The board includes an STM32H747XI SoC with the following resources:
> >  - 2 Mbytes Flash
> >  - 1 Mbyte SRAM
> >  - LCD-TFT controller
> >  - MIPI-DSI interface
> >  - FD-CAN
> >  - USB 2.0 high-speed/full-speed
> >  - Ethernet MAC
> >  - camera interface
> > 
> > Detailed information can be found at:
> > https://www.st.com/en/evaluation-tools/stm32h747i-disco.html
> > 
> > Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
> > 
> > ---
> > 
> >  arch/arm/mach-stm32/stm32h7/Kconfig        |  4 +++
> >  board/st/stm32h747-disco/Kconfig           | 15 ++++++++
> >  board/st/stm32h747-disco/MAINTAINERS       |  7 ++++
> >  board/st/stm32h747-disco/Makefile          |  6 ++++
> >  board/st/stm32h747-disco/stm32h747-disco.c | 42
> > ++++++++++++++++++++++ configs/stm32h747-disco_defconfig          |
> > 35 ++++++++++++++++++ drivers/clk/stm32/clk-stm32h7.c            |
> > 5 +++ include/configs/stm32h747-disco.h          | 32
> > +++++++++++++++++ 8 files changed, 146 insertions(+)
> >  create mode 100644 board/st/stm32h747-disco/Kconfig
> >  create mode 100644 board/st/stm32h747-disco/MAINTAINERS
> >  create mode 100644 board/st/stm32h747-disco/Makefile
> >  create mode 100644 board/st/stm32h747-disco/stm32h747-disco.c
> >  create mode 100644 configs/stm32h747-disco_defconfig
> >  create mode 100644 include/configs/stm32h747-disco.h
> > 
> > diff --git a/arch/arm/mach-stm32/stm32h7/Kconfig
> > b/arch/arm/mach-stm32/stm32h7/Kconfig index
> > 70233a4b23cd..72f20c477d04 100644 ---
> > a/arch/arm/mach-stm32/stm32h7/Kconfig +++
> > b/arch/arm/mach-stm32/stm32h7/Kconfig @@ -6,11 +6,15 @@ config
> > TARGET_STM32H743_DISCO config TARGET_STM32H743_EVAL
> >  	bool "STM32H743 Evaluation board"
> >  
> > +config TARGET_STM32H747_DISCO
> > +	bool "STM32H747 Discovery 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/stm32h747-disco/Kconfig"
> >  source "board/st/stm32h750-art-pi/Kconfig"
> >  
> >  endif
> > diff --git a/board/st/stm32h747-disco/Kconfig
> > b/board/st/stm32h747-disco/Kconfig new file mode 100644
> > index 000000000000..a7b2c09a327f
> > --- /dev/null
> > +++ b/board/st/stm32h747-disco/Kconfig
> > @@ -0,0 +1,15 @@
> > +if TARGET_STM32H747_DISCO
> > +
> > +config SYS_BOARD
> > +	default "stm32h747-disco"
> > +
> > +config SYS_VENDOR
> > +	default "st"
> > +
> > +config SYS_SOC
> > +	default "stm32h7"
> > +
> > +config SYS_CONFIG_NAME
> > +	default "stm32h747-disco"
> > +
> > +endif
> > diff --git a/board/st/stm32h747-disco/MAINTAINERS
> > b/board/st/stm32h747-disco/MAINTAINERS new file mode 100644
> > index 000000000000..d48649f773f3
> > --- /dev/null
> > +++ b/board/st/stm32h747-disco/MAINTAINERS
> > @@ -0,0 +1,7 @@
> > +STM32H747 DISCOVERY BOARD
> > +M:	Dario Binacchi <dario.binacchi@amarulasolutions.com>
> > +S:	Maintained
> > +F:	board/st/stm32h747-disco
> > +F:	include/configs/stm32h747-disco.h
> > +F:	configs/stm32h747-disco_defconfig
> > +F:	arch/arm/dts/stm32h747*
> > diff --git a/board/st/stm32h747-disco/Makefile
> > b/board/st/stm32h747-disco/Makefile new file mode 100644
> > index 000000000000..e11f052cc88f
> > --- /dev/null
> > +++ b/board/st/stm32h747-disco/Makefile
> > @@ -0,0 +1,6 @@
> > +# SPDX-License-Identifier: GPL-2.0+
> > +#
> > +# Copyright (c) 2025 Dario Binacchi
> > <dario.binacchi@amarulasolutions.com> +#
> > +
> > +obj-y	:= stm32h747-disco.o
> > diff --git a/board/st/stm32h747-disco/stm32h747-disco.c
> > b/board/st/stm32h747-disco/stm32h747-disco.c new file mode 100644
> > index 000000000000..be0884bdeb4d
> > --- /dev/null
> > +++ b/board/st/stm32h747-disco/stm32h747-disco.c
> > @@ -0,0 +1,42 @@
> > +// SPDX-License-Identifier: GPL-2.0+
> > +/*
> > + * stm32h747i-disco support
> > + *
> > + * Copyright (C) 2025 Dario Binacchi
> > <dario.binacchi@amarulasolutions.com>
> > + */
> > +
> > +#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_init(void)
> > +{
> > +	return 0;
> > +}
> > diff --git a/configs/stm32h747-disco_defconfig
> > b/configs/stm32h747-disco_defconfig new file mode 100644
> > index 000000000000..8a0c72450d1e
> > --- /dev/null
> > +++ b/configs/stm32h747-disco_defconfig
> > @@ -0,0 +1,35 @@
> > +CONFIG_ARM=y
> > +CONFIG_ARCH_STM32=y
> > +CONFIG_TEXT_BASE=0x08000000
> > +CONFIG_SYS_MALLOC_LEN=0x100000
> > +CONFIG_NR_DRAM_BANKS=1
> > +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> > +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x24040000
> > +CONFIG_ENV_SIZE=0x2000
> > +CONFIG_DEFAULT_DEVICE_TREE="st/stm32h747i-disco"
> > +CONFIG_OF_LIBFDT_OVERLAY=y
> > +CONFIG_SYS_LOAD_ADDR=0xd0400000
> > +CONFIG_STM32H7=y
> > +CONFIG_TARGET_STM32H747_DISCO=y
> > +CONFIG_DISTRO_DEFAULTS=y

I'm just wondering if there is any plan to move forward to use the new
approach?

As fair as I remember this is the "deprecated" option...

> > +CONFIG_BOOTDELAY=3
> > +CONFIG_AUTOBOOT_KEYED=y
> > +CONFIG_AUTOBOOT_PROMPT="Hit SPACE in %d seconds to stop
> > autoboot.\n" +CONFIG_AUTOBOOT_STOP_STR=" "
> > +CONFIG_DEFAULT_FDT_FILE="stm32h747i-disco"
> > +CONFIG_SYS_CBSIZE=256
> > +CONFIG_SYS_PBSIZE=282
> > +# CONFIG_DISPLAY_CPUINFO is not set
> > +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_NO_NET=y
> > +CONFIG_STM32_SDMMC2=y
> > +# CONFIG_PINCTRL_FULL is not set
> > diff --git a/drivers/clk/stm32/clk-stm32h7.c
> > b/drivers/clk/stm32/clk-stm32h7.c index 6acf2ff0a8fb..aa3be414a29f
> > 100644 --- a/drivers/clk/stm32/clk-stm32h7.c
> > +++ b/drivers/clk/stm32/clk-stm32h7.c
> > @@ -114,6 +114,7 @@
> >  #define		QSPISRC_PER_CK		3
> >  
> >  #define PWR_CR3				0x0c
> > +#define PWR_CR3_LDOEN			BIT(1)
> >  #define PWR_CR3_SCUEN			BIT(2)
> >  #define PWR_D3CR			0x18
> >  #define PWR_D3CR_VOS_MASK		GENMASK(15, 14)
> > @@ -375,7 +376,11 @@ int configure_clocks(struct udevice *dev)
> >  	clrsetbits_le32(pwr_base + PWR_D3CR, PWR_D3CR_VOS_MASK,
> >  			VOS_SCALE_1 << PWR_D3CR_VOS_SHIFT);
> >  	/* Lock supply configuration update */
> > +#if IS_ENABLED(CONFIG_TARGET_STM32H747_DISCO)
> > +	clrbits_le32(pwr_base + PWR_CR3, PWR_CR3_LDOEN);
> > +#else
> >  	clrbits_le32(pwr_base + PWR_CR3, PWR_CR3_SCUEN);
> > +#endif
> >  	while (!(readl(pwr_base + PWR_D3CR) & PWR_D3CR_VOSREADY))
> >  		;
> >  
> > diff --git a/include/configs/stm32h747-disco.h
> > b/include/configs/stm32h747-disco.h new file mode 100644
> > index 000000000000..393445a8ae1f
> > --- /dev/null
> > +++ b/include/configs/stm32h747-disco.h
> > @@ -0,0 +1,32 @@
> > +/* SPDX-License-Identifier: GPL-2.0+ */
> > +/*
> > + * Copyright (C) 2025 Dario Binacchi
> > <dario.binacchi@amarulasolutions.com>
> > + */
> > +
> > +#ifndef __CONFIG_H
> > +#define __CONFIG_H
> > +
> > +#include <config.h>
> > +#include <linux/sizes.h>
> > +
> > +/* For booting Linux, use the first 16MB of memory */
> > +#define CFG_SYS_BOOTMAPSZ		SZ_16M
> > +
> > +#define CFG_SYS_FLASH_BASE		0x08000000
> > +
> > +#define CFG_SYS_HZ_CLOCK		1000000
> > +
> > +#define BOOT_TARGET_DEVICES(func) \
> > +	func(MMC, mmc, 0)
> > +
> > +#include <config_distro_bootcmd.h>
> > +#define CFG_EXTRA_ENV_SETTINGS				\
> > +			"kernel_addr_r=0xD0008000\0"
> > 	\
> > +			"fdtfile=stm32h747i-disco.dtb\0"	\
> > +			"fdt_addr_r=0xD0408000\0"		\
> > +			"scriptaddr=0xD0418000\0"		\
> > +			"pxefile_addr_r=0xD0428000\0" \
> > +			"ramdisk_addr_r=0xD0438000\0"
> > 	\
> > +			BOOTENV
> > +
> > +#endif /* __CONFIG_H */  
> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
> 
> Thanks
> Patrice




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2025-06-09  8:07 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-07  9:37 [PATCH 0/9] Support stm32h747-discovery board Dario Binacchi
2025-06-07  9:37 ` [PATCH 1/9] ARM: dts: stm32h7-pinctrl: add _a suffix to u[s]art_pins phandles Dario Binacchi
2025-06-09  7:55   ` Patrice CHOTARD
2025-06-09 13:20   ` Sumit Garg
2025-06-09 13:38     ` Patrice CHOTARD
2025-06-09 13:38     ` Dario Binacchi
2025-06-07  9:37 ` [PATCH 2/9] dt-bindings: arm: stm32: add compatible for stm32h747i-disco board Dario Binacchi
2025-06-09  7:55   ` Patrice CHOTARD
2025-06-07  9:37 ` [PATCH 3/9] dt-bindings: clock: stm32h7: rename USART{7, 8}_CK to UART{7, 8}_CK Dario Binacchi
2025-06-09  7:55   ` [PATCH 3/9] dt-bindings: clock: stm32h7: rename USART{7, 8}_CK to UART{7,8}_CK Patrice CHOTARD
2025-06-07  9:37 ` [PATCH 4/9] ARM: dts: stm32: add uart8 node for stm32h743 MCU Dario Binacchi
2025-06-09  7:56   ` Patrice CHOTARD
2025-06-07  9:37 ` [PATCH 5/9] ARM: dts: stm32: add pin map for UART8 controller on stm32h743 Dario Binacchi
2025-06-09  7:56   ` Patrice CHOTARD
2025-06-07  9:37 ` [PATCH 6/9] ARM: dts: stm32: add an extra pin map for USART1 " Dario Binacchi
2025-06-09  7:56   ` Patrice CHOTARD
2025-06-07  9:37 ` [PATCH 7/9] ARM: dts: stm32: support STM32h747i-disco board Dario Binacchi
2025-06-09  7:57   ` Patrice CHOTARD
2025-06-07  9:37 ` [PATCH 8/9] ARM: dts: stm32: add stm32h747i-disco-u-boot DTS file Dario Binacchi
2025-06-09  7:57   ` Patrice CHOTARD
2025-06-07  9:37 ` [PATCH 9/9] board: stm32: add stm32h747-discovery board support Dario Binacchi
2025-06-09  7:58   ` Patrice CHOTARD
2025-06-09  8:07     ` Lukasz Majewski [this message]
2025-06-09  8:34       ` Patrice CHOTARD
2025-06-09  9:22         ` [Uboot-stm32] " Patrice CHOTARD
2025-06-09  9:29         ` Lukasz Majewski
2025-06-09 13:15 ` [PATCH 0/9] Support stm32h747-discovery board Patrice CHOTARD
2025-06-09 13:25   ` Sumit Garg
2025-06-09 13:46     ` Dario Binacchi
2025-06-09 15:40       ` Sumit Garg
2025-06-09 15:50         ` Tom Rini
2025-06-09 16:07           ` Sumit Garg
2025-06-09 16:22             ` Tom Rini
2025-06-10  8:52               ` Sumit Garg
2025-06-10 16:04                 ` Tom Rini
2025-06-11 12:08                   ` Sumit Garg
2025-06-11 13:25                     ` Quentin Schulz
2025-06-11 18:35                       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250609100727.56d7de7b@wsk \
    --to=lukma@denx.de \
    --cc=dario.binacchi@amarulasolutions.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=jerome.forissier@linaro.org \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=rasmus.villemoes@prevas.dk \
    --cc=seanga2@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox