Skip to contentSkip to conversation

ARM: dts: stm32: Introduce DH STM32MP13x target

PATCH In review Marek Vasut 2 participants 3 messages Oct 23, 2025 – Nov 17, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: stm32: Introduce DH STM32MP13x target

Split the DH STM32MP13x based boards from ST STM32MP13x target, this way the DH board specific code can be reused for STM32MP13x DHSOM.

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm/mach-stm32mp/Kconfig.13x        | 12 ++++++++++
 board/dhelectronics/dh_stm32mp1/Kconfig  | 23 +++++++++++++++++++
 board/dhelectronics/dh_stm32mp1/Makefile |  3 ++-
 board/dhelectronics/dh_stm32mp1/board.c  | 28 ++++++++++++++++++++++++
 configs/stm32mp13_dhcor_defconfig        |  2 +-
 5 files changed, 66 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/Kconfig.13x +12 -0
index 6a45c4e4132..e9697e34f95 100644
@@ -17,6 +17,17 @@ config TARGET_ST_STM32MP13X
 		managed by board/st/stm32mp1.
 		The difference between board are managed with devicetree
 
+config TARGET_DH_STM32MP13X
+	bool "DH electronics STM32MP13x boards"
+	imply BOOTSTAGE
+	imply CMD_BOOTSTAGE
+	imply CMD_CLS if CMD_BMP
+	imply DISABLE_CONSOLE
+	imply PRE_CONSOLE_BUFFER
+	imply SILENT_CONSOLE
+	help
+		Target the DH DHSBC development kit with STM32MP13x SoM.
+
 endchoice
 
 config TEXT_BASE
@@ -50,6 +61,7 @@ config DEBUG_UART_CLOCK
 	default 64000000
 endif
 
+source "board/dhelectronics/dh_stm32mp1/Kconfig"
 source "board/st/stm32mp1/Kconfig"
 
 endif
board/dhelectronics/dh_stm32mp1/Kconfig +23 -0
index dc707c2753f..05cb97b61e6 100644
@@ -20,3 +20,26 @@ config ENV_OFFSET_REDUND
 
 source "board/st/common/Kconfig"
 endif
+
+if TARGET_DH_STM32MP13X
+
+config SYS_BOARD
+	default "dh_stm32mp1"
+
+config SYS_VENDOR
+	default "dhelectronics"
+
+config SYS_CONFIG_NAME
+	default "stm32mp13_st_common"
+
+config ENV_SECT_SIZE
+	default 0x10000 if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET
+	default 0x3E0000 if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET_REDUND
+	default 0x3F0000 if ENV_IS_IN_SPI_FLASH
+
+source "board/st/common/Kconfig"
+endif
board/dhelectronics/dh_stm32mp1/Makefile +2 -1
index 30db1dee807..ffd221ac224 100644
@@ -3,6 +3,7 @@
 # Copyright (C) 2018, STMicroelectronics - All Rights Reserved
 #
 
-obj-y += ../../st/common/stpmic1.o board.o
+obj-$(CONFIG_PMIC_STPMIC1) += ../../st/common/stpmic1.o
+obj-y += board.o
 
 obj-$(CONFIG_SET_DFU_ALT_INFO) += ../../st/common/stm32mp_dfu.o
board/dhelectronics/dh_stm32mp1/board.c +28 -0
index d98b2c6e809..a9b1a0f2c34 100644
@@ -692,6 +692,34 @@ void board_quiesce_devices(void)
 #endif
 }
 
+#ifdef CONFIG_TARGET_DH_STM32MP13X
+enum env_location env_get_location(enum env_operation op, int prio)
+{
+	u32 bootmode = get_bootmode();
+
+	if (prio)
+		return ENVL_UNKNOWN;
+
+	switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
+	case BOOT_FLASH_SD:
+	case BOOT_FLASH_EMMC:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
+			return ENVL_MMC;
+		else
+			return ENVL_NOWHERE;
+
+	case BOOT_FLASH_NOR:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+			return ENVL_SPI_FLASH;
+		else
+			return ENVL_NOWHERE;
+
+	default:
+		return ENVL_NOWHERE;
+	}
+}
+#endif
+
 static void dh_stm32_ks8851_fixup(void *blob)
 {
 	struct gpio_desc ks8851intrn;
configs/stm32mp13_dhcor_defconfig +1 -1
index c21416459e6..f751deb801f 100644
@@ -8,7 +8,7 @@ CONFIG_ENV_OFFSET=0x3E0000
 CONFIG_DEFAULT_DEVICE_TREE="st/stm32mp135f-dhcor-dhsbc"
 CONFIG_STM32MP13X=y
 CONFIG_DDR_CACHEABLE_SIZE=0x8000000
-CONFIG_TARGET_ST_STM32MP13X=y
+CONFIG_TARGET_DH_STM32MP13X=y
 CONFIG_ENV_OFFSET_REDUND=0x3F0000
 CONFIG_STM32MP15_PWR=y
 CONFIG_ARMV7_NONSEC=y
Signature · 1 line
2.51.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 138 lines · Marek Vasut

Split the DH STM32MP13x based boards from ST STM32MP13x target, this way the DH board specific code can be reused for STM32MP13x DHSOM.

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm/mach-stm32mp/Kconfig.13x        | 12 ++++++++++
 board/dhelectronics/dh_stm32mp1/Kconfig  | 23 +++++++++++++++++++
 board/dhelectronics/dh_stm32mp1/Makefile |  3 ++-
 board/dhelectronics/dh_stm32mp1/board.c  | 28 ++++++++++++++++++++++++
 configs/stm32mp13_dhcor_defconfig        |  2 +-
 5 files changed, 66 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/Kconfig.13x +12 -0
index 6a45c4e4132..e9697e34f95 100644
@@ -17,6 +17,17 @@ config TARGET_ST_STM32MP13X
 		managed by board/st/stm32mp1.
 		The difference between board are managed with devicetree
 
+config TARGET_DH_STM32MP13X
+	bool "DH electronics STM32MP13x boards"
+	imply BOOTSTAGE
+	imply CMD_BOOTSTAGE
+	imply CMD_CLS if CMD_BMP
+	imply DISABLE_CONSOLE
+	imply PRE_CONSOLE_BUFFER
+	imply SILENT_CONSOLE
+	help
+		Target the DH DHSBC development kit with STM32MP13x SoM.
+
 endchoice
 
 config TEXT_BASE
@@ -50,6 +61,7 @@ config DEBUG_UART_CLOCK
 	default 64000000
 endif
 
+source "board/dhelectronics/dh_stm32mp1/Kconfig"
 source "board/st/stm32mp1/Kconfig"
 
 endif
board/dhelectronics/dh_stm32mp1/Kconfig +23 -0
index dc707c2753f..05cb97b61e6 100644
@@ -20,3 +20,26 @@ config ENV_OFFSET_REDUND
 
 source "board/st/common/Kconfig"
 endif
+
+if TARGET_DH_STM32MP13X
+
+config SYS_BOARD
+	default "dh_stm32mp1"
+
+config SYS_VENDOR
+	default "dhelectronics"
+
+config SYS_CONFIG_NAME
+	default "stm32mp13_st_common"
+
+config ENV_SECT_SIZE
+	default 0x10000 if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET
+	default 0x3E0000 if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET_REDUND
+	default 0x3F0000 if ENV_IS_IN_SPI_FLASH
+
+source "board/st/common/Kconfig"
+endif
board/dhelectronics/dh_stm32mp1/Makefile +2 -1
index 30db1dee807..ffd221ac224 100644
@@ -3,6 +3,7 @@
 # Copyright (C) 2018, STMicroelectronics - All Rights Reserved
 #
 
-obj-y += ../../st/common/stpmic1.o board.o
+obj-$(CONFIG_PMIC_STPMIC1) += ../../st/common/stpmic1.o
+obj-y += board.o
 
 obj-$(CONFIG_SET_DFU_ALT_INFO) += ../../st/common/stm32mp_dfu.o
board/dhelectronics/dh_stm32mp1/board.c +28 -0
index d98b2c6e809..a9b1a0f2c34 100644
@@ -692,6 +692,34 @@ void board_quiesce_devices(void)
 #endif
 }
 
+#ifdef CONFIG_TARGET_DH_STM32MP13X
+enum env_location env_get_location(enum env_operation op, int prio)
+{
+	u32 bootmode = get_bootmode();
+
+	if (prio)
+		return ENVL_UNKNOWN;
+
+	switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
+	case BOOT_FLASH_SD:
+	case BOOT_FLASH_EMMC:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
+			return ENVL_MMC;
+		else
+			return ENVL_NOWHERE;
+
+	case BOOT_FLASH_NOR:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+			return ENVL_SPI_FLASH;
+		else
+			return ENVL_NOWHERE;
+
+	default:
+		return ENVL_NOWHERE;
+	}
+}
+#endif
+
 static void dh_stm32_ks8851_fixup(void *blob)
 {
 	struct gpio_desc ks8851intrn;
configs/stm32mp13_dhcor_defconfig +0 -0
index c21416459e6..f751deb801f 100644

configs/stm32mp13_dhcor_defconfig CONFIG_ENV_OFFSET=0x3E0000 · line 14

Quoted 8 lines
configs/stm32mp13_dhcor_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_ENV_OFFSET=0x3E0000
 CONFIG_DEFAULT_DEVICE_TREE="st/stm32mp135f-dhcor-dhsbc"
 CONFIG_STM32MP13X=y
 CONFIG_DDR_CACHEABLE_SIZE=0x8000000
-CONFIG_TARGET_ST_STM32MP13X=y
+CONFIG_TARGET_DH_STM32MP13X=y
 CONFIG_ENV_OFFSET_REDUND=0x3F0000
 CONFIG_STM32MP15_PWR=y
 CONFIG_ARMV7_NONSEC=y

Hi

Thanks
Patrice

#2 lore raw
Quoted 152 lines · Patrice CHOTARD
Quoted 138 lines · Marek Vasut

Split the DH STM32MP13x based boards from ST STM32MP13x target, this way the DH board specific code can be reused for STM32MP13x DHSOM.

---
Cc: Patrice Chotard <[email protected]>
Cc: Patrick Delaunay <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 arch/arm/mach-stm32mp/Kconfig.13x        | 12 ++++++++++
 board/dhelectronics/dh_stm32mp1/Kconfig  | 23 +++++++++++++++++++
 board/dhelectronics/dh_stm32mp1/Makefile |  3 ++-
 board/dhelectronics/dh_stm32mp1/board.c  | 28 ++++++++++++++++++++++++
 configs/stm32mp13_dhcor_defconfig        |  2 +-
 5 files changed, 66 insertions(+), 2 deletions(-)
arch/arm/mach-stm32mp/Kconfig.13x +12 -0
index 6a45c4e4132..e9697e34f95 100644
@@ -17,6 +17,17 @@ config TARGET_ST_STM32MP13X
 		managed by board/st/stm32mp1.
 		The difference between board are managed with devicetree
 
+config TARGET_DH_STM32MP13X
+	bool "DH electronics STM32MP13x boards"
+	imply BOOTSTAGE
+	imply CMD_BOOTSTAGE
+	imply CMD_CLS if CMD_BMP
+	imply DISABLE_CONSOLE
+	imply PRE_CONSOLE_BUFFER
+	imply SILENT_CONSOLE
+	help
+		Target the DH DHSBC development kit with STM32MP13x SoM.
+
 endchoice
 
 config TEXT_BASE
@@ -50,6 +61,7 @@ config DEBUG_UART_CLOCK
 	default 64000000
 endif
 
+source "board/dhelectronics/dh_stm32mp1/Kconfig"
 source "board/st/stm32mp1/Kconfig"
 
 endif
board/dhelectronics/dh_stm32mp1/Kconfig +23 -0
index dc707c2753f..05cb97b61e6 100644
@@ -20,3 +20,26 @@ config ENV_OFFSET_REDUND
 
 source "board/st/common/Kconfig"
 endif
+
+if TARGET_DH_STM32MP13X
+
+config SYS_BOARD
+	default "dh_stm32mp1"
+
+config SYS_VENDOR
+	default "dhelectronics"
+
+config SYS_CONFIG_NAME
+	default "stm32mp13_st_common"
+
+config ENV_SECT_SIZE
+	default 0x10000 if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET
+	default 0x3E0000 if ENV_IS_IN_SPI_FLASH
+
+config ENV_OFFSET_REDUND
+	default 0x3F0000 if ENV_IS_IN_SPI_FLASH
+
+source "board/st/common/Kconfig"
+endif
board/dhelectronics/dh_stm32mp1/Makefile +2 -1
index 30db1dee807..ffd221ac224 100644
@@ -3,6 +3,7 @@
 # Copyright (C) 2018, STMicroelectronics - All Rights Reserved
 #
 
-obj-y += ../../st/common/stpmic1.o board.o
+obj-$(CONFIG_PMIC_STPMIC1) += ../../st/common/stpmic1.o
+obj-y += board.o
 
 obj-$(CONFIG_SET_DFU_ALT_INFO) += ../../st/common/stm32mp_dfu.o
board/dhelectronics/dh_stm32mp1/board.c +28 -0
index d98b2c6e809..a9b1a0f2c34 100644
@@ -692,6 +692,34 @@ void board_quiesce_devices(void)
 #endif
 }
 
+#ifdef CONFIG_TARGET_DH_STM32MP13X
+enum env_location env_get_location(enum env_operation op, int prio)
+{
+	u32 bootmode = get_bootmode();
+
+	if (prio)
+		return ENVL_UNKNOWN;
+
+	switch (bootmode & TAMP_BOOT_DEVICE_MASK) {
+	case BOOT_FLASH_SD:
+	case BOOT_FLASH_EMMC:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_MMC))
+			return ENVL_MMC;
+		else
+			return ENVL_NOWHERE;
+
+	case BOOT_FLASH_NOR:
+		if (CONFIG_IS_ENABLED(ENV_IS_IN_SPI_FLASH))
+			return ENVL_SPI_FLASH;
+		else
+			return ENVL_NOWHERE;
+
+	default:
+		return ENVL_NOWHERE;
+	}
+}
+#endif
+
 static void dh_stm32_ks8851_fixup(void *blob)
 {
 	struct gpio_desc ks8851intrn;
configs/stm32mp13_dhcor_defconfig +0 -0
index c21416459e6..f751deb801f 100644

configs/stm32mp13_dhcor_defconfig CONFIG_ENV_OFFSET=0x3E0000 · line 14

Quoted 8 lines
configs/stm32mp13_dhcor_defconfig +1 -1
@@ -8,7 +8,7 @@ CONFIG_ENV_OFFSET=0x3E0000
 CONFIG_DEFAULT_DEVICE_TREE="st/stm32mp135f-dhcor-dhsbc"
 CONFIG_STM32MP13X=y
 CONFIG_DDR_CACHEABLE_SIZE=0x8000000
-CONFIG_TARGET_ST_STM32MP13X=y
+CONFIG_TARGET_DH_STM32MP13X=y
 CONFIG_ENV_OFFSET_REDUND=0x3F0000
 CONFIG_STM32MP15_PWR=y
 CONFIG_ARMV7_NONSEC=y

Hi

Quoted 4 lines

Thanks
Patrice

Applied to u-boot-stm32/master

Thanks
Patrice