All of lore.kernel.org
 help / color / mirror / Atom feed
* U-Boot STM32H747i-DISCO support
@ 2025-05-08 13:27 Johannes Krottmayer
  2025-05-08 21:23 ` [PATCH 00/10] add STM32H747 discovery board Johannes Krottmayer
                   ` (10 more replies)
  0 siblings, 11 replies; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 13:27 UTC (permalink / raw)
  To: u-boot, patrick.delaunay

Hello!

For a long time ago, I have wanted to release an patch series
to support the still active STM32H747i-DISCO board.

Currently I have added support for this board in my local
Git repository for U-Boot. But must do some tests on real
hardware now.

When I have tested it, can I release a patch series to
support this board, or isn't it useful?

Thanks in advance!

Kind regards,

Johannes


^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 00/10] add STM32H747 discovery board
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
@ 2025-05-08 21:23 ` Johannes Krottmayer
  2025-05-27 13:51   ` Patrice CHOTARD
  2025-05-08 21:23 ` [PATCH 01/10] arm: mach-stm32: stm32h7: add initial lowlevel early function Johannes Krottmayer
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:23 UTC (permalink / raw)
  To: u-boot, Patrick Delaunay, Patrice Chotard; +Cc: Johannes Krottmayer

These patch series adds support for the STM32H747 discovery
board from STMicroelectronics.

Johannes Krottmayer (10):
  arm: mach-stm32: stm32h7: add initial lowlevel early function
  arm: mach-stm32: stm32h7: add initial Makefile
  arm: mach-stm32: stm32h7: add STM32H747-DISCO board
  arm: mach-stm32: add stm32h7 subdirectory
  board: st: add STM32H747 discovery board
  configs: add STM32H747 discovery board
  include: configs: add STM32H747 discovery board
  arm: dts: add STM32H747 discovery board
  dts: upstream: arm: st: add STM32H747 discovery board
  dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1

 arch/arm/dts/stm32h747i-disco-u-boot.dtsi    | 101 ++++++++++++++++
 arch/arm/mach-stm32/Makefile                 |   2 +
 arch/arm/mach-stm32/stm32h7/Kconfig          |   5 +
 arch/arm/mach-stm32/stm32h7/Makefile         |   6 +
 arch/arm/mach-stm32/stm32h7/lowlevel.S       |  45 ++++++++
 board/st/stm32h747-disco/Kconfig             |  15 +++
 board/st/stm32h747-disco/MAINTAINERS         |   8 ++
 board/st/stm32h747-disco/Makefile            |  10 ++
 board/st/stm32h747-disco/stm32h747-disco.c   |  43 +++++++
 configs/stm32h747-disco_defconfig            |  35 ++++++
 dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi |   4 +-
 dts/upstream/src/arm/st/stm32h747i-disco.dts | 115 +++++++++++++++++++
 include/configs/stm32h747-disco.h            |  37 ++++++
 13 files changed, 424 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/dts/stm32h747i-disco-u-boot.dtsi
 create mode 100644 arch/arm/mach-stm32/stm32h7/Makefile
 create mode 100644 arch/arm/mach-stm32/stm32h7/lowlevel.S
 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 dts/upstream/src/arm/st/stm32h747i-disco.dts
 create mode 100644 include/configs/stm32h747-disco.h

-- 
2.39.5



^ permalink raw reply	[flat|nested] 24+ messages in thread

* [PATCH 01/10] arm: mach-stm32: stm32h7: add initial lowlevel early function
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
  2025-05-08 21:23 ` [PATCH 00/10] add STM32H747 discovery board Johannes Krottmayer
@ 2025-05-08 21:23 ` Johannes Krottmayer
  2025-05-27 12:59   ` Patrice CHOTARD
  2025-05-08 21:23 ` [PATCH 02/10] arm: mach-stm32: stm32h7: add initial Makefile Johannes Krottmayer
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:23 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add new assembly function 'arch_very_early_init'

This functions setups the power supply for STM32H7 SoC's to
direct SMPS mode, which is required for some boards like
the STM32H747I-DISCO in the default configuration.

If this isn't done in an early stage it cause a deadlock and
also the SoC is running in a limited mode according to the
TRM from the SoC.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 arch/arm/mach-stm32/stm32h7/lowlevel.S | 45 ++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 arch/arm/mach-stm32/stm32h7/lowlevel.S

diff --git a/arch/arm/mach-stm32/stm32h7/lowlevel.S b/arch/arm/mach-stm32/stm32h7/lowlevel.S
new file mode 100644
index 00000000000..97f4e383e3b
--- /dev/null
+++ b/arch/arm/mach-stm32/stm32h7/lowlevel.S
@@ -0,0 +1,45 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2025, Johannes Krottmayer <johannes@krotti42.com>
+ */
+
+#include <linux/linkage.h>
+
+/*
+ * STM32H7 PWR registers
+ */
+#define PWR_CR3			0x5802480C
+#define PWR_CR3_LDOEN		1
+
+#define PWR_CSR1			0x58024804
+#define PWR_CSR1_ACTVOSRDY	13
+
+ENTRY(arch_very_early_init)
+	/*
+	 * Setup power supply for STM32H7 to direct SMPS mode.
+	 * This is the default configuration from some boards
+	 * like the SMT32H747i-DISCO.
+	 *
+	 * If these steps will not be done, this cause a deadlock.
+	 */
+	ldr r6, =PWR_CR3
+	/* Disable LDO */
+	movs r0, #1
+	lsl r1, r0, #PWR_CR3_LDOEN
+	mvn r2, r1
+	ldr r3, [r6]
+	and r3, r2
+	str r3, [r6]
+	lsl r1, r0, #PWR_CSR1_ACTVOSRDY
+
+	/* Loop until ACTVOSRDY is valid */
+1:
+	ldr r6, =PWR_CSR1
+	ldr r3, [r6]
+	and r3, r1
+	cmp r3, r1
+	bne 1b
+
+	/* Jump back to C runtime setup */
+	bx lr
+ENDPROC(arch_very_early_init)
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 02/10] arm: mach-stm32: stm32h7: add initial Makefile
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
  2025-05-08 21:23 ` [PATCH 00/10] add STM32H747 discovery board Johannes Krottmayer
  2025-05-08 21:23 ` [PATCH 01/10] arm: mach-stm32: stm32h7: add initial lowlevel early function Johannes Krottmayer
@ 2025-05-08 21:23 ` Johannes Krottmayer
  2025-05-27 13:00   ` Patrice CHOTARD
  2025-05-08 21:23 ` [PATCH 03/10] arm: mach-stm32: stm32h7: add STM32H747-DISCO board Johannes Krottmayer
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:23 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add initial Makefile for the STM32H7 series:

Currently it includes only one additional assembly source file
which is required for the STM32H747I-DISCO board.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 arch/arm/mach-stm32/stm32h7/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 arch/arm/mach-stm32/stm32h7/Makefile

diff --git a/arch/arm/mach-stm32/stm32h7/Makefile b/arch/arm/mach-stm32/stm32h7/Makefile
new file mode 100644
index 00000000000..a70d4b445db
--- /dev/null
+++ b/arch/arm/mach-stm32/stm32h7/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# (C) Copyright 2025
+# Johannes Krottmayer <johannes@krotti42.com>
+
+obj-y += lowlevel.o
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 03/10] arm: mach-stm32: stm32h7: add STM32H747-DISCO board
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (2 preceding siblings ...)
  2025-05-08 21:23 ` [PATCH 02/10] arm: mach-stm32: stm32h7: add initial Makefile Johannes Krottmayer
@ 2025-05-08 21:23 ` Johannes Krottmayer
  2025-05-27 13:01   ` Patrice CHOTARD
  2025-05-08 21:24 ` [PATCH 04/10] arm: mach-stm32: add stm32h7 subdirectory Johannes Krottmayer
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:23 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add initial support for the STM32H747-DISCO board in Kconfig.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 arch/arm/mach-stm32/stm32h7/Kconfig | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-stm32/stm32h7/Kconfig b/arch/arm/mach-stm32/stm32h7/Kconfig
index 70233a4b23c..281906d8595 100644
--- a/arch/arm/mach-stm32/stm32h7/Kconfig
+++ b/arch/arm/mach-stm32/stm32h7/Kconfig
@@ -9,8 +9,13 @@ config TARGET_STM32H743_EVAL
 config TARGET_STM32H750_ART_PI
 	bool "STM32H750 ART Pi board"
 
+config TARGET_STM32H747_DISCO
+	bool "STM32H747 Discovery board"
+	select ARCH_VERY_EARLY_INIT
+
 source "board/st/stm32h743-eval/Kconfig"
 source "board/st/stm32h743-disco/Kconfig"
 source "board/st/stm32h750-art-pi/Kconfig"
+source "board/st/stm32h747-disco/Kconfig"
 
 endif
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 04/10] arm: mach-stm32: add stm32h7 subdirectory
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (3 preceding siblings ...)
  2025-05-08 21:23 ` [PATCH 03/10] arm: mach-stm32: stm32h7: add STM32H747-DISCO board Johannes Krottmayer
@ 2025-05-08 21:24 ` Johannes Krottmayer
  2025-05-27 13:07   ` Patrice CHOTARD
  2025-05-08 21:24 ` [PATCH 05/10] board: st: add STM32H747 discovery board Johannes Krottmayer
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:24 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add 'stm32h7' subdirectory to main Makefile.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 arch/arm/mach-stm32/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-stm32/Makefile b/arch/arm/mach-stm32/Makefile
index 03d535d8148..8af4943e542 100644
--- a/arch/arm/mach-stm32/Makefile
+++ b/arch/arm/mach-stm32/Makefile
@@ -3,3 +3,5 @@
 # (C) Copyright 2000-2006
 # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
 obj-y += soc.o
+
+obj-$(CONFIG_STM32H7) += stm32h7/
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 05/10] board: st: add STM32H747 discovery board
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (4 preceding siblings ...)
  2025-05-08 21:24 ` [PATCH 04/10] arm: mach-stm32: add stm32h7 subdirectory Johannes Krottmayer
@ 2025-05-08 21:24 ` Johannes Krottmayer
  2025-05-27 13:11   ` Patrice CHOTARD
  2025-05-08 21:24 ` [PATCH 06/10] configs: " Johannes Krottmayer
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:24 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

The code was copied from the STM32H743 discovery board and
modified for the STM32H747 discovery board.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 board/st/stm32h747-disco/Kconfig           | 15 ++++++++
 board/st/stm32h747-disco/MAINTAINERS       |  8 ++++
 board/st/stm32h747-disco/Makefile          | 10 +++++
 board/st/stm32h747-disco/stm32h747-disco.c | 43 ++++++++++++++++++++++
 4 files changed, 76 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

diff --git a/board/st/stm32h747-disco/Kconfig b/board/st/stm32h747-disco/Kconfig
new file mode 100644
index 00000000000..a7b2c09a327
--- /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 00000000000..afca1b913ce
--- /dev/null
+++ b/board/st/stm32h747-disco/MAINTAINERS
@@ -0,0 +1,8 @@
+STM32H747 DISCOVERY BOARD
+M:	Patrice Chotard <patrice.chotard@foss.st.com>
+S:	Maintained
+F:	doc/board/st/
+F:	board/st/stm32h747-disco
+F:	include/configs/stm32h747-disco.h
+F:	configs/stm32h747-disco_defconfig
+F:	arch/arm/dts/stm32h7*
diff --git a/board/st/stm32h747-disco/Makefile b/board/st/stm32h747-disco/Makefile
new file mode 100644
index 00000000000..b0ba62fa3b7
--- /dev/null
+++ b/board/st/stm32h747-disco/Makefile
@@ -0,0 +1,10 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copied from board/st/stm32h743-disco/Makefile:
+#
+# Copyright (C) 2017, STMicroelectronics - All Rights Reserved
+# Author(s): Patrice CHOTARD, <patrice.chotard@foss.st.com> for STMicroelectronics.
+#
+# Modified for the STM32H747-DISCO: Author: Johannes Krottmayer <johannes@krotti42.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 00000000000..538174391d6
--- /dev/null
+++ b/board/st/stm32h747-disco/stm32h747-disco.c
@@ -0,0 +1,43 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copied from board/st/stm32h743-disco/stm32h743-disco.c:
+ *
+ * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
+ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
+ */
+
+#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;
+}
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 06/10] configs: add STM32H747 discovery board
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (5 preceding siblings ...)
  2025-05-08 21:24 ` [PATCH 05/10] board: st: add STM32H747 discovery board Johannes Krottmayer
@ 2025-05-08 21:24 ` Johannes Krottmayer
  2025-05-27 13:12   ` Patrice CHOTARD
  2025-05-08 21:24 ` [PATCH 07/10] include: " Johannes Krottmayer
                   ` (3 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:24 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add initial support for the STM32H747 discovery board. The
configuration is copied and modified from the STM32H743 discovery
board.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 configs/stm32h747-disco_defconfig | 35 +++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 configs/stm32h747-disco_defconfig

diff --git a/configs/stm32h747-disco_defconfig b/configs/stm32h747-disco_defconfig
new file mode 100644
index 00000000000..8a0c72450d1
--- /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
+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
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 07/10] include: configs: add STM32H747 discovery board
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (6 preceding siblings ...)
  2025-05-08 21:24 ` [PATCH 06/10] configs: " Johannes Krottmayer
@ 2025-05-08 21:24 ` Johannes Krottmayer
  2025-05-27 13:13   ` Patrice CHOTARD
  2025-05-08 21:24 ` [PATCH 08/10] arm: dts: " Johannes Krottmayer
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:24 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add initial support for the STM32H747 discovery board. The
header is copied and modified from the STM32H743 discovery
board.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 include/configs/stm32h747-disco.h | 37 +++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 include/configs/stm32h747-disco.h

diff --git a/include/configs/stm32h747-disco.h b/include/configs/stm32h747-disco.h
new file mode 100644
index 00000000000..582c0289137
--- /dev/null
+++ b/include/configs/stm32h747-disco.h
@@ -0,0 +1,37 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copied from include/configs/stm32h743-disco.h:
+ *
+ * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
+ * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
+ *
+ * Modified for the STM32H747-DISCO: Author: Johannes Krottmayer <johannes@krotti42.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 */
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 08/10] arm: dts: add STM32H747 discovery board
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (7 preceding siblings ...)
  2025-05-08 21:24 ` [PATCH 07/10] include: " Johannes Krottmayer
@ 2025-05-08 21:24 ` Johannes Krottmayer
  2025-05-27 13:23   ` Patrice CHOTARD
  2025-05-08 21:24 ` [PATCH 09/10] dts: upstream: arm: st: " Johannes Krottmayer
  2025-05-08 21:24 ` [PATCH 10/10] dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1 Johannes Krottmayer
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:24 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add initial support for the STM32H747 discovery baord. Copied
from the STM32H743 discovery board.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 arch/arm/dts/stm32h747i-disco-u-boot.dtsi | 101 ++++++++++++++++++++++
 1 file changed, 101 insertions(+)
 create mode 100644 arch/arm/dts/stm32h747i-disco-u-boot.dtsi

diff --git a/arch/arm/dts/stm32h747i-disco-u-boot.dtsi b/arch/arm/dts/stm32h747i-disco-u-boot.dtsi
new file mode 100644
index 00000000000..02e28c63f28
--- /dev/null
+++ b/arch/arm/dts/stm32h747i-disco-u-boot.dtsi
@@ -0,0 +1,101 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+#include <stm32h7-u-boot.dtsi>
+
+&fmc {
+
+	/*
+	 * Memory configuration from sdram datasheet IS42S32800G-6BLI
+	 * first bank is bank@0
+	 * second bank is bank@1
+	 */
+	bank1: bank@1 {
+		st,sdram-control = /bits/ 8 <NO_COL_9
+					     NO_ROW_12
+					     MWIDTH_32
+					     BANKS_4
+					     CAS_2
+					     SDCLK_3
+					     RD_BURST_EN
+					     RD_PIPE_DL_0>;
+		st,sdram-timing = /bits/ 8 <TMRD_1
+					    TXSR_1
+					    TRAS_1
+					    TRC_6
+					    TRP_2
+					    TWR_1
+					    TRCD_1>;
+		st,sdram-refcount = <1539>;
+	};
+};
+
+&pinctrl {
+	fmc_pins: fmc@0 {
+		pins {
+			pinmux = <STM32_PINMUX('D', 0, AF12)>,
+				 <STM32_PINMUX('D', 1, AF12)>,
+				 <STM32_PINMUX('D', 8, AF12)>,
+				 <STM32_PINMUX('D', 9, AF12)>,
+				 <STM32_PINMUX('D',10, AF12)>,
+				 <STM32_PINMUX('D',14, AF12)>,
+				 <STM32_PINMUX('D',15, AF12)>,
+
+				 <STM32_PINMUX('E', 0, AF12)>,
+				 <STM32_PINMUX('E', 1, AF12)>,
+				 <STM32_PINMUX('E', 7, AF12)>,
+				 <STM32_PINMUX('E', 8, AF12)>,
+				 <STM32_PINMUX('E', 9, AF12)>,
+				 <STM32_PINMUX('E',10, AF12)>,
+				 <STM32_PINMUX('E',11, AF12)>,
+				 <STM32_PINMUX('E',12, AF12)>,
+				 <STM32_PINMUX('E',13, AF12)>,
+				 <STM32_PINMUX('E',14, AF12)>,
+				 <STM32_PINMUX('E',15, AF12)>,
+
+				 <STM32_PINMUX('F', 0, AF12)>,
+				 <STM32_PINMUX('F', 1, AF12)>,
+				 <STM32_PINMUX('F', 2, AF12)>,
+				 <STM32_PINMUX('F', 3, AF12)>,
+				 <STM32_PINMUX('F', 4, AF12)>,
+				 <STM32_PINMUX('F', 5, AF12)>,
+				 <STM32_PINMUX('F',11, AF12)>,
+				 <STM32_PINMUX('F',12, AF12)>,
+				 <STM32_PINMUX('F',13, AF12)>,
+				 <STM32_PINMUX('F',14, AF12)>,
+				 <STM32_PINMUX('F',15, AF12)>,
+
+				 <STM32_PINMUX('G', 0, AF12)>,
+				 <STM32_PINMUX('G', 1, AF12)>,
+				 <STM32_PINMUX('G', 2, AF12)>,
+				 <STM32_PINMUX('G', 4, AF12)>,
+				 <STM32_PINMUX('G', 5, AF12)>,
+				 <STM32_PINMUX('G', 8, AF12)>,
+				 <STM32_PINMUX('G',15, AF12)>,
+
+				 <STM32_PINMUX('H', 5, AF12)>,
+				 <STM32_PINMUX('H', 6, AF12)>,
+				 <STM32_PINMUX('H', 7, AF12)>,
+				 <STM32_PINMUX('H', 8, AF12)>,
+				 <STM32_PINMUX('H', 9, AF12)>,
+				 <STM32_PINMUX('H',10, AF12)>,
+				 <STM32_PINMUX('H',11, AF12)>,
+				 <STM32_PINMUX('H',12, AF12)>,
+				 <STM32_PINMUX('H',13, AF12)>,
+				 <STM32_PINMUX('H',14, AF12)>,
+				 <STM32_PINMUX('H',15, AF12)>,
+
+				 <STM32_PINMUX('I', 0, AF12)>,
+				 <STM32_PINMUX('I', 1, AF12)>,
+				 <STM32_PINMUX('I', 2, AF12)>,
+				 <STM32_PINMUX('I', 3, AF12)>,
+				 <STM32_PINMUX('I', 4, AF12)>,
+				 <STM32_PINMUX('I', 5, AF12)>,
+				 <STM32_PINMUX('I', 6, AF12)>,
+				 <STM32_PINMUX('I', 7, AF12)>,
+				 <STM32_PINMUX('I', 9, AF12)>,
+				 <STM32_PINMUX('I',10, AF12)>;
+
+			slew-rate = <3>;
+		};
+	};
+};
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 09/10] dts: upstream: arm: st: add STM32H747 discovery board
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (8 preceding siblings ...)
  2025-05-08 21:24 ` [PATCH 08/10] arm: dts: " Johannes Krottmayer
@ 2025-05-08 21:24 ` Johannes Krottmayer
  2025-05-09 11:23   ` Quentin Schulz
  2025-05-08 21:24 ` [PATCH 10/10] dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1 Johannes Krottmayer
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:24 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

Add initial device tree for the STM32H747 discovery board.
Copied from the STM32H743 discovery board and modified for
the STM32H747 discovery board.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 dts/upstream/src/arm/st/stm32h747i-disco.dts | 115 +++++++++++++++++++
 1 file changed, 115 insertions(+)
 create mode 100644 dts/upstream/src/arm/st/stm32h747i-disco.dts

diff --git a/dts/upstream/src/arm/st/stm32h747i-disco.dts b/dts/upstream/src/arm/st/stm32h747i-disco.dts
new file mode 100644
index 00000000000..2a4398bf897
--- /dev/null
+++ b/dts/upstream/src/arm/st/stm32h747i-disco.dts
@@ -0,0 +1,115 @@
+/*
+ * Copied from the STM32H743 discovery board and modified for
+ * the STM32H747 discovery board.
+ *
+ * Original author and license:
+ * Copyright 2017 - Patrice Chotard <patrice.chotard@st.com>
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License as
+ *     published by the Free Software Foundation; either version 2 of the
+ *     License, or (at your option) any later version.
+ *
+ *     This file is distributed in the hope that it will be useful,
+ *     but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *     GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ *     obtaining a copy of this software and associated documentation
+ *     files (the "Software"), to deal in the Software without
+ *     restriction, including without limitation the rights to use,
+ *     copy, modify, merge, publish, distribute, sublicense, and/or
+ *     sell copies of the Software, and to permit persons to whom the
+ *     Software is furnished to do so, subject to the following
+ *     conditions:
+ *
+ *     The above copyright notice and this permission notice shall be
+ *     included in all copies or substantial portions of the Software.
+ *
+ *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ *     OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/dts-v1/;
+#include "stm32h743.dtsi"
+#include "stm32h7-pinctrl.dtsi"
+
+/ {
+	model = "STMicroelectronics STM32H747i-Discovery board";
+	compatible = "st,stm32h747i-disco", "st,stm32h747";
+
+	chosen {
+		bootargs = "root=/dev/ram";
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory@d0000000 {
+		device_type = "memory";
+		reg = <0xd0000000 0x2000000>;
+	};
+
+	aliases {
+		serial0 = &usart1;
+	};
+
+	v3v3: regulator-v3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "v3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-always-on;
+	};
+};
+
+&clk_hse {
+	clock-frequency = <25000000>;
+};
+
+&mac {
+	status = "disabled";
+	pinctrl-0 = <&ethernet_rmii>;
+	pinctrl-names = "default";
+	phy-mode = "rmii";
+	phy-handle = <&phy0>;
+
+	mdio0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "snps,dwmac-mdio";
+		phy0: ethernet-phy@0 {
+			reg = <0>;
+		};
+	};
+};
+
+&sdmmc1 {
+	pinctrl-names = "default", "opendrain", "sleep";
+	pinctrl-0 = <&sdmmc1_b4_pins_a>;
+	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
+	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
+	broken-cd;
+	st,neg-edge;
+	bus-width = <4>;
+	vmmc-supply = <&v3v3>;
+	status = "okay";
+};
+
+&usart1 {
+	pinctrl-0 = <&usart1_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* [PATCH 10/10] dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1
  2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
                   ` (9 preceding siblings ...)
  2025-05-08 21:24 ` [PATCH 09/10] dts: upstream: arm: st: " Johannes Krottmayer
@ 2025-05-08 21:24 ` Johannes Krottmayer
  2025-05-27 13:26   ` Patrice CHOTARD
  10 siblings, 1 reply; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-08 21:24 UTC (permalink / raw)
  To: u-boot; +Cc: Johannes Krottmayer, Patrick Delaunay, Patrice Chotard

The pins for USART1 have must be changed to other values, to
support the STM32H747 discovery board.

Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
---
 dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi b/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi
index 7f1d234e102..7d7c87aa2fe 100644
--- a/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi
+++ b/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi
@@ -213,13 +213,13 @@
 
 	usart1_pins: usart1-0 {
 		pins1 {
-			pinmux = <STM32_PINMUX('B', 14, AF4)>; /* USART1_TX */
+			pinmux = <STM32_PINMUX('A', 9, AF7)>; /* USART1_TX */
 			bias-disable;
 			drive-push-pull;
 			slew-rate = <0>;
 		};
 		pins2 {
-			pinmux = <STM32_PINMUX('B', 15, AF4)>; /* USART1_RX */
+			pinmux = <STM32_PINMUX('A', 10, AF7)>; /* USART1_RX */
 			bias-disable;
 		};
 	};
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 24+ messages in thread

* Re: [PATCH 09/10] dts: upstream: arm: st: add STM32H747 discovery board
  2025-05-08 21:24 ` [PATCH 09/10] dts: upstream: arm: st: " Johannes Krottmayer
@ 2025-05-09 11:23   ` Quentin Schulz
  2025-05-09 16:32     ` Johannes Krottmayer
  0 siblings, 1 reply; 24+ messages in thread
From: Quentin Schulz @ 2025-05-09 11:23 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay, Patrice Chotard

Hi Johannes,

On 5/8/25 11:24 PM, Johannes Krottmayer wrote:
> Add initial device tree for the STM32H747 discovery board.
> Copied from the STM32H743 discovery board and modified for
> the STM32H747 discovery board.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>   dts/upstream/src/arm/st/stm32h747i-disco.dts | 115 +++++++++++++++++++

Manual modification of dts/upstream is forbidden.

Please use tools/update-subtree.sh pick to cherry-pick commits from 
devicetree-rebasing tree. If your device tree doesn't exist in 
devicetree-rebasing yet, you need to wait for it to appear there or put 
stuff in arch/arm/dts/ instead. I highly recommend to wait to lower 
maintenance burden.

The kernel seems to have merged that, c.f. 
https://lore.kernel.org/linux-arm-kernel/bf7eddfa-ca7f-49a6-a3f9-574f2c4fe972@foss.st.com/. 
You'll need to wait for it to reach a v6.X-rcY tag before it reaches 
devicetree-rebasing. You may need to cherry-pick more than those patches 
if there are conflicts (or simply if it doesn't work).

Same remark for patch 10/10.

Cheers,
Quentin

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 09/10] dts: upstream: arm: st: add STM32H747 discovery board
  2025-05-09 11:23   ` Quentin Schulz
@ 2025-05-09 16:32     ` Johannes Krottmayer
  0 siblings, 0 replies; 24+ messages in thread
From: Johannes Krottmayer @ 2025-05-09 16:32 UTC (permalink / raw)
  To: Quentin Schulz, u-boot; +Cc: Patrick Delaunay, Patrice Chotard

Hi Quentin!

On 5/9/25 13:23, Quentin Schulz wrote:
> Hi Johannes,
> 
> On 5/8/25 11:24 PM, Johannes Krottmayer wrote:
>> Add initial device tree for the STM32H747 discovery board.
>> Copied from the STM32H743 discovery board and modified for
>> the STM32H747 discovery board.
>>
>> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
>> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
>> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
>> ---
>>    dts/upstream/src/arm/st/stm32h747i-disco.dts | 115 +++++++++++++++++++
> 
> Manual modification of dts/upstream is forbidden.

Didn't know that as independent contributor. But I have suspected this,
according to the README in the directory 'dts'.

> Please use tools/update-subtree.sh pick to cherry-pick commits from
> devicetree-rebasing tree. If your device tree doesn't exist in
> devicetree-rebasing yet, you need to wait for it to appear there or put
> stuff in arch/arm/dts/ instead. I highly recommend to wait to lower
> maintenance burden.

Yes, I will wait for that.

> The kernel seems to have merged that, c.f.
> https://lore.kernel.org/linux-arm-kernel/bf7eddfa-ca7f-49a6-a3f9-574f2c4fe972@foss.st.com/.

Good to know. I must admit I don't looked into the last commits from Linux.

> You'll need to wait for it to reach a v6.X-rcY tag before it reaches
> devicetree-rebasing. You may need to cherry-pick more than those patches
> if there are conflicts (or simply if it doesn't work).

The primarily motive to release this patch series was only because I
have must to add the board support, because to test another patch for
the ARMv7-M architecture on real hardware. So I have thought if somebody
helps my patch series so it's okay. If not then it's also okay for me.

Therefore I released it here. :)

> Same remark for patch 10/10.
> 
> Cheers,
> Quentin

Kind regards,

Johannes


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 01/10] arm: mach-stm32: stm32h7: add initial lowlevel early function
  2025-05-08 21:23 ` [PATCH 01/10] arm: mach-stm32: stm32h7: add initial lowlevel early function Johannes Krottmayer
@ 2025-05-27 12:59   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 12:59 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:23, Johannes Krottmayer wrote:
> Add new assembly function 'arch_very_early_init'
> 
> This functions setups the power supply for STM32H7 SoC's to
> direct SMPS mode, which is required for some boards like
> the STM32H747I-DISCO in the default configuration.
> 
> If this isn't done in an early stage it cause a deadlock and
> also the SoC is running in a limited mode according to the
> TRM from the SoC.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  arch/arm/mach-stm32/stm32h7/lowlevel.S | 45 ++++++++++++++++++++++++++
>  1 file changed, 45 insertions(+)
>  create mode 100644 arch/arm/mach-stm32/stm32h7/lowlevel.S
> 
> diff --git a/arch/arm/mach-stm32/stm32h7/lowlevel.S b/arch/arm/mach-stm32/stm32h7/lowlevel.S
> new file mode 100644
> index 00000000000..97f4e383e3b
> --- /dev/null
> +++ b/arch/arm/mach-stm32/stm32h7/lowlevel.S
> @@ -0,0 +1,45 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copyright (C) 2025, Johannes Krottmayer <johannes@krotti42.com>
> + */
> +
> +#include <linux/linkage.h>
> +
> +/*
> + * STM32H7 PWR registers
> + */
> +#define PWR_CR3			0x5802480C
> +#define PWR_CR3_LDOEN		1
> +
> +#define PWR_CSR1			0x58024804
> +#define PWR_CSR1_ACTVOSRDY	13
> +
> +ENTRY(arch_very_early_init)
> +	/*
> +	 * Setup power supply for STM32H7 to direct SMPS mode.
> +	 * This is the default configuration from some boards
> +	 * like the SMT32H747i-DISCO.
> +	 *
> +	 * If these steps will not be done, this cause a deadlock.
> +	 */
> +	ldr r6, =PWR_CR3
> +	/* Disable LDO */
> +	movs r0, #1
> +	lsl r1, r0, #PWR_CR3_LDOEN
> +	mvn r2, r1
> +	ldr r3, [r6]
> +	and r3, r2
> +	str r3, [r6]
> +	lsl r1, r0, #PWR_CSR1_ACTVOSRDY
> +
> +	/* Loop until ACTVOSRDY is valid */
> +1:
> +	ldr r6, =PWR_CSR1
> +	ldr r3, [r6]
> +	and r3, r1
> +	cmp r3, r1
> +	bne 1b
> +
> +	/* Jump back to C runtime setup */
> +	bx lr
> +ENDPROC(arch_very_early_init)

Hi Johannes

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 02/10] arm: mach-stm32: stm32h7: add initial Makefile
  2025-05-08 21:23 ` [PATCH 02/10] arm: mach-stm32: stm32h7: add initial Makefile Johannes Krottmayer
@ 2025-05-27 13:00   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:00 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:23, Johannes Krottmayer wrote:
> Add initial Makefile for the STM32H7 series:
> 
> Currently it includes only one additional assembly source file
> which is required for the STM32H747I-DISCO board.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  arch/arm/mach-stm32/stm32h7/Makefile | 6 ++++++
>  1 file changed, 6 insertions(+)
>  create mode 100644 arch/arm/mach-stm32/stm32h7/Makefile
> 
> diff --git a/arch/arm/mach-stm32/stm32h7/Makefile b/arch/arm/mach-stm32/stm32h7/Makefile
> new file mode 100644
> index 00000000000..a70d4b445db
> --- /dev/null
> +++ b/arch/arm/mach-stm32/stm32h7/Makefile
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# (C) Copyright 2025
> +# Johannes Krottmayer <johannes@krotti42.com>
> +
> +obj-y += lowlevel.o
Hi Johannes

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 03/10] arm: mach-stm32: stm32h7: add STM32H747-DISCO board
  2025-05-08 21:23 ` [PATCH 03/10] arm: mach-stm32: stm32h7: add STM32H747-DISCO board Johannes Krottmayer
@ 2025-05-27 13:01   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:01 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:23, Johannes Krottmayer wrote:
> Add initial support for the STM32H747-DISCO board in Kconfig.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  arch/arm/mach-stm32/stm32h7/Kconfig | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm/mach-stm32/stm32h7/Kconfig b/arch/arm/mach-stm32/stm32h7/Kconfig
> index 70233a4b23c..281906d8595 100644
> --- a/arch/arm/mach-stm32/stm32h7/Kconfig
> +++ b/arch/arm/mach-stm32/stm32h7/Kconfig
> @@ -9,8 +9,13 @@ config TARGET_STM32H743_EVAL
>  config TARGET_STM32H750_ART_PI
>  	bool "STM32H750 ART Pi board"
>  
> +config TARGET_STM32H747_DISCO
> +	bool "STM32H747 Discovery board"
> +	select ARCH_VERY_EARLY_INIT
> +
>  source "board/st/stm32h743-eval/Kconfig"
>  source "board/st/stm32h743-disco/Kconfig"
>  source "board/st/stm32h750-art-pi/Kconfig"
> +source "board/st/stm32h747-disco/Kconfig"

Add this new line respecting alphabetical order

With that fix :

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

>  
>  endif

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 04/10] arm: mach-stm32: add stm32h7 subdirectory
  2025-05-08 21:24 ` [PATCH 04/10] arm: mach-stm32: add stm32h7 subdirectory Johannes Krottmayer
@ 2025-05-27 13:07   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:07 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:24, Johannes Krottmayer wrote:
> Add 'stm32h7' subdirectory to main Makefile.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  arch/arm/mach-stm32/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-stm32/Makefile b/arch/arm/mach-stm32/Makefile
> index 03d535d8148..8af4943e542 100644
> --- a/arch/arm/mach-stm32/Makefile
> +++ b/arch/arm/mach-stm32/Makefile
> @@ -3,3 +3,5 @@
>  # (C) Copyright 2000-2006
>  # Wolfgang Denk, DENX Software Engineering, wd@denx.de.
>  obj-y += soc.o
> +
> +obj-$(CONFIG_STM32H7) += stm32h7/

Hi Johannes

Why are you adding this ?

arch/arm/mach-stm32/stm32h7 directory already exists, with a Kconfig allowing to build 
all other STM32H7xx based boards. Simply add new entry in this Kconfig for STM32H747.

Drop this patch.

Patrice

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 05/10] board: st: add STM32H747 discovery board
  2025-05-08 21:24 ` [PATCH 05/10] board: st: add STM32H747 discovery board Johannes Krottmayer
@ 2025-05-27 13:11   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:11 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:24, Johannes Krottmayer wrote:
> The code was copied from the STM32H743 discovery board and
> modified for the STM32H747 discovery board.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  board/st/stm32h747-disco/Kconfig           | 15 ++++++++
>  board/st/stm32h747-disco/MAINTAINERS       |  8 ++++
>  board/st/stm32h747-disco/Makefile          | 10 +++++
>  board/st/stm32h747-disco/stm32h747-disco.c | 43 ++++++++++++++++++++++
>  4 files changed, 76 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
> 
> diff --git a/board/st/stm32h747-disco/Kconfig b/board/st/stm32h747-disco/Kconfig
> new file mode 100644
> index 00000000000..a7b2c09a327
> --- /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 00000000000..afca1b913ce
> --- /dev/null
> +++ b/board/st/stm32h747-disco/MAINTAINERS
> @@ -0,0 +1,8 @@
> +STM32H747 DISCOVERY BOARD
> +M:	Patrice Chotard <patrice.chotard@foss.st.com>

Add your name please.

> +S:	Maintained
> +F:	doc/board/st/
> +F:	board/st/stm32h747-disco
> +F:	include/configs/stm32h747-disco.h
> +F:	configs/stm32h747-disco_defconfig
> +F:	arch/arm/dts/stm32h7*
> diff --git a/board/st/stm32h747-disco/Makefile b/board/st/stm32h747-disco/Makefile
> new file mode 100644
> index 00000000000..b0ba62fa3b7
> --- /dev/null
> +++ b/board/st/stm32h747-disco/Makefile
> @@ -0,0 +1,10 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +#
> +# Copied from board/st/stm32h743-disco/Makefile:
> +#
> +# Copyright (C) 2017, STMicroelectronics - All Rights Reserved
> +# Author(s): Patrice CHOTARD, <patrice.chotard@foss.st.com> for STMicroelectronics.

Remove or update the copyright and authors with your own.

> +#
> +# Modified for the STM32H747-DISCO: Author: Johannes Krottmayer <johannes@krotti42.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 00000000000..538174391d6
> --- /dev/null
> +++ b/board/st/stm32h747-disco/stm32h747-disco.c
> @@ -0,0 +1,43 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +/*
> + * Copied from board/st/stm32h743-disco/stm32h743-disco.c:
> + *
> + * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
> + * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.

Same remark as above

> + */
> +
> +#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;
> +}

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 06/10] configs: add STM32H747 discovery board
  2025-05-08 21:24 ` [PATCH 06/10] configs: " Johannes Krottmayer
@ 2025-05-27 13:12   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:12 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:24, Johannes Krottmayer wrote:
> Add initial support for the STM32H747 discovery board. The
> configuration is copied and modified from the STM32H743 discovery
> board.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  configs/stm32h747-disco_defconfig | 35 +++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>  create mode 100644 configs/stm32h747-disco_defconfig
> 
> diff --git a/configs/stm32h747-disco_defconfig b/configs/stm32h747-disco_defconfig
> new file mode 100644
> index 00000000000..8a0c72450d1
> --- /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
> +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

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 07/10] include: configs: add STM32H747 discovery board
  2025-05-08 21:24 ` [PATCH 07/10] include: " Johannes Krottmayer
@ 2025-05-27 13:13   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:13 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:24, Johannes Krottmayer wrote:
> Add initial support for the STM32H747 discovery board. The
> header is copied and modified from the STM32H743 discovery
> board.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  include/configs/stm32h747-disco.h | 37 +++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 include/configs/stm32h747-disco.h
> 
> diff --git a/include/configs/stm32h747-disco.h b/include/configs/stm32h747-disco.h
> new file mode 100644
> index 00000000000..582c0289137
> --- /dev/null
> +++ b/include/configs/stm32h747-disco.h
> @@ -0,0 +1,37 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Copied from include/configs/stm32h743-disco.h:
> + *
> + * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
> + * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.

Remove STMicroelectronics Copyright and my name as i am not the author of this file.

> + *
> + * Modified for the STM32H747-DISCO: Author: Johannes Krottmayer <johannes@krotti42.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 */



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 08/10] arm: dts: add STM32H747 discovery board
  2025-05-08 21:24 ` [PATCH 08/10] arm: dts: " Johannes Krottmayer
@ 2025-05-27 13:23   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:23 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:24, Johannes Krottmayer wrote:
> Add initial support for the STM32H747 discovery baord. Copied
> from the STM32H743 discovery board.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  arch/arm/dts/stm32h747i-disco-u-boot.dtsi | 101 ++++++++++++++++++++++
>  1 file changed, 101 insertions(+)
>  create mode 100644 arch/arm/dts/stm32h747i-disco-u-boot.dtsi
> 
> diff --git a/arch/arm/dts/stm32h747i-disco-u-boot.dtsi b/arch/arm/dts/stm32h747i-disco-u-boot.dtsi
> new file mode 100644
> index 00000000000..02e28c63f28
> --- /dev/null
> +++ b/arch/arm/dts/stm32h747i-disco-u-boot.dtsi
> @@ -0,0 +1,101 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +
> +#include <stm32h7-u-boot.dtsi>
> +
> +&fmc {
> +
> +	/*
> +	 * Memory configuration from sdram datasheet IS42S32800G-6BLI
> +	 * first bank is bank@0
> +	 * second bank is bank@1
> +	 */
> +	bank1: bank@1 {
> +		st,sdram-control = /bits/ 8 <NO_COL_9
> +					     NO_ROW_12
> +					     MWIDTH_32
> +					     BANKS_4
> +					     CAS_2
> +					     SDCLK_3
> +					     RD_BURST_EN
> +					     RD_PIPE_DL_0>;
> +		st,sdram-timing = /bits/ 8 <TMRD_1
> +					    TXSR_1
> +					    TRAS_1
> +					    TRC_6
> +					    TRP_2
> +					    TWR_1
> +					    TRCD_1>;
> +		st,sdram-refcount = <1539>;
> +	};
> +};
> +
> +&pinctrl {
> +	fmc_pins: fmc@0 {
> +		pins {
> +			pinmux = <STM32_PINMUX('D', 0, AF12)>,
> +				 <STM32_PINMUX('D', 1, AF12)>,
> +				 <STM32_PINMUX('D', 8, AF12)>,
> +				 <STM32_PINMUX('D', 9, AF12)>,
> +				 <STM32_PINMUX('D',10, AF12)>,
> +				 <STM32_PINMUX('D',14, AF12)>,
> +				 <STM32_PINMUX('D',15, AF12)>,
> +
> +				 <STM32_PINMUX('E', 0, AF12)>,
> +				 <STM32_PINMUX('E', 1, AF12)>,
> +				 <STM32_PINMUX('E', 7, AF12)>,
> +				 <STM32_PINMUX('E', 8, AF12)>,
> +				 <STM32_PINMUX('E', 9, AF12)>,
> +				 <STM32_PINMUX('E',10, AF12)>,
> +				 <STM32_PINMUX('E',11, AF12)>,
> +				 <STM32_PINMUX('E',12, AF12)>,
> +				 <STM32_PINMUX('E',13, AF12)>,
> +				 <STM32_PINMUX('E',14, AF12)>,
> +				 <STM32_PINMUX('E',15, AF12)>,
> +
> +				 <STM32_PINMUX('F', 0, AF12)>,
> +				 <STM32_PINMUX('F', 1, AF12)>,
> +				 <STM32_PINMUX('F', 2, AF12)>,
> +				 <STM32_PINMUX('F', 3, AF12)>,
> +				 <STM32_PINMUX('F', 4, AF12)>,
> +				 <STM32_PINMUX('F', 5, AF12)>,
> +				 <STM32_PINMUX('F',11, AF12)>,
> +				 <STM32_PINMUX('F',12, AF12)>,
> +				 <STM32_PINMUX('F',13, AF12)>,
> +				 <STM32_PINMUX('F',14, AF12)>,
> +				 <STM32_PINMUX('F',15, AF12)>,
> +
> +				 <STM32_PINMUX('G', 0, AF12)>,
> +				 <STM32_PINMUX('G', 1, AF12)>,
> +				 <STM32_PINMUX('G', 2, AF12)>,
> +				 <STM32_PINMUX('G', 4, AF12)>,
> +				 <STM32_PINMUX('G', 5, AF12)>,
> +				 <STM32_PINMUX('G', 8, AF12)>,
> +				 <STM32_PINMUX('G',15, AF12)>,
> +
> +				 <STM32_PINMUX('H', 5, AF12)>,
> +				 <STM32_PINMUX('H', 6, AF12)>,
> +				 <STM32_PINMUX('H', 7, AF12)>,
> +				 <STM32_PINMUX('H', 8, AF12)>,
> +				 <STM32_PINMUX('H', 9, AF12)>,
> +				 <STM32_PINMUX('H',10, AF12)>,
> +				 <STM32_PINMUX('H',11, AF12)>,
> +				 <STM32_PINMUX('H',12, AF12)>,
> +				 <STM32_PINMUX('H',13, AF12)>,
> +				 <STM32_PINMUX('H',14, AF12)>,
> +				 <STM32_PINMUX('H',15, AF12)>,
> +
> +				 <STM32_PINMUX('I', 0, AF12)>,
> +				 <STM32_PINMUX('I', 1, AF12)>,
> +				 <STM32_PINMUX('I', 2, AF12)>,
> +				 <STM32_PINMUX('I', 3, AF12)>,
> +				 <STM32_PINMUX('I', 4, AF12)>,
> +				 <STM32_PINMUX('I', 5, AF12)>,
> +				 <STM32_PINMUX('I', 6, AF12)>,
> +				 <STM32_PINMUX('I', 7, AF12)>,
> +				 <STM32_PINMUX('I', 9, AF12)>,
> +				 <STM32_PINMUX('I',10, AF12)>;
> +
> +			slew-rate = <3>;
> +		};
> +	};
> +};

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 10/10] dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1
  2025-05-08 21:24 ` [PATCH 10/10] dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1 Johannes Krottmayer
@ 2025-05-27 13:26   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:26 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot; +Cc: Patrick Delaunay



On 5/8/25 23:24, Johannes Krottmayer wrote:
> The pins for USART1 have must be changed to other values, to
> support the STM32H747 discovery board.
> 
> Signed-off-by: Johannes Krottmayer <johannes@krotti42.com>
> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Cc: Patrice Chotard <patrice.chotard@foss.st.com>
> ---
>  dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi b/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi
> index 7f1d234e102..7d7c87aa2fe 100644
> --- a/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi
> +++ b/dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi
> @@ -213,13 +213,13 @@
>  
>  	usart1_pins: usart1-0 {
>  		pins1 {
> -			pinmux = <STM32_PINMUX('B', 14, AF4)>; /* USART1_TX */
> +			pinmux = <STM32_PINMUX('A', 9, AF7)>; /* USART1_TX */
>  			bias-disable;
>  			drive-push-pull;
>  			slew-rate = <0>;
>  		};
>  		pins2 {
> -			pinmux = <STM32_PINMUX('B', 15, AF4)>; /* USART1_RX */
> +			pinmux = <STM32_PINMUX('A', 10, AF7)>; /* USART1_RX */
>  			bias-disable;
>  		};
>  	};


Hi Johannes

Same remark as Quentin did on Patch 9, don't update DT files from dts/upstream/src/... as
it's a synchronization with kernel device tree.
If you need a new pinctrl configuration for USART1, add a new one in kernel device tree
and submit it to kernel mailing list.

Thanks
Patrice

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: [PATCH 00/10] add STM32H747 discovery board
  2025-05-08 21:23 ` [PATCH 00/10] add STM32H747 discovery board Johannes Krottmayer
@ 2025-05-27 13:51   ` Patrice CHOTARD
  0 siblings, 0 replies; 24+ messages in thread
From: Patrice CHOTARD @ 2025-05-27 13:51 UTC (permalink / raw)
  To: Johannes Krottmayer, u-boot, Patrick Delaunay



On 5/8/25 23:23, Johannes Krottmayer wrote:
> These patch series adds support for the STM32H747 discovery
> board from STMicroelectronics.
> 
> Johannes Krottmayer (10):
>   arm: mach-stm32: stm32h7: add initial lowlevel early function
>   arm: mach-stm32: stm32h7: add initial Makefile
>   arm: mach-stm32: stm32h7: add STM32H747-DISCO board
>   arm: mach-stm32: add stm32h7 subdirectory
>   board: st: add STM32H747 discovery board
>   configs: add STM32H747 discovery board
>   include: configs: add STM32H747 discovery board
>   arm: dts: add STM32H747 discovery board
>   dts: upstream: arm: st: add STM32H747 discovery board
>   dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1
> 
>  arch/arm/dts/stm32h747i-disco-u-boot.dtsi    | 101 ++++++++++++++++
>  arch/arm/mach-stm32/Makefile                 |   2 +
>  arch/arm/mach-stm32/stm32h7/Kconfig          |   5 +
>  arch/arm/mach-stm32/stm32h7/Makefile         |   6 +
>  arch/arm/mach-stm32/stm32h7/lowlevel.S       |  45 ++++++++
>  board/st/stm32h747-disco/Kconfig             |  15 +++
>  board/st/stm32h747-disco/MAINTAINERS         |   8 ++
>  board/st/stm32h747-disco/Makefile            |  10 ++
>  board/st/stm32h747-disco/stm32h747-disco.c   |  43 +++++++
>  configs/stm32h747-disco_defconfig            |  35 ++++++
>  dts/upstream/src/arm/st/stm32h7-pinctrl.dtsi |   4 +-
>  dts/upstream/src/arm/st/stm32h747i-disco.dts | 115 +++++++++++++++++++
>  include/configs/stm32h747-disco.h            |  37 ++++++
>  13 files changed, 424 insertions(+), 2 deletions(-)
>  create mode 100644 arch/arm/dts/stm32h747i-disco-u-boot.dtsi
>  create mode 100644 arch/arm/mach-stm32/stm32h7/Makefile
>  create mode 100644 arch/arm/mach-stm32/stm32h7/lowlevel.S
>  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 dts/upstream/src/arm/st/stm32h747i-disco.dts
>  create mode 100644 include/configs/stm32h747-disco.h
> 


The patches 1/2/3/4/5 and 7 can be merged together.

Thanks
patrice

^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2025-05-27 13:52 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 13:27 U-Boot STM32H747i-DISCO support Johannes Krottmayer
2025-05-08 21:23 ` [PATCH 00/10] add STM32H747 discovery board Johannes Krottmayer
2025-05-27 13:51   ` Patrice CHOTARD
2025-05-08 21:23 ` [PATCH 01/10] arm: mach-stm32: stm32h7: add initial lowlevel early function Johannes Krottmayer
2025-05-27 12:59   ` Patrice CHOTARD
2025-05-08 21:23 ` [PATCH 02/10] arm: mach-stm32: stm32h7: add initial Makefile Johannes Krottmayer
2025-05-27 13:00   ` Patrice CHOTARD
2025-05-08 21:23 ` [PATCH 03/10] arm: mach-stm32: stm32h7: add STM32H747-DISCO board Johannes Krottmayer
2025-05-27 13:01   ` Patrice CHOTARD
2025-05-08 21:24 ` [PATCH 04/10] arm: mach-stm32: add stm32h7 subdirectory Johannes Krottmayer
2025-05-27 13:07   ` Patrice CHOTARD
2025-05-08 21:24 ` [PATCH 05/10] board: st: add STM32H747 discovery board Johannes Krottmayer
2025-05-27 13:11   ` Patrice CHOTARD
2025-05-08 21:24 ` [PATCH 06/10] configs: " Johannes Krottmayer
2025-05-27 13:12   ` Patrice CHOTARD
2025-05-08 21:24 ` [PATCH 07/10] include: " Johannes Krottmayer
2025-05-27 13:13   ` Patrice CHOTARD
2025-05-08 21:24 ` [PATCH 08/10] arm: dts: " Johannes Krottmayer
2025-05-27 13:23   ` Patrice CHOTARD
2025-05-08 21:24 ` [PATCH 09/10] dts: upstream: arm: st: " Johannes Krottmayer
2025-05-09 11:23   ` Quentin Schulz
2025-05-09 16:32     ` Johannes Krottmayer
2025-05-08 21:24 ` [PATCH 10/10] dts: upstream: arm: st: stm32h7-pinctrl: change pins for USART1 Johannes Krottmayer
2025-05-27 13:26   ` Patrice CHOTARD

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.