diff mbox series

[03/13] board: phytec: common: k3: Copy fixed partitions to OS device tree

Message ID 20240610133352.2473414-4-w.egorov@phytec.de
State Accepted
Commit e9c4448f809e1f48701c25711ef926bbeb7addc5
Delegated to: Tom Rini
Headers show
Series *** Various fixes & improvements for phycore-AM6* SoMs *** | expand

Commit Message

Wadim Egorov June 10, 2024, 1:33 p.m. UTC
Copy fixed-partitions nodes from U-Boot device tree to OS device tree.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
---
 board/phytec/common/k3/board.c      | 10 ++++++++++
 configs/phycore_am62x_a53_defconfig |  1 +
 2 files changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/board/phytec/common/k3/board.c b/board/phytec/common/k3/board.c
index f21e154d4fe..3d7e090ccaa 100644
--- a/board/phytec/common/k3/board.c
+++ b/board/phytec/common/k3/board.c
@@ -5,6 +5,7 @@ 
  */
 
 #include <env_internal.h>
+#include <fdt_support.h>
 #include <spl.h>
 #include <asm/arch/hardware.h>
 
@@ -94,3 +95,12 @@  int board_late_init(void)
 	return 0;
 }
 #endif
+
+#if IS_ENABLED(CONFIG_OF_LIBFDT) && IS_ENABLED(CONFIG_OF_BOARD_SETUP)
+int ft_board_setup(void *blob, struct bd_info *bd)
+{
+	fdt_copy_fixed_partitions(blob);
+
+	return 0;
+}
+#endif
diff --git a/configs/phycore_am62x_a53_defconfig b/configs/phycore_am62x_a53_defconfig
index 7545bf2ea73..44f6e77b626 100644
--- a/configs/phycore_am62x_a53_defconfig
+++ b/configs/phycore_am62x_a53_defconfig
@@ -36,6 +36,7 @@  CONFIG_SPL_LOAD_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000
 CONFIG_BOOTSTD_FULL=y
 CONFIG_SYS_BOOTM_LEN=0x800000
+CONFIG_OF_BOARD_SETUP=y
 CONFIG_BOOTCOMMAND="run mmcboot; bootflow scan -lb"
 CONFIG_DEFAULT_FDT_FILE="oftree"
 CONFIG_BOARD_LATE_INIT=y